Set-AzDataLakeStoreItemAcl
Modifies the ACL of a file or folder in Data Lake Store.
Syntax
Set-AzDataLakeStoreItemAcl
[-Account] <String>
[-Path] <DataLakeStorePathInstance>
[-Acl] <DataLakeStoreItemAce[]>
[-PassThru]
[-Recurse]
[-Concurrency <Int32>]
[-ShowProgress]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzDataLakeStoreItemAcl cmdlet modifies the access control list (ACL) of a file or folder in Data Lake Store.
Examples
Example 1: Set the ACL for a file and a folder
$ACL = Get-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path /
Set-AzDataLakeStoreItemAcl -AccountName "ContosoADL" -Path "/MyFiles/Test.txt" -Acl $ACL
The first command gets the ACL for the root directory of the ContosoADL account, and then stores it in the $ACL variable. The second command sets the ACL for the file Test.txt to the one in $ACL.
Example 2: Set the ACL for folder recursively
$ACL = Get-AzDataLakeStoreItemAclEntry -AccountName "ContosoADL" -Path /Folder1
Set-AzDataLakeStoreItemAcl -AccountName "ContosoADL" -Path "/Folder2" -Acl $ACL -Recurse -Concurrency 128
The first command gets the ACL for the directory Folder1 of the ContosoADL account, and then stores it in the $ACL variable. The second command sets the ACL recursively to Folder2 and its sub directories and files to the one in $ACL.
Parameters
-Account
Specifies the name of the Data Lake Store account.
Type: | String |
Aliases: | AccountName |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Acl
Specifies an ACL for a file or a folder.
Type: | DataLakeStoreItemAce[] |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Concurrency
Number of files/directories processed in parallel. Optional: a reasonable default will be selected.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Indicates the resulting ACL should be returned.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Path
Specifies the Data Lake Store path of the file or folder, starting with the root directory (/).
Type: | DataLakeStorePathInstance |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Recurse
Indicates the ACL to be set recursively to the child subdirectories and files
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ShowProgress
If passed then progress status is showed. Only applicable when recursive Acl set is done.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Azure PowerShell