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

com.pulumi.azurenative.insights.kotlin.inputs.RuleMetricDataSourceArgs.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.insights.kotlin.inputs

import com.pulumi.azurenative.insights.inputs.RuleMetricDataSourceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * A rule metric data source. The discriminator value is always RuleMetricDataSource in this case.
 * @property legacyResourceId the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
 * @property metricName the name of the metric that defines what the rule monitors.
 * @property metricNamespace the namespace of the metric.
 * @property odataType specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource
 * Expected value is 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource'.
 * @property resourceLocation the location of the resource.
 * @property resourceUri the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
 */
public data class RuleMetricDataSourceArgs(
    public val legacyResourceId: Output? = null,
    public val metricName: Output? = null,
    public val metricNamespace: Output? = null,
    public val odataType: Output,
    public val resourceLocation: Output? = null,
    public val resourceUri: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.insights.inputs.RuleMetricDataSourceArgs =
        com.pulumi.azurenative.insights.inputs.RuleMetricDataSourceArgs.builder()
            .legacyResourceId(legacyResourceId?.applyValue({ args0 -> args0 }))
            .metricName(metricName?.applyValue({ args0 -> args0 }))
            .metricNamespace(metricNamespace?.applyValue({ args0 -> args0 }))
            .odataType(odataType.applyValue({ args0 -> args0 }))
            .resourceLocation(resourceLocation?.applyValue({ args0 -> args0 }))
            .resourceUri(resourceUri?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RuleMetricDataSourceArgs].
 */
@PulumiTagMarker
public class RuleMetricDataSourceArgsBuilder internal constructor() {
    private var legacyResourceId: Output? = null

    private var metricName: Output? = null

    private var metricNamespace: Output? = null

    private var odataType: Output? = null

    private var resourceLocation: Output? = null

    private var resourceUri: Output? = null

    /**
     * @param value the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
     */
    @JvmName("jpgtlwtjrcqsbmxo")
    public suspend fun legacyResourceId(`value`: Output) {
        this.legacyResourceId = value
    }

    /**
     * @param value the name of the metric that defines what the rule monitors.
     */
    @JvmName("ftinrwjsynvcimny")
    public suspend fun metricName(`value`: Output) {
        this.metricName = value
    }

    /**
     * @param value the namespace of the metric.
     */
    @JvmName("fxijidawltbsysoq")
    public suspend fun metricNamespace(`value`: Output) {
        this.metricNamespace = value
    }

    /**
     * @param value specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource
     * Expected value is 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource'.
     */
    @JvmName("dosxscgwrifbkftj")
    public suspend fun odataType(`value`: Output) {
        this.odataType = value
    }

    /**
     * @param value the location of the resource.
     */
    @JvmName("growtmubfibhnqls")
    public suspend fun resourceLocation(`value`: Output) {
        this.resourceLocation = value
    }

    /**
     * @param value the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
     */
    @JvmName("itfjtfiebwpgyaln")
    public suspend fun resourceUri(`value`: Output) {
        this.resourceUri = value
    }

    /**
     * @param value the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
     */
    @JvmName("hxvskoxuegsfceso")
    public suspend fun legacyResourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.legacyResourceId = mapped
    }

    /**
     * @param value the name of the metric that defines what the rule monitors.
     */
    @JvmName("lmjhapqdojestrnf")
    public suspend fun metricName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metricName = mapped
    }

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

    /**
     * @param value specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource
     * Expected value is 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource'.
     */
    @JvmName("kgvakdoscphfbcja")
    public suspend fun odataType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.odataType = mapped
    }

    /**
     * @param value the location of the resource.
     */
    @JvmName("kcshyrfnnjexhdih")
    public suspend fun resourceLocation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceLocation = mapped
    }

    /**
     * @param value the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
     */
    @JvmName("lnajxvmdtakvpvgf")
    public suspend fun resourceUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceUri = mapped
    }

    internal fun build(): RuleMetricDataSourceArgs = RuleMetricDataSourceArgs(
        legacyResourceId = legacyResourceId,
        metricName = metricName,
        metricNamespace = metricNamespace,
        odataType = odataType ?: throw PulumiNullFieldException("odataType"),
        resourceLocation = resourceLocation,
        resourceUri = resourceUri,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy