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

***************************
associate_subnet_cidr_block
***************************



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

  

  Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet.

  

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


  **Request Syntax**
  ::

    response = client.associate_subnet_cidr_block(
        Ipv6IpamPoolId='string',
        Ipv6NetmaskLength=123,
        SubnetId='string',
        Ipv6CidrBlock='string'
    )
    
  :type Ipv6IpamPoolId: string
  :param Ipv6IpamPoolId: 

    An IPv6 IPAM pool ID.

    

  
  :type Ipv6NetmaskLength: integer
  :param Ipv6NetmaskLength: 

    An IPv6 netmask length.

    

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

    The ID of your subnet.

    

  
  :type Ipv6CidrBlock: string
  :param Ipv6CidrBlock: 

    The IPv6 CIDR block for your subnet.

    

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

    
    ::

      {
          'Ipv6CidrBlockAssociation': {
              'AssociationId': 'string',
              'Ipv6CidrBlock': 'string',
              'Ipv6CidrBlockState': {
                  'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                  'StatusMessage': 'string'
              },
              'Ipv6AddressAttribute': 'public'|'private',
              'IpSource': 'amazon'|'byoip'|'none'
          },
          'SubnetId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Ipv6CidrBlockAssociation** *(dict) --* 

        Information about the IPv6 association.

        
        

        - **AssociationId** *(string) --* 

          The ID of the association.

          
        

        - **Ipv6CidrBlock** *(string) --* 

          The IPv6 CIDR block.

          
        

        - **Ipv6CidrBlockState** *(dict) --* 

          The state of the CIDR block.

          
          

          - **State** *(string) --* 

            The state of a CIDR block.

            
          

          - **StatusMessage** *(string) --* 

            A message about the status of the CIDR block, if applicable.

            
      
        

        - **Ipv6AddressAttribute** *(string) --* 

          Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

          
        

        - **IpSource** *(string) --* 

          The source that allocated the IP address space. ``byoip`` or ``amazon`` indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). ``none`` indicates private space.

          
    
      

      - **SubnetId** *(string) --* 

        The ID of the subnet.

        
  