Skip to content

start_metric_streams async

start_metric_streams(
    *,
    config_overrides: Optional[AsyncCloudWatchClientConfig] = None,
    names: Optional[MetricStreamNames] = None,
) -> StartMetricStreamsOutput

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/async_cloud_watch.py
async def start_metric_streams(
    self,
    *,
    config_overrides: Optional[AsyncCloudWatchClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatch.types.start_metric_streams_input.StartMetricStreamsInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatch.types.start_metric_streams_output.StartMetricStreamsOutput"
    ]:
        import capo_cloudwatch._operations.granite_service_version20100801.start_metric_streams

        (
            output,
            http_response,
        ) = await capo_cloudwatch._operations.granite_service_version20100801.start_metric_streams.async_start_metric_streams(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output