
com.pulumi.azurenative.awsconnector.outputs.MetricTransformationResponse Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.awsconnector.outputs;
import com.pulumi.azurenative.awsconnector.outputs.DimensionResponse;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class MetricTransformationResponse {
/**
* @return (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
*
*/
private @Nullable Integer defaultValue;
/**
* @return The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as ``IPAddress`` or ``requestID`` as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see [Creating a Billing Alarm to Monitor Your Estimated Charges](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html).
*
*/
private @Nullable List dimensions;
/**
* @return The name of the CloudWatch metric.
*
*/
private @Nullable String metricName;
/**
* @return A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see [Namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace).
*
*/
private @Nullable String metricNamespace;
/**
* @return The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like ``Error``, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as ``$.size``.
*
*/
private @Nullable String metricValue;
/**
* @return The unit to assign to the metric. If you omit this, the unit is set as ``None``.
*
*/
private @Nullable String unit;
private MetricTransformationResponse() {}
/**
* @return (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
*
*/
public Optional defaultValue() {
return Optional.ofNullable(this.defaultValue);
}
/**
* @return The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as ``IPAddress`` or ``requestID`` as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric. CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges. You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see [Creating a Billing Alarm to Monitor Your Estimated Charges](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html).
*
*/
public List dimensions() {
return this.dimensions == null ? List.of() : this.dimensions;
}
/**
* @return The name of the CloudWatch metric.
*
*/
public Optional metricName() {
return Optional.ofNullable(this.metricName);
}
/**
* @return A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see [Namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace).
*
*/
public Optional metricNamespace() {
return Optional.ofNullable(this.metricNamespace);
}
/**
* @return The value that is published to the CloudWatch metric. For example, if you're counting the occurrences of a particular term like ``Error``, specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using $. followed by the name of the field that you specified in the filter pattern, such as ``$.size``.
*
*/
public Optional metricValue() {
return Optional.ofNullable(this.metricValue);
}
/**
* @return The unit to assign to the metric. If you omit this, the unit is set as ``None``.
*
*/
public Optional unit() {
return Optional.ofNullable(this.unit);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(MetricTransformationResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer defaultValue;
private @Nullable List dimensions;
private @Nullable String metricName;
private @Nullable String metricNamespace;
private @Nullable String metricValue;
private @Nullable String unit;
public Builder() {}
public Builder(MetricTransformationResponse defaults) {
Objects.requireNonNull(defaults);
this.defaultValue = defaults.defaultValue;
this.dimensions = defaults.dimensions;
this.metricName = defaults.metricName;
this.metricNamespace = defaults.metricNamespace;
this.metricValue = defaults.metricValue;
this.unit = defaults.unit;
}
@CustomType.Setter
public Builder defaultValue(@Nullable Integer defaultValue) {
this.defaultValue = defaultValue;
return this;
}
@CustomType.Setter
public Builder dimensions(@Nullable List dimensions) {
this.dimensions = dimensions;
return this;
}
public Builder dimensions(DimensionResponse... dimensions) {
return dimensions(List.of(dimensions));
}
@CustomType.Setter
public Builder metricName(@Nullable String metricName) {
this.metricName = metricName;
return this;
}
@CustomType.Setter
public Builder metricNamespace(@Nullable String metricNamespace) {
this.metricNamespace = metricNamespace;
return this;
}
@CustomType.Setter
public Builder metricValue(@Nullable String metricValue) {
this.metricValue = metricValue;
return this;
}
@CustomType.Setter
public Builder unit(@Nullable String unit) {
this.unit = unit;
return this;
}
public MetricTransformationResponse build() {
final var _resultValue = new MetricTransformationResponse();
_resultValue.defaultValue = defaultValue;
_resultValue.dimensions = dimensions;
_resultValue.metricName = metricName;
_resultValue.metricNamespace = metricNamespace;
_resultValue.metricValue = metricValue;
_resultValue.unit = unit;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy