com.amazonaws.services.cloudwatch.model.PutMetricStreamRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudwatch Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.cloudwatch.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PutMetricStreamRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* If you are creating a new metric stream, this is the name for the new stream. The name must be different than the
* names of other metric streams in this account and Region.
*
*
* If you are updating a metric stream, specify the name of that stream here.
*
*
* Valid characters are A-Z, a-z, 0-9, "-" and "_".
*
*/
private String name;
/**
*
* If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify
* here.
*
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
*
*/
private com.amazonaws.internal.SdkInternalList includeFilters;
/**
*
* If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that
* you specify here.
*
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
*
*/
private com.amazonaws.internal.SdkInternalList excludeFilters;
/**
*
* The ARN of the Amazon Kinesis Data Firehose delivery stream to use for this metric stream. This Amazon Kinesis
* Data Firehose delivery stream must already exist and must be in the same account as the metric stream.
*
*/
private String firehoseArn;
/**
*
* The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Data Firehose resources. This
* IAM role must already exist and must be in the same account as the metric stream. This IAM role must include the
* following permissions:
*
*
* -
*
* firehose:PutRecord
*
*
* -
*
* firehose:PutRecordBatch
*
*
*
*/
private String roleArn;
/**
*
* The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see
* Metric streams output formats.
*
*/
private String outputFormat;
/**
*
* A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with a metric
* stream.
*
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions by
* granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this operation to
* update an existing metric stream, any tags you specify in this parameter are ignored. To change the tags of an
* existing metric stream, use TagResource or
* UntagResource.
*
*/
private com.amazonaws.internal.SdkInternalList tags;
/**
*
* By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have the
* metric stream also send additional statistics in the stream. This array can have up to 100 members.
*
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to stream for
* those metrics. The additional statistics that you can stream depend on the stream's OutputFormat
. If
* the OutputFormat
is json
, you can stream any additional statistic that is supported by
* CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
or
* opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
*
*/
private com.amazonaws.internal.SdkInternalList statisticsConfigurations;
/**
*
* If you are creating a metric stream in a monitoring account, specify true
to include metrics from
* source accounts in the metric stream.
*
*/
private Boolean includeLinkedAccountsMetrics;
/**
*
* If you are creating a new metric stream, this is the name for the new stream. The name must be different than the
* names of other metric streams in this account and Region.
*
*
* If you are updating a metric stream, specify the name of that stream here.
*
*
* Valid characters are A-Z, a-z, 0-9, "-" and "_".
*
*
* @param name
* If you are creating a new metric stream, this is the name for the new stream. The name must be different
* than the names of other metric streams in this account and Region.
*
* If you are updating a metric stream, specify the name of that stream here.
*
*
* Valid characters are A-Z, a-z, 0-9, "-" and "_".
*/
public void setName(String name) {
this.name = name;
}
/**
*
* If you are creating a new metric stream, this is the name for the new stream. The name must be different than the
* names of other metric streams in this account and Region.
*
*
* If you are updating a metric stream, specify the name of that stream here.
*
*
* Valid characters are A-Z, a-z, 0-9, "-" and "_".
*
*
* @return If you are creating a new metric stream, this is the name for the new stream. The name must be different
* than the names of other metric streams in this account and Region.
*
* If you are updating a metric stream, specify the name of that stream here.
*
*
* Valid characters are A-Z, a-z, 0-9, "-" and "_".
*/
public String getName() {
return this.name;
}
/**
*
* If you are creating a new metric stream, this is the name for the new stream. The name must be different than the
* names of other metric streams in this account and Region.
*
*
* If you are updating a metric stream, specify the name of that stream here.
*
*
* Valid characters are A-Z, a-z, 0-9, "-" and "_".
*
*
* @param name
* If you are creating a new metric stream, this is the name for the new stream. The name must be different
* than the names of other metric streams in this account and Region.
*
* If you are updating a metric stream, specify the name of that stream here.
*
*
* Valid characters are A-Z, a-z, 0-9, "-" and "_".
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withName(String name) {
setName(name);
return this;
}
/**
*
* If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify
* here.
*
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
*
*
* @return If you specify this parameter, the stream sends only the metrics from the metric namespaces that you
* specify here.
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
*/
public java.util.List getIncludeFilters() {
if (includeFilters == null) {
includeFilters = new com.amazonaws.internal.SdkInternalList();
}
return includeFilters;
}
/**
*
* If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify
* here.
*
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
*
*
* @param includeFilters
* If you specify this parameter, the stream sends only the metrics from the metric namespaces that you
* specify here.
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
*/
public void setIncludeFilters(java.util.Collection includeFilters) {
if (includeFilters == null) {
this.includeFilters = null;
return;
}
this.includeFilters = new com.amazonaws.internal.SdkInternalList(includeFilters);
}
/**
*
* If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify
* here.
*
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setIncludeFilters(java.util.Collection)} or {@link #withIncludeFilters(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param includeFilters
* If you specify this parameter, the stream sends only the metrics from the metric namespaces that you
* specify here.
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withIncludeFilters(MetricStreamFilter... includeFilters) {
if (this.includeFilters == null) {
setIncludeFilters(new com.amazonaws.internal.SdkInternalList(includeFilters.length));
}
for (MetricStreamFilter ele : includeFilters) {
this.includeFilters.add(ele);
}
return this;
}
/**
*
* If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify
* here.
*
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
*
*
* @param includeFilters
* If you specify this parameter, the stream sends only the metrics from the metric namespaces that you
* specify here.
*
* You cannot include IncludeFilters
and ExcludeFilters
in the same operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withIncludeFilters(java.util.Collection includeFilters) {
setIncludeFilters(includeFilters);
return this;
}
/**
*
* If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that
* you specify here.
*
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
*
*
* @return If you specify this parameter, the stream sends metrics from all metric namespaces except for the
* namespaces that you specify here.
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
*/
public java.util.List getExcludeFilters() {
if (excludeFilters == null) {
excludeFilters = new com.amazonaws.internal.SdkInternalList();
}
return excludeFilters;
}
/**
*
* If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that
* you specify here.
*
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
*
*
* @param excludeFilters
* If you specify this parameter, the stream sends metrics from all metric namespaces except for the
* namespaces that you specify here.
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
*/
public void setExcludeFilters(java.util.Collection excludeFilters) {
if (excludeFilters == null) {
this.excludeFilters = null;
return;
}
this.excludeFilters = new com.amazonaws.internal.SdkInternalList(excludeFilters);
}
/**
*
* If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that
* you specify here.
*
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setExcludeFilters(java.util.Collection)} or {@link #withExcludeFilters(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param excludeFilters
* If you specify this parameter, the stream sends metrics from all metric namespaces except for the
* namespaces that you specify here.
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withExcludeFilters(MetricStreamFilter... excludeFilters) {
if (this.excludeFilters == null) {
setExcludeFilters(new com.amazonaws.internal.SdkInternalList(excludeFilters.length));
}
for (MetricStreamFilter ele : excludeFilters) {
this.excludeFilters.add(ele);
}
return this;
}
/**
*
* If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that
* you specify here.
*
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
*
*
* @param excludeFilters
* If you specify this parameter, the stream sends metrics from all metric namespaces except for the
* namespaces that you specify here.
*
* You cannot include ExcludeFilters
and IncludeFilters
in the same operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withExcludeFilters(java.util.Collection excludeFilters) {
setExcludeFilters(excludeFilters);
return this;
}
/**
*
* The ARN of the Amazon Kinesis Data Firehose delivery stream to use for this metric stream. This Amazon Kinesis
* Data Firehose delivery stream must already exist and must be in the same account as the metric stream.
*
*
* @param firehoseArn
* The ARN of the Amazon Kinesis Data Firehose delivery stream to use for this metric stream. This Amazon
* Kinesis Data Firehose delivery stream must already exist and must be in the same account as the metric
* stream.
*/
public void setFirehoseArn(String firehoseArn) {
this.firehoseArn = firehoseArn;
}
/**
*
* The ARN of the Amazon Kinesis Data Firehose delivery stream to use for this metric stream. This Amazon Kinesis
* Data Firehose delivery stream must already exist and must be in the same account as the metric stream.
*
*
* @return The ARN of the Amazon Kinesis Data Firehose delivery stream to use for this metric stream. This Amazon
* Kinesis Data Firehose delivery stream must already exist and must be in the same account as the metric
* stream.
*/
public String getFirehoseArn() {
return this.firehoseArn;
}
/**
*
* The ARN of the Amazon Kinesis Data Firehose delivery stream to use for this metric stream. This Amazon Kinesis
* Data Firehose delivery stream must already exist and must be in the same account as the metric stream.
*
*
* @param firehoseArn
* The ARN of the Amazon Kinesis Data Firehose delivery stream to use for this metric stream. This Amazon
* Kinesis Data Firehose delivery stream must already exist and must be in the same account as the metric
* stream.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withFirehoseArn(String firehoseArn) {
setFirehoseArn(firehoseArn);
return this;
}
/**
*
* The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Data Firehose resources. This
* IAM role must already exist and must be in the same account as the metric stream. This IAM role must include the
* following permissions:
*
*
* -
*
* firehose:PutRecord
*
*
* -
*
* firehose:PutRecordBatch
*
*
*
*
* @param roleArn
* The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Data Firehose resources.
* This IAM role must already exist and must be in the same account as the metric stream. This IAM role must
* include the following permissions:
*
* -
*
* firehose:PutRecord
*
*
* -
*
* firehose:PutRecordBatch
*
*
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Data Firehose resources. This
* IAM role must already exist and must be in the same account as the metric stream. This IAM role must include the
* following permissions:
*
*
* -
*
* firehose:PutRecord
*
*
* -
*
* firehose:PutRecordBatch
*
*
*
*
* @return The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Data Firehose resources.
* This IAM role must already exist and must be in the same account as the metric stream. This IAM role must
* include the following permissions:
*
* -
*
* firehose:PutRecord
*
*
* -
*
* firehose:PutRecordBatch
*
*
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Data Firehose resources. This
* IAM role must already exist and must be in the same account as the metric stream. This IAM role must include the
* following permissions:
*
*
* -
*
* firehose:PutRecord
*
*
* -
*
* firehose:PutRecordBatch
*
*
*
*
* @param roleArn
* The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Data Firehose resources.
* This IAM role must already exist and must be in the same account as the metric stream. This IAM role must
* include the following permissions:
*
* -
*
* firehose:PutRecord
*
*
* -
*
* firehose:PutRecordBatch
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withRoleArn(String roleArn) {
setRoleArn(roleArn);
return this;
}
/**
*
* The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see
* Metric streams output formats.
*
*
* @param outputFormat
* The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see Metric streams output formats.
* @see MetricStreamOutputFormat
*/
public void setOutputFormat(String outputFormat) {
this.outputFormat = outputFormat;
}
/**
*
* The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see
* Metric streams output formats.
*
*
* @return The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see Metric streams output formats.
* @see MetricStreamOutputFormat
*/
public String getOutputFormat() {
return this.outputFormat;
}
/**
*
* The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see
* Metric streams output formats.
*
*
* @param outputFormat
* The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see Metric streams output formats.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricStreamOutputFormat
*/
public PutMetricStreamRequest withOutputFormat(String outputFormat) {
setOutputFormat(outputFormat);
return this;
}
/**
*
* The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see
* Metric streams output formats.
*
*
* @param outputFormat
* The output format for the stream. Valid values are json
, opentelemetry1.0
, and
* opentelemetry0.7
. For more information about metric stream output formats, see Metric streams output formats.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricStreamOutputFormat
*/
public PutMetricStreamRequest withOutputFormat(MetricStreamOutputFormat outputFormat) {
this.outputFormat = outputFormat.toString();
return this;
}
/**
*
* A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with a metric
* stream.
*
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions by
* granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this operation to
* update an existing metric stream, any tags you specify in this parameter are ignored. To change the tags of an
* existing metric stream, use TagResource or
* UntagResource.
*
*
* @return A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with
* a metric stream.
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions
* by granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this
* operation to update an existing metric stream, any tags you specify in this parameter are ignored. To
* change the tags of an existing metric stream, use TagResource or UntagResource.
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.SdkInternalList();
}
return tags;
}
/**
*
* A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with a metric
* stream.
*
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions by
* granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this operation to
* update an existing metric stream, any tags you specify in this parameter are ignored. To change the tags of an
* existing metric stream, use TagResource or
* UntagResource.
*
*
* @param tags
* A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with a
* metric stream.
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions
* by granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this operation
* to update an existing metric stream, any tags you specify in this parameter are ignored. To change the
* tags of an existing metric stream, use TagResource or UntagResource.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new com.amazonaws.internal.SdkInternalList(tags);
}
/**
*
* A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with a metric
* stream.
*
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions by
* granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this operation to
* update an existing metric stream, any tags you specify in this parameter are ignored. To change the tags of an
* existing metric stream, use TagResource or
* UntagResource.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with a
* metric stream.
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions
* by granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this operation
* to update an existing metric stream, any tags you specify in this parameter are ignored. To change the
* tags of an existing metric stream, use TagResource or UntagResource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with a metric
* stream.
*
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions by
* granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this operation to
* update an existing metric stream, any tags you specify in this parameter are ignored. To change the tags of an
* existing metric stream, use TagResource or
* UntagResource.
*
*
* @param tags
* A list of key-value pairs to associate with the metric stream. You can associate as many as 50 tags with a
* metric stream.
*
* Tags can help you organize and categorize your resources. You can also use them to scope user permissions
* by granting a user permission to access or change only resources with certain tag values.
*
*
* You can use this parameter only when you are creating a new metric stream. If you are using this operation
* to update an existing metric stream, any tags you specify in this parameter are ignored. To change the
* tags of an existing metric stream, use TagResource or UntagResource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have the
* metric stream also send additional statistics in the stream. This array can have up to 100 members.
*
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to stream for
* those metrics. The additional statistics that you can stream depend on the stream's OutputFormat
. If
* the OutputFormat
is json
, you can stream any additional statistic that is supported by
* CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
or
* opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
*
*
* @return By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have
* the metric stream also send additional statistics in the stream. This array can have up to 100
* members.
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to
* stream for those metrics. The additional statistics that you can stream depend on the stream's
* OutputFormat
. If the OutputFormat
is json
, you can stream any
* additional statistic that is supported by CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
* or opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
*/
public java.util.List getStatisticsConfigurations() {
if (statisticsConfigurations == null) {
statisticsConfigurations = new com.amazonaws.internal.SdkInternalList();
}
return statisticsConfigurations;
}
/**
*
* By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have the
* metric stream also send additional statistics in the stream. This array can have up to 100 members.
*
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to stream for
* those metrics. The additional statistics that you can stream depend on the stream's OutputFormat
. If
* the OutputFormat
is json
, you can stream any additional statistic that is supported by
* CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
or
* opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
*
*
* @param statisticsConfigurations
* By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have
* the metric stream also send additional statistics in the stream. This array can have up to 100
* members.
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to
* stream for those metrics. The additional statistics that you can stream depend on the stream's
* OutputFormat
. If the OutputFormat
is json
, you can stream any
* additional statistic that is supported by CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
* or opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
*/
public void setStatisticsConfigurations(java.util.Collection statisticsConfigurations) {
if (statisticsConfigurations == null) {
this.statisticsConfigurations = null;
return;
}
this.statisticsConfigurations = new com.amazonaws.internal.SdkInternalList(statisticsConfigurations);
}
/**
*
* By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have the
* metric stream also send additional statistics in the stream. This array can have up to 100 members.
*
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to stream for
* those metrics. The additional statistics that you can stream depend on the stream's OutputFormat
. If
* the OutputFormat
is json
, you can stream any additional statistic that is supported by
* CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
or
* opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setStatisticsConfigurations(java.util.Collection)} or
* {@link #withStatisticsConfigurations(java.util.Collection)} if you want to override the existing values.
*
*
* @param statisticsConfigurations
* By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have
* the metric stream also send additional statistics in the stream. This array can have up to 100
* members.
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to
* stream for those metrics. The additional statistics that you can stream depend on the stream's
* OutputFormat
. If the OutputFormat
is json
, you can stream any
* additional statistic that is supported by CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
* or opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withStatisticsConfigurations(MetricStreamStatisticsConfiguration... statisticsConfigurations) {
if (this.statisticsConfigurations == null) {
setStatisticsConfigurations(new com.amazonaws.internal.SdkInternalList(statisticsConfigurations.length));
}
for (MetricStreamStatisticsConfiguration ele : statisticsConfigurations) {
this.statisticsConfigurations.add(ele);
}
return this;
}
/**
*
* By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have the
* metric stream also send additional statistics in the stream. This array can have up to 100 members.
*
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to stream for
* those metrics. The additional statistics that you can stream depend on the stream's OutputFormat
. If
* the OutputFormat
is json
, you can stream any additional statistic that is supported by
* CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
or
* opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
*
*
* @param statisticsConfigurations
* By default, a metric stream always sends the MAX
, MIN
, SUM
, and
* SAMPLECOUNT
statistics for each metric that is streamed. You can use this parameter to have
* the metric stream also send additional statistics in the stream. This array can have up to 100
* members.
*
* For each entry in this array, you specify one or more metrics and the list of additional statistics to
* stream for those metrics. The additional statistics that you can stream depend on the stream's
* OutputFormat
. If the OutputFormat
is json
, you can stream any
* additional statistic that is supported by CloudWatch, listed in
* CloudWatch statistics definitions. If the OutputFormat
is opentelemetry1.0
* or opentelemetry0.7
, you can stream percentile statistics such as p95, p99.9, and so on.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withStatisticsConfigurations(java.util.Collection statisticsConfigurations) {
setStatisticsConfigurations(statisticsConfigurations);
return this;
}
/**
*
* If you are creating a metric stream in a monitoring account, specify true
to include metrics from
* source accounts in the metric stream.
*
*
* @param includeLinkedAccountsMetrics
* If you are creating a metric stream in a monitoring account, specify true
to include metrics
* from source accounts in the metric stream.
*/
public void setIncludeLinkedAccountsMetrics(Boolean includeLinkedAccountsMetrics) {
this.includeLinkedAccountsMetrics = includeLinkedAccountsMetrics;
}
/**
*
* If you are creating a metric stream in a monitoring account, specify true
to include metrics from
* source accounts in the metric stream.
*
*
* @return If you are creating a metric stream in a monitoring account, specify true
to include metrics
* from source accounts in the metric stream.
*/
public Boolean getIncludeLinkedAccountsMetrics() {
return this.includeLinkedAccountsMetrics;
}
/**
*
* If you are creating a metric stream in a monitoring account, specify true
to include metrics from
* source accounts in the metric stream.
*
*
* @param includeLinkedAccountsMetrics
* If you are creating a metric stream in a monitoring account, specify true
to include metrics
* from source accounts in the metric stream.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricStreamRequest withIncludeLinkedAccountsMetrics(Boolean includeLinkedAccountsMetrics) {
setIncludeLinkedAccountsMetrics(includeLinkedAccountsMetrics);
return this;
}
/**
*
* If you are creating a metric stream in a monitoring account, specify true
to include metrics from
* source accounts in the metric stream.
*
*
* @return If you are creating a metric stream in a monitoring account, specify true
to include metrics
* from source accounts in the metric stream.
*/
public Boolean isIncludeLinkedAccountsMetrics() {
return this.includeLinkedAccountsMetrics;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getIncludeFilters() != null)
sb.append("IncludeFilters: ").append(getIncludeFilters()).append(",");
if (getExcludeFilters() != null)
sb.append("ExcludeFilters: ").append(getExcludeFilters()).append(",");
if (getFirehoseArn() != null)
sb.append("FirehoseArn: ").append(getFirehoseArn()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getOutputFormat() != null)
sb.append("OutputFormat: ").append(getOutputFormat()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getStatisticsConfigurations() != null)
sb.append("StatisticsConfigurations: ").append(getStatisticsConfigurations()).append(",");
if (getIncludeLinkedAccountsMetrics() != null)
sb.append("IncludeLinkedAccountsMetrics: ").append(getIncludeLinkedAccountsMetrics());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PutMetricStreamRequest == false)
return false;
PutMetricStreamRequest other = (PutMetricStreamRequest) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getIncludeFilters() == null ^ this.getIncludeFilters() == null)
return false;
if (other.getIncludeFilters() != null && other.getIncludeFilters().equals(this.getIncludeFilters()) == false)
return false;
if (other.getExcludeFilters() == null ^ this.getExcludeFilters() == null)
return false;
if (other.getExcludeFilters() != null && other.getExcludeFilters().equals(this.getExcludeFilters()) == false)
return false;
if (other.getFirehoseArn() == null ^ this.getFirehoseArn() == null)
return false;
if (other.getFirehoseArn() != null && other.getFirehoseArn().equals(this.getFirehoseArn()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
if (other.getOutputFormat() == null ^ this.getOutputFormat() == null)
return false;
if (other.getOutputFormat() != null && other.getOutputFormat().equals(this.getOutputFormat()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getStatisticsConfigurations() == null ^ this.getStatisticsConfigurations() == null)
return false;
if (other.getStatisticsConfigurations() != null && other.getStatisticsConfigurations().equals(this.getStatisticsConfigurations()) == false)
return false;
if (other.getIncludeLinkedAccountsMetrics() == null ^ this.getIncludeLinkedAccountsMetrics() == null)
return false;
if (other.getIncludeLinkedAccountsMetrics() != null && other.getIncludeLinkedAccountsMetrics().equals(this.getIncludeLinkedAccountsMetrics()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getIncludeFilters() == null) ? 0 : getIncludeFilters().hashCode());
hashCode = prime * hashCode + ((getExcludeFilters() == null) ? 0 : getExcludeFilters().hashCode());
hashCode = prime * hashCode + ((getFirehoseArn() == null) ? 0 : getFirehoseArn().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getOutputFormat() == null) ? 0 : getOutputFormat().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getStatisticsConfigurations() == null) ? 0 : getStatisticsConfigurations().hashCode());
hashCode = prime * hashCode + ((getIncludeLinkedAccountsMetrics() == null) ? 0 : getIncludeLinkedAccountsMetrics().hashCode());
return hashCode;
}
@Override
public PutMetricStreamRequest clone() {
return (PutMetricStreamRequest) super.clone();
}
}