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

com.pulumi.azure.storage.kotlin.inputs.AccountBlobPropertiesArgs.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.storage.kotlin.inputs

import com.pulumi.azure.storage.inputs.AccountBlobPropertiesArgs.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.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property changeFeedEnabled Is the blob service properties for change feed events enabled? Default to `false`.
 * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
 * @property changeFeedRetentionInDays The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed.
 * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
 * @property containerDeleteRetentionPolicy A `container_delete_retention_policy` block as defined below.
 * @property corsRules A `cors_rule` block as defined below.
 * @property defaultServiceVersion The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version.
 * @property deleteRetentionPolicy A `delete_retention_policy` block as defined below.
 * @property lastAccessTimeEnabled Is the last access time based tracking enabled? Default to `false`.
 * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
 * @property restorePolicy A `restore_policy` block as defined below. This must be used together with `delete_retention_policy` set, `versioning_enabled` and `change_feed_enabled` set to `true`.
 * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
 * > **Note:** `restore_policy` can not be configured when `dns_endpoint_type` is `AzureDnsZone`.
 * @property versioningEnabled Is versioning enabled? Default to `false`.
 * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
 */
public data class AccountBlobPropertiesArgs(
    public val changeFeedEnabled: Output? = null,
    public val changeFeedRetentionInDays: Output? = null,
    public val containerDeleteRetentionPolicy: Output? = null,
    public val corsRules: Output>? = null,
    public val defaultServiceVersion: Output? = null,
    public val deleteRetentionPolicy: Output? = null,
    public val lastAccessTimeEnabled: Output? = null,
    public val restorePolicy: Output? = null,
    public val versioningEnabled: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.storage.inputs.AccountBlobPropertiesArgs =
        com.pulumi.azure.storage.inputs.AccountBlobPropertiesArgs.builder()
            .changeFeedEnabled(changeFeedEnabled?.applyValue({ args0 -> args0 }))
            .changeFeedRetentionInDays(changeFeedRetentionInDays?.applyValue({ args0 -> args0 }))
            .containerDeleteRetentionPolicy(
                containerDeleteRetentionPolicy?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .corsRules(
                corsRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .defaultServiceVersion(defaultServiceVersion?.applyValue({ args0 -> args0 }))
            .deleteRetentionPolicy(
                deleteRetentionPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .lastAccessTimeEnabled(lastAccessTimeEnabled?.applyValue({ args0 -> args0 }))
            .restorePolicy(restorePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .versioningEnabled(versioningEnabled?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AccountBlobPropertiesArgs].
 */
@PulumiTagMarker
public class AccountBlobPropertiesArgsBuilder internal constructor() {
    private var changeFeedEnabled: Output? = null

    private var changeFeedRetentionInDays: Output? = null

    private var containerDeleteRetentionPolicy:
        Output? = null

    private var corsRules: Output>? = null

    private var defaultServiceVersion: Output? = null

    private var deleteRetentionPolicy: Output? = null

    private var lastAccessTimeEnabled: Output? = null

    private var restorePolicy: Output? = null

    private var versioningEnabled: Output? = null

    /**
     * @param value Is the blob service properties for change feed events enabled? Default to `false`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     */
    @JvmName("omlecqejubjjdyea")
    public suspend fun changeFeedEnabled(`value`: Output) {
        this.changeFeedEnabled = value
    }

    /**
     * @param value The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     */
    @JvmName("qfvgpelfodcjcjxm")
    public suspend fun changeFeedRetentionInDays(`value`: Output) {
        this.changeFeedRetentionInDays = value
    }

    /**
     * @param value A `container_delete_retention_policy` block as defined below.
     */
    @JvmName("rhdnxlaywmcpokke")
    public suspend fun containerDeleteRetentionPolicy(`value`: Output) {
        this.containerDeleteRetentionPolicy = value
    }

    /**
     * @param value A `cors_rule` block as defined below.
     */
    @JvmName("prxupadarqesrfsu")
    public suspend fun corsRules(`value`: Output>) {
        this.corsRules = value
    }

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

    /**
     * @param values A `cors_rule` block as defined below.
     */
    @JvmName("aellksyuqnoxhmcw")
    public suspend fun corsRules(values: List>) {
        this.corsRules = Output.all(values)
    }

    /**
     * @param value The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version.
     */
    @JvmName("kefaywpjyqqmbpmp")
    public suspend fun defaultServiceVersion(`value`: Output) {
        this.defaultServiceVersion = value
    }

    /**
     * @param value A `delete_retention_policy` block as defined below.
     */
    @JvmName("nghvaftvqdrvftdj")
    public suspend fun deleteRetentionPolicy(`value`: Output) {
        this.deleteRetentionPolicy = value
    }

    /**
     * @param value Is the last access time based tracking enabled? Default to `false`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     */
    @JvmName("ifijsnaxqgqisjrh")
    public suspend fun lastAccessTimeEnabled(`value`: Output) {
        this.lastAccessTimeEnabled = value
    }

    /**
     * @param value A `restore_policy` block as defined below. This must be used together with `delete_retention_policy` set, `versioning_enabled` and `change_feed_enabled` set to `true`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     * > **Note:** `restore_policy` can not be configured when `dns_endpoint_type` is `AzureDnsZone`.
     */
    @JvmName("letccvepttcenxgi")
    public suspend fun restorePolicy(`value`: Output) {
        this.restorePolicy = value
    }

    /**
     * @param value Is versioning enabled? Default to `false`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     */
    @JvmName("ljccneruwlrrjqom")
    public suspend fun versioningEnabled(`value`: Output) {
        this.versioningEnabled = value
    }

    /**
     * @param value Is the blob service properties for change feed events enabled? Default to `false`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     */
    @JvmName("ajurxcsobbaueekj")
    public suspend fun changeFeedEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.changeFeedEnabled = mapped
    }

    /**
     * @param value The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     */
    @JvmName("xqggpngylxhxhuex")
    public suspend fun changeFeedRetentionInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.changeFeedRetentionInDays = mapped
    }

    /**
     * @param value A `container_delete_retention_policy` block as defined below.
     */
    @JvmName("ceolvyjhgqsmlvek")
    public suspend fun containerDeleteRetentionPolicy(`value`: AccountBlobPropertiesContainerDeleteRetentionPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerDeleteRetentionPolicy = mapped
    }

    /**
     * @param argument A `container_delete_retention_policy` block as defined below.
     */
    @JvmName("sdhfptvnikavtuas")
    public suspend fun containerDeleteRetentionPolicy(argument: suspend AccountBlobPropertiesContainerDeleteRetentionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = AccountBlobPropertiesContainerDeleteRetentionPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.containerDeleteRetentionPolicy = mapped
    }

    /**
     * @param value A `cors_rule` block as defined below.
     */
    @JvmName("xytnjrvipdybyhyo")
    public suspend fun corsRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.corsRules = mapped
    }

    /**
     * @param argument A `cors_rule` block as defined below.
     */
    @JvmName("haehooeojftbkyyp")
    public suspend fun corsRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccountBlobPropertiesCorsRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param argument A `cors_rule` block as defined below.
     */
    @JvmName("junfhknblpgqyirj")
    public suspend fun corsRules(vararg argument: suspend AccountBlobPropertiesCorsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccountBlobPropertiesCorsRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param argument A `cors_rule` block as defined below.
     */
    @JvmName("buwdaochchktmigd")
    public suspend fun corsRules(argument: suspend AccountBlobPropertiesCorsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AccountBlobPropertiesCorsRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.corsRules = mapped
    }

    /**
     * @param values A `cors_rule` block as defined below.
     */
    @JvmName("emhflsokwrevqpmy")
    public suspend fun corsRules(vararg values: AccountBlobPropertiesCorsRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.corsRules = mapped
    }

    /**
     * @param value The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version.
     */
    @JvmName("imaqxjyihdthhjhm")
    public suspend fun defaultServiceVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultServiceVersion = mapped
    }

    /**
     * @param value A `delete_retention_policy` block as defined below.
     */
    @JvmName("tabrovfmugyliqek")
    public suspend fun deleteRetentionPolicy(`value`: AccountBlobPropertiesDeleteRetentionPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteRetentionPolicy = mapped
    }

    /**
     * @param argument A `delete_retention_policy` block as defined below.
     */
    @JvmName("pnwgnjrfakuclbrq")
    public suspend fun deleteRetentionPolicy(argument: suspend AccountBlobPropertiesDeleteRetentionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = AccountBlobPropertiesDeleteRetentionPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.deleteRetentionPolicy = mapped
    }

    /**
     * @param value Is the last access time based tracking enabled? Default to `false`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     */
    @JvmName("uowqhtpurpibxqmj")
    public suspend fun lastAccessTimeEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lastAccessTimeEnabled = mapped
    }

    /**
     * @param value A `restore_policy` block as defined below. This must be used together with `delete_retention_policy` set, `versioning_enabled` and `change_feed_enabled` set to `true`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     * > **Note:** `restore_policy` can not be configured when `dns_endpoint_type` is `AzureDnsZone`.
     */
    @JvmName("tymwivvwukbeifdv")
    public suspend fun restorePolicy(`value`: AccountBlobPropertiesRestorePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restorePolicy = mapped
    }

    /**
     * @param argument A `restore_policy` block as defined below. This must be used together with `delete_retention_policy` set, `versioning_enabled` and `change_feed_enabled` set to `true`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     * > **Note:** `restore_policy` can not be configured when `dns_endpoint_type` is `AzureDnsZone`.
     */
    @JvmName("dgeghwtrsxltfqjg")
    public suspend fun restorePolicy(argument: suspend AccountBlobPropertiesRestorePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = AccountBlobPropertiesRestorePolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.restorePolicy = mapped
    }

    /**
     * @param value Is versioning enabled? Default to `false`.
     * > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
     */
    @JvmName("lueljlehkotsndwb")
    public suspend fun versioningEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.versioningEnabled = mapped
    }

    internal fun build(): AccountBlobPropertiesArgs = AccountBlobPropertiesArgs(
        changeFeedEnabled = changeFeedEnabled,
        changeFeedRetentionInDays = changeFeedRetentionInDays,
        containerDeleteRetentionPolicy = containerDeleteRetentionPolicy,
        corsRules = corsRules,
        defaultServiceVersion = defaultServiceVersion,
        deleteRetentionPolicy = deleteRetentionPolicy,
        lastAccessTimeEnabled = lastAccessTimeEnabled,
        restorePolicy = restorePolicy,
        versioningEnabled = versioningEnabled,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy