Azure Classic

v5.19.0 published on Friday, Sep 16, 2022 by Pulumi

DataLakeGen2Path

Manages a Data Lake Gen2 Path in a 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, Storage Blob Data Owner, Storage Blob Data Contributor, Storage Blob Data Reader.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
        AccountKind = "StorageV2",
        IsHnsEnabled = true,
    });

    var exampleDataLakeGen2Filesystem = new Azure.Storage.DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", new()
    {
        StorageAccountId = exampleAccount.Id,
    });

    var exampleDataLakeGen2Path = new Azure.Storage.DataLakeGen2Path("exampleDataLakeGen2Path", new()
    {
        Path = "example",
        FilesystemName = exampleDataLakeGen2Filesystem.Name,
        StorageAccountId = exampleAccount.Id,
        Resource = "directory",
    });

});
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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
			AccountKind:            pulumi.String("StorageV2"),
			IsHnsEnabled:           pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "exampleDataLakeGen2Filesystem", &storage.DataLakeGen2FilesystemArgs{
			StorageAccountId: exampleAccount.ID(),
		})
		if err != nil {
			return err
		}
		_, err = storage.NewDataLakeGen2Path(ctx, "exampleDataLakeGen2Path", &storage.DataLakeGen2PathArgs{
			Path:             pulumi.String("example"),
			FilesystemName:   exampleDataLakeGen2Filesystem.Name,
			StorageAccountId: exampleAccount.ID(),
			Resource:         pulumi.String("directory"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 com.pulumi.azure.storage.DataLakeGen2Path;
import com.pulumi.azure.storage.DataLakeGen2PathArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .accountKind("StorageV2")
            .isHnsEnabled("true")
            .build());

        var exampleDataLakeGen2Filesystem = new DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", DataLakeGen2FilesystemArgs.builder()        
            .storageAccountId(exampleAccount.id())
            .build());

        var exampleDataLakeGen2Path = new DataLakeGen2Path("exampleDataLakeGen2Path", DataLakeGen2PathArgs.builder()        
            .path("example")
            .filesystemName(exampleDataLakeGen2Filesystem.name())
            .storageAccountId(exampleAccount.id())
            .resource("directory")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS",
    account_kind="StorageV2",
    is_hns_enabled=True)
example_data_lake_gen2_filesystem = azure.storage.DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", storage_account_id=example_account.id)
example_data_lake_gen2_path = azure.storage.DataLakeGen2Path("exampleDataLakeGen2Path",
    path="example",
    filesystem_name=example_data_lake_gen2_filesystem.name,
    storage_account_id=example_account.id,
    resource="directory")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
    accountKind: "StorageV2",
    isHnsEnabled: true,
});
const exampleDataLakeGen2Filesystem = new azure.storage.DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", {storageAccountId: exampleAccount.id});
const exampleDataLakeGen2Path = new azure.storage.DataLakeGen2Path("exampleDataLakeGen2Path", {
    path: "example",
    filesystemName: exampleDataLakeGen2Filesystem.name,
    storageAccountId: exampleAccount.id,
    resource: "directory",
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAccount:
    type: azure:storage:Account
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountReplicationType: LRS
      accountKind: StorageV2
      isHnsEnabled: true
  exampleDataLakeGen2Filesystem:
    type: azure:storage:DataLakeGen2Filesystem
    properties:
      storageAccountId: ${exampleAccount.id}
  exampleDataLakeGen2Path:
    type: azure:storage:DataLakeGen2Path
    properties:
      path: example
      filesystemName: ${exampleDataLakeGen2Filesystem.name}
      storageAccountId: ${exampleAccount.id}
      resource: directory

Create a DataLakeGen2Path Resource

new DataLakeGen2Path(name: string, args: DataLakeGen2PathArgs, opts?: CustomResourceOptions);
@overload
def DataLakeGen2Path(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     aces: Optional[Sequence[DataLakeGen2PathAceArgs]] = None,
                     filesystem_name: Optional[str] = None,
                     group: Optional[str] = None,
                     owner: Optional[str] = None,
                     path: Optional[str] = None,
                     resource: Optional[str] = None,
                     storage_account_id: Optional[str] = None)
@overload
def DataLakeGen2Path(resource_name: str,
                     args: DataLakeGen2PathArgs,
                     opts: Optional[ResourceOptions] = None)
func NewDataLakeGen2Path(ctx *Context, name string, args DataLakeGen2PathArgs, opts ...ResourceOption) (*DataLakeGen2Path, error)
public DataLakeGen2Path(string name, DataLakeGen2PathArgs args, CustomResourceOptions? opts = null)
public DataLakeGen2Path(String name, DataLakeGen2PathArgs args)
public DataLakeGen2Path(String name, DataLakeGen2PathArgs args, CustomResourceOptions options)
type: azure:storage:DataLakeGen2Path
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DataLakeGen2PathArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DataLakeGen2PathArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DataLakeGen2PathArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DataLakeGen2PathArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DataLakeGen2PathArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DataLakeGen2Path Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DataLakeGen2Path resource accepts the following input properties:

FilesystemName string

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.

Path string

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

Resource string

Specifies the type for path to create. Currently only directory is supported.

StorageAccountId string

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.

Aces List<DataLakeGen2PathAceArgs>

One or more ace blocks as defined below to specify the entries for the ACL for the path.

Group string

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

Owner string

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

FilesystemName string

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.

Path string

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

Resource string

Specifies the type for path to create. Currently only directory is supported.

StorageAccountId string

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.

Aces []DataLakeGen2PathAceArgs

One or more ace blocks as defined below to specify the entries for the ACL for the path.

Group string

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

Owner string

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

filesystemName String

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.

path String

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

resource String

Specifies the type for path to create. Currently only directory is supported.

storageAccountId String

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.

aces List<DataLakeGen2PathAceArgs>

One or more ace blocks as defined below to specify the entries for the ACL for the path.

group String

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

owner String

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

filesystemName string

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.

path string

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

resource string

Specifies the type for path to create. Currently only directory is supported.

storageAccountId string

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.

aces DataLakeGen2PathAceArgs[]

One or more ace blocks as defined below to specify the entries for the ACL for the path.

group string

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

owner string

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

filesystem_name str

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.

path str

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

resource str

Specifies the type for path to create. Currently only directory is supported.

storage_account_id str

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.

aces Sequence[DataLakeGen2PathAceArgs]

One or more ace blocks as defined below to specify the entries for the ACL for the path.

group str

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

owner str

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

filesystemName String

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.

path String

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

resource String

Specifies the type for path to create. Currently only directory is supported.

storageAccountId String

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.

aces List<Property Map>

One or more ace blocks as defined below to specify the entries for the ACL for the path.

group String

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

owner String

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

Outputs

All input properties are implicitly available as output properties. Additionally, the DataLakeGen2Path resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing DataLakeGen2Path Resource

Get an existing DataLakeGen2Path resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DataLakeGen2PathState, opts?: CustomResourceOptions): DataLakeGen2Path
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        aces: Optional[Sequence[DataLakeGen2PathAceArgs]] = None,
        filesystem_name: Optional[str] = None,
        group: Optional[str] = None,
        owner: Optional[str] = None,
        path: Optional[str] = None,
        resource: Optional[str] = None,
        storage_account_id: Optional[str] = None) -> DataLakeGen2Path
