Associate a virtual private cloud (VPC) subnet endpoint with your custom routing accelerator.
The listener port range must be large enough to support the number of IP addresses that can be specified in your subnet. The number of ports required is: subnet size times the number of ports per destination EC2 instances. For example, a subnet defined as /24 requires a listener port range of at least 255 ports.
Note: You must have enough remaining listener ports available to map to the subnet ports, or the call will fail with a LimitExceededException.
By default, all destinations in a subnet in a custom routing accelerator cannot receive traffic. To enable all destinations to receive traffic, or to specify individual port mappings that can receive traffic, see the AllowCustomRoutingTraffic operation.
Parameters:
-
endpoint_configurations
(CustomRoutingEndpointConfigurations)
–
The list of endpoint objects to add to a custom routing accelerator.
-
endpoint_group_arn
(GenericString)
–
The Amazon Resource Name (ARN) of the endpoint group for the custom routing endpoint.
Raises:
Source code in docs_src/capo_global_accelerator/_services/async_global_accelerator.py
| async def add_custom_routing_endpoints(
self,
endpoint_configurations: "capo_global_accelerator.types.custom_routing_endpoint_configurations.CustomRoutingEndpointConfigurations",
endpoint_group_arn: "capo_global_accelerator.types.generic_string.GenericString",
*,
config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = None,
) -> "capo_global_accelerator.types.add_custom_routing_endpoints_response.AddCustomRoutingEndpointsResponse":
"""<p>Associate a virtual private cloud (VPC) subnet endpoint with your custom routing accelerator.</p> <p>The listener port range must be large enough to support the number of IP addresses that can be specified in your subnet. The number of ports required is: subnet size times the number of ports per destination EC2 instances. For example, a subnet defined as /24 requires a listener port range of at least 255 ports. </p> <p>Note: You must have enough remaining listener ports available to map to the subnet ports, or the call will fail with a LimitExceededException.</p> <p>By default, all destinations in a subnet in a custom routing accelerator cannot receive traffic. To enable all destinations to receive traffic, or to specify individual port mappings that can receive traffic, see the <a href="https://docs.aws.amazon.com/global-accelerator/latest/api/API_AllowCustomRoutingTraffic.html"> AllowCustomRoutingTraffic</a> operation.</p>
Args:
endpoint_configurations: <p>The list of endpoint objects to add to a custom routing accelerator.</p>
endpoint_group_arn: <p>The Amazon Resource Name (ARN) of the endpoint group for the custom routing endpoint.</p>
Raises:
capo_global_accelerator.errors.access_denied_exception.AccessDeniedException: <p>You don't have access permission.</p>
capo_global_accelerator.errors.conflict_exception.ConflictException: <p>You can't use both of those options.</p>
capo_global_accelerator.errors.endpoint_already_exists_exception.EndpointAlreadyExistsException: <p>The endpoint that you specified doesn't exist.</p>
capo_global_accelerator.errors.endpoint_group_not_found_exception.EndpointGroupNotFoundException: <p>The endpoint group that you specified doesn't exist.</p>
capo_global_accelerator.errors.internal_service_error_exception.InternalServiceErrorException: <p>There was an internal error for Global Accelerator.</p>
capo_global_accelerator.errors.invalid_argument_exception.InvalidArgumentException: <p>An argument that you specified is invalid.</p>
capo_global_accelerator.errors.limit_exceeded_exception.LimitExceededException: <p>Processing your request would cause you to exceed an Global Accelerator limit.</p>
capo_global_accelerator.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_global_accelerator.types.add_custom_routing_endpoints_request.AddCustomRoutingEndpointsRequest]",
) -> AsyncOperationResponse[
"capo_global_accelerator.types.add_custom_routing_endpoints_response.AddCustomRoutingEndpointsResponse"
]:
import capo_global_accelerator._operations.global_accelerator_v20180706.add_custom_routing_endpoints
(
output,
http_response,
) = await capo_global_accelerator._operations.global_accelerator_v20180706.add_custom_routing_endpoints.async_add_custom_routing_endpoints(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AddCustomRoutingEndpoints")
)
input_: capo_global_accelerator.types.add_custom_routing_endpoints_request.AddCustomRoutingEndpointsRequest = {
"endpoint_configurations": endpoint_configurations,
"endpoint_group_arn": endpoint_group_arn,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|