Interface PutMetricDataRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CloudWatchRequest.Builder,CopyableBuilder<PutMetricDataRequest.Builder,,PutMetricDataRequest> SdkBuilder<PutMetricDataRequest.Builder,,PutMetricDataRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
PutMetricDataRequest
-
Method Summary
Modifier and TypeMethodDescriptionentityMetricData(Collection<EntityMetricData> entityMetricData) Data for metrics that contain associated entity information.entityMetricData(Consumer<EntityMetricData.Builder>... entityMetricData) Data for metrics that contain associated entity information.entityMetricData(EntityMetricData... entityMetricData) Data for metrics that contain associated entity information.metricData(Collection<MetricDatum> metricData) The data for the metrics.metricData(Consumer<MetricDatum.Builder>... metricData) The data for the metrics.metricData(MetricDatum... metricData) The data for the metrics.The namespace for the metric data.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.strictEntityValidation(Boolean strictEntityValidation) Whether to accept valid metric data when an invalid entity is sent.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.services.cloudwatch.model.CloudWatchRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
namespace
The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters which are not supported.
To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins with
AWS/- Parameters:
namespace- The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters which are not supported.To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins with
AWS/- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricData
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
EntityMetricDataandMetricDatametrics.- Parameters:
metricData- 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
EntityMetricDataandMetricDatametrics.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricData
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
EntityMetricDataandMetricDatametrics.- Parameters:
metricData- 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
EntityMetricDataandMetricDatametrics.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricData
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
This is a convenience method that creates an instance of theEntityMetricDataandMetricDatametrics.MetricDatum.Builderavoiding the need to create one manually viaMetricDatum.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tometricData(List<MetricDatum>).- Parameters:
metricData- a consumer that will call methods onMetricDatum.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
entityMetricData
Data for metrics that contain associated entity information. You can include up to two
EntityMetricDataobjects, each of which can contain a singleEntityand associated metrics.The limit of metrics allowed, 1000, is the sum of both
EntityMetricDataandMetricDatametrics.- Parameters:
entityMetricData- Data for metrics that contain associated entity information. You can include up to twoEntityMetricDataobjects, each of which can contain a singleEntityand associated metrics.The limit of metrics allowed, 1000, is the sum of both
EntityMetricDataandMetricDatametrics.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
entityMetricData
Data for metrics that contain associated entity information. You can include up to two
EntityMetricDataobjects, each of which can contain a singleEntityand associated metrics.The limit of metrics allowed, 1000, is the sum of both
EntityMetricDataandMetricDatametrics.- Parameters:
entityMetricData- Data for metrics that contain associated entity information. You can include up to twoEntityMetricDataobjects, each of which can contain a singleEntityand associated metrics.The limit of metrics allowed, 1000, is the sum of both
EntityMetricDataandMetricDatametrics.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
entityMetricData
PutMetricDataRequest.Builder entityMetricData(Consumer<EntityMetricData.Builder>... entityMetricData) Data for metrics that contain associated entity information. You can include up to two
EntityMetricDataobjects, each of which can contain a singleEntityand associated metrics.The limit of metrics allowed, 1000, is the sum of both
This is a convenience method that creates an instance of theEntityMetricDataandMetricDatametrics.EntityMetricData.Builderavoiding the need to create one manually viaEntityMetricData.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toentityMetricData(List<EntityMetricData>).- Parameters:
entityMetricData- a consumer that will call methods onEntityMetricData.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
strictEntityValidation
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
200status, but an additional response header will contain information about the validation errors. The new header,X-Amzn-Failure-Messageis an enumeration of the following values:-
InvalidEntity- The provided entity is invalid. -
InvalidKeyAttributes- The providedKeyAttributesof an entity is invalid. -
InvalidAttributes- The providedAttributesof an entity is invalid. -
InvalidTypeValue- The providedTypein theKeyAttributesof an entity is invalid. -
EntitySizeTooLarge- The number ofEntityMetricDataobjects allowed is 2. -
MissingRequiredFields- There are missing required fields in theKeyAttributesfor the providedType.
For details of the requirements for specifying an entity, see How to add related information to telemetry in the CloudWatch User Guide.
-
This parameter is required when
EntityMetricDatais included.- Parameters:
strictEntityValidation- 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
200status, but an additional response header will contain information about the validation errors. The new header,X-Amzn-Failure-Messageis an enumeration of the following values:-
InvalidEntity- The provided entity is invalid. -
InvalidKeyAttributes- The providedKeyAttributesof an entity is invalid. -
InvalidAttributes- The providedAttributesof an entity is invalid. -
InvalidTypeValue- The providedTypein theKeyAttributesof an entity is invalid. -
EntitySizeTooLarge- The number ofEntityMetricDataobjects allowed is 2. -
MissingRequiredFields- There are missing required fields in theKeyAttributesfor the providedType.
For details of the requirements for specifying an entity, see How to add related information to telemetry in the CloudWatch User Guide.
-
This parameter is required when
EntityMetricDatais included.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
overrideConfiguration
PutMetricDataRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
PutMetricDataRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-