func GetDataLakeGen2Path(ctx *Context, name string, id IDInput, state *DataLakeGen2PathState, opts ...ResourceOption) (*DataLakeGen2Path, error)
public static DataLakeGen2Path Get(string name, Input<string> id, DataLakeGen2PathState? state, CustomResourceOptions? opts = null)
public static DataLakeGen2Path get(String name, Output<String> id, DataLakeGen2PathState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Aces List<DataLakeGen2PathAceArgs>

One or more ace blocks as defined below to specify the entries for the ACL for the path.

FilesystemName string

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.

Group string

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

Owner string

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

Path string

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

Resource string

Specifies the type for path to create. Currently only directory is supported.

StorageAccountId string

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.

Aces []DataLakeGen2PathAceArgs

One or more ace blocks as defined below to specify the entries for the ACL for the path.

FilesystemName string

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.

Group string

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

Owner string

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

Path string

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

Resource string

Specifies the type for path to create. Currently only directory is supported.

StorageAccountId string

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.

aces List<DataLakeGen2PathAceArgs>

One or more ace blocks as defined below to specify the entries for the ACL for the path.

filesystemName String

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.

group String

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

owner String

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

path String

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

resource String

Specifies the type for path to create. Currently only directory is supported.

storageAccountId String

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.

aces DataLakeGen2PathAceArgs[]

One or more ace blocks as defined below to specify the entries for the ACL for the path.

filesystemName string

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.

group string

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

owner string

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

path string

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

resource string

Specifies the type for path to create. Currently only directory is supported.

storageAccountId string

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.

aces Sequence[DataLakeGen2PathAceArgs]

One or more ace blocks as defined below to specify the entries for the ACL for the path.

filesystem_name str

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.

group str

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

owner str

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

path str

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

resource str

Specifies the type for path to create. Currently only directory is supported.

storage_account_id str

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.

aces List<Property Map>

One or more ace blocks as defined below to specify the entries for the ACL for the path.

filesystemName String

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.

group String

Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include $superuser.

owner String

Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include $superuser.

path String

The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.

resource String

Specifies the type for path to create. Currently only directory is supported.

storageAccountId String

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.

Supporting Types

DataLakeGen2PathAce

Permissions string

Specifies the permissions for the entry in rwx form. For example, rwx gives full permissions but r-- only gives read permissions.

Type string

Specifies the type of entry. Can be user, group, mask or other.

Id string

Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for user or group entries.

Scope string

Specifies whether the ACE represents an access entry or a default entry. Default value is access.

Permissions string

Specifies the permissions for the entry in rwx form. For example, rwx gives full permissions but r-- only gives read permissions.

Type string

Specifies the type of entry. Can be user, group, mask or other.

Id string

Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for user or group entries.

Scope string

Specifies whether the ACE represents an access entry or a default entry. Default value is access.

permissions String

Specifies the permissions for the entry in rwx form. For example, rwx gives full permissions but r-- only gives read permissions.

type String

Specifies the type of entry. Can be user, group, mask or other.

id String

Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for user or group entries.

scope String

Specifies whether the ACE represents an access entry or a default entry. Default value is access.

permissions string

Specifies the permissions for the entry in rwx form. For example, rwx gives full permissions but r-- only gives read permissions.

type string

Specifies the type of entry. Can be user, group, mask or other.

id string

Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for user or group entries.

scope string

Specifies whether the ACE represents an access entry or a default entry. Default value is access.

permissions str

Specifies the permissions for the entry in rwx form. For example, rwx gives full permissions but r-- only gives read permissions.

type str

Specifies the type of entry. Can be user, group, mask or other.

id str

Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for user or group entries.

scope str

Specifies whether the ACE represents an access entry or a default entry. Default value is access.

permissions String

Specifies the permissions for the entry in rwx form. For example, rwx gives full permissions but r-- only gives read permissions.

type String

Specifies the type of entry. Can be user, group, mask or other.

id String

Specifies the Object ID of the Azure Active Directory User or Group that the entry relates to. Only valid for user or group entries.

scope String

Specifies whether the ACE represents an access entry or a default entry. Default value is access.

Import

Data Lake Gen2 Paths can be imported using the resource id, e.g.

 $ pulumi import azure:storage/dataLakeGen2Path:DataLakeGen2Path example https://account1.dfs.core.windows.net/fileSystem1/path

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.