You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/blobs/data-lake-storage-directory-file-acl-dotnet.md
+35-10Lines changed: 35 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,19 @@
1
1
---
2
-
title: Azure Data Lake Storage Gen2 .NET SDK for files & ACLs (preview)
2
+
title: Azure Data Lake Storage Gen2 .NET SDK for files & ACLs
3
3
description: Use the Azure Storage client library to manage directories and file and directory access control lists (ACL) in storage accounts that has hierarchical namespace (HNS) enabled.
4
4
author: normesta
5
5
ms.service: storage
6
-
ms.date: 03/18/2020
6
+
ms.date: 03/20/2020
7
7
ms.author: normesta
8
8
ms.topic: article
9
9
ms.subservice: data-lake-storage-gen2
10
10
ms.reviewer: prishet
11
11
---
12
12
13
-
# Use .NET to manage directories, files, and ACLs in Azure Data Lake Storage Gen2 (preview)
13
+
# Use .NET to manage directories, files, and ACLs in Azure Data Lake Storage Gen2
14
14
15
15
This article shows you how to use .NET to create and manage directories, files, and permissions in storage accounts that has hierarchical namespace (HNS) enabled.
16
16
17
-
> [!IMPORTANT]
18
-
> The [Azure.Storage.Files.DataLake](https://www.nuget.org/packages/Azure.Storage.Files.DataLake) NuGet package that is featured in this article is currently in public preview.
To use the snippets in this article, you'll need to create a [DataLakeServiceClient](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakeserviceclient) instance that represents the storage account. The easiest way to get one is to use an account key.
43
+
To use the snippets in this article, you'll need to create a [DataLakeServiceClient](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakeserviceclient) instance that represents the storage account.
44
+
45
+
### Connect by using an account key
46
+
47
+
This is the easiest way to connect to an account.
47
48
48
-
This example creates an instance of the [DataLakeServiceClient](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakeserviceclient?) by using an account key.
49
+
This example creates a [DataLakeServiceClient](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakeserviceclient?) instance by using an account key.
@@ -61,6 +62,30 @@ public void GetDataLakeServiceClient(ref DataLakeServiceClient dataLakeServiceCl
61
62
}
62
63
```
63
64
65
+
### Connect by using Azure Active Directory (AD)
66
+
67
+
You can use the [Azure identity client library for .NET](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/identity/Azure.Identity) to authenticate your application with Azure AD.
68
+
69
+
This example creates a [DataLakeServiceClient](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakeserviceclient?) instance by using a client ID, a client secret, and a tenant ID. To get these values, see [Acquire a token from Azure AD for authorizing requests from a client application](../common/storage-auth-aad-app.md).
> For more examples, see the [Azure identity client library for .NET](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/identity/Azure.Identity) documentation..
88
+
64
89
## Create a file system
65
90
66
91
A file system acts as a container for your files. You can create one by calling the [DataLakeServiceClient.CreateFileSystem](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakeserviceclient.createfilesystemasync) method.
@@ -198,13 +223,13 @@ public async Task UploadFile(DataLakeFileSystemClient fileSystemClient)
198
223
```
199
224
200
225
> [!TIP]
201
-
> If your file size is large, your code will have to make multiple calls to the [DataLakeFileClient.AppendAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.appendasync). Consider using the [DataLakeFileClient.UploadAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.uploadasync?view=azure-dotnet-preview#Azure_Storage_Files_DataLake_DataLakeFileClient_UploadAsync_System_IO_Stream_) method instead. That way, you can upload the entire file in a single call.
226
+
> If your file size is large, your code will have to make multiple calls to the [DataLakeFileClient.AppendAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.appendasync). Consider using the [DataLakeFileClient.UploadAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.uploadasync?view=azure-dotnet#Azure_Storage_Files_DataLake_DataLakeFileClient_UploadAsync_System_IO_Stream_) method instead. That way, you can upload the entire file in a single call.
202
227
>
203
228
> See the next section for an example.
204
229
205
230
## Upload a large file to a directory
206
231
207
-
Use the [DataLakeFileClient.UploadAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.uploadasync?view=azure-dotnet-preview#Azure_Storage_Files_DataLake_DataLakeFileClient_UploadAsync_System_IO_Stream_) method to upload large files without having to make multiple calls to the [DataLakeFileClient.AppendAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.appendasync) method.
232
+
Use the [DataLakeFileClient.UploadAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.uploadasync?view=azure-dotnet#Azure_Storage_Files_DataLake_DataLakeFileClient_UploadAsync_System_IO_Stream_) method to upload large files without having to make multiple calls to the [DataLakeFileClient.AppendAsync](https://docs.microsoft.com/dotnet/api/azure.storage.files.datalake.datalakefileclient.appendasync) method.
Copy file name to clipboardExpand all lines: articles/storage/blobs/data-lake-storage-directory-file-acl-java.md
+38-18Lines changed: 38 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,20 @@
1
1
---
2
-
title: Azure Data Lake Storage Gen2 Java SDK for files & ACLs (preview)
2
+
title: Azure Data Lake Storage Gen2 Java SDK for files & ACLs
3
3
description: Use Azure Storage libraries for Java to manage directories and file and directory access control lists (ACL) in storage accounts that has hierarchical namespace (HNS) enabled.
4
4
author: normesta
5
5
ms.service: storage
6
-
ms.date: 03/18/2020
6
+
ms.date: 03/20/2020
7
7
ms.author: normesta
8
8
ms.topic: conceptual
9
9
ms.subservice: data-lake-storage-gen2
10
10
ms.reviewer: prishet
11
11
---
12
12
13
-
# Use Java to manage directories, files, and ACLs in Azure Data Lake Storage Gen2 (preview)
13
+
# Use Java to manage directories, files, and ACLs in Azure Data Lake Storage Gen2
14
14
15
15
This article shows you how to use Java to create and manage directories, files, and permissions in storage accounts that has hierarchical namespace (HNS) enabled.
16
16
17
-
> [!IMPORTANT]
18
-
> The Java library that is featured in this article is currently in public preview.
To use the snippets in this article, you'll need to create a **DataLakeServiceClient** instance that represents the storage account.
59
52
60
-
## Connectto the account
53
+
###Connect by using an account key
61
54
62
-
To use the snippets in this article, you'll need to create a **DataLakeServiceClient** instance that represents the storage account. The easiest way to get one is to use an account key.
55
+
This is the easiest way to connect to an account.
63
56
64
-
This example creates an instance of the **DataLakeServiceClient** by using an account key.
57
+
This example creates a **DataLakeServiceClient** instance by using an account key.
65
58
66
59
```java
67
60
@@ -78,8 +71,35 @@ static public DataLakeServiceClient GetDataLakeServiceClient
78
71
79
72
return builder.buildClient();
80
73
}
74
+
```
75
+
76
+
### Connect by using Azure Active Directory (Azure AD)
77
+
78
+
You can use the [Azure identity client library for Java](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/identity/azure-identity) to authenticate your application with Azure AD.
81
79
80
+
This example creates a **DataLakeServiceClient** instance by using a client ID, a client secret, and a tenant ID. To get these values, see [Acquire a token from Azure AD for authorizing requests from a client application](../common/storage-auth-aad-app.md).
> For more examples, see the [Azure identity client library for Java](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/identity/azure-identity) documentation.
101
+
102
+
83
103
## Create a file system
84
104
85
105
A file system acts as a container for your files. You can create one by calling the **DataLakeServiceClient.createFileSystem** method.
@@ -367,8 +387,8 @@ static public void ListFilesInDirectory(DataLakeFileSystemClient fileSystemClien
Copy file name to clipboardExpand all lines: articles/storage/blobs/data-lake-storage-directory-file-acl-javascript.md
+31-9Lines changed: 31 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,19 @@
1
1
---
2
-
title: Use JavaScript for files & ACLs in Azure Data Lake Storage Gen2 (preview)
2
+
title: Use JavaScript for files & ACLs in Azure Data Lake Storage Gen2
3
3
description: Use Azure Storage Data Lake client library for JavaScript to manage directories and file and directory access control lists (ACL) in storage accounts that has hierarchical namespace (HNS) enabled.
4
4
author: normesta
5
5
ms.service: storage
6
-
ms.date: 03/18/2020
6
+
ms.date: 03/20/2020
7
7
ms.author: normesta
8
8
ms.topic: conceptual
9
9
ms.subservice: data-lake-storage-gen2
10
10
ms.reviewer: prishet
11
11
---
12
12
13
-
# Use JavaScript to manage directories, files, and ACLs in Azure Data Lake Storage Gen2 (preview)
13
+
# Use JavaScript to manage directories, files, and ACLs in Azure Data Lake Storage Gen2
14
14
15
15
This article shows you how to use JavaScript to create and manage directories, files, and permissions in storage accounts that has hierarchical namespace (HNS) enabled.
16
16
17
-
> [!IMPORTANT]
18
-
> The JavaScript library that is featured in this article is currently in public preview.
To use the snippets in this article, you'll need to create a **DataLakeServiceClient** instance that represents the storage account. The easiest way to get one is to use an account key.
42
+
To use the snippets in this article, you'll need to create a **DataLakeServiceClient** instance that represents the storage account.
43
+
44
+
### Connect by using an account key
45
+
46
+
This is the easiest way to connect to an account.
46
47
47
-
This example creates an instance of the **DataLakeServiceClient** by using an account key.
48
+
This example creates a **DataLakeServiceClient** instance by using an account key.
48
49
49
50
```javascript
50
51
@@ -61,7 +62,28 @@ function GetDataLakeServiceClient(accountName, accountKey) {
61
62
62
63
```
63
64
> [!NOTE]
64
-
> This method of authorization works only for Node.js applications. If you plan to run your code in a browser, you can authorize by using Azure Active Directory (AD). For guidance on how to do that, see the [Azure Storage File Data Lake client library for JavaScript](https://www.npmjs.com/package/@azure/storage-file-datalake) readme file.
65
+
> This method of authorization works only for Node.js applications. If you plan to run your code in a browser, you can authorize by using Azure Active Directory (AD).
66
+
67
+
### Connect by using Azure Active Directory (AD)
68
+
69
+
You can use the [Azure identity client library for JS](https://www.npmjs.com/package/@azure/identity) to authenticate your application with Azure AD.
70
+
71
+
This example creates a **DataLakeServiceClient** instance by using a client ID, a client secret, and a tenant ID. To get these values, see [Acquire a token from Azure AD for authorizing requests from a client application](../common/storage-auth-aad-app.md).
Copy file name to clipboardExpand all lines: articles/storage/blobs/data-lake-storage-directory-file-acl-python.md
+34-9Lines changed: 34 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,20 @@
1
1
---
2
-
title: Azure Data Lake Storage Gen2 Python SDK for files & ACLs (preview)
2
+
title: Azure Data Lake Storage Gen2 Python SDK for files & ACLs
3
3
description: Use Python manage directories and file and directory access control lists (ACL) in storage accounts that has hierarchical namespace (HNS) enabled.
4
4
author: normesta
5
5
ms.service: storage
6
-
ms.date: 11/24/2019
6
+
ms.date: 03/20/2020
7
7
ms.author: normesta
8
8
ms.topic: article
9
9
ms.subservice: data-lake-storage-gen2
10
10
ms.reviewer: prishet
11
11
---
12
12
13
-
# Use Python to manage directories, files, and ACLs in Azure Data Lake Storage Gen2 (preview)
13
+
# Use Python to manage directories, files, and ACLs in Azure Data Lake Storage Gen2
14
14
15
15
This article shows you how to use Python to create and manage directories, files, and permissions in storage accounts that has hierarchical namespace (HNS) enabled.
16
16
17
-
> [!IMPORTANT]
18
-
> The Azure Data Lake Storage client library for Python is currently in public preview.
@@ -44,9 +41,13 @@ from azure.storage.filedatalake._models import ContentSettings
44
41
45
42
## Connect to the account
46
43
47
-
To use the snippets in this article, you'll need to create a **DataLakeServiceClient** instance that represents the storage account. The easiest way to get one is to use an account key.
44
+
To use the snippets in this article, you'll need to create a **DataLakeServiceClient** instance that represents the storage account.
45
+
46
+
### Connect by using an account key
48
47
49
-
This example uses an account key to create a **DataLakeServiceClient** instance that represents the storage account.
48
+
This is the easiest way to connect to an account.
49
+
50
+
This example creates a **DataLakeServiceClient** instance by using an account key.
50
51
51
52
```python
52
53
try:
@@ -63,6 +64,30 @@ except Exception as e:
63
64
64
65
- Replace the `storage_account_key` placeholder value with your storage account access key.
65
66
67
+
### Connect by using Azure Active Directory (AD)
68
+
69
+
You can use the [Azure identity client library for Python](https://pypi.org/project/azure-identity/) to authenticate your application with Azure AD.
70
+
71
+
This example creates a **DataLakeServiceClient** instance by using a client ID, a client secret, and a tenant ID. To get these values, see [Acquire a token from Azure AD for authorizing requests from a client application](../common/storage-auth-aad-app.md).
0 commit comments