Skip to main content

ipam_byoasns

Creates, updates, deletes, gets or lists an ipam_byoasns resource.

Overview

Nameipam_byoasns
TypeResource
Idaws.ec2.ipam_byoasns

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
asnstringA public 2-byte or 4-byte ASN.
ipam_idstringAn IPAM ID.
statestringThe provisioning state of the BYOASN.
status_messagestringThe status message.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_ipam_byoasnselectregionDryRun, MaxResults, NextTokenDescribes your Autonomous System Numbers (ASNs), their provisioning statuses, and the BYOIP CIDRs with which they are associated. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.
provision_ipam_byoasnupdateIpamId, AsnAuthorizationContext, regionDryRun, AsnProvisions your Autonomous System Number (ASN) for use in your Amazon Web Services account. This action requires authorization context for Amazon to bring the ASN to an Amazon Web Services account. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.
deprovision_ipam_byoasnupdateIpamId, regionDryRun, AsnDeprovisions your Autonomous System Number (ASN) from your Amazon Web Services account. This action can only be called after any BYOIP CIDR associations are removed from your Amazon Web Services account with DisassociateIpamByoasn. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.
associate_ipam_byoasnupdateregionDryRun, Asn, CidrAssociates 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.
disassociate_ipam_byoasnexecregionDryRun, Asn, CidrRemove the association between your Autonomous System Number (ASN) and your BYOIP CIDR. You may want to use this action to disassociate an ASN from a CIDR or if you want to swap ASNs. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
AsnAuthorizationContextobjectAn ASN authorization context.
IpamIdstringThe IPAM ID.
regionstringAWS region (default: us-east-1)
AsnstringA public 2-byte or 4-byte ASN.
CidrstringA BYOIP CIDR.
DryRunbooleanChecks 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.
MaxResultsintegerThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
NextTokenstringThe token for the next page of results.

SELECT examples

Describes your Autonomous System Numbers (ASNs), their provisioning statuses, and the BYOIP CIDRs with which they are associated. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.

SELECT
asn,
ipam_id,
state,
status_message
FROM aws.ec2.ipam_byoasns
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;

UPDATE examples

Provisions your Autonomous System Number (ASN) for use in your Amazon Web Services account. This action requires authorization context for Amazon to bring the ASN to an Amazon Web Services account. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.

UPDATE aws.ec2.ipam_byoasns
SET
-- No updatable properties
WHERE
IpamId = '{{ IpamId }}' --required
AND AsnAuthorizationContext = '{{ AsnAuthorizationContext }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND Asn = '{{ Asn}}'
RETURNING
asn,
ipam_id,
state,
status_message;

Lifecycle Methods

Remove the association between your Autonomous System Number (ASN) and your BYOIP CIDR. You may want to use this action to disassociate an ASN from a CIDR or if you want to swap ASNs. For more information, see Tutorial: Bring your ASN to IPAM in the Amazon VPC IPAM guide.

EXEC aws.ec2.ipam_byoasns.disassociate_ipam_byoasn
@region='{{ region }}' --required,
@DryRun={{ DryRun }},
@Asn='{{ Asn }}',
@Cidr='{{ Cidr }}'
;