Skip to content

create_custom_routing_endpoint_group async

create_custom_routing_endpoint_group(
    listener_arn: GenericString,
    endpoint_group_region: GenericString,
    destination_configurations: CustomRoutingDestinationConfigurations,
    idempotency_token: IdempotencyToken,
    *,
    config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = None,
) -> CreateCustomRoutingEndpointGroupResponse

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.

Parameters:

  • listener_arn (GenericString) –

    The Amazon Resource Name (ARN) of the listener for a custom routing endpoint.

  • endpoint_group_region (GenericString) –

    The Amazon Web Services Region where the endpoint group is located. A listener can have only one endpoint group in a specific Region.

  • destination_configurations (CustomRoutingDestinationConfigurations) –

    Sets the port range and protocol for all endpoints (virtual private cloud subnets) in a custom routing endpoint group to accept client traffic on.

  • idempotency_token (IdempotencyToken) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.

Raises:

Source code in docs_src/capo_global_accelerator/_services/async_global_accelerator.py
async def create_custom_routing_endpoint_group(
    self,
    listener_arn: "capo_global_accelerator.types.generic_string.GenericString",
    endpoint_group_region: "capo_global_accelerator.types.generic_string.GenericString",
    destination_configurations: "capo_global_accelerator.types.custom_routing_destination_configurations.CustomRoutingDestinationConfigurations",
    idempotency_token: "capo_global_accelerator.types.idempotency_token.IdempotencyToken",
    *,
    config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = None,
) -> "capo_global_accelerator.types.create_custom_routing_endpoint_group_response.CreateCustomRoutingEndpointGroupResponse":
    """<p>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. </p>

    Args:
        listener_arn: <p>The Amazon Resource Name (ARN) of the listener for a custom routing endpoint.</p>
        endpoint_group_region: <p>The Amazon Web Services Region where the endpoint group is located. A listener can have only one endpoint group in a specific Region.</p>
        destination_configurations: <p>Sets the port range and protocol for all endpoints (virtual private cloud subnets) in a custom routing endpoint group to accept client traffic on.</p>
        idempotency_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.</p>

    Raises:
        capo_global_accelerator.errors.accelerator_not_found_exception.AcceleratorNotFoundException: <p>The accelerator that you specified doesn't exist.</p>
        capo_global_accelerator.errors.access_denied_exception.AccessDeniedException: <p>You don't have access permission.</p>
        capo_global_accelerator.errors.endpoint_group_already_exists_exception.EndpointGroupAlreadyExistsException: <p>The endpoint group that you specified already exists.</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.invalid_port_range_exception.InvalidPortRangeException: <p>The port numbers that you specified are not valid numbers or are not unique for this accelerator.</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.listener_not_found_exception.ListenerNotFoundException: <p>The listener that you specified doesn't exist.</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.create_custom_routing_endpoint_group_request.CreateCustomRoutingEndpointGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_global_accelerator.types.create_custom_routing_endpoint_group_response.CreateCustomRoutingEndpointGroupResponse"
    ]:
        import capo_global_accelerator._operations.global_accelerator_v20180706.create_custom_routing_endpoint_group

        (
            output,
            http_response,
        ) = await capo_global_accelerator._operations.global_accelerator_v20180706.create_custom_routing_endpoint_group.async_create_custom_routing_endpoint_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCustomRoutingEndpointGroup")
    )
    input_: capo_global_accelerator.types.create_custom_routing_endpoint_group_request.CreateCustomRoutingEndpointGroupRequest = {
        "listener_arn": listener_arn,
        "endpoint_group_region": endpoint_group_region,
        "destination_configurations": destination_configurations,
        "idempotency_token": idempotency_token,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output