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/storage-manage-access-to-resources.md
+35-57Lines changed: 35 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: tamram
6
6
7
7
ms.service: storage
8
8
ms.topic: article
9
-
ms.date: 04/30/2019
9
+
ms.date: 09/19/2019
10
10
ms.author: tamram
11
11
ms.reviewer: cbrooks
12
12
---
@@ -23,22 +23,15 @@ By default, a container and any blobs within it may be accessed only by a user t
23
23
24
24
You can configure a container with the following permissions:
25
25
26
-
***No public read access:** The container and its blobs can be accessed only by the storage account owner. This is the default for all new containers.
27
-
***Public read access for blobs only:** Blobs within the container can be read by anonymous request, but container data is not available. Anonymous clients cannot enumerate the blobs within the container.
28
-
***Public read access for container and its blobs:** All container and blob data can be read by anonymous request. Clients can enumerate blobs within the container by anonymous request, but cannot enumerate containers within the storage account.
29
-
30
-
You can use the following to set container permissions:
* Programmatically, by using one of the storage client libraries or the REST API
26
+
-**No public read access:** The container and its blobs can be accessed only by the storage account owner. This is the default for all new containers.
27
+
-**Public read access for blobs only:** Blobs within the container can be read by anonymous request, but container data is not available. Anonymous clients cannot enumerate the blobs within the container.
28
+
-**Public read access for container and its blobs:** All container and blob data can be read by anonymous request. Clients can enumerate blobs within the container by anonymous request, but cannot enumerate containers within the storage account.
36
29
37
30
### Set container public access level in the Azure portal
38
31
39
32
From the [Azure portal](https://portal.azure.com), you can update the public access level for one or more containers:
40
33
41
-
1. Navigate to your storage account in the Azure portal.
34
+
1. Navigate to your storage account overview in the Azure portal.
42
35
1. Under **Blob service** on the menu blade, select **Blobs**.
43
36
1. Select the containers for which you want to set the public access level.
44
37
1. Use the **Change access level** button to display the public access settings.
@@ -53,16 +46,28 @@ The following screenshot shows how to change the public access level for the sel
53
46
54
47
### Set container public access level with .NET
55
48
56
-
To set permissions for a container using C# and the Storage Client Library for .NET, first retrieve the container's existing permissions by calling the **GetPermissions** method. Then set the **PublicAccess** property for the **BlobContainerPermissions** object that is returned by the **GetPermissions** method. Finally, call the **SetPermissions** method with the updated permissions.
49
+
To set permissions for a container using the Azure Storage client library for .NET, first retrieve the container's existing permissions by calling one of the following methods:
Next, set the **PublicAccess** property on the [BlobContainerPermissions](/dotnet/api/microsoft.azure.storage.blob.blobcontainerpermissions) object that is returned by the **GetPermissions** method.
55
+
56
+
Finally, call one of the following methods to update the container's permissions:
The following example sets the container's permissions to full public read access. To set permissions to public read access for blobs only, set the **PublicAccess** property to **BlobContainerPublicAccessType.Blob**. To remove all permissions for anonymous users, set the property to **BlobContainerPublicAccessType.Off**.
0 commit comments