EC2 / Client / associate_ipam_byoasn

associate_ipam_byoasn#

EC2.Client.associate_ipam_byoasn(**kwargs)#

Associates your Autonomous System Number (ASN) with a BYOIP CIDR that you own in the same Amazon Web Services Region. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.

After the association succeeds, the ASN is eligible for advertisement. You can view the association with DescribeByoipCidrs. You can advertise the CIDR with AdvertiseByoipCidr.

See also: AWS API Documentation

Request Syntax

response = client.associate_ipam_byoasn(
    DryRun=True|False,
    Asn='string',
    Cidr='string'
)
Parameters:
  • DryRun (boolean) – 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.

  • Asn (string) –

    [REQUIRED]

    A public 2-byte or 4-byte ASN.

  • Cidr (string) –

    [REQUIRED]

    The BYOIP CIDR you want to associate with an ASN.

Return type:

dict

Returns:

Response Syntax

{
    'AsnAssociation': {
        'Asn': 'string',
        'Cidr': 'string',
        'StatusMessage': 'string',
        'State': 'disassociated'|'failed-disassociation'|'failed-association'|'pending-disassociation'|'pending-association'|'associated'
    }
}

Response Structure

  • (dict) –

    • AsnAssociation (dict) –

      The ASN and BYOIP CIDR association.

      • Asn (string) –

        The association’s ASN.

      • Cidr (string) –

        The association’s CIDR.

      • StatusMessage (string) –

        The association’s status message.

      • State (string) –

        The association’s state.