Skip to content

delete_accelerator

delete_accelerator(
    accelerator_arn: GenericString,
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
) -> None

Delete an accelerator. Before you can delete an accelerator, you must disable it and remove all dependent resources (listeners and endpoint groups). To disable the accelerator, update the accelerator to set Enabled to false.

When you create an accelerator, by default, Global Accelerator provides you with a set of two static IP addresses. Alternatively, you can bring your own IP address ranges to Global Accelerator and assign IP addresses from those ranges.

The IP addresses are assigned to your accelerator for as long as it exists, even if you disable the accelerator and it no longer accepts or routes traffic. However, when you delete an accelerator, you lose the static IP addresses that are assigned to the accelerator, so you can no longer route traffic by using them. As a best practice, ensure that you have permissions in place to avoid inadvertently deleting accelerators. You can use IAM policies with Global Accelerator to limit the users who have permissions to delete an accelerator. For more information, see Identity and access management in the Global Accelerator Developer Guide.

Parameters:

  • accelerator_arn (GenericString) –

    The Amazon Resource Name (ARN) of an accelerator.

Raises:

Source code in docs_src/capo_global_accelerator/_services/global_accelerator.py
def delete_accelerator(
    self,
    accelerator_arn: "capo_global_accelerator.types.generic_string.GenericString",
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
) -> None:
    """<p>Delete an accelerator. Before you can delete an accelerator, you must disable it and remove all dependent resources (listeners and endpoint groups). To disable the accelerator, update the accelerator to set <code>Enabled</code> to false.</p> <important> <p>When you create an accelerator, by default, Global Accelerator provides you with a set of two static IP addresses. Alternatively, you can bring your own IP address ranges to Global Accelerator and assign IP addresses from those ranges. </p> <p>The IP addresses are assigned to your accelerator for as long as it exists, even if you disable the accelerator and it no longer accepts or routes traffic. However, when you <i>delete</i> an accelerator, you lose the static IP addresses that are assigned to the accelerator, so you can no longer route traffic by using them. As a best practice, ensure that you have permissions in place to avoid inadvertently deleting accelerators. You can use IAM policies with Global Accelerator to limit the users who have permissions to delete an accelerator. For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/auth-and-access-control.html">Identity and access management</a> in the <i>Global Accelerator Developer Guide</i>.</p> </important>

    Args:
        accelerator_arn: <p>The Amazon Resource Name (ARN) of an accelerator.</p>

    Raises:
        capo_global_accelerator.errors.accelerator_not_disabled_exception.AcceleratorNotDisabledException: <p>The accelerator that you specified could not be disabled.</p>
        capo_global_accelerator.errors.accelerator_not_found_exception.AcceleratorNotFoundException: <p>The accelerator that you specified doesn't exist.</p>
        capo_global_accelerator.errors.associated_listener_found_exception.AssociatedListenerFoundException: <p>The accelerator that you specified has a listener associated with it. You must remove all dependent resources from an accelerator before you can delete it.</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.delete_accelerator_request.DeleteAcceleratorRequest]",
    ) -> OperationResponse[None]:
        import capo_global_accelerator._operations.global_accelerator_v20180706.delete_accelerator

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAccelerator")
    )
    input_: capo_global_accelerator.types.delete_accelerator_request.DeleteAcceleratorRequest = {
        "accelerator_arn": accelerator_arn
    }

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