Retrieves details about an API destination.
Parameters:
Raises:
Source code in docs_src/capo_cloudwatch_events/_services/cloud_watch_events.py
| def describe_api_destination(
self,
name: "capo_cloudwatch_events.types.api_destination_name.ApiDestinationName",
*,
config_overrides: Optional[CloudWatchEventsClientConfig] = None,
) -> "capo_cloudwatch_events.types.describe_api_destination_response.DescribeApiDestinationResponse":
"""<p>Retrieves details about an API destination.</p>
Args:
name: <p>The name of the API destination 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.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch_events.types.describe_api_destination_request.DescribeApiDestinationRequest]",
) -> OperationResponse[
"capo_cloudwatch_events.types.describe_api_destination_response.DescribeApiDestinationResponse"
]:
import capo_cloudwatch_events._operations.aws_events.describe_api_destination
output, http_response = (
capo_cloudwatch_events._operations.aws_events.describe_api_destination.describe_api_destination(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeApiDestination")
)
input_: capo_cloudwatch_events.types.describe_api_destination_request.DescribeApiDestinationRequest = {
"name": name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|