Returns information about the metric stream that you specify.
Parameters:
Raises:
Source code in docs_src/capo_cloudwatch/_services/async_cloud_watch.py
| async def get_metric_stream(
self,
*,
config_overrides: Optional[AsyncCloudWatchClientConfig] = None,
name: Optional[
"capo_cloudwatch.types.metric_stream_name.MetricStreamName"
] = None,
) -> "capo_cloudwatch.types.get_metric_stream_output.GetMetricStreamOutput":
"""<p>Returns information about the metric stream that you specify.</p>
Args:
name: <p>The name of the metric stream to retrieve information about.</p>
Raises:
capo_cloudwatch.errors.internal_service_fault.InternalServiceFault: <p>Request processing has failed due to some unknown error, exception, or failure.</p>
capo_cloudwatch.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Parameters were used together that cannot be used together.</p>
capo_cloudwatch.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of an input parameter is bad or out-of-range.</p>
capo_cloudwatch.errors.missing_required_parameter_exception.MissingRequiredParameterException: <p>An input parameter that is required is missing.</p>
capo_cloudwatch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The named resource does not exist.</p>
capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudwatch.types.get_metric_stream_input.GetMetricStreamInput]",
) -> AsyncOperationResponse[
"capo_cloudwatch.types.get_metric_stream_output.GetMetricStreamOutput"
]:
import capo_cloudwatch._operations.granite_service_version20100801.get_metric_stream
(
output,
http_response,
) = await capo_cloudwatch._operations.granite_service_version20100801.get_metric_stream.async_get_metric_stream(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetMetricStream")
)
input_: capo_cloudwatch.types.get_metric_stream_input.GetMetricStreamInput = {}
if name is not None:
input_["name"] = name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|