< Back
Set-AzureStorageContainerAcl
Post
NAME Set-AzureStorageContainerAcl
SYNOPSIS
Sets the public access permission to a storage container.
SYNTAX
Set-AzureStorageContainerAcl [-Name] <String> [-Permission] {Off | Container | Blob} [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount
<Int32>] [-Context <IStorageContext>] [-PassThru] [-ServerTimeoutPerRequest <Int32>] [<CommonParameters>]
DESCRIPTION
The Set-AzureStorageContainerAcl cmdlet sets the public access permission to the specified storage container in Azure.
PARAMETERS
-ClientTimeoutPerRequest <Int32>
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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ConcurrentTaskCount <Int32>
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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Context <IStorageContext>
Specifies the Azure storage context. You can create it by using the New-AzureStorageContext cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-Name <String>
Specifies a container name.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Permission <BlobContainerPublicAccessType>
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.
Required? true
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ServerTimeoutPerRequest <Int32>
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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
IStorageContext
Parameter 'Context' accepts value of type 'IStorageContext' from the pipeline
String
Parameter 'Name' accepts value of type 'String' from the pipeline
OUTPUTS
Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureStorageContainer
NOTES
Example 1: Set azure storage container ACL by name
PS C:\\>Set-AzureStorageContainerAcl -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
PS C:\\>Get-AzureStorageContainer container* | Set-AzureStorageContainerAcl -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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ntaineracl
Get-AzureStorageContainer
New-AzureStorageContainer
Remove-AzureStorageContainer
SYNOPSIS
Sets the public access permission to a storage container.
SYNTAX
Set-AzureStorageContainerAcl [-Name] <String> [-Permission] {Off | Container | Blob} [-ClientTimeoutPerRequest <Int32>] [-ConcurrentTaskCount
<Int32>] [-Context <IStorageContext>] [-PassThru] [-ServerTimeoutPerRequest <Int32>] [<CommonParameters>]
DESCRIPTION
The Set-AzureStorageContainerAcl cmdlet sets the public access permission to the specified storage container in Azure.
PARAMETERS
-ClientTimeoutPerRequest <Int32>
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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ConcurrentTaskCount <Int32>
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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Context <IStorageContext>
Specifies the Azure storage context. You can create it by using the New-AzureStorageContext cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-Name <String>
Specifies a container name.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Permission <BlobContainerPublicAccessType>
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.
Required? true
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ServerTimeoutPerRequest <Int32>
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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
IStorageContext
Parameter 'Context' accepts value of type 'IStorageContext' from the pipeline
String
Parameter 'Name' accepts value of type 'String' from the pipeline
OUTPUTS
Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureStorageContainer
NOTES
Example 1: Set azure storage container ACL by name
PS C:\\>Set-AzureStorageContainerAcl -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
PS C:\\>Get-AzureStorageContainer container* | Set-AzureStorageContainerAcl -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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ntaineracl
Get-AzureStorageContainer
New-AzureStorageContainer
Remove-AzureStorageContainer