provisionByoipCidr method

Future<ProvisionByoipCidrResponse> provisionByoipCidr({
  1. required String cidr,
  2. required CidrAuthorizationContext cidrAuthorizationContext,
})

Provisions an IP address range to 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 using AdvertiseByoipCidr.

For more information, see Bring your own IP addresses (BYOIP) in the Global Accelerator Developer Guide.

May throw AccessDeniedException. May throw IncorrectCidrStateException. May throw InternalServiceErrorException. May throw InvalidArgumentException. May throw LimitExceededException.

Parameter cidr : The public IPv4 address range, in CIDR notation. The most specific IP prefix that you can specify is /24. The address range cannot overlap with another address range that you've brought to this Amazon Web Services Region or another Region.

For more information, see Bring your own IP addresses (BYOIP) in the Global Accelerator Developer Guide.

Parameter cidrAuthorizationContext : A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.

Implementation

Future<ProvisionByoipCidrResponse> provisionByoipCidr({
  required String cidr,
  required CidrAuthorizationContext cidrAuthorizationContext,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GlobalAccelerator_V20180706.ProvisionByoipCidr'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Cidr': cidr,
      'CidrAuthorizationContext': cidrAuthorizationContext,
    },
  );

  return ProvisionByoipCidrResponse.fromJson(jsonResponse.body);
}