Skip to content

get_proxy_configuration_contents async

get_proxy_configuration_contents(
    proxy_identifier: ProxyIdentifier,
    *,
    config_overrides: Optional[AsyncELBProxyClientConfig] = None,
    include_config_file: Optional[bool] = None,
    include_config_archive: Optional[bool] = None,
) -> GetProxyConfigurationContentsResponse

Retrieves the configuration file, the configuration archive, or both for the specified proxy. This operation is separate from GetProxy so that you can grant access to proxy metadata without granting access to the configuration content.

Parameters:

  • proxy_identifier (ProxyIdentifier) –

    The Amazon Resource Name (ARN) of the proxy.

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

    Indicates whether to include the configuration file contents in the response. The default is false.

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

    Indicates whether to include the configuration archive contents in the response. The default is false.

Raises:

Examples:

To get the configuration for a proxy The following example gets the configuration file for the specified proxy. The configuration archive isn't included.

>>> await client.get_proxy_configuration_contents(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', include_config_file=True, include_config_archive=False)
Source code in docs_src/capo_elb_proxy/_services/async_elb_proxy.py
async def get_proxy_configuration_contents(
    self,
    proxy_identifier: "capo_elb_proxy.types.proxy_identifier.ProxyIdentifier",
    *,
    config_overrides: Optional[AsyncELBProxyClientConfig] = None,
    include_config_file: Optional[bool] = None,
    include_config_archive: Optional[bool] = None,
) -> "capo_elb_proxy.types.get_proxy_configuration_contents_response.GetProxyConfigurationContentsResponse":
    """Retrieves the configuration file, the configuration archive, or both for the specified proxy. This operation is separate from GetProxy so that you can grant access to proxy metadata without granting access to the configuration content.

    Args:
        proxy_identifier: The Amazon Resource Name (ARN) of the proxy.
        include_config_file: Indicates whether to include the configuration file contents in the response. The default is `false`.
        include_config_archive: Indicates whether to include the configuration archive contents in the response. The default is `false`.

    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.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 get the configuration for a proxy
        The following example gets the configuration file for the specified proxy. The configuration archive isn't included.

        >>> await client.get_proxy_configuration_contents(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', include_config_file=True, include_config_archive=False)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elb_proxy.types.get_proxy_configuration_contents_request.GetProxyConfigurationContentsRequest]",
    ) -> AsyncOperationResponse[
        "capo_elb_proxy.types.get_proxy_configuration_contents_response.GetProxyConfigurationContentsResponse"
    ]:
        import capo_elb_proxy._operations.elb_proxy.get_proxy_configuration_contents

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

    def _redact_output(
        output: "capo_elb_proxy.types.get_proxy_configuration_contents_response.GetProxyConfigurationContentsResponse",
    ) -> dict[str, Any]:
        import capo_elb_proxy.types.get_proxy_configuration_contents_response

        return capo_elb_proxy.types.get_proxy_configuration_contents_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetProxyConfigurationContents", redact_output=_redact_output
        ),
    )
    input_: capo_elb_proxy.types.get_proxy_configuration_contents_request.GetProxyConfigurationContentsRequest = {
        "proxy_identifier": proxy_identifier
    }
    if include_config_file is not None:
        input_["include_config_file"] = include_config_file
    if include_config_archive is not None:
        input_["include_config_archive"] = include_config_archive

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