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

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi

aws.cloudwatch.MetricStream

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi

    Provides a CloudWatch Metric Stream resource.

    Example Usage

    Filters

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var streamsAssumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Principals = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                        {
                            Type = "Service",
                            Identifiers = new[]
                            {
                                "streams.metrics.cloudwatch.amazonaws.com",
                            },
                        },
                    },
                    Actions = new[]
                    {
                        "sts:AssumeRole",
                    },
                },
            },
        });
    
        var metricStreamToFirehoseRole = new Aws.Iam.Role("metricStreamToFirehoseRole", new()
        {
            AssumeRolePolicy = streamsAssumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var bucket = new Aws.S3.BucketV2("bucket");
    
        var firehoseAssumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Principals = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                        {
                            Type = "Service",
                            Identifiers = new[]
                            {
                                "firehose.amazonaws.com",
                            },
                        },
                    },
                    Actions = new[]
                    {
                        "sts:AssumeRole",
                    },
                },
            },
        });
    
        var firehoseToS3Role = new Aws.Iam.Role("firehoseToS3Role", new()
        {
            AssumeRolePolicy = firehoseAssumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var s3Stream = new Aws.Kinesis.FirehoseDeliveryStream("s3Stream", new()
        {
            Destination = "extended_s3",
            ExtendedS3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamExtendedS3ConfigurationArgs
            {
                RoleArn = firehoseToS3Role.Arn,
                BucketArn = bucket.Arn,
            },
        });
    
        var main = new Aws.CloudWatch.MetricStream("main", new()
        {
            RoleArn = metricStreamToFirehoseRole.Arn,
            FirehoseArn = s3Stream.Arn,
            OutputFormat = "json",
            IncludeFilters = new[]
            {
                new Aws.CloudWatch.Inputs.MetricStreamIncludeFilterArgs
                {
                    Namespace = "AWS/EC2",
                    MetricNames = new[]
                    {
                        "CPUUtilization",
                        "NetworkOut",
                    },
                },
                new Aws.CloudWatch.Inputs.MetricStreamIncludeFilterArgs
                {
                    Namespace = "AWS/EBS",
                    MetricNames = new() { },
                },
            },
        });
    
        var metricStreamToFirehosePolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Actions = new[]
                    {
                        "firehose:PutRecord",
                        "firehose:PutRecordBatch",
                    },
                    Resources = new[]
                    {
                        s3Stream.Arn,
                    },
                },
            },
        });
    
        var metricStreamToFirehoseRolePolicy = new Aws.Iam.RolePolicy("metricStreamToFirehoseRolePolicy", new()
        {
            Role = metricStreamToFirehoseRole.Id,
            Policy = metricStreamToFirehosePolicyDocument.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var bucketAcl = new Aws.S3.BucketAclV2("bucketAcl", new()
        {
            Bucket = bucket.Id,
            Acl = "private",
        });
    
        var firehoseToS3PolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Actions = new[]
                    {
                        "s3:AbortMultipartUpload",
                        "s3:GetBucketLocation",
                        "s3:GetObject",
                        "s3:ListBucket",
                        "s3:ListBucketMultipartUploads",
                        "s3:PutObject",
                    },
                    Resources = new[]
                    {
                        bucket.Arn,
                        $"{bucket.Arn}/*",
                    },
                },
            },
        });
    
        var firehoseToS3RolePolicy = new Aws.Iam.RolePolicy("firehoseToS3RolePolicy", new()
        {
            Role = firehoseToS3Role.Id,
            Policy = firehoseToS3PolicyDocument.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		streamsAssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    			Statements: []iam.GetPolicyDocumentStatement{
    				{
    					Effect: pulumi.StringRef("Allow"),
    					Principals: []iam.GetPolicyDocumentStatementPrincipal{
    						{
    							Type: "Service",
    							Identifiers: []string{
    								"streams.metrics.cloudwatch.amazonaws.com",
    							},
    						},
    					},
    					Actions: []string{
    						"sts:AssumeRole",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		metricStreamToFirehoseRole, err := iam.NewRole(ctx, "metricStreamToFirehoseRole", &iam.RoleArgs{
    			AssumeRolePolicy: *pulumi.String(streamsAssumeRole.Json),
    		})
    		if err != nil {
    			return err
    		}
    		bucket, err := s3.NewBucketV2(ctx, "bucket", nil)
    		if err != nil {
    			return err
    		}
    		firehoseAssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    			Statements: []iam.GetPolicyDocumentStatement{
    				{
    					Effect: pulumi.StringRef("Allow"),
    					Principals: []iam.GetPolicyDocumentStatementPrincipal{
    						{
    							Type: "Service",
    							Identifiers: []string{
    								"firehose.amazonaws.com",
    							},
    						},
    					},
    					Actions: []string{
    						"sts:AssumeRole",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		firehoseToS3Role, err := iam.NewRole(ctx, "firehoseToS3Role", &iam.RoleArgs{
    			AssumeRolePolicy: *pulumi.String(firehoseAssumeRole.Json),
    		})
    		if err != nil {
    			return err
    		}
    		s3Stream, err := kinesis.NewFirehoseDeliveryStream(ctx, "s3Stream", &kinesis.FirehoseDeliveryStreamArgs{
    			Destination: pulumi.String("extended_s3"),
    			ExtendedS3Configuration: &kinesis.FirehoseDeliveryStreamExtendedS3ConfigurationArgs{
    				RoleArn:   firehoseToS3Role.Arn,
    				BucketArn: bucket.Arn,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudwatch.NewMetricStream(ctx, "main", &cloudwatch.MetricStreamArgs{
    			RoleArn:      metricStreamToFirehoseRole.Arn,
    			FirehoseArn:  s3Stream.Arn,
    			OutputFormat: pulumi.String("json"),
    			IncludeFilters: cloudwatch.MetricStreamIncludeFilterArray{
    				&cloudwatch.MetricStreamIncludeFilterArgs{
    					Namespace: pulumi.String("AWS/EC2"),
    					MetricNames: pulumi.StringArray{
    						pulumi.String("CPUUtilization"),
    						pulumi.String("NetworkOut"),
    					},
    				},
    				&cloudwatch.MetricStreamIncludeFilterArgs{
    					Namespace:   pulumi.String("AWS/EBS"),
    					MetricNames: pulumi.StringArray{},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		metricStreamToFirehosePolicyDocument := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{
    			Statements: iam.GetPolicyDocumentStatementArray{
    				&iam.GetPolicyDocumentStatementArgs{
    					Effect: pulumi.String("Allow"),
    					Actions: pulumi.StringArray{
    						pulumi.String("firehose:PutRecord"),
    						pulumi.String("firehose:PutRecordBatch"),
    					},
    					Resources: pulumi.StringArray{
    						s3Stream.Arn,
    					},
    				},
    			},
    		}, nil)
    		_, err = iam.NewRolePolicy(ctx, "metricStreamToFirehoseRolePolicy", &iam.RolePolicyArgs{
    			Role: metricStreamToFirehoseRole.ID(),
    			Policy: metricStreamToFirehosePolicyDocument.ApplyT(func(metricStreamToFirehosePolicyDocument iam.GetPolicyDocumentResult) (*string, error) {
    				return &metricStreamToFirehosePolicyDocument.Json, nil
    			}).(pulumi.StringPtrOutput),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = s3.NewBucketAclV2(ctx, "bucketAcl", &s3.BucketAclV2Args{
    			Bucket: bucket.ID(),
    			Acl:    pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		firehoseToS3PolicyDocument := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{
    			Statements: iam.GetPolicyDocumentStatementArray{
    				&iam.GetPolicyDocumentStatementArgs{
    					Effect: pulumi.String("Allow"),
    					Actions: pulumi.StringArray{
    						pulumi.String("s3:AbortMultipartUpload"),
    						pulumi.String("s3:GetBucketLocation"),
    						pulumi.String("s3:GetObject"),
    						pulumi.String("s3:ListBucket"),
    						pulumi.String("s3:ListBucketMultipartUploads"),
    						pulumi.String("s3:PutObject"),
    					},
    					Resources: pulumi.StringArray{
    						bucket.Arn,
    						bucket.Arn.ApplyT(func(arn string) (string, error) {
    							return fmt.Sprintf("%v/*", arn), nil
    						}).(pulumi.StringOutput),
    					},
    				},
    			},
    		}, nil)
    		_, err = iam.NewRolePolicy(ctx, "firehoseToS3RolePolicy", &iam.RolePolicyArgs{
    			Role: firehoseToS3Role.ID(),
    			Policy: firehoseToS3PolicyDocument.ApplyT(func(firehoseToS3PolicyDocument iam.GetPolicyDocumentResult) (*string, error) {
    				return &firehoseToS3PolicyDocument.Json, nil
    			}).(pulumi.StringPtrOutput),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iam.IamFunctions;
    import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
    import com.pulumi.aws.iam.Role;
    import com.pulumi.aws.iam.RoleArgs;
    import com.pulumi.aws.s3.BucketV2;
    import com.pulumi.aws.kinesis.FirehoseDeliveryStream;
    import com.pulumi.aws.kinesis.FirehoseDeliveryStreamArgs;
    import com.pulumi.aws.kinesis.inputs.FirehoseDeliveryStreamExtendedS3ConfigurationArgs;
    import com.pulumi.aws.cloudwatch.MetricStream;
    import com.pulumi.aws.cloudwatch.MetricStreamArgs;
    import com.pulumi.aws.cloudwatch.inputs.MetricStreamIncludeFilterArgs;
    import com.pulumi.aws.iam.RolePolicy;
    import com.pulumi.aws.iam.RolePolicyArgs;
    import com.pulumi.aws.s3.BucketAclV2;
    import com.pulumi.aws.s3.BucketAclV2Args;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var streamsAssumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("Service")
                        .identifiers("streams.metrics.cloudwatch.amazonaws.com")
                        .build())
                    .actions("sts:AssumeRole")
                    .build())
                .build());
    
            var metricStreamToFirehoseRole = new Role("metricStreamToFirehoseRole", RoleArgs.builder()        
                .assumeRolePolicy(streamsAssumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .build());
    
            var bucket = new BucketV2("bucket");
    
            final var firehoseAssumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("Service")
                        .identifiers("firehose.amazonaws.com")
                        .build())
                    .actions("sts:AssumeRole")
                    .build())
                .build());
    
            var firehoseToS3Role = new Role("firehoseToS3Role", RoleArgs.builder()        
                .assumeRolePolicy(firehoseAssumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .build());
    
            var s3Stream = new FirehoseDeliveryStream("s3Stream", FirehoseDeliveryStreamArgs.builder()        
                .destination("extended_s3")
                .extendedS3Configuration(FirehoseDeliveryStreamExtendedS3ConfigurationArgs.builder()
                    .roleArn(firehoseToS3Role.arn())
                    .bucketArn(bucket.arn())
                    .build())
                .build());
    
            var main = new MetricStream("main", MetricStreamArgs.builder()        
                .roleArn(metricStreamToFirehoseRole.arn())
                .firehoseArn(s3Stream.arn())
                .outputFormat("json")
                .includeFilters(            
                    MetricStreamIncludeFilterArgs.builder()
                        .namespace("AWS/EC2")
                        .metricNames(                    
                            "CPUUtilization",
                            "NetworkOut")
                        .build(),
                    MetricStreamIncludeFilterArgs.builder()
                        .namespace("AWS/EBS")
                        .metricNames()
                        .build())
                .build());
    
            final var metricStreamToFirehosePolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .actions(                
                        "firehose:PutRecord",
                        "firehose:PutRecordBatch")
                    .resources(s3Stream.arn())
                    .build())
                .build());
    
            var metricStreamToFirehoseRolePolicy = new RolePolicy("metricStreamToFirehoseRolePolicy", RolePolicyArgs.builder()        
                .role(metricStreamToFirehoseRole.id())
                .policy(metricStreamToFirehosePolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(metricStreamToFirehosePolicyDocument -> metricStreamToFirehosePolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
                .build());
    
            var bucketAcl = new BucketAclV2("bucketAcl", BucketAclV2Args.builder()        
                .bucket(bucket.id())
                .acl("private")
                .build());
    
            final var firehoseToS3PolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .actions(                
                        "s3:AbortMultipartUpload",
                        "s3:GetBucketLocation",
                        "s3:GetObject",
                        "s3:ListBucket",
                        "s3:ListBucketMultipartUploads",
                        "s3:PutObject")
                    .resources(                
                        bucket.arn(),
                        bucket.arn().applyValue(arn -> String.format("%s/*", arn)))
                    .build())
                .build());
    
            var firehoseToS3RolePolicy = new RolePolicy("firehoseToS3RolePolicy", RolePolicyArgs.builder()        
                .role(firehoseToS3Role.id())
                .policy(firehoseToS3PolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult).applyValue(firehoseToS3PolicyDocument -> firehoseToS3PolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json())))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    streams_assume_role = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
        effect="Allow",
        principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
            type="Service",
            identifiers=["streams.metrics.cloudwatch.amazonaws.com"],
        )],
        actions=["sts:AssumeRole"],
    )])
    metric_stream_to_firehose_role = aws.iam.Role("metricStreamToFirehoseRole", assume_role_policy=streams_assume_role.json)
    bucket = aws.s3.BucketV2("bucket")
    firehose_assume_role = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
        effect="Allow",
        principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
            type="Service",
            identifiers=["firehose.amazonaws.com"],
        )],
        actions=["sts:AssumeRole"],
    )])
    firehose_to_s3_role = aws.iam.Role("firehoseToS3Role", assume_role_policy=firehose_assume_role.json)
    s3_stream = aws.kinesis.FirehoseDeliveryStream("s3Stream",
        destination="extended_s3",
        extended_s3_configuration=aws.kinesis.FirehoseDeliveryStreamExtendedS3ConfigurationArgs(
            role_arn=firehose_to_s3_role.arn,
            bucket_arn=bucket.arn,
        ))
    main = aws.cloudwatch.MetricStream("main",
        role_arn=metric_stream_to_firehose_role.arn,
        firehose_arn=s3_stream.arn,
        output_format="json",
        include_filters=[
            aws.cloudwatch.MetricStreamIncludeFilterArgs(
                namespace="AWS/EC2",
                metric_names=[
                    "CPUUtilization",
                    "NetworkOut",
                ],
            ),
            aws.cloudwatch.MetricStreamIncludeFilterArgs(
                namespace="AWS/EBS",
                metric_names=[],
            ),
        ])
    metric_stream_to_firehose_policy_document = aws.iam.get_policy_document_output(statements=[aws.iam.GetPolicyDocumentStatementArgs(
        effect="Allow",
        actions=[
            "firehose:PutRecord",
            "firehose:PutRecordBatch",
        ],
        resources=[s3_stream.arn],
    )])
    metric_stream_to_firehose_role_policy = aws.iam.RolePolicy("metricStreamToFirehoseRolePolicy",
        role=metric_stream_to_firehose_role.id,
        policy=metric_stream_to_firehose_policy_document.json)
    bucket_acl = aws.s3.BucketAclV2("bucketAcl",
        bucket=bucket.id,
        acl="private")
    firehose_to_s3_policy_document = aws.iam.get_policy_document_output(statements=[aws.iam.GetPolicyDocumentStatementArgs(
        effect="Allow",
        actions=[
            "s3:AbortMultipartUpload",
            "s3:GetBucketLocation",
            "s3:GetObject",
            "s3:ListBucket",
            "s3:ListBucketMultipartUploads",
            "s3:PutObject",
        ],
        resources=[
            bucket.arn,
            bucket.arn.apply(lambda arn: f"{arn}/*"),
        ],
    )])
    firehose_to_s3_role_policy = aws.iam.RolePolicy("firehoseToS3RolePolicy",
        role=firehose_to_s3_role.id,
        policy=firehose_to_s3_policy_document.json)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const streamsAssumeRole = aws.iam.getPolicyDocument({
        statements: [{
            effect: "Allow",
            principals: [{
                type: "Service",
                identifiers: ["streams.metrics.cloudwatch.amazonaws.com"],
            }],
            actions: ["sts:AssumeRole"],
        }],
    });
    const metricStreamToFirehoseRole = new aws.iam.Role("metricStreamToFirehoseRole", {assumeRolePolicy: streamsAssumeRole.then(streamsAssumeRole => streamsAssumeRole.json)});
    const bucket = new aws.s3.BucketV2("bucket", {});
    const firehoseAssumeRole = aws.iam.getPolicyDocument({
        statements: [{
            effect: "Allow",
            principals: [{
                type: "Service",
                identifiers: ["firehose.amazonaws.com"],
            }],
            actions: ["sts:AssumeRole"],
        }],
    });
    const firehoseToS3Role = new aws.iam.Role("firehoseToS3Role", {assumeRolePolicy: firehoseAssumeRole.then(firehoseAssumeRole => firehoseAssumeRole.json)});
    const s3Stream = new aws.kinesis.FirehoseDeliveryStream("s3Stream", {
        destination: "extended_s3",
        extendedS3Configuration: {
            roleArn: firehoseToS3Role.arn,
            bucketArn: bucket.arn,
        },
    });
    const main = new aws.cloudwatch.MetricStream("main", {
        roleArn: metricStreamToFirehoseRole.arn,
        firehoseArn: s3Stream.arn,
        outputFormat: "json",
        includeFilters: [
            {
                namespace: "AWS/EC2",
                metricNames: [
                    "CPUUtilization",
                    "NetworkOut",
                ],
            },
            {
                namespace: "AWS/EBS",
                metricNames: [],
            },
        ],
    });
    const metricStreamToFirehosePolicyDocument = aws.iam.getPolicyDocumentOutput({
        statements: [{
            effect: "Allow",
            actions: [
                "firehose:PutRecord",
                "firehose:PutRecordBatch",
            ],
            resources: [s3Stream.arn],
        }],
    });
    const metricStreamToFirehoseRolePolicy = new aws.iam.RolePolicy("metricStreamToFirehoseRolePolicy", {
        role: metricStreamToFirehoseRole.id,
        policy: metricStreamToFirehosePolicyDocument.apply(metricStreamToFirehosePolicyDocument => metricStreamToFirehosePolicyDocument.json),
    });
    const bucketAcl = new aws.s3.BucketAclV2("bucketAcl", {
        bucket: bucket.id,
        acl: "private",
    });
    const firehoseToS3PolicyDocument = aws.iam.getPolicyDocumentOutput({
        statements: [{
            effect: "Allow",
            actions: [
                "s3:AbortMultipartUpload",
                "s3:GetBucketLocation",
                "s3:GetObject",
                "s3:ListBucket",
                "s3:ListBucketMultipartUploads",
                "s3:PutObject",
            ],
            resources: [
                bucket.arn,
                pulumi.interpolate`${bucket.arn}/*`,
            ],
        }],
    });
    const firehoseToS3RolePolicy = new aws.iam.RolePolicy("firehoseToS3RolePolicy", {
        role: firehoseToS3Role.id,
        policy: firehoseToS3PolicyDocument.apply(firehoseToS3PolicyDocument => firehoseToS3PolicyDocument.json),
    });
    
    resources:
      main:
        type: aws:cloudwatch:MetricStream
        properties:
          roleArn: ${metricStreamToFirehoseRole.arn}
          firehoseArn: ${s3Stream.arn}
          outputFormat: json
          includeFilters:
            - namespace: AWS/EC2
              metricNames:
                - CPUUtilization
                - NetworkOut
            - namespace: AWS/EBS
              metricNames: []
      metricStreamToFirehoseRole:
        type: aws:iam:Role
        properties:
          assumeRolePolicy: ${streamsAssumeRole.json}
      metricStreamToFirehoseRolePolicy:
        type: aws:iam:RolePolicy
        properties:
          role: ${metricStreamToFirehoseRole.id}
          policy: ${metricStreamToFirehosePolicyDocument.json}
      bucket:
        type: aws:s3:BucketV2
      bucketAcl:
        type: aws:s3:BucketAclV2
        properties:
          bucket: ${bucket.id}
          acl: private
      firehoseToS3Role:
        type: aws:iam:Role
        properties:
          assumeRolePolicy: ${firehoseAssumeRole.json}
      firehoseToS3RolePolicy:
        type: aws:iam:RolePolicy
        properties:
          role: ${firehoseToS3Role.id}
          policy: ${firehoseToS3PolicyDocument.json}
      s3Stream:
        type: aws:kinesis:FirehoseDeliveryStream
        properties:
          destination: extended_s3
          extendedS3Configuration:
            roleArn: ${firehoseToS3Role.arn}
            bucketArn: ${bucket.arn}
    variables:
      streamsAssumeRole:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                principals:
                  - type: Service
                    identifiers:
                      - streams.metrics.cloudwatch.amazonaws.com
                actions:
                  - sts:AssumeRole
      metricStreamToFirehosePolicyDocument:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                actions:
                  - firehose:PutRecord
                  - firehose:PutRecordBatch
                resources:
                  - ${s3Stream.arn}
      firehoseAssumeRole:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                principals:
                  - type: Service
                    identifiers:
                      - firehose.amazonaws.com
                actions:
                  - sts:AssumeRole
      firehoseToS3PolicyDocument:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                actions:
                  - s3:AbortMultipartUpload
                  - s3:GetBucketLocation
                  - s3:GetObject
                  - s3:ListBucket
                  - s3:ListBucketMultipartUploads
                  - s3:PutObject
                resources:
                  - ${bucket.arn}
                  - ${bucket.arn}/*
    

    Additional Statistics

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Aws.CloudWatch.MetricStream("main", new()
        {
            RoleArn = aws_iam_role.Metric_stream_to_firehose.Arn,
            FirehoseArn = aws_kinesis_firehose_delivery_stream.S3_stream.Arn,
            OutputFormat = "json",
            StatisticsConfigurations = new[]
            {
                new Aws.CloudWatch.Inputs.MetricStreamStatisticsConfigurationArgs
                {
                    AdditionalStatistics = new[]
                    {
                        "p1",
                        "tm99",
                    },
                    IncludeMetrics = new[]
                    {
                        new Aws.CloudWatch.Inputs.MetricStreamStatisticsConfigurationIncludeMetricArgs
                        {
                            MetricName = "CPUUtilization",
                            Namespace = "AWS/EC2",
                        },
                    },
                },
                new Aws.CloudWatch.Inputs.MetricStreamStatisticsConfigurationArgs
                {
                    AdditionalStatistics = new[]
                    {
                        "TS(50.5:)",
                    },
                    IncludeMetrics = new[]
                    {
                        new Aws.CloudWatch.Inputs.MetricStreamStatisticsConfigurationIncludeMetricArgs
                        {
                            MetricName = "CPUUtilization",
                            Namespace = "AWS/EC2",
                        },
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudwatch.NewMetricStream(ctx, "main", &cloudwatch.MetricStreamArgs{
    			RoleArn:      pulumi.Any(aws_iam_role.Metric_stream_to_firehose.Arn),
    			FirehoseArn:  pulumi.Any(aws_kinesis_firehose_delivery_stream.S3_stream.Arn),
    			OutputFormat: pulumi.String("json"),
    			StatisticsConfigurations: cloudwatch.MetricStreamStatisticsConfigurationArray{
    				&cloudwatch.MetricStreamStatisticsConfigurationArgs{
    					AdditionalStatistics: pulumi.StringArray{
    						pulumi.String("p1"),
    						pulumi.String("tm99"),
    					},
    					IncludeMetrics: cloudwatch.MetricStreamStatisticsConfigurationIncludeMetricArray{
    						&cloudwatch.MetricStreamStatisticsConfigurationIncludeMetricArgs{
    							MetricName: pulumi.String("CPUUtilization"),
    							Namespace:  pulumi.String("AWS/EC2"),
    						},
    					},
    				},
    				&cloudwatch.MetricStreamStatisticsConfigurationArgs{
    					AdditionalStatistics: pulumi.StringArray{
    						pulumi.String("TS(50.5:)"),
    					},
    					IncludeMetrics: cloudwatch.MetricStreamStatisticsConfigurationIncludeMetricArray{
    						&cloudwatch.MetricStreamStatisticsConfigurationIncludeMetricArgs{
    							MetricName: pulumi.String("CPUUtilization"),
    							Namespace:  pulumi.String("AWS/EC2"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.cloudwatch.MetricStream;
    import com.pulumi.aws.cloudwatch.MetricStreamArgs;
    import com.pulumi.aws.cloudwatch.inputs.MetricStreamStatisticsConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var main = new MetricStream("main", MetricStreamArgs.builder()        
                .roleArn(aws_iam_role.metric_stream_to_firehose().arn())
                .firehoseArn(aws_kinesis_firehose_delivery_stream.s3_stream().arn())
                .outputFormat("json")
                .statisticsConfigurations(            
                    MetricStreamStatisticsConfigurationArgs.builder()
                        .additionalStatistics(                    
                            "p1",
                            "tm99")
                        .includeMetrics(MetricStreamStatisticsConfigurationIncludeMetricArgs.builder()
                            .metricName("CPUUtilization")
                            .namespace("AWS/EC2")
                            .build())
                        .build(),
                    MetricStreamStatisticsConfigurationArgs.builder()
                        .additionalStatistics("TS(50.5:)")
                        .includeMetrics(MetricStreamStatisticsConfigurationIncludeMetricArgs.builder()
                            .metricName("CPUUtilization")
                            .namespace("AWS/EC2")
                            .build())
                        .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    main = aws.cloudwatch.MetricStream("main",
        role_arn=aws_iam_role["metric_stream_to_firehose"]["arn"],
        firehose_arn=aws_kinesis_firehose_delivery_stream["s3_stream"]["arn"],
        output_format="json",
        statistics_configurations=[
            aws.cloudwatch.MetricStreamStatisticsConfigurationArgs(
                additional_statistics=[
                    "p1",
                    "tm99",
                ],
                include_metrics=[aws.cloudwatch.MetricStreamStatisticsConfigurationIncludeMetricArgs(
                    metric_name="CPUUtilization",
                    namespace="AWS/EC2",
                )],
            ),
            aws.cloudwatch.MetricStreamStatisticsConfigurationArgs(
                additional_statistics=["TS(50.5:)"],
                include_metrics=[aws.cloudwatch.MetricStreamStatisticsConfigurationIncludeMetricArgs(
                    metric_name="CPUUtilization",
                    namespace="AWS/EC2",
                )],
            ),
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const main = new aws.cloudwatch.MetricStream("main", {
        roleArn: aws_iam_role.metric_stream_to_firehose.arn,
        firehoseArn: aws_kinesis_firehose_delivery_stream.s3_stream.arn,
        outputFormat: "json",
        statisticsConfigurations: [
            {
                additionalStatistics: [
                    "p1",
                    "tm99",
                ],
                includeMetrics: [{
                    metricName: "CPUUtilization",
                    namespace: "AWS/EC2",
                }],
            },
            {
                additionalStatistics: ["TS(50.5:)"],
                includeMetrics: [{
                    metricName: "CPUUtilization",
                    namespace: "AWS/EC2",
                }],
            },
        ],
    });
    
    resources:
      main:
        type: aws:cloudwatch:MetricStream
        properties:
          roleArn: ${aws_iam_role.metric_stream_to_firehose.arn}
          firehoseArn: ${aws_kinesis_firehose_delivery_stream.s3_stream.arn}
          outputFormat: json
          statisticsConfigurations:
            - additionalStatistics:
                - p1
                - tm99
              includeMetrics:
                - metricName: CPUUtilization
                  namespace: AWS/EC2
            - additionalStatistics:
                - TS(50.5:)
              includeMetrics:
                - metricName: CPUUtilization
                  namespace: AWS/EC2
    

    Create MetricStream Resource

    new MetricStream(name: string, args: MetricStreamArgs, opts?: CustomResourceOptions);
    @overload
    def MetricStream(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     exclude_filters: Optional[Sequence[MetricStreamExcludeFilterArgs]] = None,
                     firehose_arn: Optional[str] = None,
                     include_filters: Optional[Sequence[MetricStreamIncludeFilterArgs]] = None,
                     include_linked_accounts_metrics: Optional[bool] = None,
                     name: Optional[str] = None,
                     name_prefix: Optional[str] = None,
                     output_format: Optional[str] = None,
                     role_arn: Optional[str] = None,
                     statistics_configurations: Optional[Sequence[MetricStreamStatisticsConfigurationArgs]] = None,
                     tags: Optional[Mapping[str, str]] = None)
    @overload
    def MetricStream(resource_name: str,
                     args: MetricStreamArgs,
                     opts: Optional[ResourceOptions] = None)
    func NewMetricStream(ctx *Context, name string, args MetricStreamArgs, opts ...ResourceOption) (*MetricStream, error)
    public MetricStream(string name, MetricStreamArgs args, CustomResourceOptions? opts = null)
    public MetricStream(String name, MetricStreamArgs args)
    public MetricStream(String name, MetricStreamArgs args, CustomResourceOptions options)
    
    type: aws:cloudwatch:MetricStream
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name 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 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 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 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 String
    The unique name of the resource.
    args 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

    The MetricStream resource accepts the following input properties:

    FirehoseArn string
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    OutputFormat string

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    RoleArn string
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    ExcludeFilters List<MetricStreamExcludeFilter>
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    IncludeFilters List<MetricStreamIncludeFilter>
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    Name string
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    NamePrefix string
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    StatisticsConfigurations List<MetricStreamStatisticsConfiguration>
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    FirehoseArn string
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    OutputFormat string

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    RoleArn string
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    ExcludeFilters []MetricStreamExcludeFilterArgs
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    IncludeFilters []MetricStreamIncludeFilterArgs
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    Name string
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    NamePrefix string
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    StatisticsConfigurations []MetricStreamStatisticsConfigurationArgs
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    Tags map[string]string
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    firehoseArn String
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    outputFormat String

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    roleArn String
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    excludeFilters List<MetricStreamExcludeFilter>
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    includeFilters List<MetricStreamIncludeFilter>
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    name String
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    namePrefix String
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    statisticsConfigurations List<MetricStreamStatisticsConfiguration>
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    tags Map<String,String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    firehoseArn string
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    outputFormat string

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    roleArn string
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    excludeFilters MetricStreamExcludeFilter[]
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    includeFilters MetricStreamIncludeFilter[]
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    name string
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    namePrefix string
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    statisticsConfigurations MetricStreamStatisticsConfiguration[]
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    tags {[key: string]: string}
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    firehose_arn str
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    output_format str

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    role_arn str
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    exclude_filters Sequence[MetricStreamExcludeFilterArgs]
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    include_filters Sequence[MetricStreamIncludeFilterArgs]
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    name str
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    name_prefix str
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    statistics_configurations Sequence[MetricStreamStatisticsConfigurationArgs]
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    tags Mapping[str, str]
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    firehoseArn String
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    outputFormat String

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    roleArn String
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    excludeFilters List<Property Map>
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    includeFilters List<Property Map>
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    name String
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    namePrefix String
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    statisticsConfigurations List<Property Map>
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    tags Map<String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    ARN of the metric stream.
    CreationDate string
    Date and time in RFC3339 format that the metric stream was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateDate string
    Date and time in RFC3339 format that the metric stream was last updated.
    State string
    State of the metric stream. Possible values are running and stopped.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Arn string
    ARN of the metric stream.
    CreationDate string
    Date and time in RFC3339 format that the metric stream was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdateDate string
    Date and time in RFC3339 format that the metric stream was last updated.
    State string
    State of the metric stream. Possible values are running and stopped.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    ARN of the metric stream.
    creationDate String
    Date and time in RFC3339 format that the metric stream was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateDate String
    Date and time in RFC3339 format that the metric stream was last updated.
    state String
    State of the metric stream. Possible values are running and stopped.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn string
    ARN of the metric stream.
    creationDate string
    Date and time in RFC3339 format that the metric stream was created.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdateDate string
    Date and time in RFC3339 format that the metric stream was last updated.
    state string
    State of the metric stream. Possible values are running and stopped.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn str
    ARN of the metric stream.
    creation_date str
    Date and time in RFC3339 format that the metric stream was created.
    id str
    The provider-assigned unique ID for this managed resource.
    last_update_date str
    Date and time in RFC3339 format that the metric stream was last updated.
    state str
    State of the metric stream. Possible values are running and stopped.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    ARN of the metric stream.
    creationDate String
    Date and time in RFC3339 format that the metric stream was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdateDate String
    Date and time in RFC3339 format that the metric stream was last updated.
    state String
    State of the metric stream. Possible values are running and stopped.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Look up Existing MetricStream Resource

    Get an existing MetricStream resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MetricStreamState, opts?: CustomResourceOptions): MetricStream
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            creation_date: Optional[str] = None,
            exclude_filters: Optional[Sequence[MetricStreamExcludeFilterArgs]] = None,
            firehose_arn: Optional[str] = None,
            include_filters: Optional[Sequence[MetricStreamIncludeFilterArgs]] = None,
            include_linked_accounts_metrics: Optional[bool] = None,
            last_update_date: Optional[str] = None,
            name: Optional[str] = None,
            name_prefix: Optional[str] = None,
            output_format: Optional[str] = None,
            role_arn: Optional[str] = None,
            state: Optional[str] = None,
            statistics_configurations: Optional[Sequence[MetricStreamStatisticsConfigurationArgs]] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> MetricStream
    func GetMetricStream(ctx *Context, name string, id IDInput, state *MetricStreamState, opts ...ResourceOption) (*MetricStream, error)
    public static MetricStream Get(string name, Input<string> id, MetricStreamState? state, CustomResourceOptions? opts = null)
    public static MetricStream get(String name, Output<String> id, MetricStreamState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    ARN of the metric stream.
    CreationDate string
    Date and time in RFC3339 format that the metric stream was created.
    ExcludeFilters List<MetricStreamExcludeFilter>
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    FirehoseArn string
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    IncludeFilters List<MetricStreamIncludeFilter>
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    LastUpdateDate string
    Date and time in RFC3339 format that the metric stream was last updated.
    Name string
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    NamePrefix string
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    OutputFormat string

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    RoleArn string
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    State string
    State of the metric stream. Possible values are running and stopped.
    StatisticsConfigurations List<MetricStreamStatisticsConfiguration>
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Arn string
    ARN of the metric stream.
    CreationDate string
    Date and time in RFC3339 format that the metric stream was created.
    ExcludeFilters []MetricStreamExcludeFilterArgs
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    FirehoseArn string
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    IncludeFilters []MetricStreamIncludeFilterArgs
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    LastUpdateDate string
    Date and time in RFC3339 format that the metric stream was last updated.
    Name string
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    NamePrefix string
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    OutputFormat string

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    RoleArn string
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    State string
    State of the metric stream. Possible values are running and stopped.
    StatisticsConfigurations []MetricStreamStatisticsConfigurationArgs
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    Tags map[string]string
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    ARN of the metric stream.
    creationDate String
    Date and time in RFC3339 format that the metric stream was created.
    excludeFilters List<MetricStreamExcludeFilter>
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    firehoseArn String
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    includeFilters List<MetricStreamIncludeFilter>
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    lastUpdateDate String
    Date and time in RFC3339 format that the metric stream was last updated.
    name String
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    namePrefix String
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    outputFormat String

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    roleArn String
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    state String
    State of the metric stream. Possible values are running and stopped.
    statisticsConfigurations List<MetricStreamStatisticsConfiguration>
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    tags Map<String,String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn string
    ARN of the metric stream.
    creationDate string
    Date and time in RFC3339 format that the metric stream was created.
    excludeFilters MetricStreamExcludeFilter[]
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    firehoseArn string
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    includeFilters MetricStreamIncludeFilter[]
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    lastUpdateDate string
    Date and time in RFC3339 format that the metric stream was last updated.
    name string
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    namePrefix string
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    outputFormat string

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    roleArn string
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    state string
    State of the metric stream. Possible values are running and stopped.
    statisticsConfigurations MetricStreamStatisticsConfiguration[]
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    tags {[key: string]: string}
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn str
    ARN of the metric stream.
    creation_date str
    Date and time in RFC3339 format that the metric stream was created.
    exclude_filters Sequence[MetricStreamExcludeFilterArgs]
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    firehose_arn str
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    include_filters Sequence[MetricStreamIncludeFilterArgs]
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    last_update_date str
    Date and time in RFC3339 format that the metric stream was last updated.
    name str
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    name_prefix str
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    output_format str

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    role_arn str
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    state str
    State of the metric stream. Possible values are running and stopped.
    statistics_configurations Sequence[MetricStreamStatisticsConfigurationArgs]
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    tags Mapping[str, str]
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    ARN of the metric stream.
    creationDate String
    Date and time in RFC3339 format that the metric stream was created.
    excludeFilters List<Property Map>
    List of exclusive metric filters. If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces and the conditional metric names that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is excluded. Conflicts with include_filter.
    firehoseArn String
    ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
    includeFilters List<Property Map>
    List of inclusive metric filters. If you specify this parameter, the stream sends only the conditional metric names from the metric namespaces that you specify here. If you don't specify metric names or provide empty metric names whole metric namespace is included. Conflicts with exclude_filter.
    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. For more information about linking accounts, see CloudWatch cross-account observability.
    lastUpdateDate String
    Date and time in RFC3339 format that the metric stream was last updated.
    name String
    Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with name_prefix.
    namePrefix String
    Creates a unique friendly name beginning with the specified prefix. Conflicts with name.
    outputFormat String

    Output format for the stream. Possible values are json, opentelemetry0.7, and opentelemetry1.0. For more information about output formats, see Metric streams output formats.

    The following arguments are optional:

    roleArn String
    ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. For more information about role permissions, see Trust between CloudWatch and Kinesis Data Firehose.
    state String
    State of the metric stream. Possible values are running and stopped.
    statisticsConfigurations List<Property Map>
    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 output_format. 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 opentelemetry0.7 or opentelemetry1.0, you can stream percentile statistics (p99 etc.). See details below.
    tags Map<String>
    Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Supporting Types

    MetricStreamExcludeFilter, MetricStreamExcludeFilterArgs

    Namespace string
    Name of the metric namespace in the filter.
    MetricNames List<string>
    An array that defines the metrics you want to exclude for this metric namespace
    Namespace string
    Name of the metric namespace in the filter.
    MetricNames []string
    An array that defines the metrics you want to exclude for this metric namespace
    namespace String
    Name of the metric namespace in the filter.
    metricNames List<String>
    An array that defines the metrics you want to exclude for this metric namespace
    namespace string
    Name of the metric namespace in the filter.
    metricNames string[]
    An array that defines the metrics you want to exclude for this metric namespace
    namespace str
    Name of the metric namespace in the filter.
    metric_names Sequence[str]
    An array that defines the metrics you want to exclude for this metric namespace
    namespace String
    Name of the metric namespace in the filter.
    metricNames List<String>
    An array that defines the metrics you want to exclude for this metric namespace

    MetricStreamIncludeFilter, MetricStreamIncludeFilterArgs

    Namespace string
    Name of the metric namespace in the filter.
    MetricNames List<string>
    An array that defines the metrics you want to include for this metric namespace
    Namespace string
    Name of the metric namespace in the filter.
    MetricNames []string
    An array that defines the metrics you want to include for this metric namespace
    namespace String
    Name of the metric namespace in the filter.
    metricNames List<String>
    An array that defines the metrics you want to include for this metric namespace
    namespace string
    Name of the metric namespace in the filter.
    metricNames string[]
    An array that defines the metrics you want to include for this metric namespace
    namespace str
    Name of the metric namespace in the filter.
    metric_names Sequence[str]
    An array that defines the metrics you want to include for this metric namespace
    namespace String
    Name of the metric namespace in the filter.
    metricNames List<String>
    An array that defines the metrics you want to include for this metric namespace

    MetricStreamStatisticsConfiguration, MetricStreamStatisticsConfigurationArgs

    AdditionalStatistics List<string>
    The additional statistics to stream for the metrics listed in include_metrics.
    IncludeMetrics List<MetricStreamStatisticsConfigurationIncludeMetric>
    An array that defines the metrics that are to have additional statistics streamed. See details below.
    AdditionalStatistics []string
    The additional statistics to stream for the metrics listed in include_metrics.
    IncludeMetrics []MetricStreamStatisticsConfigurationIncludeMetric
    An array that defines the metrics that are to have additional statistics streamed. See details below.
    additionalStatistics List<String>
    The additional statistics to stream for the metrics listed in include_metrics.
    includeMetrics List<MetricStreamStatisticsConfigurationIncludeMetric>
    An array that defines the metrics that are to have additional statistics streamed. See details below.
    additionalStatistics string[]
    The additional statistics to stream for the metrics listed in include_metrics.
    includeMetrics MetricStreamStatisticsConfigurationIncludeMetric[]
    An array that defines the metrics that are to have additional statistics streamed. See details below.
    additional_statistics Sequence[str]
    The additional statistics to stream for the metrics listed in include_metrics.
    include_metrics Sequence[MetricStreamStatisticsConfigurationIncludeMetric]
    An array that defines the metrics that are to have additional statistics streamed. See details below.
    additionalStatistics List<String>
    The additional statistics to stream for the metrics listed in include_metrics.
    includeMetrics List<Property Map>
    An array that defines the metrics that are to have additional statistics streamed. See details below.

    MetricStreamStatisticsConfigurationIncludeMetric, MetricStreamStatisticsConfigurationIncludeMetricArgs

    MetricName string
    The name of the metric.
    Namespace string
    Name of the metric namespace in the filter.
    MetricName string
    The name of the metric.
    Namespace string
    Name of the metric namespace in the filter.
    metricName String
    The name of the metric.
    namespace String
    Name of the metric namespace in the filter.
    metricName string
    The name of the metric.
    namespace string
    Name of the metric namespace in the filter.
    metric_name str
    The name of the metric.
    namespace str
    Name of the metric namespace in the filter.
    metricName String
    The name of the metric.
    namespace String
    Name of the metric namespace in the filter.

    Import

    Using pulumi import, import CloudWatch metric streams using the name. For example:

     $ pulumi import aws:cloudwatch/metricStream:MetricStream sample sample-stream-name
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi