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

com.pulumi.awsnative.cloudwatch.kotlin.MetricStreamArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cloudwatch.kotlin

import com.pulumi.awsnative.cloudwatch.MetricStreamArgs.builder
import com.pulumi.awsnative.cloudwatch.kotlin.inputs.MetricStreamFilterArgs
import com.pulumi.awsnative.cloudwatch.kotlin.inputs.MetricStreamFilterArgsBuilder
import com.pulumi.awsnative.cloudwatch.kotlin.inputs.MetricStreamStatisticsConfigurationArgs
import com.pulumi.awsnative.cloudwatch.kotlin.inputs.MetricStreamStatisticsConfigurationArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for Metric Stream
 * ## Example Usage
 * ### Example
 * No Java example available.
 * @property excludeFilters 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.
 * @property firehoseArn The ARN of the Kinesis Firehose where to stream the data.
 * @property includeFilters 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.
 * @property 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.
 * @property name Name of the metric stream.
 * @property outputFormat The output format of the data streamed to the Kinesis Firehose.
 * @property roleArn The ARN of the role that provides access to the Kinesis Firehose.
 * @property statisticsConfigurations By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
 * @property tags A set of tags to assign to the delivery stream.
 */
public data class MetricStreamArgs(
    public val excludeFilters: Output>? = null,
    public val firehoseArn: Output? = null,
    public val includeFilters: Output>? = null,
    public val includeLinkedAccountsMetrics: Output? = null,
    public val name: Output? = null,
    public val outputFormat: Output? = null,
    public val roleArn: Output? = null,
    public val statisticsConfigurations: Output>? =
        null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudwatch.MetricStreamArgs =
        com.pulumi.awsnative.cloudwatch.MetricStreamArgs.builder()
            .excludeFilters(
                excludeFilters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .firehoseArn(firehoseArn?.applyValue({ args0 -> args0 }))
            .includeFilters(
                includeFilters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .includeLinkedAccountsMetrics(includeLinkedAccountsMetrics?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .outputFormat(outputFormat?.applyValue({ args0 -> args0 }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .statisticsConfigurations(
                statisticsConfigurations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [MetricStreamArgs].
 */
@PulumiTagMarker
public class MetricStreamArgsBuilder internal constructor() {
    private var excludeFilters: Output>? = null

    private var firehoseArn: Output? = null

    private var includeFilters: Output>? = null

    private var includeLinkedAccountsMetrics: Output? = null

    private var name: Output? = null

    private var outputFormat: Output? = null

    private var roleArn: Output? = null

    private var statisticsConfigurations: Output>? =
        null

    private var tags: Output>? = null

    /**
     * @param value 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.
     */
    @JvmName("mcrlbdesoqsrpsse")
    public suspend fun excludeFilters(`value`: Output>) {
        this.excludeFilters = value
    }

    @JvmName("xakshhfmljuaihhj")
    public suspend fun excludeFilters(vararg values: Output) {
        this.excludeFilters = Output.all(values.asList())
    }

    /**
     * @param values 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.
     */
    @JvmName("vaqoccdjqukejbwy")
    public suspend fun excludeFilters(values: List>) {
        this.excludeFilters = Output.all(values)
    }

    /**
     * @param value The ARN of the Kinesis Firehose where to stream the data.
     */
    @JvmName("nhgqetqxyqgymqfp")
    public suspend fun firehoseArn(`value`: Output) {
        this.firehoseArn = value
    }

    /**
     * @param value 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.
     */
    @JvmName("dbsoiqbdhgtkrpet")
    public suspend fun includeFilters(`value`: Output>) {
        this.includeFilters = value
    }

    @JvmName("oqbxerirmjyyfhrg")
    public suspend fun includeFilters(vararg values: Output) {
        this.includeFilters = Output.all(values.asList())
    }

    /**
     * @param values 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.
     */
    @JvmName("ysfklpdtaeryvgna")
    public suspend fun includeFilters(values: List>) {
        this.includeFilters = Output.all(values)
    }

    /**
     * @param value 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.
     */
    @JvmName("yrcuqukitwoxkves")
    public suspend fun includeLinkedAccountsMetrics(`value`: Output) {
        this.includeLinkedAccountsMetrics = value
    }

    /**
     * @param value Name of the metric stream.
     */
    @JvmName("lmvqpjfcqcvbbvdd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The output format of the data streamed to the Kinesis Firehose.
     */
    @JvmName("xpqpnujyqkoovqnk")
    public suspend fun outputFormat(`value`: Output) {
        this.outputFormat = value
    }

    /**
     * @param value The ARN of the role that provides access to the Kinesis Firehose.
     */
    @JvmName("kavrnwbcdcbmcoqh")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
     */
    @JvmName("qceougxoetnhuuhl")
    public suspend fun statisticsConfigurations(`value`: Output>) {
        this.statisticsConfigurations = value
    }

    @JvmName("rjhptxipqacscoor")
    public suspend fun statisticsConfigurations(vararg values: Output) {
        this.statisticsConfigurations = Output.all(values.asList())
    }

    /**
     * @param values By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
     */
    @JvmName("xldfaesmbpvwtsfx")
    public suspend fun statisticsConfigurations(values: List>) {
        this.statisticsConfigurations = Output.all(values)
    }

    /**
     * @param value A set of tags to assign to the delivery stream.
     */
    @JvmName("kicasbuvdqviijwq")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("eusbahrjkxjoidra")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values A set of tags to assign to the delivery stream.
     */
    @JvmName("pwwueoqtwweebsuc")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value 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.
     */
    @JvmName("abbqpdootigbxjki")
    public suspend fun excludeFilters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludeFilters = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("potqhricdveglfvw")
    public suspend fun excludeFilters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            MetricStreamFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.excludeFilters = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("cnpyrhfnniieiwwq")
    public suspend fun excludeFilters(vararg argument: suspend MetricStreamFilterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            MetricStreamFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.excludeFilters = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("fnuhifcbrmlmjrbf")
    public suspend fun excludeFilters(argument: suspend MetricStreamFilterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(MetricStreamFilterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.excludeFilters = mapped
    }

    /**
     * @param values 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.
     */
    @JvmName("cdcdnmldwrrvogwx")
    public suspend fun excludeFilters(vararg values: MetricStreamFilterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.excludeFilters = mapped
    }

    /**
     * @param value The ARN of the Kinesis Firehose where to stream the data.
     */
    @JvmName("aivcvhxofedponys")
    public suspend fun firehoseArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.firehoseArn = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("ledqghjyfrgnlvso")
    public suspend fun includeFilters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.includeFilters = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("kkunvvbggfxnwqhn")
    public suspend fun includeFilters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            MetricStreamFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.includeFilters = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("fiiswmvikikniwos")
    public suspend fun includeFilters(vararg argument: suspend MetricStreamFilterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            MetricStreamFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.includeFilters = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("mmbqrmoxssxapjqx")
    public suspend fun includeFilters(argument: suspend MetricStreamFilterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(MetricStreamFilterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.includeFilters = mapped
    }

    /**
     * @param values 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.
     */
    @JvmName("doijlfqffdvxfmet")
    public suspend fun includeFilters(vararg values: MetricStreamFilterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.includeFilters = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("bvhiqfjustxylsyx")
    public suspend fun includeLinkedAccountsMetrics(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.includeLinkedAccountsMetrics = mapped
    }

    /**
     * @param value Name of the metric stream.
     */
    @JvmName("luktwsoqqlmjlsja")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The output format of the data streamed to the Kinesis Firehose.
     */
    @JvmName("utwefnvctltimcnm")
    public suspend fun outputFormat(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputFormat = mapped
    }

    /**
     * @param value The ARN of the role that provides access to the Kinesis Firehose.
     */
    @JvmName("mstlnkamqrxaxwtv")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
     */
    @JvmName("lohhfjrqyfnibpsx")
    public suspend fun statisticsConfigurations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statisticsConfigurations = mapped
    }

    /**
     * @param argument By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
     */
    @JvmName("wbsxdxhciubiarat")
    public suspend fun statisticsConfigurations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            MetricStreamStatisticsConfigurationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statisticsConfigurations = mapped
    }

    /**
     * @param argument By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
     */
    @JvmName("cvkwokomahtjueff")
    public suspend fun statisticsConfigurations(vararg argument: suspend MetricStreamStatisticsConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            MetricStreamStatisticsConfigurationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.statisticsConfigurations = mapped
    }

    /**
     * @param argument By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
     */
    @JvmName("qhlespcmxuduhmsl")
    public suspend fun statisticsConfigurations(argument: suspend MetricStreamStatisticsConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            MetricStreamStatisticsConfigurationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.statisticsConfigurations = mapped
    }

    /**
     * @param values By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
     */
    @JvmName("gtfbeyetygkfkntt")
    public suspend fun statisticsConfigurations(vararg values: MetricStreamStatisticsConfigurationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statisticsConfigurations = mapped
    }

    /**
     * @param value A set of tags to assign to the delivery stream.
     */
    @JvmName("fwbghiwpppejkvee")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument A set of tags to assign to the delivery stream.
     */
    @JvmName("ojwawywosdqhfrem")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A set of tags to assign to the delivery stream.
     */
    @JvmName("ykqdqiaruobjwvky")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A set of tags to assign to the delivery stream.
     */
    @JvmName("opoweevespfgpnqp")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values A set of tags to assign to the delivery stream.
     */
    @JvmName("fcvxtixwigeemcgr")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): MetricStreamArgs = MetricStreamArgs(
        excludeFilters = excludeFilters,
        firehoseArn = firehoseArn,
        includeFilters = includeFilters,
        includeLinkedAccountsMetrics = includeLinkedAccountsMetrics,
        name = name,
        outputFormat = outputFormat,
        roleArn = roleArn,
        statisticsConfigurations = statisticsConfigurations,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy