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

com.pulumi.azurenative.storage.kotlin.BlobContainerArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.storage.kotlin

import com.pulumi.azurenative.storage.BlobContainerArgs.builder
import com.pulumi.azurenative.storage.kotlin.enums.PublicAccess
import com.pulumi.azurenative.storage.kotlin.inputs.ImmutableStorageWithVersioningArgs
import com.pulumi.azurenative.storage.kotlin.inputs.ImmutableStorageWithVersioningArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Properties of the blob container, including Id, resource name, resource type, Etag.
 * Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2021-02-01.
 * Other available API versions: 2023-01-01, 2023-04-01, 2023-05-01.
 * ## Example Usage
 * ### PutContainerWithDefaultEncryptionScope
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var blobContainer = new AzureNative.Storage.BlobContainer("blobContainer", new()
 *     {
 *         AccountName = "sto328",
 *         ContainerName = "container6185",
 *         DefaultEncryptionScope = "encryptionscope185",
 *         DenyEncryptionScopeOverride = true,
 *         ResourceGroupName = "res3376",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := storage.NewBlobContainer(ctx, "blobContainer", &storage.BlobContainerArgs{
 * 			AccountName:                 pulumi.String("sto328"),
 * 			ContainerName:               pulumi.String("container6185"),
 * 			DefaultEncryptionScope:      pulumi.String("encryptionscope185"),
 * 			DenyEncryptionScopeOverride: pulumi.Bool(true),
 * 			ResourceGroupName:           pulumi.String("res3376"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.storage.BlobContainer;
 * import com.pulumi.azurenative.storage.BlobContainerArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var blobContainer = new BlobContainer("blobContainer", BlobContainerArgs.builder()
 *             .accountName("sto328")
 *             .containerName("container6185")
 *             .defaultEncryptionScope("encryptionscope185")
 *             .denyEncryptionScopeOverride(true)
 *             .resourceGroupName("res3376")
 *             .build());
 *     }
 * }
 * ```
 * ### PutContainerWithObjectLevelWorm
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var blobContainer = new AzureNative.Storage.BlobContainer("blobContainer", new()
 *     {
 *         AccountName = "sto328",
 *         ContainerName = "container6185",
 *         ImmutableStorageWithVersioning = new AzureNative.Storage.Inputs.ImmutableStorageWithVersioningArgs
 *         {
 *             Enabled = true,
 *         },
 *         ResourceGroupName = "res3376",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := storage.NewBlobContainer(ctx, "blobContainer", &storage.BlobContainerArgs{
 * 			AccountName:   pulumi.String("sto328"),
 * 			ContainerName: pulumi.String("container6185"),
 * 			ImmutableStorageWithVersioning: &storage.ImmutableStorageWithVersioningArgs{
 * 				Enabled: pulumi.Bool(true),
 * 			},
 * 			ResourceGroupName: pulumi.String("res3376"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.storage.BlobContainer;
 * import com.pulumi.azurenative.storage.BlobContainerArgs;
 * import com.pulumi.azurenative.storage.inputs.ImmutableStorageWithVersioningArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var blobContainer = new BlobContainer("blobContainer", BlobContainerArgs.builder()
 *             .accountName("sto328")
 *             .containerName("container6185")
 *             .immutableStorageWithVersioning(ImmutableStorageWithVersioningArgs.builder()
 *                 .enabled(true)
 *                 .build())
 *             .resourceGroupName("res3376")
 *             .build());
 *     }
 * }
 * ```
 * ### PutContainers
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var blobContainer = new AzureNative.Storage.BlobContainer("blobContainer", new()
 *     {
 *         AccountName = "sto328",
 *         ContainerName = "container6185",
 *         ResourceGroupName = "res3376",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := storage.NewBlobContainer(ctx, "blobContainer", &storage.BlobContainerArgs{
 * 			AccountName:       pulumi.String("sto328"),
 * 			ContainerName:     pulumi.String("container6185"),
 * 			ResourceGroupName: pulumi.String("res3376"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.storage.BlobContainer;
 * import com.pulumi.azurenative.storage.BlobContainerArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var blobContainer = new BlobContainer("blobContainer", BlobContainerArgs.builder()
 *             .accountName("sto328")
 *             .containerName("container6185")
 *             .resourceGroupName("res3376")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:storage:BlobContainer container6185 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}
 * ```
 * @property accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
 * @property containerName The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
 * @property defaultEncryptionScope Default the container to use specified encryption scope for all writes.
 * @property denyEncryptionScopeOverride Block override of encryption scope from the container default.
 * @property enableNfsV3AllSquash Enable NFSv3 all squash on blob container.
 * @property enableNfsV3RootSquash Enable NFSv3 root squash on blob container.
 * @property immutableStorageWithVersioning The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.
 * @property metadata A name-value pair to associate with the container as metadata.
 * @property publicAccess Specifies whether data in the container may be accessed publicly and the level of access.
 * @property resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
 */
public data class BlobContainerArgs(
    public val accountName: Output? = null,
    public val containerName: Output? = null,
    public val defaultEncryptionScope: Output? = null,
    public val denyEncryptionScopeOverride: Output? = null,
    public val enableNfsV3AllSquash: Output? = null,
    public val enableNfsV3RootSquash: Output? = null,
    public val immutableStorageWithVersioning: Output? = null,
    public val metadata: Output>? = null,
    public val publicAccess: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.storage.BlobContainerArgs =
        com.pulumi.azurenative.storage.BlobContainerArgs.builder()
            .accountName(accountName?.applyValue({ args0 -> args0 }))
            .containerName(containerName?.applyValue({ args0 -> args0 }))
            .defaultEncryptionScope(defaultEncryptionScope?.applyValue({ args0 -> args0 }))
            .denyEncryptionScopeOverride(denyEncryptionScopeOverride?.applyValue({ args0 -> args0 }))
            .enableNfsV3AllSquash(enableNfsV3AllSquash?.applyValue({ args0 -> args0 }))
            .enableNfsV3RootSquash(enableNfsV3RootSquash?.applyValue({ args0 -> args0 }))
            .immutableStorageWithVersioning(
                immutableStorageWithVersioning?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .publicAccess(publicAccess?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BlobContainerArgs].
 */
@PulumiTagMarker
public class BlobContainerArgsBuilder internal constructor() {
    private var accountName: Output? = null

    private var containerName: Output? = null

    private var defaultEncryptionScope: Output? = null

    private var denyEncryptionScopeOverride: Output? = null

    private var enableNfsV3AllSquash: Output? = null

    private var enableNfsV3RootSquash: Output? = null

    private var immutableStorageWithVersioning: Output? = null

    private var metadata: Output>? = null

    private var publicAccess: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
     */
    @JvmName("satsmoqdkqntpbvg")
    public suspend fun accountName(`value`: Output) {
        this.accountName = value
    }

    /**
     * @param value The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
     */
    @JvmName("tcllicslthsheaus")
    public suspend fun containerName(`value`: Output) {
        this.containerName = value
    }

    /**
     * @param value Default the container to use specified encryption scope for all writes.
     */
    @JvmName("ymdloxsrxgtcrnxn")
    public suspend fun defaultEncryptionScope(`value`: Output) {
        this.defaultEncryptionScope = value
    }

    /**
     * @param value Block override of encryption scope from the container default.
     */
    @JvmName("orhbifijhinyyeee")
    public suspend fun denyEncryptionScopeOverride(`value`: Output) {
        this.denyEncryptionScopeOverride = value
    }

    /**
     * @param value Enable NFSv3 all squash on blob container.
     */
    @JvmName("nhouhrdwvkfsyixi")
    public suspend fun enableNfsV3AllSquash(`value`: Output) {
        this.enableNfsV3AllSquash = value
    }

    /**
     * @param value Enable NFSv3 root squash on blob container.
     */
    @JvmName("vxvjuiuruaqsjfhv")
    public suspend fun enableNfsV3RootSquash(`value`: Output) {
        this.enableNfsV3RootSquash = value
    }

    /**
     * @param value The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.
     */
    @JvmName("iciqkudpfkeqwllx")
    public suspend fun immutableStorageWithVersioning(`value`: Output) {
        this.immutableStorageWithVersioning = value
    }

    /**
     * @param value A name-value pair to associate with the container as metadata.
     */
    @JvmName("ibshlmhqqxwfbpck")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value Specifies whether data in the container may be accessed publicly and the level of access.
     */
    @JvmName("bwaiccevgkacrsfo")
    public suspend fun publicAccess(`value`: Output) {
        this.publicAccess = value
    }

    /**
     * @param value The name of the resource group within the user's subscription. The name is case insensitive.
     */
    @JvmName("sjxdvpmoeuefhhld")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
     */
    @JvmName("jgpiogrqjsptgeiq")
    public suspend fun accountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountName = mapped
    }

    /**
     * @param value The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
     */
    @JvmName("tpbhnhagsmwuvuko")
    public suspend fun containerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerName = mapped
    }

    /**
     * @param value Default the container to use specified encryption scope for all writes.
     */
    @JvmName("miqlucmukwaxlrgi")
    public suspend fun defaultEncryptionScope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultEncryptionScope = mapped
    }

    /**
     * @param value Block override of encryption scope from the container default.
     */
    @JvmName("uywaykeuqydpjcbd")
    public suspend fun denyEncryptionScopeOverride(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.denyEncryptionScopeOverride = mapped
    }

    /**
     * @param value Enable NFSv3 all squash on blob container.
     */
    @JvmName("kdojydysxgvlowfo")
    public suspend fun enableNfsV3AllSquash(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableNfsV3AllSquash = mapped
    }

    /**
     * @param value Enable NFSv3 root squash on blob container.
     */
    @JvmName("hfmtfgpvsfvakmhh")
    public suspend fun enableNfsV3RootSquash(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableNfsV3RootSquash = mapped
    }

    /**
     * @param value The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.
     */
    @JvmName("vpebtvcyyjmrpwjk")
    public suspend fun immutableStorageWithVersioning(`value`: ImmutableStorageWithVersioningArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.immutableStorageWithVersioning = mapped
    }

    /**
     * @param argument The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.
     */
    @JvmName("uuebxtvwqfwwxdwy")
    public suspend fun immutableStorageWithVersioning(argument: suspend ImmutableStorageWithVersioningArgsBuilder.() -> Unit) {
        val toBeMapped = ImmutableStorageWithVersioningArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.immutableStorageWithVersioning = mapped
    }

    /**
     * @param value A name-value pair to associate with the container as metadata.
     */
    @JvmName("sfifalgxbtfeyrfw")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values A name-value pair to associate with the container as metadata.
     */
    @JvmName("jscrfiashemvxoja")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value Specifies whether data in the container may be accessed publicly and the level of access.
     */
    @JvmName("awscmwarxoamailf")
    public suspend fun publicAccess(`value`: PublicAccess?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicAccess = mapped
    }

    /**
     * @param value The name of the resource group within the user's subscription. The name is case insensitive.
     */
    @JvmName("pjbkunhecwflqewp")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): BlobContainerArgs = BlobContainerArgs(
        accountName = accountName,
        containerName = containerName,
        defaultEncryptionScope = defaultEncryptionScope,
        denyEncryptionScopeOverride = denyEncryptionScopeOverride,
        enableNfsV3AllSquash = enableNfsV3AllSquash,
        enableNfsV3RootSquash = enableNfsV3RootSquash,
        immutableStorageWithVersioning = immutableStorageWithVersioning,
        metadata = metadata,
        publicAccess = publicAccess,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy