import * as core from "@terrascript/core"; export interface IncludeMetricArgs extends core.SchemaArgs { metricName: string | core.StringOut; namespace: string | core.StringOut; } export class IncludeMetric extends core.Schema { @core.attr(String) public metricName!: string | core.StringOut; @core.attr(String) public namespace!: string | core.StringOut; } export interface StatisticsConfigurationArgs extends core.SchemaArgs { additionalStatistics: core.Array | core.ArrayOut; includeMetric: core.Array | core.ArrayOut; } export class StatisticsConfiguration extends core.Schema { @core.attr(String, { kind: "array" }) public additionalStatistics!: | core.Array | core.ArrayOut; @core.attr(IncludeMetric, { kind: "array" }) public includeMetric!: | core.Array | core.ArrayOut; } export interface IncludeFilterArgs extends core.SchemaArgs { namespace: string | core.StringOut; } export class IncludeFilter extends core.Schema { @core.attr(String) public namespace!: string | core.StringOut; } export interface ExcludeFilterArgs extends core.SchemaArgs { namespace: string | core.StringOut; } export class ExcludeFilter extends core.Schema { @core.attr(String) public namespace!: string | core.StringOut; } export interface MetricStreamArgs extends core.ResourceArgs { /** * (Optional) List of exclusive metric filters. If you specify this parameter, the stream sends metrics * from all metric namespaces except for the namespaces that you specify here. Conflicts with `include * _filter`. */ excludeFilter?: core.Array | core.ArrayOut; /** * (Required) ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream. */ firehoseArn: string | core.StringOut; /** * (Optional) List of inclusive metric filters. If you specify this parameter, the stream sends only th * e metrics from the metric namespaces that you specify here. Conflicts with `exclude_filter`. */ includeFilter?: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) Friendly name of the metric stream. If omitted, Terraform will assig * n a random, unique name. Conflicts with `name_prefix`. */ name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique friendly name beginning with the specified prefix. * Conflicts with `name`. */ namePrefix?: string | core.StringOut; /** * (Required) Output format for the stream. Possible values are `json` and `opentelemetry0.7`. For more * information about output formats, see [Metric streams output formats](https://docs.aws.amazon.com/A * mazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html). */ outputFormat: string | core.StringOut; /** * (Required) ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose re * sources. For more information about role permissions, see [Trust between CloudWatch and Kinesis Data * Firehose](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams- * trustpolicy.html). */ roleArn: string | core.StringOut; /** * (Optional) 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 tha * t is supported by CloudWatch, listed in [CloudWatch statistics definitions](https://docs.aws.amazon. * com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). If the OutputFormat is `op * entelemetry0.7`, you can stream percentile statistics (p99 etc.). See details below. */ statisticsConfiguration?: | core.Array | core.ArrayOut; /** * (Optional) Map of tags to assign to the resource. If configured with a provider [`default_tags` conf * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level * . */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; } export class MetricStream extends core.Resource { /** * ARN of the metric stream. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the metric s * tream was created. */ @core.attr(String, { computed: true }) public creationDate!: string | core.StringOut; /** * (Optional) List of exclusive metric filters. If you specify this parameter, the stream sends metrics * from all metric namespaces except for the namespaces that you specify here. Conflicts with `include * _filter`. */ @core.attr(ExcludeFilter, { kind: "array" }) public excludeFilter?: | core.Array | core.ArrayOut; /** * (Required) ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream. */ @core.attr(String) public firehoseArn!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) List of inclusive metric filters. If you specify this parameter, the stream sends only th * e metrics from the metric namespaces that you specify here. Conflicts with `exclude_filter`. */ @core.attr(IncludeFilter, { kind: "array" }) public includeFilter?: | core.Array | core.ArrayOut; /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the metric s * tream was last updated. */ @core.attr(String, { computed: true }) public lastUpdateDate!: string | core.StringOut; /** * (Optional, Forces new resource) Friendly name of the metric stream. If omitted, Terraform will assig * n a random, unique name. Conflicts with `name_prefix`. */ @core.attr(String, { computed: true }) public name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique friendly name beginning with the specified prefix. * Conflicts with `name`. */ @core.attr(String, { computed: true }) public namePrefix?: string | core.StringOut; /** * (Required) Output format for the stream. Possible values are `json` and `opentelemetry0.7`. For more * information about output formats, see [Metric streams output formats](https://docs.aws.amazon.com/A * mazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html). */ @core.attr(String) public outputFormat!: string | core.StringOut; /** * (Required) ARN of the IAM role that this metric stream will use to access Amazon Kinesis Firehose re * sources. For more information about role permissions, see [Trust between CloudWatch and Kinesis Data * Firehose](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams- * trustpolicy.html). */ @core.attr(String) public roleArn!: string | core.StringOut; /** * State of the metric stream. Possible values are `running` and `stopped`. */ @core.attr(String, { computed: true }) public state!: string | core.StringOut; /** * (Optional) 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 tha * t is supported by CloudWatch, listed in [CloudWatch statistics definitions](https://docs.aws.amazon. * com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). If the OutputFormat is `op * entelemetry0.7`, you can stream percentile statistics (p99 etc.). See details below. */ @core.attr(StatisticsConfiguration, { kind: "array" }) public statisticsConfiguration?: | core.Array | core.ArrayOut; /** * (Optional) Map of tags to assign to the resource. If configured with a provider [`default_tags` conf * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level * . */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; constructor(name: string, args?: MetricStreamArgs) { super(name, "aws_cloudwatch_metric_stream", args); } public override getNamespace(): string { return "aws_cloudwatch"; } }