Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Set-AzStorageContainerAcl
- Module:
- Az.Storage Module
Sets the public access permission to a storage container.
Syntax
Default (Default)
Set-AzStorageContainerAcl
[-Name] <String>
[-Permission] <BlobContainerPublicAccessType>
[-PassThru]
[-Context <IStorageContext>]
[-ServerTimeoutPerRequest <Int32>]
[-ClientTimeoutPerRequest <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-ConcurrentTaskCount <Int32>]
[<CommonParameters>]
Description
The Set-AzStorageContainerAcl cmdlet sets the public access permission to the specified storage container in Azure.
Examples
Example 1: Set azure storage container ACL by name
Set-AzStorageContainerAcl -Container "Container01" -Permission Off -PassThru
This command creates a container that has no public access.
Example 2: Set azure storage container ACL by using the pipeline
Get-AzStorageContainer container* | Set-AzStorageContainerAcl -Permission Blob -PassThru
This command gets all storage containers whose name starts with container and then passes the result on the pipeline to set the permission for them all to Blob access.
Parameters
-ClientTimeoutPerRequest
Specifies the client-side time-out interval, in seconds, for one service request. If the previous call fails in the specified interval, this cmdlet retries the request. If this cmdlet does not receive a successful response before the interval elapses, this cmdlet returns an error.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ClientTimeoutPerRequestInSeconds |
Parameter sets
-ConcurrentTaskCount
Specifies the maximum concurrent network calls. You can use this parameter to limit the concurrency to throttle local CPU and bandwidth usage by specifying the maximum number of concurrent network calls. The specified value is an absolute count and is not multiplied by the core count. This parameter can help reduce network connection problems in low bandwidth environments, such as 100 kilobits per second. The default value is 10.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Context
Specifies the Azure storage context. You can create it by using the New-AzStorageContext cmdlet.
Parameter properties
| Type: | IStorageContext |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzureRmContext, AzureCredential |
Parameter sets
-Name
Specifies a container name.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | N, Container |
Parameter sets
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Permission
Specifies the level of public access to this container. By default, the container and any blobs in it can be accessed only by the owner of the storage account. To grant anonymous users read permissions to a container and its blobs, you can set the container permissions to enable public access. Anonymous users can read blobs in a publicly available container without authenticating the request. The acceptable values for this parameter are: --Container. Provides full read access to a container and its blobs. Clients can enumerate blobs in the container through anonymous request, but cannot enumerate containers in the storage account. --Blob. Provides read access to blob data in a container through anonymous request, but does not provide access to container data. Clients cannot enumerate blobs in the container by using anonymous request. --Off. Restricts access to only the storage account owner.
Parameter properties
| Type: | Microsoft.Azure.Storage.Blob.BlobContainerPublicAccessType |
| Default value: | None |
| Accepted values: | Off, Container, Blob, Unknown |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | PublicAccess |
Parameter sets
-ServerTimeoutPerRequest
Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. Server side time out for each request.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ServerTimeoutPerRequestInSeconds |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
IStorageContext
Outputs
AzureStorageContainer
Related Links
Azure PowerShell
Feedback
Was this page helpful?
