Skip to main content

byoip_cidrs

Creates, updates, deletes, gets or lists a byoip_cidrs resource.

Overview

Namebyoip_cidrs
TypeResource
Idaws.ec2.byoip_cidrs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
advertisement_typestringSpecifies the advertisement method for the BYOIP CIDR. Valid values are: unicast: IP is advertised from a single location (regional services like EC2) anycast: IP is advertised from multiple global locations simultaneously (global services like CloudFront) For more information, see Bring your own IP to CloudFront using IPAM in the Amazon VPC IPAM User Guide.
asn_associationsstringThe BYOIP CIDR associations with ASNs.
cidrstringThe address range, in CIDR notation.
descriptionstringThe description of the address range.
ipam_pool_idstringThe ID of the IPAM pool associated with the CIDR.
network_border_groupstringIf you have Local Zones enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group. You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups: us-east-1-dfw-2 us-west-2-lax-1 us-west-2-phx-2 You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this time.
pool_idstringThe ID of the address pool associated with the CIDR.
statestringThe state of the address range. advertised: The address range is being advertised to the internet by Amazon Web Services. deprovisioned: The address range is deprovisioned. failed-deprovision: The request to deprovision the address range was unsuccessful. Ensure that all EIPs from the range have been deallocated and try again. failed-provision: The request to provision the address range was unsuccessful. pending-deprovision: You’ve submitted a request to deprovision an address range and it's pending. pending-provision: You’ve submitted a request to provision an address range and it's pending. provisioned: The address range is provisioned and can be advertised. The range is not currently advertised. provisioned-not-publicly-advertisable: The address range is provisioned and cannot be advertised.
status_messagestringUpon success, contains the ID of the address pool. Otherwise, contains an error message.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_byoip_cidrsselectMaxResults, regionDryRun, NextTokenDescribes the IP address ranges that were provisioned for use with Amazon Web Services resources through through bring your own IP addresses (BYOIP).
advertise_byoip_cidrupdateregionCidr, Asn, DryRun, NetworkBorderGroupAdvertises an IPv4 or IPv6 address range that is provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP). You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time. We recommend that you stop advertising the BYOIP CIDR from other locations when you advertise it from Amazon Web Services. To minimize down time, you can configure your Amazon Web Services resources to use an address from a BYOIP CIDR before it is advertised, and then simultaneously stop advertising it from the current location and start advertising it through Amazon Web Services. It can take a few minutes before traffic to the specified addresses starts routing to Amazon Web Services because of BGP propagation delays.
deprovision_byoip_cidrexecregionCidr, DryRunReleases the specified address range that you provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and deletes the corresponding address pool. Before you can release an address range, you must stop advertising it and you must not have any IP addresses allocated from its address range.
move_byoip_cidr_to_ipamexecIpamPoolId, IpamPoolOwner, regionDryRun, CidrMove a BYOIPv4 CIDR to IPAM from a public IPv4 pool. If you already have a BYOIPv4 CIDR with Amazon Web Services, you can move the CIDR to IPAM from a public IPv4 pool. You cannot move an IPv6 CIDR to IPAM. If you are bringing a new IP address to Amazon Web Services for the first time, complete the steps in Tutorial: BYOIP address CIDRs to IPAM.
provision_byoip_cidrexecregionCidr, CidrAuthorizationContext, PubliclyAdvertisable, Description, DryRun, PoolTagSpecification, MultiRegion, NetworkBorderGroupProvisions an IPv4 or IPv6 address range for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and creates a corresponding address pool. After the address range is provisioned, it is ready to be advertised. Amazon Web Services verifies that you own the address range and are authorized to advertise it. You must ensure that the address range is registered to you and that you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise the address range. For the Amazon Web Services GovCloud (US) Regions, authorize only ASN 8987. For the Amazon Web Services European Sovereign Cloud, authorize ASNs 16509 and 214101. For more information, see Bring your own IP addresses (BYOIP) in the Amazon EC2 User Guide. Provisioning an address range is an asynchronous operation, so the call returns immediately, but the address range is not ready to use until its status changes from pending-provision to provisioned. For more information, see Onboard your address range.
withdraw_byoip_cidrexecregionCidr, DryRunStops advertising an address range that is provisioned as an address pool. You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time. It can take a few minutes before traffic to the specified addresses stops routing to Amazon Web Services because of BGP propagation delays.

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
IpamPoolIdstringThe IPAM pool ID.
IpamPoolOwnerstringThe Amazon Web Services account ID of the owner of the IPAM pool.
MaxResultsintegerThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
regionstringAWS region (default: us-east-1)
AsnstringThe public 2-byte or 4-byte ASN that you want to advertise.
CidrstringThe address range, in CIDR notation.
CidrAuthorizationContextobjectA signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.
DescriptionstringA description for the address range and the address pool.
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.
MultiRegionbooleanReserved.
NetworkBorderGroupstringIf you have Local Zones enabled, you can choose a network border group for Local Zones when you provision and advertise a BYOIPv4 CIDR. Choose the network border group carefully as the EIP and the Amazon Web Services resource it is associated with must reside in the same network border group. You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups: us-east-1-dfw-2 us-west-2-lax-1 us-west-2-phx-2 You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this time.
NextTokenstringThe token for the next page of results.
PoolTagSpecificationarrayThe tags to apply to the address pool.
PubliclyAdvertisableboolean(IPv6 only) Indicate whether the address range will be publicly advertised to the internet. Default: true

SELECT examples

Describes the IP address ranges that were provisioned for use with Amazon Web Services resources through through bring your own IP addresses (BYOIP).

SELECT
advertisement_type,
asn_associations,
cidr,
description,
ipam_pool_id,
network_border_group,
pool_id,
state,
status_message
FROM aws.ec2.byoip_cidrs
WHERE MaxResults = '{{ MaxResults }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND NextToken = '{{ NextToken }}'
;

UPDATE examples

Advertises an IPv4 or IPv6 address range that is provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP). You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time. We recommend that you stop advertising the BYOIP CIDR from other locations when you advertise it from Amazon Web Services. To minimize down time, you can configure your Amazon Web Services resources to use an address from a BYOIP CIDR before it is advertised, and then simultaneously stop advertising it from the current location and start advertising it through Amazon Web Services. It can take a few minutes before traffic to the specified addresses starts routing to Amazon Web Services because of BGP propagation delays.

UPDATE aws.ec2.byoip_cidrs
SET
-- No updatable properties
WHERE
region = '{{ region }}' --required
AND Cidr = '{{ Cidr}}'
AND Asn = '{{ Asn}}'
AND DryRun = {{ DryRun}}
AND NetworkBorderGroup = '{{ NetworkBorderGroup}}'
RETURNING
advertisement_type,
asn_associations,
cidr,
description,
ipam_pool_id,
network_border_group,
pool_id,
state,
status_message;

Lifecycle Methods

Releases the specified address range that you provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and deletes the corresponding address pool. Before you can release an address range, you must stop advertising it and you must not have any IP addresses allocated from its address range.

EXEC aws.ec2.byoip_cidrs.deprovision_byoip_cidr
@region='{{ region }}' --required,
@Cidr='{{ Cidr }}',
@DryRun={{ DryRun }}
;