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

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

import com.pulumi.azure.storage.DataLakeGen2FilesystemArgs.builder
import com.pulumi.azure.storage.kotlin.inputs.DataLakeGen2FilesystemAceArgs
import com.pulumi.azure.storage.kotlin.inputs.DataLakeGen2FilesystemAceArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Data Lake Gen2 File System within an Azure Storage Account.
 * > **NOTE:** This resource requires some `Storage` specific roles which are not granted by default. Some of the built-ins roles that can be attributed are [`Storage Account Contributor`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-account-contributor), [`Storage Blob Data Owner`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-owner), [`Storage Blob Data Contributor`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor), [`Storage Blob Data Reader`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-reader).
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplestorageacc",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 *     accountKind: "StorageV2",
 *     isHnsEnabled: true,
 * });
 * const exampleDataLakeGen2Filesystem = new azure.storage.DataLakeGen2Filesystem("example", {
 *     name: "example",
 *     storageAccountId: exampleAccount.id,
 *     properties: {
 *         hello: "aGVsbG8=",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_account = azure.storage.Account("example",
 *     name="examplestorageacc",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     account_tier="Standard",
 *     account_replication_type="LRS",
 *     account_kind="StorageV2",
 *     is_hns_enabled=True)
 * example_data_lake_gen2_filesystem = azure.storage.DataLakeGen2Filesystem("example",
 *     name="example",
 *     storage_account_id=example_account.id,
 *     properties={
 *         "hello": "aGVsbG8=",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleAccount = new Azure.Storage.Account("example", new()
 *     {
 *         Name = "examplestorageacc",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AccountTier = "Standard",
 *         AccountReplicationType = "LRS",
 *         AccountKind = "StorageV2",
 *         IsHnsEnabled = true,
 *     });
 *     var exampleDataLakeGen2Filesystem = new Azure.Storage.DataLakeGen2Filesystem("example", new()
 *     {
 *         Name = "example",
 *         StorageAccountId = exampleAccount.Id,
 *         Properties =
 *         {
 *             { "hello", "aGVsbG8=" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
 * 			Name:                   pulumi.String("examplestorageacc"),
 * 			ResourceGroupName:      example.Name,
 * 			Location:               example.Location,
 * 			AccountTier:            pulumi.String("Standard"),
 * 			AccountReplicationType: pulumi.String("LRS"),
 * 			AccountKind:            pulumi.String("StorageV2"),
 * 			IsHnsEnabled:           pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{
 * 			Name:             pulumi.String("example"),
 * 			StorageAccountId: exampleAccount.ID(),
 * 			Properties: pulumi.StringMap{
 * 				"hello": pulumi.String("aGVsbG8="),
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.storage.DataLakeGen2Filesystem;
 * import com.pulumi.azure.storage.DataLakeGen2FilesystemArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("examplestorageacc")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .accountKind("StorageV2")
 *             .isHnsEnabled("true")
 *             .build());
 *         var exampleDataLakeGen2Filesystem = new DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", DataLakeGen2FilesystemArgs.builder()
 *             .name("example")
 *             .storageAccountId(exampleAccount.id())
 *             .properties(Map.of("hello", "aGVsbG8="))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:storage:Account
 *     name: example
 *     properties:
 *       name: examplestorageacc
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountReplicationType: LRS
 *       accountKind: StorageV2
 *       isHnsEnabled: 'true'
 *   exampleDataLakeGen2Filesystem:
 *     type: azure:storage:DataLakeGen2Filesystem
 *     name: example
 *     properties:
 *       name: example
 *       storageAccountId: ${exampleAccount.id}
 *       properties:
 *         hello: aGVsbG8=
 * ```
 * 
 * ## Import
 * Data Lake Gen2 File System's can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:storage/dataLakeGen2Filesystem:DataLakeGen2Filesystem queue1 https://account1.dfs.core.windows.net/fileSystem1
 * ```
 * @property aces One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
 * @property defaultEncryptionScope The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
 * @property group Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
 * > **NOTE:** The Storage Account requires `account_kind` to be either `StorageV2` or `BlobStorage`. In addition, `is_hns_enabled` has to be set to `true`.
 * @property name The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
 * @property owner Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
 * @property properties A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
 * @property storageAccountId Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
 */
public data class DataLakeGen2FilesystemArgs(
    public val aces: Output>? = null,
    public val defaultEncryptionScope: Output? = null,
    public val group: Output? = null,
    public val name: Output? = null,
    public val owner: Output? = null,
    public val properties: Output>? = null,
    public val storageAccountId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.storage.DataLakeGen2FilesystemArgs =
        com.pulumi.azure.storage.DataLakeGen2FilesystemArgs.builder()
            .aces(aces?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .defaultEncryptionScope(defaultEncryptionScope?.applyValue({ args0 -> args0 }))
            .group(group?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .owner(owner?.applyValue({ args0 -> args0 }))
            .properties(
                properties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .storageAccountId(storageAccountId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DataLakeGen2FilesystemArgs].
 */
@PulumiTagMarker
public class DataLakeGen2FilesystemArgsBuilder internal constructor() {
    private var aces: Output>? = null

    private var defaultEncryptionScope: Output? = null

    private var group: Output? = null

    private var name: Output? = null

    private var owner: Output? = null

    private var properties: Output>? = null

    private var storageAccountId: Output? = null

    /**
     * @param value One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
     */
    @JvmName("ofwynkowwdmxitic")
    public suspend fun aces(`value`: Output>) {
        this.aces = value
    }

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

    /**
     * @param values One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
     */
    @JvmName("ikqmodtquwkqlkdi")
    public suspend fun aces(values: List>) {
        this.aces = Output.all(values)
    }

    /**
     * @param value The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
     */
    @JvmName("subchprhrwpbriww")
    public suspend fun defaultEncryptionScope(`value`: Output) {
        this.defaultEncryptionScope = value
    }

    /**
     * @param value Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
     * > **NOTE:** The Storage Account requires `account_kind` to be either `StorageV2` or `BlobStorage`. In addition, `is_hns_enabled` has to be set to `true`.
     */
    @JvmName("oqvgfpirlpncnwfg")
    public suspend fun group(`value`: Output) {
        this.group = value
    }

    /**
     * @param value The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
     */
    @JvmName("kfwjqavjgqykjase")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
     */
    @JvmName("grlhdkedjxjkpvqg")
    public suspend fun owner(`value`: Output) {
        this.owner = value
    }

    /**
     * @param value A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
     */
    @JvmName("eennjllgxeglxnwv")
    public suspend fun properties(`value`: Output>) {
        this.properties = value
    }

    /**
     * @param value Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
     */
    @JvmName("xmeknhifhgdisnoj")
    public suspend fun storageAccountId(`value`: Output) {
        this.storageAccountId = value
    }

    /**
     * @param value One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
     */
    @JvmName("eyocnpdhdmtqktee")
    public suspend fun aces(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aces = mapped
    }

    /**
     * @param argument One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
     */
    @JvmName("blsldmjuqfljfykc")
    public suspend fun aces(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DataLakeGen2FilesystemAceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.aces = mapped
    }

    /**
     * @param argument One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
     */
    @JvmName("tknyhhuyoncglhmm")
    public suspend fun aces(vararg argument: suspend DataLakeGen2FilesystemAceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DataLakeGen2FilesystemAceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.aces = mapped
    }

    /**
     * @param argument One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
     */
    @JvmName("ulwutpqaidctcdla")
    public suspend fun aces(argument: suspend DataLakeGen2FilesystemAceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DataLakeGen2FilesystemAceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.aces = mapped
    }

    /**
     * @param values One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
     */
    @JvmName("nlealbiaqtjwnsfc")
    public suspend fun aces(vararg values: DataLakeGen2FilesystemAceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.aces = mapped
    }

    /**
     * @param value The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
     */
    @JvmName("emjmnrhfhtppfmxg")
    public suspend fun defaultEncryptionScope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultEncryptionScope = mapped
    }

    /**
     * @param value Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
     * > **NOTE:** The Storage Account requires `account_kind` to be either `StorageV2` or `BlobStorage`. In addition, `is_hns_enabled` has to be set to `true`.
     */
    @JvmName("weruldlmlufbxcgw")
    public suspend fun group(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.group = mapped
    }

    /**
     * @param value The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
     */
    @JvmName("jyasavqrxkpshppe")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
     */
    @JvmName("eofkxviwcxiqhalh")
    public suspend fun owner(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.owner = mapped
    }

    /**
     * @param value A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
     */
    @JvmName("hdweaviwjaawqspc")
    public suspend fun properties(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param values A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
     */
    @JvmName("ibqmdxhwhdhrfetd")
    public fun properties(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
     */
    @JvmName("jsvpdtaamwepficn")
    public suspend fun storageAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountId = mapped
    }

    internal fun build(): DataLakeGen2FilesystemArgs = DataLakeGen2FilesystemArgs(
        aces = aces,
        defaultEncryptionScope = defaultEncryptionScope,
        group = group,
        name = name,
        owner = owner,
        properties = properties,
        storageAccountId = storageAccountId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy