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

com.pulumi.azure.monitoring.kotlin.inputs.DiagnosticSettingMetricArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.monitoring.kotlin.inputs

import com.pulumi.azure.monitoring.inputs.DiagnosticSettingMetricArgs.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 com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property category The name of a Diagnostic Metric Category for this Resource.
 * > **NOTE:** The Metric Categories available vary depending on the Resource being used. You may wish to use the `azure.monitoring.getDiagnosticCategories` Data Source to identify which categories are available for a given Resource.
 * @property enabled Is this Diagnostic Metric enabled? Defaults to `true`.
 * @property retentionPolicy A `retention_policy` block as defined below.
 * !> **NOTE:** `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention).
 */
public data class DiagnosticSettingMetricArgs(
    public val category: Output,
    public val enabled: Output? = null,
    @Deprecated(
        message = """
  `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to
      learn more https://aka.ms/diagnostic_settings_log_retention
  """,
    )
    public val retentionPolicy: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.monitoring.inputs.DiagnosticSettingMetricArgs =
        com.pulumi.azure.monitoring.inputs.DiagnosticSettingMetricArgs.builder()
            .category(category.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .retentionPolicy(
                retentionPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [DiagnosticSettingMetricArgs].
 */
@PulumiTagMarker
public class DiagnosticSettingMetricArgsBuilder internal constructor() {
    private var category: Output? = null

    private var enabled: Output? = null

    private var retentionPolicy: Output? = null

    /**
     * @param value The name of a Diagnostic Metric Category for this Resource.
     * > **NOTE:** The Metric Categories available vary depending on the Resource being used. You may wish to use the `azure.monitoring.getDiagnosticCategories` Data Source to identify which categories are available for a given Resource.
     */
    @JvmName("ayqkrucvlijcmwvx")
    public suspend fun category(`value`: Output) {
        this.category = value
    }

    /**
     * @param value Is this Diagnostic Metric enabled? Defaults to `true`.
     */
    @JvmName("piglgwhguwunmglq")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value A `retention_policy` block as defined below.
     * !> **NOTE:** `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention).
     */
    @Deprecated(
        message = """
  `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to
      learn more https://aka.ms/diagnostic_settings_log_retention
  """,
    )
    @JvmName("iaoileoflfjfxknp")
    public suspend fun retentionPolicy(`value`: Output) {
        this.retentionPolicy = value
    }

    /**
     * @param value The name of a Diagnostic Metric Category for this Resource.
     * > **NOTE:** The Metric Categories available vary depending on the Resource being used. You may wish to use the `azure.monitoring.getDiagnosticCategories` Data Source to identify which categories are available for a given Resource.
     */
    @JvmName("cfwanrwmtkviiyny")
    public suspend fun category(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.category = mapped
    }

    /**
     * @param value Is this Diagnostic Metric enabled? Defaults to `true`.
     */
    @JvmName("hnrqsvfjwlvcqbvr")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value A `retention_policy` block as defined below.
     * !> **NOTE:** `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention).
     */
    @Deprecated(
        message = """
  `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to
      learn more https://aka.ms/diagnostic_settings_log_retention
  """,
    )
    @JvmName("wwlnsjyckbumbnfy")
    public suspend fun retentionPolicy(`value`: DiagnosticSettingMetricRetentionPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param argument A `retention_policy` block as defined below.
     * !> **NOTE:** `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to learn more information on the deprecation [in the Azure documentation](https://aka.ms/diagnostic_settings_log_retention).
     */
    @Deprecated(
        message = """
  `retention_policy` has been deprecated in favor of `azure.storage.ManagementPolicy` resource - to
      learn more https://aka.ms/diagnostic_settings_log_retention
  """,
    )
    @JvmName("rbnwgxjqgpwbhfsn")
    public suspend fun retentionPolicy(argument: suspend DiagnosticSettingMetricRetentionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = DiagnosticSettingMetricRetentionPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.retentionPolicy = mapped
    }

    internal fun build(): DiagnosticSettingMetricArgs = DiagnosticSettingMetricArgs(
        category = category ?: throw PulumiNullFieldException("category"),
        enabled = enabled,
        retentionPolicy = retentionPolicy,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy