Class CfnMetricStream.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnMetricStream>
- Enclosing class:
CfnMetricStream
CfnMetricStream
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static CfnMetricStream.Builder
excludeFilters
(List<? extends Object> excludeFilters) If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here.excludeFilters
(IResolvable excludeFilters) If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here.firehoseArn
(String firehoseArn) The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.includeFilters
(List<? extends Object> includeFilters) If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here.includeFilters
(IResolvable includeFilters) If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here.includeLinkedAccountsMetrics
(Boolean includeLinkedAccountsMetrics) If you are creating a metric stream in a monitoring account, specifytrue
to include metrics from source accounts that are linked to this monitoring account, in the metric stream.includeLinkedAccountsMetrics
(IResolvable includeLinkedAccountsMetrics) If you are creating a metric stream in a monitoring account, specifytrue
to include metrics from source accounts that are linked to this monitoring account, in the metric stream.If you are creating a new metric stream, this is the name for the new stream.outputFormat
(String outputFormat) The output format for the stream.The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Firehose resources.statisticsConfigurations
(List<? extends Object> statisticsConfigurations) By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed.statisticsConfigurations
(IResolvable statisticsConfigurations) By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed.An array of key-value pairs to apply to the metric stream.
-
Method Details
-
create
@Stability(Stable) public static CfnMetricStream.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnMetricStream.Builder
.
-
firehoseArn
The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.This Amazon Kinesis Firehose delivery stream must already exist and must be in the same account as the metric stream.
- Parameters:
firehoseArn
- The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream. This parameter is required.- Returns:
this
- See Also:
-
outputFormat
The output format for the stream.Valid values are
json
,opentelemetry1.0
andopentelemetry0.7
For more information about metric stream output formats, see Metric streams output formats .This parameter is required.
- Parameters:
outputFormat
- The output format for the stream. This parameter is required.- Returns:
this
- See Also:
-
roleArn
The ARN of an IAM role that this metric stream will use to access Amazon Kinesis 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
firehose:PutRecord
andfirehose:PutRecordBatch
permissions.- Parameters:
roleArn
- The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. This parameter is required.- Returns:
this
- See Also:
-
excludeFilters
If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here.You cannot specify both
IncludeFilters
andExcludeFilters
in the same metric stream.When you modify the
IncludeFilters
orExcludeFilters
of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update.- Parameters:
excludeFilters
- If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here. This parameter is required.- Returns:
this
- See Also:
-
excludeFilters
@Stability(Stable) public CfnMetricStream.Builder excludeFilters(List<? extends Object> excludeFilters) If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here.You cannot specify both
IncludeFilters
andExcludeFilters
in the same metric stream.When you modify the
IncludeFilters
orExcludeFilters
of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update.- Parameters:
excludeFilters
- If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here. This parameter is required.- Returns:
this
- See Also:
-
includeFilters
If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here.You cannot specify both
IncludeFilters
andExcludeFilters
in the same metric stream.When you modify the
IncludeFilters
orExcludeFilters
of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update.- Parameters:
includeFilters
- If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here. This parameter is required.- Returns:
this
- See Also:
-
includeFilters
@Stability(Stable) public CfnMetricStream.Builder includeFilters(List<? extends Object> includeFilters) If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here.You cannot specify both
IncludeFilters
andExcludeFilters
in the same metric stream.When you modify the
IncludeFilters
orExcludeFilters
of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update.- Parameters:
includeFilters
- If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here. This parameter is required.- Returns:
this
- See Also:
-
includeLinkedAccountsMetrics
@Stability(Stable) public CfnMetricStream.Builder includeLinkedAccountsMetrics(Boolean includeLinkedAccountsMetrics) If you are creating a metric stream in a monitoring account, specifytrue
to include metrics from source accounts that are linked to this monitoring account, in the metric stream.The default is
false
.For more information about linking accounts, see CloudWatch cross-account observability
- Parameters:
includeLinkedAccountsMetrics
- If you are creating a metric stream in a monitoring account, specifytrue
to include metrics from source accounts that are linked to this monitoring account, in the metric stream. This parameter is required.- Returns:
this
- See Also:
-
includeLinkedAccountsMetrics
@Stability(Stable) public CfnMetricStream.Builder includeLinkedAccountsMetrics(IResolvable includeLinkedAccountsMetrics) If you are creating a metric stream in a monitoring account, specifytrue
to include metrics from source accounts that are linked to this monitoring account, in the metric stream.The default is
false
.For more information about linking accounts, see CloudWatch cross-account observability
- Parameters:
includeLinkedAccountsMetrics
- If you are creating a metric stream in a monitoring account, specifytrue
to include metrics from source accounts that are linked to this monitoring account, in the metric stream. This parameter is required.- Returns:
this
- See Also:
-
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.
- Parameters:
name
- If you are creating a new metric stream, this is the name for the new stream. This parameter is required.- Returns:
this
- See Also:
-
statisticsConfigurations
@Stability(Stable) public CfnMetricStream.Builder statisticsConfigurations(IResolvable 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 theOutputFormat
isjson
, you can stream any additional statistic that is supported by CloudWatch , listed in CloudWatch statistics definitions . If theOutputFormat
is OpenTelemetry, you can stream percentile statistics.- Parameters:
statisticsConfigurations
- By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. This parameter is required.- Returns:
this
- See Also:
-
statisticsConfigurations
@Stability(Stable) public CfnMetricStream.Builder statisticsConfigurations(List<? extends Object> 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 theOutputFormat
isjson
, you can stream any additional statistic that is supported by CloudWatch , listed in CloudWatch statistics definitions . If theOutputFormat
is OpenTelemetry, you can stream percentile statistics.- Parameters:
statisticsConfigurations
- By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. This parameter is required.- Returns:
this
- See Also:
-
tags
An array of key-value pairs to apply to the metric stream.For more information, see Tag .
- Parameters:
tags
- An array of key-value pairs to apply to the metric stream. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnMetricStream>
- Returns:
- a newly built instance of
CfnMetricStream
.
-