Module Smaws_Client_CloudWatch.PutMetricStream

Creates or updates a metric stream. Metric streams can automatically stream CloudWatch metrics to Amazon Web Services destinations, including Amazon S3, and to many third-party solutions.

For more information, see Using Metric Streams.

To create a metric stream, you must be signed in to an account that has the iam:PassRole permission and either the CloudWatchFullAccess policy or the cloudwatch:PutMetricStream permission.

When you create or update a metric stream, you choose one of the following:

By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use the StatisticsConfigurations parameter to have the metric stream send additional statistics in the stream. Streaming additional statistics incurs additional costs. For more information, see Amazon CloudWatch Pricing.

When you use PutMetricStream to create a new metric stream, the stream is created in the running state. If you use it to update an existing stream, the state of the stream is not changed.

If you are using CloudWatch cross-account observability and you create a metric stream in a monitoring account, you can choose whether to include metrics from source accounts in the stream. For more information, see CloudWatch cross-account observability.

val error_to_string : [ Smaws_Lib.Protocols.AwsQuery.error | `ConcurrentModificationException of Types.concurrent_modification_exception | `InternalServiceFault of Types.internal_service_fault | `InvalidParameterCombinationException of Types.invalid_parameter_combination_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `MissingRequiredParameterException of Types.missing_required_parameter_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.put_metric_stream_input -> (Types.put_metric_stream_output, [> Smaws_Lib.Protocols.AwsQuery.error | `ConcurrentModificationException of Types.concurrent_modification_exception | `InternalServiceFault of Types.internal_service_fault | `InvalidParameterCombinationException of Types.invalid_parameter_combination_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `MissingRequiredParameterException of Types.missing_required_parameter_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.put_metric_stream_input -> (Types.put_metric_stream_output Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsQuery.error | `ConcurrentModificationException of Types.concurrent_modification_exception | `InternalServiceFault of Types.internal_service_fault | `InvalidParameterCombinationException of Types.invalid_parameter_combination_exception | `InvalidParameterValueException of Types.invalid_parameter_value_exception | `MissingRequiredParameterException of Types.missing_required_parameter_exception ] * Smaws_Lib.Response.metadata) Stdlib.result