createCustomRoutingEndpointGroup method
Create an endpoint group for the specified listener for a custom routing accelerator. An endpoint group is a collection of endpoints in one Amazon Web Services Region.
May throw AcceleratorNotFoundException.
May throw AccessDeniedException.
May throw EndpointGroupAlreadyExistsException.
May throw InternalServiceErrorException.
May throw InvalidArgumentException.
May throw InvalidPortRangeException.
May throw LimitExceededException.
May throw ListenerNotFoundException.
Parameter destinationConfigurations :
Sets the port range and protocol for all endpoints (virtual private cloud
subnets) in a custom routing endpoint group to accept client traffic on.
Parameter endpointGroupRegion :
The Amazon Web Services Region where the endpoint group is located. A
listener can have only one endpoint group in a specific Region.
Parameter listenerArn :
The Amazon Resource Name (ARN) of the listener for a custom routing
endpoint.
Parameter idempotencyToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency—that is, the uniqueness—of the request.
Implementation
Future<CreateCustomRoutingEndpointGroupResponse>
createCustomRoutingEndpointGroup({
required List<CustomRoutingDestinationConfiguration>
destinationConfigurations,
required String endpointGroupRegion,
required String listenerArn,
String? idempotencyToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'GlobalAccelerator_V20180706.CreateCustomRoutingEndpointGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DestinationConfigurations': destinationConfigurations,
'EndpointGroupRegion': endpointGroupRegion,
'ListenerArn': listenerArn,
'IdempotencyToken': idempotencyToken ?? _s.generateIdempotencyToken(),
},
);
return CreateCustomRoutingEndpointGroupResponse.fromJson(jsonResponse.body);
}