Interface PutMetricDataRequest.Builder

  • Method Details

    • namespace

      PutMetricDataRequest.Builder namespace(String 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 EntityMetricData and MetricData metrics.

      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 EntityMetricData and MetricData metrics.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metricData

      PutMetricDataRequest.Builder metricData(MetricDatum... 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 EntityMetricData and MetricData metrics.

      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 EntityMetricData and MetricData metrics.

      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 EntityMetricData and MetricData metrics.

      This is a convenience method that creates an instance of the MetricDatum.Builder avoiding the need to create one manually via MetricDatum.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to metricData(List<MetricDatum>).

      Parameters:
      metricData - a consumer that will call methods on MetricDatum.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • entityMetricData

      PutMetricDataRequest.Builder entityMetricData(Collection<EntityMetricData> entityMetricData)

      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.

      Parameters:
      entityMetricData - 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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • entityMetricData

      PutMetricDataRequest.Builder entityMetricData(EntityMetricData... entityMetricData)

      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.

      Parameters:
      entityMetricData - 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.

      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 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.

      This is a convenience method that creates an instance of the EntityMetricData.Builder avoiding the need to create one manually via EntityMetricData.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to entityMetricData(List<EntityMetricData>).

      Parameters:
      entityMetricData - a consumer that will call methods on EntityMetricData.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • strictEntityValidation

      PutMetricDataRequest.Builder strictEntityValidation(Boolean 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 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 in the CloudWatch User Guide.

      This parameter is required when EntityMetricData is 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 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 in the CloudWatch User Guide.

      This parameter is required when EntityMetricData is 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.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.