Skip to content

update_proxy_configuration async

update_proxy_configuration(
    proxy_identifier: ProxyIdentifier,
    *,
    config_overrides: Optional[AsyncELBProxyClientConfig] = None,
    configuration_file: Optional[ConfigurationFile] = None,
    configuration_archive: Optional[ConfigurationArchive] = None,
    reset_configuration_archive: Optional[bool] = None,
    customer_kms_key_arn: Optional[CustomerKmsKeyArn] = None,
    reset_customer_kms_key_arn: Optional[bool] = None,
) -> UpdateProxyConfigurationResponse

Updates the configuration for the specified proxy. You can update the configuration file, the configuration archive, or both.

Parameters:

  • proxy_identifier (ProxyIdentifier) –

    The Amazon Resource Name (ARN) of the proxy.

  • configuration_file (Optional[ConfigurationFile], default: None ) –

    The updated configuration file for the proxy. If you don't specify a value, the existing configuration file is unchanged.

  • configuration_archive (Optional[ConfigurationArchive], default: None ) –

    The updated configuration archive for the proxy. If you don't specify a value, the existing configuration archive is unchanged.

  • reset_configuration_archive (Optional[bool], default: None ) –

    Indicates whether to remove the configuration archive from the proxy.

  • customer_kms_key_arn (Optional[CustomerKmsKeyArn], default: None ) –

    The Amazon Resource Name (ARN) of the customer managed KMS key used to encrypt the proxy's configuration content. Specify a new ARN to set or rotate the key. If you don't specify a value, the existing key is unchanged.

  • reset_customer_kms_key_arn (Optional[bool], default: None ) –

    Indicates whether to remove the customer managed KMS key from the proxy and use the default service-owned key.

Raises:

Examples:

To update the configuration for a proxy The following example replaces the configuration file for the specified proxy. You can use the update ID in the output to track the progress of the update.

>>> await client.update_proxy_configuration(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', configuration_file={'configurationBytes': 'c3RhdGljX3Jlc291cmNlczoKICBsaXN0ZW5lcnM6IFtdCg=='})
Source code in docs_src/capo_elb_proxy/_services/async_elb_proxy.py
async def update_proxy_configuration(
    self,
    proxy_identifier: "capo_elb_proxy.types.proxy_identifier.ProxyIdentifier",
    *,
    config_overrides: Optional[AsyncELBProxyClientConfig] = None,
    configuration_file: Optional[
        "capo_elb_proxy.types.configuration_file.ConfigurationFile"
    ] = None,
    configuration_archive: Optional[
        "capo_elb_proxy.types.configuration_archive.ConfigurationArchive"
    ] = None,
    reset_configuration_archive: Optional[bool] = None,
    customer_kms_key_arn: Optional[
        "capo_elb_proxy.types.customer_kms_key_arn.CustomerKmsKeyArn"
    ] = None,
    reset_customer_kms_key_arn: Optional[bool] = None,
) -> "capo_elb_proxy.types.update_proxy_configuration_response.UpdateProxyConfigurationResponse":
    """Updates the configuration for the specified proxy. You can update the configuration file, the configuration archive, or both.

    Args:
        proxy_identifier: The Amazon Resource Name (ARN) of the proxy.
        configuration_file: The updated configuration file for the proxy. If you don't specify a value, the existing configuration file is unchanged.
        configuration_archive: The updated configuration archive for the proxy. If you don't specify a value, the existing configuration archive is unchanged.
        reset_configuration_archive: Indicates whether to remove the configuration archive from the proxy.
        customer_kms_key_arn: The Amazon Resource Name (ARN) of the customer managed KMS key used to encrypt the proxy's configuration content. Specify a new ARN to set or rotate the key. If you don't specify a value, the existing key is unchanged.
        reset_customer_kms_key_arn: Indicates whether to remove the customer managed KMS key from the proxy and use the default service-owned key.

    Raises:
        capo_elb_proxy.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_elb_proxy.errors.throttling_exception.ThrottlingException: The limit on the number of requests per second was exceeded.
        capo_elb_proxy.errors.access_denied_exception.AccessDeniedException: The user does not have sufficient access to perform this action.
        capo_elb_proxy.errors.prior_request_not_completed_exception.PriorRequestNotCompletedException: The request could not be completed because a prior request has not yet completed.
        capo_elb_proxy.errors.resource_not_found_exception.ResourceNotFoundException: The request references a resource that does not exist.
        capo_elb_proxy.errors.validation_exception.ValidationException: The input does not satisfy the constraints specified by an AWS service.
        capo_elb_proxy.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To update the configuration for a proxy
        The following example replaces the configuration file for the specified proxy. You can use the update ID in the output to track the progress of the update.

        >>> await client.update_proxy_configuration(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', configuration_file={'configurationBytes': 'c3RhdGljX3Jlc291cmNlczoKICBsaXN0ZW5lcnM6IFtdCg=='})
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elb_proxy.types.update_proxy_configuration_request.UpdateProxyConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_elb_proxy.types.update_proxy_configuration_response.UpdateProxyConfigurationResponse"
    ]:
        import capo_elb_proxy._operations.elb_proxy.update_proxy_configuration

        (
            output,
            http_response,
        ) = await capo_elb_proxy._operations.elb_proxy.update_proxy_configuration.async_update_proxy_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_elb_proxy.types.update_proxy_configuration_request.UpdateProxyConfigurationRequest",
    ) -> dict[str, Any]:
        import capo_elb_proxy.types.update_proxy_configuration_request

        return capo_elb_proxy.types.update_proxy_configuration_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateProxyConfiguration", redact_input=_redact_input),
    )
    input_: capo_elb_proxy.types.update_proxy_configuration_request.UpdateProxyConfigurationRequest = {
        "proxy_identifier": proxy_identifier
    }
    if configuration_file is not None:
        input_["configuration_file"] = configuration_file
    if configuration_archive is not None:
        input_["configuration_archive"] = configuration_archive
    if reset_configuration_archive is not None:
        input_["reset_configuration_archive"] = reset_configuration_archive
    if customer_kms_key_arn is not None:
        input_["customer_kms_key_arn"] = customer_kms_key_arn
    if reset_customer_kms_key_arn is not None:
        input_["reset_customer_kms_key_arn"] = reset_customer_kms_key_arn

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