provision_byoip_cidr(
*,
config_overrides: Optional[EC2ClientConfig] = None,
cidr: Optional[String] = None,
cidr_authorization_context: Optional[CidrAuthorizationContext] = None,
publicly_advertisable: Optional[Boolean] = None,
description: Optional[String] = None,
dry_run: Optional[Boolean] = None,
pool_tag_specifications: Optional[TagSpecificationList] = None,
multi_region: Optional[Boolean] = None,
network_border_group: Optional[String] = None,
) -> ProvisionByoipCidrResult
Provisions 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.
Parameters:
-
cidr
(Optional[String], default:
None
)
–
The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 prefix that you can specify is /24. The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /56 for CIDRs that are not publicly advertisable. The address range cannot overlap with another address range that you've brought to this or another Region.
-
cidr_authorization_context
(Optional[CidrAuthorizationContext], default:
None
)
–
A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.
-
publicly_advertisable
(Optional[Boolean], default:
None
)
–
(IPv6 only) Indicate whether the address range will be publicly advertised to the internet.
Default: true
-
description
(Optional[String], default:
None
)
–
A description for the address range and the address pool.
-
dry_run
(Optional[Boolean], default:
None
)
–
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.
-
pool_tag_specifications
(Optional[TagSpecificationList], default:
None
)
–
The tags to apply to the address pool.
-
multi_region
(Optional[Boolean], default:
None
)
–
-
network_border_group
(Optional[String], default:
None
)
–
If 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.
Raises:
Source code in docs_src/capo_ec2/_services/ec2.py
| def provision_byoip_cidr(
self,
*,
config_overrides: Optional[EC2ClientConfig] = None,
cidr: Optional["capo_ec2.types.string.String"] = None,
cidr_authorization_context: Optional[
"capo_ec2.types.cidr_authorization_context.CidrAuthorizationContext"
] = None,
publicly_advertisable: Optional["capo_ec2.types.boolean.Boolean"] = None,
description: Optional["capo_ec2.types.string.String"] = None,
dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
pool_tag_specifications: Optional[
"capo_ec2.types.tag_specification_list.TagSpecificationList"
] = None,
multi_region: Optional["capo_ec2.types.boolean.Boolean"] = None,
network_border_group: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.provision_byoip_cidr_result.ProvisionByoipCidrResult":
"""<p>Provisions 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.</p> <p>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 <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html">Bring your own IP addresses (BYOIP)</a> in the <i>Amazon EC2 User Guide</i>.</p> <p>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 <code>pending-provision</code> to <code>provisioned</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/byoip-onboard.html">Onboard your address range</a>.</p>
Args:
cidr: <p>The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 prefix that you can specify is /24. The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /56 for CIDRs that are not publicly advertisable. The address range cannot overlap with another address range that you've brought to this or another Region.</p>
cidr_authorization_context: <p>A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.</p>
publicly_advertisable: <p>(IPv6 only) Indicate whether the address range will be publicly advertised to the internet.</p> <p>Default: true</p>
description: <p>A description for the address range and the address pool.</p>
dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pool_tag_specifications: <p>The tags to apply to the address pool.</p>
multi_region: <p>Reserved.</p>
network_border_group: <p>If you have <a href="https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html">Local Zones</a> 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.</p> <p>You can provision BYOIP address ranges to and advertise them in the following Local Zone network border groups:</p> <ul> <li> <p>us-east-1-dfw-2</p> </li> <li> <p>us-west-2-lax-1</p> </li> <li> <p>us-west-2-phx-2</p> </li> </ul> <note> <p>You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this time.</p> </note>
Raises:
capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ec2.types.provision_byoip_cidr_request.ProvisionByoipCidrRequest]",
) -> OperationResponse[
"capo_ec2.types.provision_byoip_cidr_result.ProvisionByoipCidrResult"
]:
import capo_ec2._operations.amazon_ec2.provision_byoip_cidr
output, http_response = (
capo_ec2._operations.amazon_ec2.provision_byoip_cidr.provision_byoip_cidr(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ProvisionByoipCidr")
)
input_: capo_ec2.types.provision_byoip_cidr_request.ProvisionByoipCidrRequest = {}
if cidr is not None:
input_["cidr"] = cidr
if cidr_authorization_context is not None:
input_["cidr_authorization_context"] = cidr_authorization_context
if publicly_advertisable is not None:
input_["publicly_advertisable"] = publicly_advertisable
if description is not None:
input_["description"] = description
if dry_run is not None:
input_["dry_run"] = dry_run
if pool_tag_specifications is not None:
input_["pool_tag_specifications"] = pool_tag_specifications
if multi_region is not None:
input_["multi_region"] = multi_region
if network_border_group is not None:
input_["network_border_group"] = network_border_group
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|