:doc:`EVS <../../evs>` / Client / associate_eip_to_vlan

*********************
associate_eip_to_vlan
*********************



.. py:method:: EVS.Client.associate_eip_to_vlan(**kwargs)

  

  Associates an Elastic IP address with a public HCX VLAN. This operation is only allowed for public HCX VLANs at this time.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/evs-2023-07-27/AssociateEipToVlan>`_  


  **Request Syntax**
  ::

    response = client.associate_eip_to_vlan(
        clientToken='string',
        environmentId='string',
        vlanName='string',
        allocationId='string'
    )
    
  :type clientToken: string
  :param clientToken: 

    

    .. note::

      

      This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.

      

     

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the environment creation request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

    

    This field is autopopulated if not provided.

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

    A unique ID for the environment containing the VLAN that the Elastic IP address associates with.

    

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

    The name of the VLAN. ``hcx`` is the only accepted VLAN name at this time.

    

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

    The Elastic IP address allocation ID.

    

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

    
    ::

      {
          'vlan': {
              'vlanId': 123,
              'cidr': 'string',
              'availabilityZone': 'string',
              'functionName': 'string',
              'subnetId': 'string',
              'createdAt': datetime(2015, 1, 1),
              'modifiedAt': datetime(2015, 1, 1),
              'vlanState': 'CREATING'|'CREATED'|'DELETING'|'DELETED'|'CREATE_FAILED',
              'stateDetails': 'string',
              'eipAssociations': [
                  {
                      'associationId': 'string',
                      'allocationId': 'string',
                      'ipAddress': 'string'
                  },
              ],
              'isPublic': True|False,
              'networkAclId': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **vlan** *(dict) --* 

        The VLANs that Amazon EVS creates during environment creation.

        
        

        - **vlanId** *(integer) --* 

          The unique ID of the VLAN.

          
        

        - **cidr** *(string) --* 

          The CIDR block of the VLAN. Amazon EVS VLAN subnets have a minimum CIDR block size of /28 and a maximum size of /24.

          
        

        - **availabilityZone** *(string) --* 

          The availability zone of the VLAN.

          
        

        - **functionName** *(string) --* 

          The VMware VCF traffic type that is carried over the VLAN. For example, a VLAN with a ``functionName`` of ``hcx`` is being used to carry VMware HCX traffic.

          
        

        - **subnetId** *(string) --* 

          The unique ID of the VLAN subnet.

          
        

        - **createdAt** *(datetime) --* 

          The date and time that the VLAN was created.

          
        

        - **modifiedAt** *(datetime) --* 

          The date and time that the VLAN was modified.

          
        

        - **vlanState** *(string) --* 

          The state of the VLAN.

          
        

        - **stateDetails** *(string) --* 

          The state details of the VLAN.

          
        

        - **eipAssociations** *(list) --* 

          An array of Elastic IP address associations.

          
          

          - *(dict) --* 

            An Elastic IP address association with the elastic network interface in the VLAN subnet.

            
            

            - **associationId** *(string) --* 

              A unique ID for the elastic IP address association with the VLAN subnet.

              
            

            - **allocationId** *(string) --* 

              The Elastic IP address allocation ID.

              
            

            - **ipAddress** *(string) --* 

              The Elastic IP address.

              
        
      
        

        - **isPublic** *(boolean) --* 

          Determines if the VLAN that Amazon EVS provisions is public or private.

          
        

        - **networkAclId** *(string) --* 

          A unique ID for a network access control list.

          
    
  
  **Exceptions**
  
  *   :py:class:`EVS.Client.exceptions.ThrottlingException`

  
  *   :py:class:`EVS.Client.exceptions.ValidationException`

  
  *   :py:class:`EVS.Client.exceptions.ResourceNotFoundException`

  