com.pulumi.aws.cloudwatch.outputs.MetricAlarmMetricQueryMetric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
The newest version!
// *** 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.aws.cloudwatch.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class MetricAlarmMetricQueryMetric {
/**
* @return The dimensions for this metric. For the list of available dimensions see the AWS documentation [here](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
*
*/
private @Nullable Map dimensions;
/**
* @return The name for this metric.
* See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
*
*/
private String metricName;
/**
* @return The namespace for this metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html).
* See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
*
*/
private @Nullable String namespace;
/**
* @return Granularity in seconds of returned data points.
* For metrics with regular resolution, valid values are any multiple of `60`.
* For high-resolution metrics, valid values are `1`, `5`, `10`, `30`, or any multiple of `60`.
*
*/
private Integer period;
/**
* @return The statistic to apply to this metric.
* See docs for [supported statistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html).
*
*/
private String stat;
/**
* @return The unit for this metric.
*
*/
private @Nullable String unit;
private MetricAlarmMetricQueryMetric() {}
/**
* @return The dimensions for this metric. For the list of available dimensions see the AWS documentation [here](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
*
*/
public Map dimensions() {
return this.dimensions == null ? Map.of() : this.dimensions;
}
/**
* @return The name for this metric.
* See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
*
*/
public String metricName() {
return this.metricName;
}
/**
* @return The namespace for this metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html).
* See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
*
*/
public Optional namespace() {
return Optional.ofNullable(this.namespace);
}
/**
* @return Granularity in seconds of returned data points.
* For metrics with regular resolution, valid values are any multiple of `60`.
* For high-resolution metrics, valid values are `1`, `5`, `10`, `30`, or any multiple of `60`.
*
*/
public Integer period() {
return this.period;
}
/**
* @return The statistic to apply to this metric.
* See docs for [supported statistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html).
*
*/
public String stat() {
return this.stat;
}
/**
* @return The unit for this metric.
*
*/
public Optional unit() {
return Optional.ofNullable(this.unit);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(MetricAlarmMetricQueryMetric defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Map dimensions;
private String metricName;
private @Nullable String namespace;
private Integer period;
private String stat;
private @Nullable String unit;
public Builder() {}
public Builder(MetricAlarmMetricQueryMetric defaults) {
Objects.requireNonNull(defaults);
this.dimensions = defaults.dimensions;
this.metricName = defaults.metricName;
this.namespace = defaults.namespace;
this.period = defaults.period;
this.stat = defaults.stat;
this.unit = defaults.unit;
}
@CustomType.Setter
public Builder dimensions(@Nullable Map dimensions) {
this.dimensions = dimensions;
return this;
}
@CustomType.Setter
public Builder metricName(String metricName) {
if (metricName == null) {
throw new MissingRequiredPropertyException("MetricAlarmMetricQueryMetric", "metricName");
}
this.metricName = metricName;
return this;
}
@CustomType.Setter
public Builder namespace(@Nullable String namespace) {
this.namespace = namespace;
return this;
}
@CustomType.Setter
public Builder period(Integer period) {
if (period == null) {
throw new MissingRequiredPropertyException("MetricAlarmMetricQueryMetric", "period");
}
this.period = period;
return this;
}
@CustomType.Setter
public Builder stat(String stat) {
if (stat == null) {
throw new MissingRequiredPropertyException("MetricAlarmMetricQueryMetric", "stat");
}
this.stat = stat;
return this;
}
@CustomType.Setter
public Builder unit(@Nullable String unit) {
this.unit = unit;
return this;
}
public MetricAlarmMetricQueryMetric build() {
final var _resultValue = new MetricAlarmMetricQueryMetric();
_resultValue.dimensions = dimensions;
_resultValue.metricName = metricName;
_resultValue.namespace = namespace;
_resultValue.period = period;
_resultValue.stat = stat;
_resultValue.unit = unit;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy