:doc:`KinesisAnalyticsV2 <../../kinesisanalyticsv2>` / Client / add_application_vpc_configuration

*********************************
add_application_vpc_configuration
*********************************



.. py:method:: KinesisAnalyticsV2.Client.add_application_vpc_configuration(**kwargs)

  

  Adds a Virtual Private Cloud (VPC) configuration to the application. Applications can use VPCs to store and access resources securely.

   

  Note the following about VPC configurations for Managed Service for Apache Flink applications:

   

  
  * VPC configurations are not supported for SQL applications.
   
  * When a VPC is added to a Managed Service for Apache Flink application, the application can no longer be accessed from the Internet directly. To enable Internet access to the application, add an Internet gateway to your VPC.
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kinesisanalyticsv2-2018-05-23/AddApplicationVpcConfiguration>`_  


  **Request Syntax**
  ::

    response = client.add_application_vpc_configuration(
        ApplicationName='string',
        CurrentApplicationVersionId=123,
        VpcConfiguration={
            'SubnetIds': [
                'string',
            ],
            'SecurityGroupIds': [
                'string',
            ]
        },
        ConditionalToken='string'
    )
    
  :type ApplicationName: string
  :param ApplicationName: **[REQUIRED]** 

    The name of an existing application.

    

  
  :type CurrentApplicationVersionId: integer
  :param CurrentApplicationVersionId: 

    The version of the application to which you want to add the VPC configuration. You must provide the ``CurrentApplicationVersionId`` or the ``ConditionalToken``. You can use the  DescribeApplication operation to get the current application version. If the version specified is not the current version, the ``ConcurrentModificationException`` is returned. For better concurrency support, use the ``ConditionalToken`` parameter instead of ``CurrentApplicationVersionId``.

    

  
  :type VpcConfiguration: dict
  :param VpcConfiguration: **[REQUIRED]** 

    Description of the VPC to add to the application.

    

  
    - **SubnetIds** *(list) --* **[REQUIRED]** 

      The array of `Subnet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Subnet.html>`__ IDs used by the VPC configuration.

      

    
      - *(string) --* 

      
  
    - **SecurityGroupIds** *(list) --* **[REQUIRED]** 

      The array of `SecurityGroup <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SecurityGroup.html>`__ IDs used by the VPC configuration.

      

    
      - *(string) --* 

      
  
  
  :type ConditionalToken: string
  :param ConditionalToken: 

    A value you use to implement strong concurrency for application updates. You must provide the ``ApplicationVersionID`` or the ``ConditionalToken``. You get the application's current ``ConditionalToken`` using  DescribeApplication. For better concurrency support, use the ``ConditionalToken`` parameter instead of ``CurrentApplicationVersionId``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ApplicationARN': 'string',
          'ApplicationVersionId': 123,
          'VpcConfigurationDescription': {
              'VpcConfigurationId': 'string',
              'VpcId': 'string',
              'SubnetIds': [
                  'string',
              ],
              'SecurityGroupIds': [
                  'string',
              ]
          },
          'OperationId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ApplicationARN** *(string) --* 

        The ARN of the application.

        
      

      - **ApplicationVersionId** *(integer) --* 

        Provides the current application version. Managed Service for Apache Flink updates the ApplicationVersionId each time you update the application.

        
      

      - **VpcConfigurationDescription** *(dict) --* 

        The parameters of the new VPC configuration.

        
        

        - **VpcConfigurationId** *(string) --* 

          The ID of the VPC configuration.

          
        

        - **VpcId** *(string) --* 

          The ID of the associated VPC.

          
        

        - **SubnetIds** *(list) --* 

          The array of `Subnet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Subnet.html>`__ IDs used by the VPC configuration.

          
          

          - *(string) --* 
      
        

        - **SecurityGroupIds** *(list) --* 

          The array of `SecurityGroup <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SecurityGroup.html>`__ IDs used by the VPC configuration.

          
          

          - *(string) --* 
      
    
      

      - **OperationId** *(string) --* 

        The operation ID that can be used to track the request.

        
  
  **Exceptions**
  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.ResourceInUseException`

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.ConcurrentModificationException`

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.InvalidApplicationConfigurationException`

  