All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.cloudwatch.MetricStreamArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.cloudwatch;

import com.pulumi.aws.cloudwatch.inputs.MetricStreamExcludeFilterArgs;
import com.pulumi.aws.cloudwatch.inputs.MetricStreamIncludeFilterArgs;
import com.pulumi.aws.cloudwatch.inputs.MetricStreamStatisticsConfigurationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class MetricStreamArgs extends com.pulumi.resources.ResourceArgs {

    public static final MetricStreamArgs Empty = new MetricStreamArgs();

    /**
     * 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`.
     * 
     */
    @Import(name="excludeFilters")
    private @Nullable Output> excludeFilters;

    /**
     * @return 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`.
     * 
     */
    public Optional>> excludeFilters() {
        return Optional.ofNullable(this.excludeFilters);
    }

    /**
     * ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
     * 
     */
    @Import(name="firehoseArn", required=true)
    private Output firehoseArn;

    /**
     * @return ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
     * 
     */
    public Output firehoseArn() {
        return this.firehoseArn;
    }

    /**
     * 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`.
     * 
     */
    @Import(name="includeFilters")
    private @Nullable Output> includeFilters;

    /**
     * @return 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`.
     * 
     */
    public Optional>> includeFilters() {
        return Optional.ofNullable(this.includeFilters);
    }

    /**
     * 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html).
     * 
     */
    @Import(name="includeLinkedAccountsMetrics")
    private @Nullable Output includeLinkedAccountsMetrics;

    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html).
     * 
     */
    public Optional> includeLinkedAccountsMetrics() {
        return Optional.ofNullable(this.includeLinkedAccountsMetrics);
    }

    /**
     * Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Creates a unique friendly name beginning with the specified prefix. Conflicts with `name`.
     * 
     */
    @Import(name="namePrefix")
    private @Nullable Output namePrefix;

    /**
     * @return Creates a unique friendly name beginning with the specified prefix. Conflicts with `name`.
     * 
     */
    public Optional> namePrefix() {
        return Optional.ofNullable(this.namePrefix);
    }

    /**
     * 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html).
     * 
     * The following arguments are optional:
     * 
     */
    @Import(name="outputFormat", required=true)
    private Output outputFormat;

    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html).
     * 
     * The following arguments are optional:
     * 
     */
    public Output outputFormat() {
        return this.outputFormat;
    }

    /**
     * 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-trustpolicy.html).
     * 
     */
    @Import(name="roleArn", required=true)
    private Output roleArn;

    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-trustpolicy.html).
     * 
     */
    public Output roleArn() {
        return this.roleArn;
    }

    /**
     * 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). If the OutputFormat is `opentelemetry0.7` or `opentelemetry1.0`, you can stream percentile statistics (p99 etc.). See details below.
     * 
     */
    @Import(name="statisticsConfigurations")
    private @Nullable Output> statisticsConfigurations;

    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). If the OutputFormat is `opentelemetry0.7` or `opentelemetry1.0`, you can stream percentile statistics (p99 etc.). See details below.
     * 
     */
    public Optional>> statisticsConfigurations() {
        return Optional.ofNullable(this.statisticsConfigurations);
    }

    /**
     * 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.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return 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.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private MetricStreamArgs() {}

    private MetricStreamArgs(MetricStreamArgs $) {
        this.excludeFilters = $.excludeFilters;
        this.firehoseArn = $.firehoseArn;
        this.includeFilters = $.includeFilters;
        this.includeLinkedAccountsMetrics = $.includeLinkedAccountsMetrics;
        this.name = $.name;
        this.namePrefix = $.namePrefix;
        this.outputFormat = $.outputFormat;
        this.roleArn = $.roleArn;
        this.statisticsConfigurations = $.statisticsConfigurations;
        this.tags = $.tags;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(MetricStreamArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private MetricStreamArgs $;

        public Builder() {
            $ = new MetricStreamArgs();
        }

        public Builder(MetricStreamArgs defaults) {
            $ = new MetricStreamArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param excludeFilters 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`.
         * 
         * @return builder
         * 
         */
        public Builder excludeFilters(@Nullable Output> excludeFilters) {
            $.excludeFilters = excludeFilters;
            return this;
        }

        /**
         * @param excludeFilters 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`.
         * 
         * @return builder
         * 
         */
        public Builder excludeFilters(List excludeFilters) {
            return excludeFilters(Output.of(excludeFilters));
        }

        /**
         * @param excludeFilters 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`.
         * 
         * @return builder
         * 
         */
        public Builder excludeFilters(MetricStreamExcludeFilterArgs... excludeFilters) {
            return excludeFilters(List.of(excludeFilters));
        }

        /**
         * @param firehoseArn ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
         * 
         * @return builder
         * 
         */
        public Builder firehoseArn(Output firehoseArn) {
            $.firehoseArn = firehoseArn;
            return this;
        }

        /**
         * @param firehoseArn ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
         * 
         * @return builder
         * 
         */
        public Builder firehoseArn(String firehoseArn) {
            return firehoseArn(Output.of(firehoseArn));
        }

        /**
         * @param includeFilters 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`.
         * 
         * @return builder
         * 
         */
        public Builder includeFilters(@Nullable Output> includeFilters) {
            $.includeFilters = includeFilters;
            return this;
        }

        /**
         * @param includeFilters 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`.
         * 
         * @return builder
         * 
         */
        public Builder includeFilters(List includeFilters) {
            return includeFilters(Output.of(includeFilters));
        }

        /**
         * @param includeFilters 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`.
         * 
         * @return builder
         * 
         */
        public Builder includeFilters(MetricStreamIncludeFilterArgs... includeFilters) {
            return includeFilters(List.of(includeFilters));
        }

        /**
         * @param includeLinkedAccountsMetrics 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html).
         * 
         * @return builder
         * 
         */
        public Builder includeLinkedAccountsMetrics(@Nullable Output includeLinkedAccountsMetrics) {
            $.includeLinkedAccountsMetrics = includeLinkedAccountsMetrics;
            return this;
        }

        /**
         * @param includeLinkedAccountsMetrics 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html).
         * 
         * @return builder
         * 
         */
        public Builder includeLinkedAccountsMetrics(Boolean includeLinkedAccountsMetrics) {
            return includeLinkedAccountsMetrics(Output.of(includeLinkedAccountsMetrics));
        }

        /**
         * @param name Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Friendly name of the metric stream. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param namePrefix Creates a unique friendly name beginning with the specified prefix. Conflicts with `name`.
         * 
         * @return builder
         * 
         */
        public Builder namePrefix(@Nullable Output namePrefix) {
            $.namePrefix = namePrefix;
            return this;
        }

        /**
         * @param namePrefix Creates a unique friendly name beginning with the specified prefix. Conflicts with `name`.
         * 
         * @return builder
         * 
         */
        public Builder namePrefix(String namePrefix) {
            return namePrefix(Output.of(namePrefix));
        }

        /**
         * @param outputFormat 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html).
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder outputFormat(Output outputFormat) {
            $.outputFormat = outputFormat;
            return this;
        }

        /**
         * @param outputFormat 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-formats.html).
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder outputFormat(String outputFormat) {
            return outputFormat(Output.of(outputFormat));
        }

        /**
         * @param roleArn 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-trustpolicy.html).
         * 
         * @return builder
         * 
         */
        public Builder roleArn(Output roleArn) {
            $.roleArn = roleArn;
            return this;
        }

        /**
         * @param roleArn 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-metric-streams-trustpolicy.html).
         * 
         * @return builder
         * 
         */
        public Builder roleArn(String roleArn) {
            return roleArn(Output.of(roleArn));
        }

        /**
         * @param statisticsConfigurations 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). If the OutputFormat is `opentelemetry0.7` or `opentelemetry1.0`, you can stream percentile statistics (p99 etc.). See details below.
         * 
         * @return builder
         * 
         */
        public Builder statisticsConfigurations(@Nullable Output> statisticsConfigurations) {
            $.statisticsConfigurations = statisticsConfigurations;
            return this;
        }

        /**
         * @param statisticsConfigurations 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). If the OutputFormat is `opentelemetry0.7` or `opentelemetry1.0`, you can stream percentile statistics (p99 etc.). See details below.
         * 
         * @return builder
         * 
         */
        public Builder statisticsConfigurations(List statisticsConfigurations) {
            return statisticsConfigurations(Output.of(statisticsConfigurations));
        }

        /**
         * @param statisticsConfigurations 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.html). If the OutputFormat is `opentelemetry0.7` or `opentelemetry1.0`, you can stream percentile statistics (p99 etc.). See details below.
         * 
         * @return builder
         * 
         */
        public Builder statisticsConfigurations(MetricStreamStatisticsConfigurationArgs... statisticsConfigurations) {
            return statisticsConfigurations(List.of(statisticsConfigurations));
        }

        /**
         * @param tags 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.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags 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.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public MetricStreamArgs build() {
            if ($.firehoseArn == null) {
                throw new MissingRequiredPropertyException("MetricStreamArgs", "firehoseArn");
            }
            if ($.outputFormat == null) {
                throw new MissingRequiredPropertyException("MetricStreamArgs", "outputFormat");
            }
            if ($.roleArn == null) {
                throw new MissingRequiredPropertyException("MetricStreamArgs", "roleArn");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy