Skip to content

get_realtime_log_config async

get_realtime_log_config(
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    name: Optional[string] = None,
    arn: Optional[string] = None,
) -> GetRealtimeLogConfigResult

Gets a real-time log configuration.

To get a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to get.

Parameters:

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

    The name of the real-time log configuration to get.

  • arn (Optional[string], default: None ) –

    The Amazon Resource Name (ARN) of the real-time log configuration to get.

Raises:

Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
async def get_realtime_log_config(
    self,
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
    name: Optional["capo_cloudfront.types.string.string"] = None,
    arn: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.get_realtime_log_config_result.GetRealtimeLogConfigResult":
    """<p>Gets a real-time log configuration.</p> <p>To get a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to get.</p>

    Args:
        name: <p>The name of the real-time log configuration to get.</p>
        arn: <p>The Amazon Resource Name (ARN) of the real-time log configuration to get.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
        capo_cloudfront.errors.no_such_realtime_log_config.NoSuchRealtimeLogConfig: <p>The real-time log configuration does not exist.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudfront.types.get_realtime_log_config_request.GetRealtimeLogConfigRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudfront.types.get_realtime_log_config_result.GetRealtimeLogConfigResult"
    ]:
        import capo_cloudfront._operations.cloudfront2020_05_31.get_realtime_log_config

        (
            output,
            http_response,
        ) = await capo_cloudfront._operations.cloudfront2020_05_31.get_realtime_log_config.async_get_realtime_log_config(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetRealtimeLogConfig")
    )
    input_: capo_cloudfront.types.get_realtime_log_config_request.GetRealtimeLogConfigRequest = {}
    if name is not None:
        input_["name"] = name
    if arn is not None:
        input_["arn"] = arn

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