Skip to content

describe_connection async

describe_connection(
    name: ConnectionName,
    *,
    config_overrides: Optional[AsyncCloudWatchEventsClientConfig] = None,
) -> DescribeConnectionResponse

Retrieves details about a connection.

Parameters:

Raises:

Source code in docs_src/capo_cloudwatch_events/_services/async_cloud_watch_events.py
async def describe_connection(
    self,
    name: "capo_cloudwatch_events.types.connection_name.ConnectionName",
    *,
    config_overrides: Optional[AsyncCloudWatchEventsClientConfig] = None,
) -> "capo_cloudwatch_events.types.describe_connection_response.DescribeConnectionResponse":
    """<p>Retrieves details about a connection.</p>

    Args:
        name: <p>The name of the connection to retrieve.</p>

    Raises:
        capo_cloudwatch_events.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_cloudwatch_events.errors.resource_not_found_exception.ResourceNotFoundException: <p>An entity that you specified does not exist.</p>
        capo_cloudwatch_events.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatch_events.types.describe_connection_request.DescribeConnectionRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatch_events.types.describe_connection_response.DescribeConnectionResponse"
    ]:
        import capo_cloudwatch_events._operations.aws_events.describe_connection

        (
            output,
            http_response,
        ) = await capo_cloudwatch_events._operations.aws_events.describe_connection.async_describe_connection(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_cloudwatch_events.types.describe_connection_response.DescribeConnectionResponse",
    ) -> dict[str, Any]:
        import capo_cloudwatch_events.types.describe_connection_response

        return capo_cloudwatch_events.types.describe_connection_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeConnection", redact_output=_redact_output),
    )
    input_: capo_cloudwatch_events.types.describe_connection_request.DescribeConnectionRequest = {
        "name": name
    }

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