aws_sdk_cloudwatch/client/put_metric_data.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`PutMetricData`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`namespace(impl Into<String>)`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::namespace) / [`set_namespace(Option<String>)`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::set_namespace):<br>required: **true**<br><p>The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters which are not supported.</p> <p>To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins with <code>AWS/</code></p><br>
7 /// - [`metric_data(MetricDatum)`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::metric_data) / [`set_metric_data(Option<Vec::<MetricDatum>>)`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::set_metric_data):<br>required: **false**<br><p>The data for the metrics. Use this parameter if your metrics do not contain associated entities. The array can include no more than 1000 metrics per call.</p> <p>The limit of metrics allowed, 1000, is the sum of both <code>EntityMetricData</code> and <code>MetricData</code> metrics.</p><br>
8 /// - [`entity_metric_data(EntityMetricData)`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::entity_metric_data) / [`set_entity_metric_data(Option<Vec::<EntityMetricData>>)`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::set_entity_metric_data):<br>required: **false**<br><p>Data for metrics that contain associated entity information. You can include up to two <code>EntityMetricData</code> objects, each of which can contain a single <code>Entity</code> and associated metrics.</p> <p>The limit of metrics allowed, 1000, is the sum of both <code>EntityMetricData</code> and <code>MetricData</code> metrics.</p><br>
9 /// - [`strict_entity_validation(bool)`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::strict_entity_validation) / [`set_strict_entity_validation(Option<bool>)`](crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::set_strict_entity_validation):<br>required: **false**<br><p>Whether to accept valid metric data when an invalid entity is sent.</p> <ul> <li> <p>When set to <code>true</code>: Any validation error (for entity or metric data) will fail the entire request, and no data will be ingested. The failed operation will return a 400 result with the error.</p></li> <li> <p>When set to <code>false</code>: Validation errors in the entity will not associate the metric with the entity, but the metric data will still be accepted and ingested. Validation errors in the metric data will fail the entire request, and no data will be ingested.</p> <p>In the case of an invalid entity, the operation will return a <code>200</code> status, but an additional response header will contain information about the validation errors. The new header, <code>X-Amzn-Failure-Message</code> is an enumeration of the following values:</p> <ul> <li> <p><code>InvalidEntity</code> - The provided entity is invalid.</p></li> <li> <p><code>InvalidKeyAttributes</code> - The provided <code>KeyAttributes</code> of an entity is invalid.</p></li> <li> <p><code>InvalidAttributes</code> - The provided <code>Attributes</code> of an entity is invalid.</p></li> <li> <p><code>InvalidTypeValue</code> - The provided <code>Type</code> in the <code>KeyAttributes</code> of an entity is invalid.</p></li> <li> <p><code>EntitySizeTooLarge</code> - The number of <code>EntityMetricData</code> objects allowed is 2.</p></li> <li> <p><code>MissingRequiredFields</code> - There are missing required fields in the <code>KeyAttributes</code> for the provided <code>Type</code>.</p></li> </ul> <p>For details of the requirements for specifying an entity, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/adding-your-own-related-telemetry.html">How to add related information to telemetry</a> in the <i>CloudWatch User Guide</i>.</p></li> </ul> <p>This parameter is <i>required</i> when <code>EntityMetricData</code> is included.</p><br>
10 /// - On success, responds with [`PutMetricDataOutput`](crate::operation::put_metric_data::PutMetricDataOutput)
11 /// - On failure, responds with [`SdkError<PutMetricDataError>`](crate::operation::put_metric_data::PutMetricDataError)
12 pub fn put_metric_data(&self) -> crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder {
13 crate::operation::put_metric_data::builders::PutMetricDataFluentBuilder::new(self.handle.clone())
14 }
15}