:doc:`EC2 <../../ec2>` / Client / apply_security_groups_to_client_vpn_target_network

**************************************************
apply_security_groups_to_client_vpn_target_network
**************************************************



.. py:method:: EC2.Client.apply_security_groups_to_client_vpn_target_network(**kwargs)

  

  Applies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing security groups with the specified security groups.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ApplySecurityGroupsToClientVpnTargetNetwork>`_  


  **Request Syntax**
  ::

    response = client.apply_security_groups_to_client_vpn_target_network(
        ClientVpnEndpointId='string',
        VpcId='string',
        SecurityGroupIds=[
            'string',
        ],
        DryRun=True|False
    )
    
  :type ClientVpnEndpointId: string
  :param ClientVpnEndpointId: **[REQUIRED]** 

    The ID of the Client VPN endpoint.

    

  
  :type VpcId: string
  :param VpcId: **[REQUIRED]** 

    The ID of the VPC in which the associated target network is located.

    

  
  :type SecurityGroupIds: list
  :param SecurityGroupIds: **[REQUIRED]** 

    The IDs of the security groups to apply to the associated target network. Up to 5 security groups can be applied to an associated target network.

    

  
    - *(string) --* 

    

  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

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

    
    ::

      {
          'SecurityGroupIds': [
              'string',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The IDs of the applied security groups.

        
        

        - *(string) --* 
    
  