1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. cloudwatch
  5. MetricStream

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.cloudwatch.MetricStream

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

Resource Type definition for Metric Stream

Example Usage

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var myMetricStream = new AwsNative.CloudWatch.MetricStream("myMetricStream", new()
    {
        OutputFormat = "json",
        FirehoseArn = "arn:aws:firehose:us-east-1:123456789012:deliverystream/MyDeliveryStream",
        RoleArn = "arn:aws:iam::123456789012:role/service-role/MyRole",
        IncludeFilters = new[]
        {
            new AwsNative.CloudWatch.Inputs.MetricStreamFilterArgs
            {
                Namespace = "AWS/ELB",
            },
            new AwsNative.CloudWatch.Inputs.MetricStreamFilterArgs
            {
                Namespace = "AWS/EC2",
            },
        },
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/cloudwatch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudwatch.NewMetricStream(ctx, "myMetricStream", &cloudwatch.MetricStreamArgs{
			OutputFormat: pulumi.String("json"),
			FirehoseArn:  pulumi.String("arn:aws:firehose:us-east-1:123456789012:deliverystream/MyDeliveryStream"),
			RoleArn:      pulumi.String("arn:aws:iam::123456789012:role/service-role/MyRole"),
			IncludeFilters: cloudwatch.MetricStreamFilterArray{
				&cloudwatch.MetricStreamFilterArgs{
					Namespace: pulumi.String("AWS/ELB"),
				},
				&cloudwatch.MetricStreamFilterArgs{
					Namespace: pulumi.String("AWS/EC2"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const myMetricStream = new aws_native.cloudwatch.MetricStream("myMetricStream", {
    outputFormat: "json",
    firehoseArn: "arn:aws:firehose:us-east-1:123456789012:deliverystream/MyDeliveryStream",
    roleArn: "arn:aws:iam::123456789012:role/service-role/MyRole",
    includeFilters: [
        {
            namespace: "AWS/ELB",
        },
        {
            namespace: "AWS/EC2",
        },
    ],
});
Copy
import pulumi
import pulumi_aws_native as aws_native

my_metric_stream = aws_native.cloudwatch.MetricStream("myMetricStream",
    output_format="json",
    firehose_arn="arn:aws:firehose:us-east-1:123456789012:deliverystream/MyDeliveryStream",
    role_arn="arn:aws:iam::123456789012:role/service-role/MyRole",
    include_filters=[
        {
            "namespace": "AWS/ELB",
        },
        {
            "namespace": "AWS/EC2",
        },
    ])
Copy

Coming soon!

Create MetricStream Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MetricStream(name: string, args?: MetricStreamArgs, opts?: CustomResourceOptions);
@overload
def MetricStream(resource_name: str,
                 args: Optional[MetricStreamArgs] = None,
                 opts: Optional[ResourceOptions] = None)

@overload
def MetricStream(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 exclude_filters: Optional[Sequence[MetricStreamFilterArgs]] = None,
                 firehose_arn: Optional[str] = None,
                 include_filters: Optional[Sequence[MetricStreamFilterArgs]] = None,
                 include_linked_accounts_metrics: Optional[bool] = None,
                 name: Optional[str] = None,
                 output_format: Optional[str] = None,
                 role_arn: Optional[str] = None,
                 statistics_configurations: Optional[Sequence[MetricStreamStatisticsConfigurationArgs]] = None,
                 tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewMetricStream(ctx *Context, name string, args *MetricStreamArgs, opts ...ResourceOption) (*MetricStream, error)
public MetricStream(string name, MetricStreamArgs? args = null, CustomResourceOptions? opts = null)
public MetricStream(String name, MetricStreamArgs args)
public MetricStream(String name, MetricStreamArgs args, CustomResourceOptions options)
type: aws-native:cloudwatch:MetricStream
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args MetricStreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args MetricStreamArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args MetricStreamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args MetricStreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MetricStreamArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

MetricStream Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The MetricStream resource accepts the following input properties:

ExcludeFilters List<Pulumi.AwsNative.CloudWatch.Inputs.MetricStreamFilter>
Define which metrics will be not streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
FirehoseArn string
The ARN of the Kinesis Firehose where to stream the data.
IncludeFilters List<Pulumi.AwsNative.CloudWatch.Inputs.MetricStreamFilter>
Define which metrics will be streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
IncludeLinkedAccountsMetrics bool
If you are creating a metric stream in a monitoring account, specify true to include metrics from source accounts that are linked to this monitoring account, in the metric stream. The default is false.
Name string
Name of the metric stream.
OutputFormat string
The output format of the data streamed to the Kinesis Firehose.
RoleArn string
The ARN of the role that provides access to the Kinesis Firehose.
StatisticsConfigurations List<Pulumi.AwsNative.CloudWatch.Inputs.MetricStreamStatisticsConfiguration>
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.
Tags List<Pulumi.AwsNative.Inputs.Tag>
A set of tags to assign to the delivery stream.
ExcludeFilters []MetricStreamFilterArgs
Define which metrics will be not streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
FirehoseArn string
The ARN of the Kinesis Firehose where to stream the data.
IncludeFilters []MetricStreamFilterArgs
Define which metrics will be streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
IncludeLinkedAccountsMetrics bool
If you are creating a metric stream in a monitoring account, specify true to include metrics from source accounts that are linked to this monitoring account, in the metric stream. The default is false.
Name string
Name of the metric stream.
OutputFormat string
The output format of the data streamed to the Kinesis Firehose.
RoleArn string
The ARN of the role that provides access to the Kinesis Firehose.
StatisticsConfigurations []MetricStreamStatisticsConfigurationArgs
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.
Tags TagArgs
A set of tags to assign to the delivery stream.
excludeFilters List<MetricStreamFilter>
Define which metrics will be not streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
firehoseArn String
The ARN of the Kinesis Firehose where to stream the data.
includeFilters List<MetricStreamFilter>
Define which metrics will be streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
includeLinkedAccountsMetrics Boolean
If you are creating a metric stream in a monitoring account, specify true to include metrics from source accounts that are linked to this monitoring account, in the metric stream. The default is false.
name String
Name of the metric stream.
outputFormat String
The output format of the data streamed to the Kinesis Firehose.
roleArn String
The ARN of the role that provides access to the Kinesis Firehose.
statisticsConfigurations List<MetricStreamStatisticsConfiguration>
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.
tags List<Tag>
A set of tags to assign to the delivery stream.
excludeFilters MetricStreamFilter[]
Define which metrics will be not streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
firehoseArn string
The ARN of the Kinesis Firehose where to stream the data.
includeFilters MetricStreamFilter[]
Define which metrics will be streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
includeLinkedAccountsMetrics boolean
If you are creating a metric stream in a monitoring account, specify true to include metrics from source accounts that are linked to this monitoring account, in the metric stream. The default is false.
name string
Name of the metric stream.
outputFormat string
The output format of the data streamed to the Kinesis Firehose.
roleArn string
The ARN of the role that provides access to the Kinesis Firehose.
statisticsConfigurations MetricStreamStatisticsConfiguration[]
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.
tags Tag[]
A set of tags to assign to the delivery stream.
exclude_filters Sequence[MetricStreamFilterArgs]
Define which metrics will be not streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
firehose_arn str
The ARN of the Kinesis Firehose where to stream the data.
include_filters Sequence[MetricStreamFilterArgs]
Define which metrics will be streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
include_linked_accounts_metrics bool
If you are creating a metric stream in a monitoring account, specify true to include metrics from source accounts that are linked to this monitoring account, in the metric stream. The default is false.
name str
Name of the metric stream.
output_format str
The output format of the data streamed to the Kinesis Firehose.
role_arn str
The ARN of the role that provides access to the Kinesis Firehose.
statistics_configurations Sequence[MetricStreamStatisticsConfigurationArgs]
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.
tags Sequence[TagArgs]
A set of tags to assign to the delivery stream.
excludeFilters List<Property Map>
Define which metrics will be not streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
firehoseArn String
The ARN of the Kinesis Firehose where to stream the data.
includeFilters List<Property Map>
Define which metrics will be streamed. Metrics matched by multiple instances of MetricStreamFilter are joined with an OR operation by default. If both IncludeFilters and ExcludeFilters are omitted, all metrics in the account will be streamed. IncludeFilters and ExcludeFilters are mutually exclusive. Default to null.
includeLinkedAccountsMetrics Boolean
If you are creating a metric stream in a monitoring account, specify true to include metrics from source accounts that are linked to this monitoring account, in the metric stream. The default is false.
name String
Name of the metric stream.
outputFormat String
The output format of the data streamed to the Kinesis Firehose.
roleArn String
The ARN of the role that provides access to the Kinesis Firehose.
statisticsConfigurations List<Property Map>
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.
tags List<Property Map>
A set of tags to assign to the delivery stream.

Outputs

All input properties are implicitly available as output properties. Additionally, the MetricStream resource produces the following output properties:

Arn string
Amazon Resource Name of the metric stream.
CreationDate string
The date of creation of the metric stream.
Id string
The provider-assigned unique ID for this managed resource.
LastUpdateDate string
The date of the last update of the metric stream.
State string
Displays the state of the Metric Stream.
Arn string
Amazon Resource Name of the metric stream.
CreationDate string
The date of creation of the metric stream.
Id string
The provider-assigned unique ID for this managed resource.
LastUpdateDate string
The date of the last update of the metric stream.
State string
Displays the state of the Metric Stream.
arn String
Amazon Resource Name of the metric stream.
creationDate String
The date of creation of the metric stream.
id String
The provider-assigned unique ID for this managed resource.
lastUpdateDate String
The date of the last update of the metric stream.
state String
Displays the state of the Metric Stream.
arn string
Amazon Resource Name of the metric stream.
creationDate string
The date of creation of the metric stream.
id string
The provider-assigned unique ID for this managed resource.
lastUpdateDate string
The date of the last update of the metric stream.
state string
Displays the state of the Metric Stream.
arn str
Amazon Resource Name of the metric stream.
creation_date str
The date of creation of the metric stream.
id str
The provider-assigned unique ID for this managed resource.
last_update_date str
The date of the last update of the metric stream.
state str
Displays the state of the Metric Stream.
arn String
Amazon Resource Name of the metric stream.
creationDate String
The date of creation of the metric stream.
id String
The provider-assigned unique ID for this managed resource.
lastUpdateDate String
The date of the last update of the metric stream.
state String
Displays the state of the Metric Stream.

Supporting Types

MetricStreamFilter
, MetricStreamFilterArgs

Namespace This property is required. string
Only metrics with Namespace matching this value will be streamed.
MetricNames List<string>
Only metrics with MetricNames matching these values will be streamed. Must be set together with Namespace.
Namespace This property is required. string
Only metrics with Namespace matching this value will be streamed.
MetricNames []string
Only metrics with MetricNames matching these values will be streamed. Must be set together with Namespace.
namespace This property is required. String
Only metrics with Namespace matching this value will be streamed.
metricNames List<String>
Only metrics with MetricNames matching these values will be streamed. Must be set together with Namespace.
namespace This property is required. string
Only metrics with Namespace matching this value will be streamed.
metricNames string[]
Only metrics with MetricNames matching these values will be streamed. Must be set together with Namespace.
namespace This property is required. str
Only metrics with Namespace matching this value will be streamed.
metric_names Sequence[str]
Only metrics with MetricNames matching these values will be streamed. Must be set together with Namespace.
namespace This property is required. String
Only metrics with Namespace matching this value will be streamed.
metricNames List<String>
Only metrics with MetricNames matching these values will be streamed. Must be set together with Namespace.

MetricStreamStatisticsConfiguration
, MetricStreamStatisticsConfigurationArgs

AdditionalStatistics This property is required. List<string>
The additional statistics to stream for the metrics listed in IncludeMetrics.
IncludeMetrics This property is required. List<Pulumi.AwsNative.CloudWatch.Inputs.MetricStreamStatisticsMetric>
An array that defines the metrics that are to have additional statistics streamed.
AdditionalStatistics This property is required. []string
The additional statistics to stream for the metrics listed in IncludeMetrics.
IncludeMetrics This property is required. []MetricStreamStatisticsMetric
An array that defines the metrics that are to have additional statistics streamed.
additionalStatistics This property is required. List<String>
The additional statistics to stream for the metrics listed in IncludeMetrics.
includeMetrics This property is required. List<MetricStreamStatisticsMetric>
An array that defines the metrics that are to have additional statistics streamed.
additionalStatistics This property is required. string[]
The additional statistics to stream for the metrics listed in IncludeMetrics.
includeMetrics This property is required. MetricStreamStatisticsMetric[]
An array that defines the metrics that are to have additional statistics streamed.
additional_statistics This property is required. Sequence[str]
The additional statistics to stream for the metrics listed in IncludeMetrics.
include_metrics This property is required. Sequence[MetricStreamStatisticsMetric]
An array that defines the metrics that are to have additional statistics streamed.
additionalStatistics This property is required. List<String>
The additional statistics to stream for the metrics listed in IncludeMetrics.
includeMetrics This property is required. List<Property Map>
An array that defines the metrics that are to have additional statistics streamed.

MetricStreamStatisticsMetric
, MetricStreamStatisticsMetricArgs

MetricName This property is required. string
The name of the metric.
Namespace This property is required. string
The namespace of the metric.
MetricName This property is required. string
The name of the metric.
Namespace This property is required. string
The namespace of the metric.
metricName This property is required. String
The name of the metric.
namespace This property is required. String
The namespace of the metric.
metricName This property is required. string
The name of the metric.
namespace This property is required. string
The namespace of the metric.
metric_name This property is required. str
The name of the metric.
namespace This property is required. str
The namespace of the metric.
metricName This property is required. String
The name of the metric.
namespace This property is required. String
The namespace of the metric.

Tag
, TagArgs

Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag
key This property is required. string
The key name of the tag
value This property is required. string
The value of the tag
key This property is required. str
The key name of the tag
value This property is required. str
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi