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

com.pulumi.azurenative.logz.kotlin.inputs.MetricRulesArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.logz.kotlin.inputs

import com.pulumi.azurenative.logz.inputs.MetricRulesArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Set of rules for sending metrics for the Monitor resource.
 * @property filteringTags List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
 * @property subscriptionId Subscription Id for which filtering tags are applicable
 */
public data class MetricRulesArgs(
    public val filteringTags: Output>? = null,
    public val subscriptionId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.logz.inputs.MetricRulesArgs =
        com.pulumi.azurenative.logz.inputs.MetricRulesArgs.builder()
            .filteringTags(
                filteringTags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .subscriptionId(subscriptionId?.applyValue({ args0 -> args0 })).build()
}

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

    private var subscriptionId: Output? = null

    /**
     * @param value List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
     */
    @JvmName("bsvmbbtavpgcxflj")
    public suspend fun filteringTags(`value`: Output>) {
        this.filteringTags = value
    }

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

    /**
     * @param values List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
     */
    @JvmName("babfonypqkfkrrbs")
    public suspend fun filteringTags(values: List>) {
        this.filteringTags = Output.all(values)
    }

    /**
     * @param value Subscription Id for which filtering tags are applicable
     */
    @JvmName("prayqhjmychjdrpi")
    public suspend fun subscriptionId(`value`: Output) {
        this.subscriptionId = value
    }

    /**
     * @param value List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
     */
    @JvmName("tqxjnihjqvglchxe")
    public suspend fun filteringTags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filteringTags = mapped
    }

    /**
     * @param argument List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
     */
    @JvmName("ghjndqnutdfrxtsd")
    public suspend fun filteringTags(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FilteringTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.filteringTags = mapped
    }

    /**
     * @param argument List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
     */
    @JvmName("xjhxmemvugndybus")
    public suspend fun filteringTags(vararg argument: suspend FilteringTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FilteringTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.filteringTags = mapped
    }

    /**
     * @param argument List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
     */
    @JvmName("ielitenmrsinfvho")
    public suspend fun filteringTags(argument: suspend FilteringTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(FilteringTagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.filteringTags = mapped
    }

    /**
     * @param values List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
     */
    @JvmName("cmbdduoklqfqqytc")
    public suspend fun filteringTags(vararg values: FilteringTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.filteringTags = mapped
    }

    /**
     * @param value Subscription Id for which filtering tags are applicable
     */
    @JvmName("tolhcemeicakbjit")
    public suspend fun subscriptionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subscriptionId = mapped
    }

    internal fun build(): MetricRulesArgs = MetricRulesArgs(
        filteringTags = filteringTags,
        subscriptionId = subscriptionId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy