MetricStream

Resource Type definition for Metric Stream

Example Usage

Example

using Pulumi;
using AwsNative = Pulumi.AwsNative;

class MyStack : Stack
{
    public MyStack()
    {
        var myMetricStream = new AwsNative.CloudWatch.MetricStream("myMetricStream", new AwsNative.CloudWatch.MetricStreamArgs
        {
            OutputFormat = "json",
            FirehoseArn = "arn:aws:firehose:us-east-1:123456789012:deliverystream/MyDeliveryStream",
            RoleArn = "arn:aws:iam::123456789012:role/service-role/MyRole",
            IncludeFilters = 
            {
                new AwsNative.CloudWatch.Inputs.MetricStreamFilterArgs
                {
                    Namespace = "AWS/ELB",
                },
                new AwsNative.CloudWatch.Inputs.MetricStreamFilterArgs
                {
                    Namespace = "AWS/EC2",
                },
            },
        });
    }

}

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.MetricStreamFilterArgs{
				&cloudwatch.MetricStreamFilterArgs{
					Namespace: pulumi.String("AWS/ELB"),
				},
				&cloudwatch.MetricStreamFilterArgs{
					Namespace: pulumi.String("AWS/EC2"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

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=[
        aws_native.cloudwatch.MetricStreamFilterArgs(
            namespace="AWS/ELB",
        ),
        aws_native.cloudwatch.MetricStreamFilterArgs(
            namespace="AWS/EC2",
        ),
    ])

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",
        },
    ],
});

Create a MetricStream Resource

new MetricStream(name: string, args: MetricStreamArgs, opts?: CustomResourceOptions);
@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,
                 name: Optional[str] = None,
                 output_format: Optional[str] = None,
                 role_arn: Optional[str] = None,
                 tags: Optional[Sequence[MetricStreamTagArgs]] = 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)
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.

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
The ARN of the Kinesis Firehose where to stream the data.
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.
ExcludeFilters List<Pulumi.AwsNative.CloudWatch.Inputs.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.
IncludeFilters List<Pulumi.AwsNative.CloudWatch.Inputs.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.
Name string
Name of the metric stream.
Tags List<Pulumi.AwsNative.CloudWatch.Inputs.MetricStreamTagArgs>
A set of tags to assign to the delivery stream.
FirehoseArn string
The ARN of the Kinesis Firehose where to stream the data.
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.
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.
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.
Name string
Name of the metric stream.
Tags []MetricStreamTagArgs
A set of tags to assign to the delivery stream.
firehoseArn string
The ARN of the Kinesis Firehose where to stream the data.
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.
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.
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.
name string
Name of the metric stream.
tags MetricStreamTagArgs[]
A set of tags to assign to the delivery stream.
firehose_arn str
The ARN of the Kinesis Firehose where to stream the data.
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.
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.
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.
name str
Name of the metric stream.
tags Sequence[MetricStreamTagArgs]
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 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.

Supporting Types

MetricStreamFilter

Namespace string
Only metrics with Namespace matching this value will be streamed.
Namespace string
Only metrics with Namespace matching this value will be streamed.
namespace string
Only metrics with Namespace matching this value will be streamed.
namespace str
Only metrics with Namespace matching this value will be streamed.

MetricStreamTag

Key string
A unique identifier for the tag.
Value string
An optional string, which you can use to describe or define the tag.
Key string
A unique identifier for the tag.
Value string
An optional string, which you can use to describe or define the tag.
key string
A unique identifier for the tag.
value string
An optional string, which you can use to describe or define the tag.
key str
A unique identifier for the tag.
value str
An optional string, which you can use to describe or define the tag.

Package Details

Repository
https://github.com/pulumi/pulumi-aws-native
License
Apache-2.0