com.pulumi.azure.storage.kotlin.DataLakeGen2Filesystem.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.storage.kotlin
import com.pulumi.azure.storage.kotlin.outputs.DataLakeGen2FilesystemAce
import com.pulumi.azure.storage.kotlin.outputs.DataLakeGen2FilesystemAce.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [DataLakeGen2Filesystem].
*/
@PulumiTagMarker
public class DataLakeGen2FilesystemResourceBuilder internal constructor() {
public var name: String? = null
public var args: DataLakeGen2FilesystemArgs = DataLakeGen2FilesystemArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend DataLakeGen2FilesystemArgsBuilder.() -> Unit) {
val builder = DataLakeGen2FilesystemArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): DataLakeGen2Filesystem {
val builtJavaResource = com.pulumi.azure.storage.DataLakeGen2Filesystem(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DataLakeGen2Filesystem(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class DataLakeGen2Filesystem internal constructor(
override val javaResource: com.pulumi.azure.storage.DataLakeGen2Filesystem,
) : KotlinCustomResource(javaResource, DataLakeGen2FilesystemMapper) {
/**
* One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
*/
public val aces: Output>
get() = javaResource.aces().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
})
/**
* The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
*/
public val defaultEncryptionScope: Output
get() = javaResource.defaultEncryptionScope().applyValue({ args0 -> args0 })
/**
* 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`.
*/
public val group: Output
get() = javaResource.group().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* 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`.
*/
public val owner: Output
get() = javaResource.owner().applyValue({ args0 -> args0 })
/**
* A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
*/
public val properties: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy