Skip to content

update_proxy_attributes

update_proxy_attributes(
    proxy_identifier: ProxyIdentifier,
    attributes: ProxyAttributeList,
    *,
    config_overrides: Optional[ELBProxyClientConfig] = None,
) -> UpdateProxyAttributesResponse

Updates the attributes for the specified proxy.

Parameters:

  • proxy_identifier (ProxyIdentifier) –

    The Amazon Resource Name (ARN) of the proxy.

  • attributes (ProxyAttributeList) –

    The attributes to update. Attributes that you don't specify are unchanged.

Raises:

Examples:

To enable deletion protection The following example enables deletion protection for the specified proxy.

>>> client.update_proxy_attributes(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', attributes=[{'key': 'deletion_protection.enabled', 'value': 'true'}])
To change the Envoy log level
The following example changes the Envoy log level for the specified proxy to debug.
>>> client.update_proxy_attributes(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', attributes=[{'key': 'envoy.log_level', 'value': 'debug'}])
To change the log level for specific Envoy components
The following example changes the log level for the http and router Envoy components on the specified proxy to debug. Components that aren't specified use the log level set by envoy.log_level.
>>> client.update_proxy_attributes(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', attributes=[{'key': 'envoy.component_log_level', 'value': 'http:debug,router:debug'}])
To enable AWS WAF fail open
The following example enables AWS WAF fail open for the specified proxy.
>>> client.update_proxy_attributes(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', attributes=[{'key': 'waf.fail_open.enabled', 'value': 'true'}])
Source code in docs_src/capo_elb_proxy/_services/elb_proxy.py
def update_proxy_attributes(
    self,
    proxy_identifier: "capo_elb_proxy.types.proxy_identifier.ProxyIdentifier",
    attributes: "capo_elb_proxy.types.proxy_attribute_list.ProxyAttributeList",
    *,
    config_overrides: Optional[ELBProxyClientConfig] = None,
) -> "capo_elb_proxy.types.update_proxy_attributes_response.UpdateProxyAttributesResponse":
    """Updates the attributes for the specified proxy.

    Args:
        proxy_identifier: The Amazon Resource Name (ARN) of the proxy.
        attributes: The attributes to update. Attributes that you don't specify are unchanged.

    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.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 enable deletion protection
        The following example enables deletion protection for the specified proxy.

        >>> client.update_proxy_attributes(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', attributes=[{'key': 'deletion_protection.enabled', 'value': 'true'}])
        To change the Envoy log level
        The following example changes the Envoy log level for the specified proxy to debug.

        >>> client.update_proxy_attributes(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', attributes=[{'key': 'envoy.log_level', 'value': 'debug'}])
        To change the log level for specific Envoy components
        The following example changes the log level for the http and router Envoy components on the specified proxy to debug. Components that aren't specified use the log level set by envoy.log_level.

        >>> client.update_proxy_attributes(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', attributes=[{'key': 'envoy.component_log_level', 'value': 'http:debug,router:debug'}])
        To enable AWS WAF fail open
        The following example enables AWS WAF fail open for the specified proxy.

        >>> client.update_proxy_attributes(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', attributes=[{'key': 'waf.fail_open.enabled', 'value': 'true'}])
    """

    def _handler(
        req: "OperationRequest[capo_elb_proxy.types.update_proxy_attributes_request.UpdateProxyAttributesRequest]",
    ) -> OperationResponse[
        "capo_elb_proxy.types.update_proxy_attributes_response.UpdateProxyAttributesResponse"
    ]:
        import capo_elb_proxy._operations.elb_proxy.update_proxy_attributes

        output, http_response = (
            capo_elb_proxy._operations.elb_proxy.update_proxy_attributes.update_proxy_attributes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateProxyAttributes")
    )
    input_: capo_elb_proxy.types.update_proxy_attributes_request.UpdateProxyAttributesRequest = {
        "proxy_identifier": proxy_identifier,
        "attributes": attributes,
    }

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