EC2 / Client / disassociate_vpc_cidr_block

disassociate_vpc_cidr_block#

EC2.Client.disassociate_vpc_cidr_block(**kwargs)#

Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must specify its association ID. You can get the association ID by using DescribeVpcs. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.

You cannot disassociate the CIDR block with which you originally created the VPC (the primary CIDR block).

See also: AWS API Documentation

Request Syntax

response = client.disassociate_vpc_cidr_block(
    AssociationId='string'
)
Parameters:

AssociationId (string) –

[REQUIRED]

The association ID for the CIDR block.

Return type:

dict

Returns:

Response Syntax

{
    'Ipv6CidrBlockAssociation': {
        'AssociationId': 'string',
        'Ipv6CidrBlock': 'string',
        'Ipv6CidrBlockState': {
            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
            'StatusMessage': 'string'
        },
        'NetworkBorderGroup': 'string',
        'Ipv6Pool': 'string',
        'Ipv6AddressAttribute': 'public'|'private',
        'IpSource': 'amazon'|'byoip'|'none'
    },
    'CidrBlockAssociation': {
        'AssociationId': 'string',
        'CidrBlock': 'string',
        'CidrBlockState': {
            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
            'StatusMessage': 'string'
        }
    },
    'VpcId': 'string'
}

Response Structure

  • (dict) –

    • Ipv6CidrBlockAssociation (dict) –

      Information about the IPv6 CIDR block association.

      • AssociationId (string) –

        The association ID for the IPv6 CIDR block.

      • Ipv6CidrBlock (string) –

        The IPv6 CIDR block.

      • Ipv6CidrBlockState (dict) –

        Information about the state of the CIDR block.

        • State (string) –

          The state of the CIDR block.

        • StatusMessage (string) –

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

      • NetworkBorderGroup (string) –

        The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1.

      • Ipv6Pool (string) –

        The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

      • 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.

    • CidrBlockAssociation (dict) –

      Information about the IPv4 CIDR block association.

      • AssociationId (string) –

        The association ID for the IPv4 CIDR block.

      • CidrBlock (string) –

        The IPv4 CIDR block.

      • CidrBlockState (dict) –

        Information about the state of the CIDR block.

        • State (string) –

          The state of the CIDR block.

        • StatusMessage (string) –

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

    • VpcId (string) –

      The ID of the VPC.