Skip to content

update_accelerator async

update_accelerator(
    accelerator_arn: GenericString,
    *,
    config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = None,
    name: Optional[GenericString] = None,
    ip_address_type: Optional[IpAddressType] = None,
    ip_addresses: Optional[IpAddresses] = None,
    enabled: Optional[GenericBoolean] = None,
) -> UpdateAcceleratorResponse

Update an accelerator to make changes, such as the following:

  • Change the name of the accelerator.

  • Disable the accelerator so that it no longer accepts or routes traffic, or so that you can delete it.

  • Enable the accelerator, if it is disabled.

  • Change the IP address type to dual-stack if it is IPv4, or change the IP address type to IPv4 if it's dual-stack.

Be aware that static IP addresses remain 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 the accelerator, you lose the static IP addresses that are assigned to it, so you can no longer route traffic by using them.

Global Accelerator is a global service that supports endpoints in multiple Amazon Web Services Regions but you must specify the US West (Oregon) Region to create, update, or otherwise work with accelerators. That is, for example, specify --region us-west-2 on Amazon Web Services CLI commands.

Parameters:

  • accelerator_arn (GenericString) –

    The Amazon Resource Name (ARN) of the accelerator to update.

  • name (Optional[GenericString], default: None ) –

    The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.

  • ip_address_type (Optional[IpAddressType], default: None ) –

    The IP address type that an accelerator supports. For a standard accelerator, the value can be IPV4 or DUAL_STACK.

  • ip_addresses (Optional[IpAddresses], default: None ) –

    The IP addresses for an accelerator.

  • enabled (Optional[GenericBoolean], default: None ) –

    Indicates whether an accelerator is enabled. The value is true or false. The default value is true.

    If the value is set to true, the accelerator cannot be deleted. If set to false, the accelerator can be deleted.

Raises:

Source code in docs_src/capo_global_accelerator/_services/async_global_accelerator.py
async def update_accelerator(
    self,
    accelerator_arn: "capo_global_accelerator.types.generic_string.GenericString",
    *,
    config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = None,
    name: Optional[
        "capo_global_accelerator.types.generic_string.GenericString"
    ] = None,
    ip_address_type: Optional[
        "capo_global_accelerator.types.ip_address_type.IpAddressType"
    ] = None,
    ip_addresses: Optional[
        "capo_global_accelerator.types.ip_addresses.IpAddresses"
    ] = None,
    enabled: Optional[
        "capo_global_accelerator.types.generic_boolean.GenericBoolean"
    ] = None,
) -> "capo_global_accelerator.types.update_accelerator_response.UpdateAcceleratorResponse":
    """<p>Update an accelerator to make changes, such as the following: </p> <ul> <li> <p>Change the name of the accelerator.</p> </li> <li> <p>Disable the accelerator so that it no longer accepts or routes traffic, or so that you can delete it.</p> </li> <li> <p>Enable the accelerator, if it is disabled.</p> </li> <li> <p>Change the IP address type to dual-stack if it is IPv4, or change the IP address type to IPv4 if it's dual-stack.</p> </li> </ul> <p>Be aware that static IP addresses remain 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 the accelerator, you lose the static IP addresses that are assigned to it, so you can no longer route traffic by using them.</p> <important> <p>Global Accelerator is a global service that supports endpoints in multiple Amazon Web Services Regions but you must specify the US West (Oregon) Region to create, update, or otherwise work with accelerators. That is, for example, specify <code>--region us-west-2</code> on Amazon Web Services CLI commands.</p> </important>

    Args:
        accelerator_arn: <p>The Amazon Resource Name (ARN) of the accelerator to update.</p>
        name: <p>The name of the accelerator. The name can have a maximum of 64 characters, must contain only alphanumeric characters, periods (.), or hyphens (-), and must not begin or end with a hyphen or period.</p>
        ip_address_type: <p>The IP address type that an accelerator supports. For a standard accelerator, the value can be IPV4 or DUAL_STACK.</p>
        ip_addresses: <p>The IP addresses for an accelerator.</p>
        enabled: <p>Indicates whether an accelerator is enabled. The value is true or false. The default value is true. </p> <p>If the value is set to true, the accelerator cannot be deleted. If set to false, the accelerator can be deleted.</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.conflict_exception.ConflictException: <p>You can't use both of those options.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_global_accelerator.types.update_accelerator_request.UpdateAcceleratorRequest]",
    ) -> AsyncOperationResponse[
        "capo_global_accelerator.types.update_accelerator_response.UpdateAcceleratorResponse"
    ]:
        import capo_global_accelerator._operations.global_accelerator_v20180706.update_accelerator

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAccelerator")
    )
    input_: capo_global_accelerator.types.update_accelerator_request.UpdateAcceleratorRequest = {
        "accelerator_arn": accelerator_arn
    }
    if name is not None:
        input_["name"] = name
    if ip_address_type is not None:
        input_["ip_address_type"] = ip_address_type
    if ip_addresses is not None:
        input_["ip_addresses"] = ip_addresses
    if enabled is not None:
        input_["enabled"] = enabled

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