Skip to content

remove_endpoints

remove_endpoints(
    endpoint_identifiers: EndpointIdentifiers,
    endpoint_group_arn: GenericString,
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
) -> None

Remove endpoints from an endpoint group.

The RemoveEndpoints API operation is the recommended option for removing endpoints. The alternative is to remove endpoints by updating an endpoint group by using the UpdateEndpointGroup API operation. There are two advantages to using AddEndpoints to remove endpoints instead:

  • It's more convenient, because you only need to specify the endpoints that you want to remove. With the UpdateEndpointGroup API operation, you must specify all of the endpoints in the endpoint group except the ones that you want to remove from the group.

  • It's faster, because Global Accelerator doesn't need to resolve any endpoints. With the UpdateEndpointGroup API operation, Global Accelerator must resolve all of the endpoints that remain in the group.

Parameters:

  • endpoint_identifiers (EndpointIdentifiers) –

    The identifiers of the endpoints that you want to remove.

  • endpoint_group_arn (GenericString) –

    The Amazon Resource Name (ARN) of the endpoint group.

Raises:

Source code in docs_src/capo_global_accelerator/_services/global_accelerator.py
def remove_endpoints(
    self,
    endpoint_identifiers: "capo_global_accelerator.types.endpoint_identifiers.EndpointIdentifiers",
    endpoint_group_arn: "capo_global_accelerator.types.generic_string.GenericString",
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
) -> None:
    """<p>Remove endpoints from an endpoint group. </p> <p>The <code>RemoveEndpoints</code> API operation is the recommended option for removing endpoints. The alternative is to remove endpoints by updating an endpoint group by using the <a href="https://docs.aws.amazon.com/global-accelerator/latest/api/API_UpdateEndpointGroup.html">UpdateEndpointGroup</a> API operation. There are two advantages to using <code>AddEndpoints</code> to remove endpoints instead:</p> <ul> <li> <p>It's more convenient, because you only need to specify the endpoints that you want to remove. With the <code>UpdateEndpointGroup</code> API operation, you must specify all of the endpoints in the endpoint group except the ones that you want to remove from the group.</p> </li> <li> <p>It's faster, because Global Accelerator doesn't need to resolve any endpoints. With the <code>UpdateEndpointGroup</code> API operation, Global Accelerator must resolve all of the endpoints that remain in the group.</p> </li> </ul>

    Args:
        endpoint_identifiers: <p>The identifiers of the endpoints that you want to remove.</p>
        endpoint_group_arn: <p>The Amazon Resource Name (ARN) of the endpoint group.</p>

    Raises:
        capo_global_accelerator.errors.access_denied_exception.AccessDeniedException: <p>You don't have access permission.</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.transaction_in_progress_exception.TransactionInProgressException: <p>There's already a transaction in progress. Another transaction can't be processed.</p>
        capo_global_accelerator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_global_accelerator.types.remove_endpoints_request.RemoveEndpointsRequest]",
    ) -> OperationResponse[None]:
        import capo_global_accelerator._operations.global_accelerator_v20180706.remove_endpoints

        output, http_response = (
            capo_global_accelerator._operations.global_accelerator_v20180706.remove_endpoints.remove_endpoints(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveEndpoints")
    )
    input_: capo_global_accelerator.types.remove_endpoints_request.RemoveEndpointsRequest = {
        "endpoint_identifiers": endpoint_identifiers,
        "endpoint_group_arn": endpoint_group_arn,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output