lib/aws-sdk-cloudwatch/metric.rb in aws-sdk-cloudwatch-1.105.0 vs lib/aws-sdk-cloudwatch/metric.rb in aws-sdk-cloudwatch-1.106.0

- old
+ new

@@ -735,12 +735,16 @@ # # If you are using this operation to update an existing alarm, any tags # you specify in this parameter are ignored. To change the tags of an # existing alarm, use [TagResource][1] or [UntagResource][2]. # + # To use this field to set tags for an alarm when you create it, you + # must be signed on with both the `cloudwatch:PutMetricAlarm` and + # `cloudwatch:TagResource` permissions. # # + # # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html # [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_UntagResource.html # @option options [String] :threshold_metric_id # If this is an alarm based on an anomaly detection model, make this # value match the ID of the `ANOMALY_DETECTION_BAND` function. @@ -766,11 +770,11 @@ end # @example Request syntax with placeholder values # # metric.put_data({ - # metric_data: [ # required + # metric_data: [ # { # metric_name: "MetricName", # required # dimensions: [ # { # name: "DimensionName", # required @@ -789,14 +793,104 @@ # counts: [1.0], # unit: "Seconds", # accepts Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None # storage_resolution: 1, # }, # ], + # entity_metric_data: [ + # { + # entity: { + # key_attributes: { + # "EntityKeyAttributesMapKeyString" => "EntityKeyAttributesMapValueString", + # }, + # attributes: { + # "EntityAttributesMapKeyString" => "EntityAttributesMapValueString", + # }, + # }, + # metric_data: [ + # { + # metric_name: "MetricName", # required + # dimensions: [ + # { + # name: "DimensionName", # required + # value: "DimensionValue", # required + # }, + # ], + # timestamp: Time.now, + # value: 1.0, + # statistic_values: { + # sample_count: 1.0, # required + # sum: 1.0, # required + # minimum: 1.0, # required + # maximum: 1.0, # required + # }, + # values: [1.0], + # counts: [1.0], + # unit: "Seconds", # accepts Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None + # storage_resolution: 1, + # }, + # ], + # }, + # ], + # strict_entity_validation: false, # }) # @param [Hash] options ({}) - # @option options [required, Array<Types::MetricDatum>] :metric_data - # The data for the metric. The array can include no more than 1000 + # @option options [Array<Types::MetricDatum>] :metric_data + # 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. + # + # The limit of metrics allowed, 1000, is the sum of both + # `EntityMetricData` and `MetricData` metrics. + # @option options [Array<Types::EntityMetricData>] :entity_metric_data + # Data for metrics that contain associated entity information. You can + # include up to two `EntityMetricData` objects, each of which can + # contain a single `Entity` and associated metrics. + # + # The limit of metrics allowed, 1000, is the sum of both + # `EntityMetricData` and `MetricData` metrics. + # @option options [Boolean] :strict_entity_validation + # Whether to accept valid metric data when an invalid entity is sent. + # + # * When set to `true`: 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. + # + # * When set to `false`: 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. + # + # In the case of an invalid entity, the operation will return a `200` + # status, but an additional response header will contain information + # about the validation errors. The new header, + # `X-Amzn-Failure-Message` is an enumeration of the following values: + # + # * `InvalidEntity` - The provided entity is invalid. + # + # * `InvalidKeyAttributes` - The provided `KeyAttributes` of an entity + # is invalid. + # + # * `InvalidAttributes` - The provided `Attributes` of an entity is + # invalid. + # + # * `InvalidTypeValue` - The provided `Type` in the `KeyAttributes` of + # an entity is invalid. + # + # * `EntitySizeTooLarge` - The number of `EntityMetricData` objects + # allowed is 2. + # + # * `MissingRequiredFields` - There are missing required fields in the + # `KeyAttributes` for the provided `Type`. + # + # For details of the requirements for specifying an entity, see [How + # to add related information to telemetry][1] in the *CloudWatch User + # Guide*. + # + # This parameter is *required* when `EntityMetricData` is included. + # + # + # + # [1]: https://docs.aws.amazon.com/adding-your-own-related-telemetry.html # @return [EmptyStructure] def put_data(options = {}) options = Aws::Util.deep_merge(options, namespace: @namespace, metric_data: [{ metric_name: @name }]