Starts the streaming of metrics for one or more of your metric streams.
Parameters:
-
names
(Optional[MetricStreamNames], default:
None
)
–
The array of the names of metric streams to start streaming.
This is an "all or nothing" operation. If you do not have permission to access all of the metric streams that you list here, then none of the streams that you list in the operation will start streaming.
Raises:
Source code in docs_src/capo_cloudwatch/_services/cloud_watch.py
| def start_metric_streams(
self,
*,
config_overrides: Optional[CloudWatchClientConfig] = None,
names: Optional[
"capo_cloudwatch.types.metric_stream_names.MetricStreamNames"
] = None,
) -> "capo_cloudwatch.types.start_metric_streams_output.StartMetricStreamsOutput":
"""<p>Starts the streaming of metrics for one or more of your metric streams.</p>
Args:
names: <p>The array of the names of metric streams to start streaming.</p> <p>This is an "all or nothing" operation. If you do not have permission to access all of the metric streams that you list here, then none of the streams that you list in the operation will start streaming.</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_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.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch.types.start_metric_streams_input.StartMetricStreamsInput]",
) -> OperationResponse[
"capo_cloudwatch.types.start_metric_streams_output.StartMetricStreamsOutput"
]:
import capo_cloudwatch._operations.granite_service_version20100801.start_metric_streams
output, http_response = (
capo_cloudwatch._operations.granite_service_version20100801.start_metric_streams.start_metric_streams(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartMetricStreams")
)
input_: capo_cloudwatch.types.start_metric_streams_input.StartMetricStreamsInput = {}
if names is not None:
input_["names"] = names
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|