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

com.pulumi.azurenative.insights.kotlin.inputs.LogSettingsArgs.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.LogSettingsArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.
 * @property category Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
 * @property categoryGroup Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
 * @property enabled a value indicating whether this log is enabled.
 * @property retentionPolicy the retention policy for this log.
 */
public data class LogSettingsArgs(
    public val category: Output? = null,
    public val categoryGroup: Output? = null,
    public val enabled: Output,
    public val retentionPolicy: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.insights.inputs.LogSettingsArgs =
        com.pulumi.azurenative.insights.inputs.LogSettingsArgs.builder()
            .category(category?.applyValue({ args0 -> args0 }))
            .categoryGroup(categoryGroup?.applyValue({ args0 -> args0 }))
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .retentionPolicy(
                retentionPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

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

    private var categoryGroup: Output? = null

    private var enabled: Output? = null

    private var retentionPolicy: Output? = null

    /**
     * @param value Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
     */
    @JvmName("sqiiacimohlnkoow")
    public suspend fun category(`value`: Output) {
        this.category = value
    }

    /**
     * @param value Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
     */
    @JvmName("rdwirsidygctadgf")
    public suspend fun categoryGroup(`value`: Output) {
        this.categoryGroup = value
    }

    /**
     * @param value a value indicating whether this log is enabled.
     */
    @JvmName("ugkqttjrifliupjg")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value the retention policy for this log.
     */
    @JvmName("ctxxtbgttuqaemdc")
    public suspend fun retentionPolicy(`value`: Output) {
        this.retentionPolicy = value
    }

    /**
     * @param value Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
     */
    @JvmName("hxtyowqwuhmubmvc")
    public suspend fun category(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.category = mapped
    }

    /**
     * @param value Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
     */
    @JvmName("osipdexiwwbxjunw")
    public suspend fun categoryGroup(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.categoryGroup = mapped
    }

    /**
     * @param value a value indicating whether this log is enabled.
     */
    @JvmName("oaxrfjjwdojwsbhx")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value the retention policy for this log.
     */
    @JvmName("vgsbhwmabkhhigbd")
    public suspend fun retentionPolicy(`value`: RetentionPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param argument the retention policy for this log.
     */
    @JvmName("orwfauulqonbmrof")
    public suspend fun retentionPolicy(argument: suspend RetentionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = RetentionPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.retentionPolicy = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy