From 603aa0ce2fc3a4a45837a8f32c9155e94f334214 Mon Sep 17 00:00:00 2001 From: "Wei Wei (AZURE)" Date: Wed, 11 May 2022 20:30:37 +0800 Subject: [PATCH 1/3] [Storage] Support DatalakeGen2 SAS token --- .../ScenarioTests/StorageDataPlaneTests.ps1 | 4 +- .../Storage.Management.Test.csproj | 8 +- .../Storage.Management/Az.Storage.psd1 | 3 +- src/Storage/Storage.Management/ChangeLog.md | 2 + .../Storage.Management/ChangeLog.md.bak | 620 ++++++++++++++++++ .../Storage.Management/help/Az.Storage.md | 3 + .../Storage.Management/help/Az.Storage.md.bak | 481 ++++++++++++++ .../help/New-AzDataLakeGen2SasToken.md | 238 +++++++ .../help/New-AzDataLakeGen2SasToken.md.bak | 238 +++++++ .../Blob/StorageCloudBlobCmdletBase.cs | 26 +- .../Storage/Common/AzureDataLakeGen2Item.cs | 6 + src/Storage/Storage/Common/SasTokenHelper.cs | 30 + .../Cmdlet/NewAzDataLakeGen2SasToken.cs | 209 ++++++ src/Storage/Storage/Storage.csproj | 10 +- 14 files changed, 1863 insertions(+), 15 deletions(-) create mode 100644 src/Storage/Storage.Management/ChangeLog.md.bak create mode 100644 src/Storage/Storage.Management/help/Az.Storage.md.bak create mode 100644 src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md create mode 100644 src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md.bak create mode 100644 src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs diff --git a/src/Storage/Storage.Management.Test/ScenarioTests/StorageDataPlaneTests.ps1 b/src/Storage/Storage.Management.Test/ScenarioTests/StorageDataPlaneTests.ps1 index 3e2369a4aff6..d7252b63868e 100644 --- a/src/Storage/Storage.Management.Test/ScenarioTests/StorageDataPlaneTests.ps1 +++ b/src/Storage/Storage.Management.Test/ScenarioTests/StorageDataPlaneTests.ps1 @@ -846,7 +846,9 @@ function Test-DatalakeGen2 -Permission rw-rw--wx ` -Owner '$superuser' ` -Group '$superuser' - $file1 = Get-AzDataLakeGen2Item -Context $storageContext -FileSystem $filesystemName -Path $filePath1 + $sas = New-AzDataLakeGen2SasToken -FileSystem $filesystemName -Path $filePath1 -Permission rw -Context $storageContext + $ctxsas = New-AzStorageContext -StorageAccountName $StorageAccountName -SasToken $sas + $file1 = Get-AzDataLakeGen2Item -Context $ctxsas -FileSystem $filesystemName -Path $filePath1 Assert-AreEqual $file1.Path $filePath1 Assert-AreEqual $file1.Permissions.ToSymbolicPermissions() "rw-rw--wx" Assert-AreEqual $file1.Properties.ContentType $ContentType diff --git a/src/Storage/Storage.Management.Test/Storage.Management.Test.csproj b/src/Storage/Storage.Management.Test/Storage.Management.Test.csproj index 233191c0a2da..e487d11b89d4 100644 --- a/src/Storage/Storage.Management.Test/Storage.Management.Test.csproj +++ b/src/Storage/Storage.Management.Test/Storage.Management.Test.csproj @@ -11,10 +11,10 @@ - - - - + + + + diff --git a/src/Storage/Storage.Management/Az.Storage.psd1 b/src/Storage/Storage.Management/Az.Storage.psd1 index 52f8009a93ae..927a80e6d27e 100644 --- a/src/Storage/Storage.Management/Az.Storage.psd1 +++ b/src/Storage/Storage.Management/Az.Storage.psd1 @@ -197,7 +197,8 @@ CmdletsToExport = 'Get-AzStorageAccount', 'Get-AzStorageAccountKey', 'Set-AzStorageBlobImmutabilityPolicy', 'Remove-AzStorageBlobImmutabilityPolicy', 'Set-AzStorageBlobLegalHold', - 'Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration' + 'Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration', + 'New-AzDataLakeGen2SasToken' # Variables to export from this module # VariablesToExport = @() diff --git a/src/Storage/Storage.Management/ChangeLog.md b/src/Storage/Storage.Management/ChangeLog.md index 6cd4ab3ce0f3..ce052da251fe 100644 --- a/src/Storage/Storage.Management/ChangeLog.md +++ b/src/Storage/Storage.Management/ChangeLog.md @@ -18,6 +18,8 @@ - Additional information about change #1 --> ## Upcoming Release +* Supported generae Sas token for DataLakeGen2 + - `New-AzDataLakeGen2SasToken` * Show OAuth token in debug log in debug build only - `New-AzStorageContext` diff --git a/src/Storage/Storage.Management/ChangeLog.md.bak b/src/Storage/Storage.Management/ChangeLog.md.bak new file mode 100644 index 000000000000..6cd4ab3ce0f3 --- /dev/null +++ b/src/Storage/Storage.Management/ChangeLog.md.bak @@ -0,0 +1,620 @@ + +## Upcoming Release +* Show OAuth token in debug log in debug build only + - `New-AzStorageContext` + +## Version 4.5.0 +* Supported DaysAfterLastTierChangeGreaterThan in Management Policy + - `Add-AzStorageAccountManagementPolicyAction` +* Fixed the issue that upload blob might fail on Linux [#17743] + - `Set-AzStorageBlobContent` +* Supported AllowPermanentDelete when enable blob soft delete + - `Enable-AzStorageBlobDeleteRetentionPolicy` +* Added breaking change warning message for upcoming cmdlet breaking change + - `Get-AzStorageFile` + +## Version 4.4.1 +* Fixed get blob by tag failure on Powershell 7.2.2 + - `Get-AzStorageBlobByTag` + +## Version 4.4.0 +* Updated examples in reference documentation for `Close-AzStorageFileHandle` +* Supported create storage context with customized blob, queue, file, table service endpoint + - `New-AzStorageContext` +* Fixed copy blob failure on Premium Storage account, or account enabled hierarchical namespace + - `Copy-AzStorageBlob` +* Supported create account SAS token, container SAS token, blob SAS token with EncryptionScope + - `New-AzStorageAccountSASToken` + - `New-AzStorageContainerSASToken` + - `New-AzStorageBlobSASToken` +* Supported asynchronous blob copy run on new API version + - `Start-AzStorageBlobCopy` +* Fixed IpRule examples in help + - `Add-AzStorageAccountNetworkRule` + - `Remove-AzStorageAccountNetworkRule` + - `Update-AzStorageAccountNetworkRuleSet` + +## Version 4.3.0 +* Supported download blob from managed disk account with Sas Uri and bearer token + - `Get-AzStorageBlobContent` +* Supported create/upgrade storage account with ActiveDirectorySamAccountName and ActiveDirectoryAccountType + - `New-AzStorageAccount` + - `Set-AzStorageAccount` + +## Version 4.2.0 +* Fixed the issue that output number in console when update/copy blob sometimes [#16783] + - `Set-AzStorageBlobContent` + - `Copy-AzStorageBlob` +* Updated help file, added more description for the asynchronous blob copy. + - `Start-AzStorageBlobCopy` + +## Version 4.1.1 +* Fixed the failure of sync copy blob with long destination blob name [#16628] + - `Copy-AzStorageBlob` +* Supported AAD oauth storage context in storage table cmdlets. + - `Get-AzStorageCORSRule` + - `Get-AzStorageServiceLoggingProperty` + - `Get-AzStorageServiceMetricsProperty` + - `Get-AzStorageServiceProperty` + - `Get-AzStorageTable` + - `Get-AzStorageTableStoredAccessPolicy` + - `New-AzStorageTable` + - `New-AzStorageTableSASToken` + - `New-AzStorageTableStoredAccessPolicy` + - `Remove-AzStorageCORSRule` + - `Remove-AzStorageTableStoredAccessPolicy` + - `Set-AzStorageCORSRule` + - `Set-AzStorageServiceLoggingProperty` + - `Set-AzStorageServiceMetricsProperty` + - `Set-AzStorageServiceProperty` + - `Set-AzStorageTable` + - `Set-AzStorageTableStoredAccessPolicy` + +## Version 4.1.0 +* Fixed the failure of `Get-AzStorageContainerStoredAccessPolicy` when permission is null [#15644] +* Supported create blob service Sas token or account Sas token with permission i + - `New-AzStorageBlobSASToken` + - `New-AzStorageContainerSASToken` + - `New-AzStorageAccountSASToken` +* Fixed creating container SAS token failed from an access policy without expire time, and set SAS token expire time [#16266] + - `New-AzStorageContainerSASToken` +* Removed parameter -Name from Get-AzRmStorageShare ShareResourceIdParameterSet + - `Get-AzRmStorageShare` +* Supported create or migrate container to enable immutable Storage with versioning. + - `New-AzRmStorageContainer` + - `Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration` +* Supported set/remove immutability policy on a Storage blob. + - `Set-AzStorageBlobImmutabilityPolicy` + - `Remove-AzStorageBlobImmutabilityPolicy` +* Supported enable/disable legal hold on a Storage blob. + - `Set-AzStorageBlobLegalHold` +* Supported create storage account with enable account level immutability with versioning, and create/update storage account with account level immutability policy. + - `New-AzStorageAccount` + - `Set-AzStorageAccount` + +## Version 3.12.0 +* Upgraded Azure.Storage.Blobs to 12.10.0 +* Upgraded Azure.Storage.Files.Shares to 12.8.0 +* Upgraded Azure.Storage.Files.DataLake to 12.8.0 +* Upgraded Azure.Storage.Queues to 12.8.0 +* Supported upgrade storage account to enable HierarchicalNamespace + - `Invoke-AzStorageAccountHierarchicalNamespaceUpgrade` + - `Stop-AzStorageAccountHierarchicalNamespaceUpgrade` +* Supported AccessTierInferred, Tags in blob inventory policy schema + - `New-AzStorageBlobInventoryPolicyRule` +* Supported create/update storage account with PublicNetworkAccess enabled/disabled + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Supported create/update storage blob container with RootSquash + - `New-AzRmStorageContainer` + - `Update-AzRmStorageContainer` +* Supported AllowProtectedAppendWriteAll in set container Immutability Policy, and add container LegalHold + - `Set-AzRmStorageContainerImmutabilityPolicy` + - `Add-AzRmStorageContainerLegalHold` + +## Version 3.11.0 +* Supported get/set blob tags on a specific blob + - `Get-AzStorageBlobTag` + - `Set-AzStorageBlobTag` +* Supported create destination blob with specific blob tags while upload/copy Blob + - `Set-AzStorageBlobContent` + - `Start-AzStorageBlobCopy` +* Supported list blobs across containers with a blob tag filter sql expression + - `Get-AzStorageBlobByTag` +* Supported list blobs inside a container and include Blob Tags + - `Get-AzStorageBlob` +* Supported run blob operation with blob tag condition, and fail the cmdlet when blob tag condition not match + - `Get-AzStorageBlob` + - `Get-AzStorageBlobContent` + - `Get-AzStorageBlobTag` + - `Remove-AzStorageBlob` + - `Set-AzStorageBlobContent` + - `Set-AzStorageBlobTag` + - `Start-AzStorageBlobCopy` + - `Stop-AzStorageBlobCopy` +* Generate blob sas token with new API version + - `New-AzStorageBlobSASToken` + - `New-AzStorageContainerSASToken` + - `New-AzStorageAccountSASToken` +* Fixed blob copy failure with OAuth credential when client and server has time difference [#15644] + - `Copy-AzStorageBlob` +* Fixed remove Data Lake Gen2 item fail with readonly SAS token + - `Remove-AzDataLakeGen2Item` +* Revised destination existing check in move Data Lake Gen2 item + - `Move-AzDataLakeGen2Item` + +## Version 3.10.0 +* Supported Blob Last Access Time + - `Enable-AzStorageBlobLastAccessTimeTracking` + - `Disable-AzStorageBlobLastAccessTimeTracking` + - `Add-AzStorageAccountManagementPolicyAction` +* Made `Get-AzDataLakeGen2ChildItem` list all datalake gen2 items by default, instead of needing user to list chunk by chunk. +* Fixed BlobProperties is empty issue when using sas without prefix '?' [#15460] +* Fixed synchronously copy small blob failure [#15548] + - `Copy-AzStorageBlob` + +## Version 3.9.0 +* Supported enable/disable Blob container soft delete + - `Enable-AzStorageContainerDeleteRetentionPolicy` + - `Disable-AzStorageContainerDeleteRetentionPolicy` +* Supported list deleted Blob containers + - `Get-AzRmStorageContainer` + - `Get-AzStorageContainer` +* Supported restore deleted Blob container + - `Restore-AzStorageContainer` +* Supported secure SMB setting in File service properties + - `Update-AzStorageFileServiceProperty` +* Supported create account with EnableNfsV3 + - `New-AzStorageAccount` +* Supported input more copy blob parameters from pipeline [#15301] + - `Start-AzStorageBlobCopy` + +## Version 3.8.0 +* Supported create file share with NFS/SMB enabledEnabledProtocol and RootSquash, and update share with RootSquash + - `New-AzRmStorageShare` + - `Update-AzRmStorageShare` +* Supported enable Smb Multichannel on File service + - `Update-AzStorageFileServiceProperty` +* Fixed copy inside same account issue by access source with anonymous credential, when copy Blob inside same account with Oauth credential +* Removed StorageFileDataSmbShareOwner from value set of parameter DefaultSharePermission in create/update storage account + - `New-AzStorageAccount` + - `Set-AzStorageAccount` + +## Version 3.7.0 +* Supported file share snapshot + - `New-AzRmStorageShare` + - `Get-AzRmStorageShare` + - `Remove-AzRmStorageShare` +* Supported remove file share with it's snapshot (leased and not leased), by default remove file share will fail when share has snapshot + - `Remove-AzRmStorageShare` +* Supported Set/Get/Remove blob inventory policy + - `New-AzStorageBlobInventoryPolicyRule` + - `Set-AzStorageBlobInventoryPolicy` + - `Get-AzStorageBlobInventoryPolicy` + - `Remove-AzStorageBlobInventoryPolicy` +* Supported DefaultSharePermission in create/update storage account + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Supported AllowCrossTenantReplication in create/update storage account + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Supported Set Object Replication Policy with SourceAccount/DestinationAccount as Storage account resource Id + - `Set-AzStorageObjectReplicationPolicy` +* Supported set SasExpirationPeriod as TimeSpan.Zero + - `New-AzStorageAccount` + - `Set-AzStorageAccount +* Make sure the correct account name is used when create account credential + - `New-AzStorageContext` + +## Version 3.6.0 +* Supported create/update storage account with KeyExpirationPeriod and SasExpirationPeriod + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Supported create/update storage account with keyvault encryption and access keyvault with user assigned identity + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Supported EdgeZone in create storage account + - `New-AzStorageAccount` +* Fixed an issue that delete immutable blob will prompt incorrect message. + - `Remove-AzStorageAccount` +* Allowed update Storage Account KeyVault properties by cleanup Keyversion to enable key auto rotation [#14769] + - `Set-AzStorageAccount` +* Added breaking change warning message for upcoming cmdlet breaking change + - `Remove-AzRmStorageShare` + +## Version 3.5.1 +* Fixed copy blob fail with source context as Oauth [#14662] + - `Start-AzStorageBlobCopy` + +## Version 3.5.0 +* Fixed an issue that list account from resource group won't use nextlink + - `Get-AzStorageAccount` +* Supported ChangeFeedRetentionInDays when Enable ChangeFeed on Blob service + - `Update-AzStorageBlobServiceProperty` + +## Version 3.4.0 +* Upgraded to Microsoft.Azure.Management.Storage 19.0.0, to support new API version 2021-01-01. +* Supported resource access rule in NetworkRuleSet + - `Update-AzStorageAccountNetworkRuleSet` + - `Add-AzStorageAccountNetworkRule` + - `Remove-AzStorageAccountNetworkRule` +* Supported Blob version and Append Blob type in Management Policy + - `Add-AzStorageAccountManagementPolicyAction` + - `New-AzStorageAccountManagementPolicyFilter` + - `Set-AzStorageAccountManagementPolicy` +* Supported create/update account with AllowSharedKeyAccess + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Supported create Encryption Scope with RequireInfrastructureEncryption + - `New-AzStorageEncryptionScope` +* Supported copy block blob synchronously, with encryption scope + - `Copy-AzStorageBlob` +* Fixed issue that Get-AzStorageBlobContent use wrong directory separator char on Linux and MacOS [#14234] + +## Version 3.3.0 +* Supported RoutingPreference settings in create/update Storage account + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Upgraded Azure.Storage.Blobs to 12.8.0 +* Upgraded Azure.Storage.Files.Shares to 12.6.0 +* Upgraded Azure.Storage.Files.DataLake to 12.6.0 + +## Version 3.2.1 +* Fix ContinuationToken never null when list blob with -IncludeVersion + - `Get-AzStorageBlob` + +## Version 3.2.0 +* Supported create/update/get/list EncryptionScope of a Storage account + - `New-AzStorageEncryptionScope` + - `Update-AzStorageEncryptionScope` + - `Get-AzStorageEncryptionScope` +* Supported create container and upload blob with Encryption Scope setting + - `New-AzRmStorageContainer` + - `New-AzStorageContainer` + - `Set-AzStorageBlobContent` + +## Version 3.1.0 +* Supported upload Azure File size up to 4 TiB + - `Set-AzStorageFileContent` +* Upgraded Azure.Storage.Blobs to 12.7.0 +* Upgraded Azure.Storage.Files.Shares to 12.5.0 +* Upgraded Azure.Storage.Files.DataLake to 12.5.0 +* Upgraded Azure.Storage.Queues to 12.5.0 + +## Version 3.0.0 +* Removed obsolete property RestorePolicy.LastEnabledTime + - `Enable-AzStorageBlobRestorePolicy` + - `Disable-AzStorageBlobRestorePolicy` + - `Get-AzStorageBlobServiceProperty` + - `Update-AzStorageBlobServiceProperty` +* Change Type of DaysAfterModificationGreaterThan from int to int? + - `Set-AzStorageAccountManagementPolicy` + - `Get-AzStorageAccountManagementPolicy` + - `Add-AzStorageAccountManagementPolicyAction` + - `New-AzStorageAccountManagementPolicyRule` +* Supported create/update file share with access tier + - `New-AzRmStorageShare` + - `Update-AzRmStorageShare` +* Supported set/update/remove Acl recursively on Datalake Gen2 item + - `Set-AzDataLakeGen2AclRecursive` + - `Update-AzDataLakeGen2AclRecursive` + - `Remove-AzDataLakeGen2AclRecursive` +* Supported Container access policy with new permission x,t + - `New-AzStorageContainerStoredAccessPolicy` + - `Set-AzStorageContainerStoredAccessPolicy` +* Changed the output of get/set Container access policy cmdlet, by change the child property Permission type from enum to String + - `Get-AzStorageContainerStoredAccessPolicy` + - `Set-AzStorageContainerStoredAccessPolicy` +* Fixed a sample script issue of set management policy with json + - `Set-AzStorageAccountManagementPolicy` + +## Version 2.7.0 +* Supported enable/disable/get share soft delete properties on file Service of a Storage account + - `Update-AzStorageFileServiceProperty` + - `Get-AzStorageFileServiceProperty` +* Supported list file shares include the deleted ones of a Storage account, and Get single file share usage + - `Get-AzRmStorageShare` +* Supported restore a deleted file share + - `Restore-AzRmStorageShare` +* Changed the cmdlets for modify blob service properties, won't get the original properties from server, but only set the modified properties to server. + - `Enable-AzStorageBlobDeleteRetentionPolicy` + - `Disable-AzStorageBlobDeleteRetentionPolicy` + - `Enable-AzStorageBlobRestorePolicy` + - `Disable-AzStorageBlobRestorePolicy` + - `Update-AzStorageBlobServiceProperty` +* Fixed help issue for New-AzStorageAccount parameter -Kind default value [#12189] +* Fixed issue by add example to show how to set correct ContentType in blob upload [#12989] + +## Version 2.6.0 +* Fixed upload blob fail by upgrade to Microsoft.Azure.Storage.DataMovement 2.0.0 [#12220] +* Supported Point In Time Restore + - `Enable-AzStorageBlobRestorePolicy` + - `Disable-AzStorageBlobRestorePolicy` + - `New-AzStorageBlobRangeToRestore` + - `Restore-AzStorageBlobRange` +* Supported get blob restore status of Storage account by run get-AzureRMStorageAccount with parameter -IncludeBlobRestoreStatus + - `Get-AzureRMStorageAccount` +* Added breaking change warning message for upcoming cmdlet output change + - `Get-AzStorageContainerStoredAccessPolicy` + - `Set-AzStorageContainerStoredAccessPolicy` + - `Set-AzStorageAccountManagementPolicy` + - `Get-AzStorageAccountManagementPolicy` + - `Add-AzStorageAccountManagementPolicyAction` + - `New-AzStorageAccountManagementPolicyRule` +* Upgraded Microsoft.Azure.Cosmos.Table SDK to 1.0.8 + + +## Version 2.5.0 +* Supported blob query acceleration + - `Get-AzStorageBlobQueryResult` + - `New-AzStorageBlobQueryConfig` +* Updated help file, added more description, and fixed typo + - `Start-AzStorageBlobCopy` + - `Get-AzDataLakeGen2Item` +* Fixed download blob fail when related sub directory not exist [#12592] + - `Get-AzStorageBlobContent` +* Supported Set/Get/Remove Object Replication Policy on Storage accounts + - `New-AzStorageObjectReplicationPolicyRule` + - `Set-AzStorageObjectReplicationPolicy` + - `Get-AzStorageObjectReplicationPolicy` + - `Remove-AzStorageObjectReplicationPolicy` +* Supported enable/disable ChangeFeed on Blob Service of a Storage account + - `Update-AzStorageBlobServiceProperty` + +## Version 2.4.0 +* Supported create container/blob Sas token with new permission x,t + - `New-AzStorageBlobSASToken` + - `New-AzStorageContainerSASToken` +* Supported create account Sas token with new permission x,t,f + - `New-AzStorageAccountSASToken` +* Supported get single file share usage + - `Get-AzRmStorageShare` + +## Version 2.3.0 +* Fixed the issue that UserAgent is not added for some data plane cmdlets. +* Supported create/update Storage account with MinimumTlsVersion and AllowBlobPublicAccess + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Support enable/disable versioning on Blob Service of a Storage account + - `Update-AzStorageBlobServiceProperty` +* Support list blobs with blob versions + - `Get-AzStorageBlob` +* Support get/remove single blob snapshot or blob version + - `Get-AzStorageBlob` + - `Remove-AzStorageBlob` +* Support pipeline from blob object generated from Azure.Storage.Blobs V12 + - `Get-AzStorageBlobContent` + - `New-AzStorageBlobSASToken` + - `Remove-AzStorageBlob` + - `Set-AzStorageBlobContent` + - `Start-AzStorageBlobCopy` + +## Version 2.2.0 +* Supported create Storage account with RequireInfrastructureEncryption + - `New-AzStorageAccount` +* Moved the logic of loading Azure.Core to Az.Accounts + +## Version 2.1.0 +* Updated assembly version of data plane cmdlets + +## Version 2.0.0 +* Added `-AsJob` to get/list account cmdlet `Get-AzStorageAccount` +* Make KeyVersion to optional when update Storage account with KeyvaultEncryption, to support key auto-rotation + - `Set-AzStorageAccount` +* Fixed remove Azure File Directory fail with pipeline + - `Remove-AzStorageDirectory` +* Fixed [#9880]: Change NetWorkRule DefaultAction value defination to align with swagger. + - `Update-AzStorageAccountNetworkRuleSet` + - `Get-AzStorageAccountNetworkRuleSet` +* Fixed [#11624]: Skip duplicated rules when add NetworkRules, to avoid server failure + - `Add-AzStorageAccountNetworkRule` +* Upgraded Microsoft.Azure.Cosmos.Table SDK to 1.0.7 +* Added a warning message to remind user to list again with ContinuationToken when only part items are returned in list DataLake Gen2 Items, + - `Get-AzDataLakeGen2ChildItem` +* Supported to create or update Storage account with Azure Files Active Directory Domain Service Authentication + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Supported to new or list Kerberos keys of Storage account + - `New-AzStorageAccountKey` + - `Get-AzStorageAccountKey` +* Supported failover Storage account + - `Invoke-AzStorageAccountFailover` +* Updated help of `Get-AzStorageBlobCopyState` +* Updated help of `Get-AzStorageFileCopyState` and `Start-AzStorageBlobCopy` +* Integrated Storage client library v12 to Queue and File cmdlets +* Changed output type from CloudFile to AzureStorageFile, the original output will become a child property of the new output + - `Get-AzStorageFile` + - `Remove-AzStorageFile` + - `Get-AzStorageFileContent` + - `Set-AzStorageFileContent` + - `Start-AzStorageFileCopy` +* Changed output type from CloudFileDirectory to AzureStorageFileDirectory, the original output will become a child property of the new output + - `New-AzStorageDirectory` + - `Remove-AzStorageDirectory` +* Changed output type from CloudFileShare to AzureStorageFileShare, the original output will become a child property of the new output + - `Get-AzStorageShare` + - `New-AzStorageShare` + - `Remove-AzStorageShare` +* Changed output type from FileShareProperties to AzureStorageFileShare, the original output will become a sub child property of the new output + - `Set-AzStorageShareQuota` + +## Version 1.14.0 +* Added breaking change notice for Azure File cmdlets output change in a future release +* Supported new SkuName StandardGZRS, StandardRAGZRS when create/update Storage account + - `New-AzStorageAccount` + - `Set-AzStorageAccount` +* Supported DataLake Gen2 + - `New-AzDataLakeGen2Item` + - `Get-AzDataLakeGen2Item` + - `Get-AzDataLakeGen2ChildItem` + - `Move-AzDataLakeGen2Item` + - `Set-AzDataLakeGen2ItemAclObject` + - `Update-AzDataLakeGen2Item` + - `Get-AzDataLakeGen2ItemContent` + - `Remove-AzDataLakeGen2Item` + +## Version 1.13.0 +* Supported AllowProtectedAppendWrite in ImmutabilityPolicy + - `Set-AzRmStorageContainerImmutabilityPolicy` +* Added breaking change warning message for AzureStorageTable type change in a future release + - `New-AzStorageTable` + - `Get-AzStorageTable` + +## Version 1.12.0 +* Support set Table/Queue Encryption Keytype in Create Storage Account + - New-AzRmStorageAccount +* Show RequestId when StorageException don't have ExtendedErrorInformation +* Fix the Example 6 of cmdlet Start-AzStorageBlobCopy + +## Version 1.11.0 +* Add breaking change warning message for DefaultAction Value change in a future release + - Update-AzStorageAccountNetworkRuleSet +* Support Get last sync time of Storage account by run get-AzureRMStorageAccount with parameter -IncludeGeoReplicationStats + - Get-AzureRMStorageAccount + +## Version 1.10.0 +* Update references in .psd1 to use relative path +* Support generate Blob/Constainer Idenity based SAS token with Storage Context based on Oauth authentication + - New-AzStorageContainerSASToken + - New-AzStorageBlobSASToken +* Support revoke Storage Account User Delegation Keys, so all Idenity SAS tokens are revoked + - Revoke-AzStorageAccountUserDelegationKeys +* Upgrade to Microsoft.Azure.Management.Storage 14.2.0, to support new API version 2019-06-01. +* Support Share QuotaGiB more than 5120 in Management plane File Share cmdlets, and add parameter alias "Quota" to parameter "QuotaGiB" + - New-AzRmStorageShare + - Update-AzRmStorageShare +* Add parameter alias "QuotaGiB" to parameter "Quota" + - Set-AzStorageShareQuota +* Fix the issue that Set-AzStorageContainerAcl can clean up the stored Access Policy + - Set-AzStorageContainerAcl + +## Version 1.9.0 +* Support enable Large File share when create or update Storage account + - New-AzStorageAccount + - Set-AzStorageAccount +* When close/get File handle, skip check the input path is File directory or File, to avoid failure with object in DeletePending status + - Get-AzStorageFileHandle + - Close-AzStorageFileHandle + +## Version 1.8.0 +* Upgrade Storage Client Library to 11.1.0 +* List containers with Management plane API, will list with NextPageLink + - Get-AzRmStorageContainer +* List Storage accounts from subscription, will list with NextPageLink + - Get-AzStorageAccount + +## Version 1.7.0 +* Updated example in reference documentation for `Get-AzStorageAccountKey` +* In upload/Downalod Azure File,support perserve the source File SMB properties (File Attributtes, File Creation Time, File Last Write Time) in the destination file + - Set-AzStorageFileContent + - Get-AzStorageFileContent +* Fix Upload block blob with properties/metadate fail on container enabled ImmutabilityPolicy. + - Set-AzStorageBlobContent +* Support manage Azure File shares with Management plane API + - New-AzRmStorageShare + - Get-AzRmStorageShare + - Update-AzRmStorageShare + - Remove-AzRmStorageShare + +## Version 1.6.0 +* Fixed miscellaneous typos across module +* Update help for Get/Close-AzStorageFileHandle, by add more scenarios to cmdlet examples and update parameter descriptions +* Support StandardBlobTier in upload blob and copy blob + - Set-AzStorageBlobContent + - Start-AzStorageBlobCopy +* Support Rehydrate Priority in copy blob + - Start-AzStorageBlobCopy + +## Version 1.5.1 +* Update example in reference documentation for `Get-AzStorageAccount` to use correct parameter name + +## Version 1.5.0 +* Change 2 parameters "-IndexDocument" and "-ErrorDocument404Path" from required to optional in cmdlet: + - Enable-AzStorageStaticWebsite +* Update help of Get-AzStorageBlobContent by add an example +* Show more error information when cmdlet failed with StorageException +* Support create or update Storage account with Azure Files AAD DS Authentication + - New-AzStorageAccount + - Set-AzStorageAccount +* Support list or close file handles of a file share, file directory or a file + - Get-AzStorageFileHandle + - Close-AzStorageFileHandle + +## Version 1.4.0 +* Support Kind FileStorage and SkuName Premium_ZRS when create Storage account + - New-AzStorageAccount +* Clarified description of blob immutability cmdlet + - Remove-AzRmStorageContainerImmutabilityPolicy + +## Version 1.3.0 +* Upgrade to Storage Client Library 10.0.1 (the namespace of all objects from this SDK change from "Microsoft.WindowsAzure.Storage.*" to "Microsoft.Azure.Storage.*") +* Upgrade to Microsoft.Azure.Management.Storage 11.0.0, to support new API version 2019-04-01. +* The default Storage account Kind in Create Storage account change from 'Storage' to 'StorageV2' + - New-AzStorageAccount +* Change the Storage account cmdlet output Sku.Name to be aligned with input SkuName by add '-', like "StandardLRS" change to "Standard_LRS" + - New-AzStorageAccount + - Get-AzStorageAccount + - Set-AzStorageAccount + +## Version 1.2.0 +* Report detail error when create Storage context with parameter -UseConnectedAccount, but without login Azure account + - New-AzStorageContext +* Support Manage Blob Service Properties of a specified Storage account with Management plane API + - Update-AzStorageBlobServiceProperty + - Get-AzStorageBlobServiceProperty + - Enable-AzStorageBlobDeleteRetentionPolicy + - Disable-AzStorageBlobDeleteRetentionPolicy +* -AsJob support for Blob and file upload and download cmdlets + - Get-AzStorageBlobContent + - Set-AzStorageBlobContent + - Get-AzStorageFileContent + - Set-AzStorageFileContent + +## Version 1.1.0 +* Support Get/Set/Remove Management Policy on a Storage account + - Set-AzStorageAccountManagementPolicy + - Get-AzStorageAccountManagementPolicy + - Remove-AzStorageAccountManagementPolicy + - Add-AzStorageAccountManagementPolicyAction + - New-AzStorageAccountManagementPolicyFilter + - New-AzStorageAccountManagementPolicyRule + +## Version 1.0.4 +* Upgrade to Storage Client Library 9.4.2 and Microsoft.Azure.Cosmos.Table 0.10.1-preview + +## Version 1.0.3 +* Support Kind BlockBlobStorage when create Storage account + - New-AzStorageAccount + +## Version 1.0.2 +* Update incorrect online help URLs +* Give detail error message when get/set classic Logging/Metric on Premium Storage Account, since Premium Storage Account not supoort classic Logging/Metric. + - Get/Set-AzStorageServiceLoggingProperty + - Get/Set-AzStorageServiceMetricsProperty + +## Version 1.0.1 +* Set the StorageAccountName of Storage context as the real Storage Account Name, when it's created with Sas Token, OAuth or Anonymous + - New-AzStorageContext +* Create Sas Token of Blob Snapshot Object with '-FullUri' parameter, fix the returned Uri to be the sanpshot Uri + - New-AzStorageBlobSASToken + +## Version 1.0.0 +* General availability of `Az.Storage` module diff --git a/src/Storage/Storage.Management/help/Az.Storage.md b/src/Storage/Storage.Management/help/Az.Storage.md index be52c90c40f6..61baa0b35d88 100644 --- a/src/Storage/Storage.Management/help/Az.Storage.md +++ b/src/Storage/Storage.Management/help/Az.Storage.md @@ -197,6 +197,9 @@ Move a file or directory to another a file or directory in same Storage account. ### [New-AzDataLakeGen2Item](New-AzDataLakeGen2Item.md) Create a file or directory in a filesystem. +### [New-AzDataLakeGen2SasToken](New-AzDataLakeGen2SasToken.md) +Generates a SAS token for an Azure storage blob. + ### [New-AzRmStorageContainer](New-AzRmStorageContainer.md) Creates a Storage blob container diff --git a/src/Storage/Storage.Management/help/Az.Storage.md.bak b/src/Storage/Storage.Management/help/Az.Storage.md.bak new file mode 100644 index 000000000000..6315e7b77c7d --- /dev/null +++ b/src/Storage/Storage.Management/help/Az.Storage.md.bak @@ -0,0 +1,481 @@ +--- +Module Name: Az.Storage +Module Guid: da67eaa7-4cb1-4bfa-a194-8bf3faae8ac5 +Download Help Link: https://docs.microsoft.com/powershell/module/az.storage +Help Version: 4.2.3.0 +Locale: en-US +--- + +# Az.Storage Module +## Description +This topic displays help topics for the Azure Storage Management Cmdlets. + +## Az.Storage Cmdlets +### [Add-AzRmStorageContainerLegalHold](Add-AzRmStorageContainerLegalHold.md) +Adds legal hold tags to a Storage blob container + +### [Add-AzStorageAccountManagementPolicyAction](Add-AzStorageAccountManagementPolicyAction.md) +Adds an action to the input ManagementPolicy Action Group object, or creates a ManagementPolicy Action Group object with the action. The object can be used in New-AzStorageAccountManagementPolicyRule. + +### [Add-AzStorageAccountNetworkRule](Add-AzStorageAccountNetworkRule.md) + Add IpRules or VirtualNetworkRules to the NetworkRule property of a Storage account + +### [Close-AzStorageFileHandle](Close-AzStorageFileHandle.md) +Closes file handles of a file share, a file directory or a file. + +### [Copy-AzStorageBlob](Copy-AzStorageBlob.md) +Copy a blob synchronously. + +### [Disable-AzStorageBlobDeleteRetentionPolicy](Disable-AzStorageBlobDeleteRetentionPolicy.md) +Disable delete retention policy for the Azure Storage Blob service. + +### [Disable-AzStorageBlobLastAccessTimeTracking](Disable-AzStorageBlobLastAccessTimeTracking.md) +Disable last access time tracking for the Azure Storage Blob service. + +### [Disable-AzStorageBlobRestorePolicy](Disable-AzStorageBlobRestorePolicy.md) +Disables Blob Restore Policy on a Storage account. + +### [Disable-AzStorageContainerDeleteRetentionPolicy](Disable-AzStorageContainerDeleteRetentionPolicy.md) +Disable delete retention policy for Azure Storage blob containers. + +### [Disable-AzStorageDeleteRetentionPolicy](Disable-AzStorageDeleteRetentionPolicy.md) +Disable delete retention policy for the Azure Storage Blob service. + +### [Disable-AzStorageStaticWebsite](Disable-AzStorageStaticWebsite.md) +Disable static website for the Azure Storage account. + +### [Enable-AzStorageBlobDeleteRetentionPolicy](Enable-AzStorageBlobDeleteRetentionPolicy.md) +Enable delete retention policy for the Azure Storage Blob service. + +### [Enable-AzStorageBlobLastAccessTimeTracking](Enable-AzStorageBlobLastAccessTimeTracking.md) +Enable last access time tracking for the Azure Storage Blob service. + +### [Enable-AzStorageBlobRestorePolicy](Enable-AzStorageBlobRestorePolicy.md) +Enables Blob Restore Policy on a Storage account. + +### [Enable-AzStorageContainerDeleteRetentionPolicy](Enable-AzStorageContainerDeleteRetentionPolicy.md) +Enable delete retention policy for Azure Storage blob containers. + +### [Enable-AzStorageDeleteRetentionPolicy](Enable-AzStorageDeleteRetentionPolicy.md) +Enable delete retention policy for the Azure Storage Blob service. + +### [Enable-AzStorageStaticWebsite](Enable-AzStorageStaticWebsite.md) +Enable static website for the Azure Storage account. + +### [Get-AzDataLakeGen2ChildItem](Get-AzDataLakeGen2ChildItem.md) +Lists sub directorys and files from a directory or filesystem root. + +### [Get-AzDataLakeGen2Item](Get-AzDataLakeGen2Item.md) +Gets the details of a file or directory in a filesystem. + +### [Get-AzDataLakeGen2ItemContent](Get-AzDataLakeGen2ItemContent.md) +Download a file. + +### [Get-AzRmStorageContainer](Get-AzRmStorageContainer.md) +Gets or lists Storage blob containers + +### [Get-AzRmStorageContainerImmutabilityPolicy](Get-AzRmStorageContainerImmutabilityPolicy.md) +Gets ImmutabilityPolicy of a Storage blob containers + +### [Get-AzRmStorageShare](Get-AzRmStorageShare.md) +Gets or lists Storage file shares. + +### [Get-AzStorageAccount](Get-AzStorageAccount.md) +Gets a Storage account. + +### [Get-AzStorageAccountKey](Get-AzStorageAccountKey.md) +Gets the access keys for an Azure Storage account. + +### [Get-AzStorageAccountManagementPolicy](Get-AzStorageAccountManagementPolicy.md) +Gets the management policy of an Azure Storage account. + +### [Get-AzStorageAccountNameAvailability](Get-AzStorageAccountNameAvailability.md) +Checks the availability of a Storage account name. + +### [Get-AzStorageAccountNetworkRuleSet](Get-AzStorageAccountNetworkRuleSet.md) +Get the NetWorkRule property of a Storage account + +### [Get-AzStorageBlob](Get-AzStorageBlob.md) +Lists blobs in a container. + +### [Get-AzStorageBlobByTag](Get-AzStorageBlobByTag.md) +Lists blobs in a storage account across containers, with a blob tag filter sql expression. + +### [Get-AzStorageBlobContent](Get-AzStorageBlobContent.md) +Downloads a storage blob. + +### [Get-AzStorageBlobCopyState](Get-AzStorageBlobCopyState.md) +Gets the copy status of an Azure Storage blob. + +### [Get-AzStorageBlobInventoryPolicy](Get-AzStorageBlobInventoryPolicy.md) +Gets blob inventory policy from a Storage account. + +### [Get-AzStorageBlobQueryResult](Get-AzStorageBlobQueryResult.md) +Applies a simple Structured Query Language (SQL) statement on a blob's contents and save only the queried subset of the data to a local file. + +### [Get-AzStorageBlobServiceProperty](Get-AzStorageBlobServiceProperty.md) +Gets service properties for Azure Storage Blob services. + +### [Get-AzStorageBlobTag](Get-AzStorageBlobTag.md) +Get blob tags of a specific blob. + +### [Get-AzStorageContainer](Get-AzStorageContainer.md) +Lists the storage containers. + +### [Get-AzStorageContainerStoredAccessPolicy](Get-AzStorageContainerStoredAccessPolicy.md) +Gets the stored access policy or policies for an Azure storage container. + +### [Get-AzStorageCORSRule](Get-AzStorageCORSRule.md) +Gets CORS rules for a Storage service type. + +### [Get-AzStorageEncryptionScope](Get-AzStorageEncryptionScope.md) +Get or list encryption scopes from a Storage account. + +### [Get-AzStorageFile](Get-AzStorageFile.md) +Lists directories and files for a path. + +### [Get-AzStorageFileContent](Get-AzStorageFileContent.md) +Downloads the contents of a file. + +### [Get-AzStorageFileCopyState](Get-AzStorageFileCopyState.md) +Gets the state of a copy operation. + +### [Get-AzStorageFileHandle](Get-AzStorageFileHandle.md) +Lists file handles of a file share, a file directory or a file. + +### [Get-AzStorageFileServiceProperty](Get-AzStorageFileServiceProperty.md) +Gets service properties for Azure Storage File services. + +### [Get-AzStorageObjectReplicationPolicy](Get-AzStorageObjectReplicationPolicy.md) +Gets or lists object replication policy of a Storage account. + +### [Get-AzStorageQueue](Get-AzStorageQueue.md) +Lists storage queues. + +### [Get-AzStorageQueueStoredAccessPolicy](Get-AzStorageQueueStoredAccessPolicy.md) +Gets the stored access policy or policies for an Azure storage queue. + +### [Get-AzStorageServiceLoggingProperty](Get-AzStorageServiceLoggingProperty.md) +Gets logging properties for Azure Storage services. + +### [Get-AzStorageServiceMetricsProperty](Get-AzStorageServiceMetricsProperty.md) +Gets metrics properties for the Azure Storage service. + +### [Get-AzStorageServiceProperty](Get-AzStorageServiceProperty.md) +Gets properties for Azure Storage services. + +### [Get-AzStorageShare](Get-AzStorageShare.md) +Gets a list of file shares. + +### [Get-AzStorageShareStoredAccessPolicy](Get-AzStorageShareStoredAccessPolicy.md) +Gets stored access policies for a Storage share. + +### [Get-AzStorageTable](Get-AzStorageTable.md) +Lists the storage tables. + +### [Get-AzStorageTableStoredAccessPolicy](Get-AzStorageTableStoredAccessPolicy.md) +Gets the stored access policy or policies for an Azure storage table. + +### [Get-AzStorageUsage](Get-AzStorageUsage.md) +Gets the Storage resource usage of the current subscription. + +### [Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration](Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration.md) +Migrate an existing Storage blob containers to enable immutable Storage with versioning. + +### [Invoke-AzStorageAccountFailover](Invoke-AzStorageAccountFailover.md) +Invokes failover of a Storage account. + +### [Invoke-AzStorageAccountHierarchicalNamespaceUpgrade](Invoke-AzStorageAccountHierarchicalNamespaceUpgrade.md) +Validates if a storage account can be upgraded to enable HierarchicalNamespace, or upgrades a Storage account to enabled HierarchicalNamespace. + +### [Lock-AzRmStorageContainerImmutabilityPolicy](Lock-AzRmStorageContainerImmutabilityPolicy.md) +Locks ImmutabilityPolicy of a Storage blob containers + +### [Move-AzDataLakeGen2Item](Move-AzDataLakeGen2Item.md) +Move a file or directory to another a file or directory in same Storage account. + +### [New-AzDataLakeGen2Item](New-AzDataLakeGen2Item.md) +Create a file or directory in a filesystem. + +### [New-AzDataLakeGen2SasToken](New-AzDataLakeGen2SasToken.md) +{{ Fill in the Synopsis }} + +### [New-AzRmStorageContainer](New-AzRmStorageContainer.md) +Creates a Storage blob container + +### [New-AzRmStorageShare](New-AzRmStorageShare.md) +Creates a Storage file share. + +### [New-AzStorageAccount](New-AzStorageAccount.md) +Creates a Storage account. + +### [New-AzStorageAccountKey](New-AzStorageAccountKey.md) +Regenerates a storage key for an Azure Storage account. + +### [New-AzStorageAccountManagementPolicyFilter](New-AzStorageAccountManagementPolicyFilter.md) +Creates a ManagementPolicy rule filter object, which can be used in New-AzStorageAccountManagementPolicyRule. + +### [New-AzStorageAccountManagementPolicyRule](New-AzStorageAccountManagementPolicyRule.md) +Creates a ManagementPolicy rule object, which can be used in Set-AzStorageAccountManagementPolicy. + +### [New-AzStorageAccountSASToken](New-AzStorageAccountSASToken.md) +Creates an account-level SAS token. + +### [New-AzStorageBlobInventoryPolicyRule](New-AzStorageBlobInventoryPolicyRule.md) +Creates a blob inventory policy rule object, which can be used in Set-AzStorageBlobInventoryPolicy. + +### [New-AzStorageBlobQueryConfig](New-AzStorageBlobQueryConfig.md) +Creates a blob query configuration object, which can be used in Get-AzStorageBlobQueryResult. + +### [New-AzStorageBlobRangeToRestore](New-AzStorageBlobRangeToRestore.md) +Creates a Blob Range object to restores a Storage account. + +### [New-AzStorageBlobSASToken](New-AzStorageBlobSASToken.md) +Generates a SAS token for an Azure storage blob. + +### [New-AzStorageContainer](New-AzStorageContainer.md) +Creates an Azure storage container. + +### [New-AzStorageContainerSASToken](New-AzStorageContainerSASToken.md) +Generates an SAS token for an Azure storage container. + +### [New-AzStorageContainerStoredAccessPolicy](New-AzStorageContainerStoredAccessPolicy.md) +Creates a stored access policy for an Azure storage container. + +### [New-AzStorageContext](New-AzStorageContext.md) +Creates an Azure Storage context. + +### [New-AzStorageDirectory](New-AzStorageDirectory.md) +Creates a directory. + +### [New-AzStorageEncryptionScope](New-AzStorageEncryptionScope.md) +Creates an encryption scope for a Storage account. + +### [New-AzStorageFileSASToken](New-AzStorageFileSASToken.md) +Generates a shared access signature token for a Storage file. + +### [New-AzStorageObjectReplicationPolicyRule](New-AzStorageObjectReplicationPolicyRule.md) +Creates an object replication policy rule. + +### [New-AzStorageQueue](New-AzStorageQueue.md) +Creates a storage queue. + +### [New-AzStorageQueueSASToken](New-AzStorageQueueSASToken.md) +Generates a shared access signature token for an Azure storage queue. + +### [New-AzStorageQueueStoredAccessPolicy](New-AzStorageQueueStoredAccessPolicy.md) +Creates a stored access policy for an Azure storage queue. + +### [New-AzStorageShare](New-AzStorageShare.md) +Creates a file share. + +### [New-AzStorageShareSASToken](New-AzStorageShareSASToken.md) +Generate Shared Access Signature token for Azure Storage share. + +### [New-AzStorageShareStoredAccessPolicy](New-AzStorageShareStoredAccessPolicy.md) +Creates a stored access policy on a Storage share. + +### [New-AzStorageTable](New-AzStorageTable.md) +Creates a storage table. + +### [New-AzStorageTableSASToken](New-AzStorageTableSASToken.md) +Generates an SAS token for an Azure Storage table. + +### [New-AzStorageTableStoredAccessPolicy](New-AzStorageTableStoredAccessPolicy.md) +Creates a stored access policy for an Azure storage table. + +### [Remove-AzDataLakeGen2AclRecursive](Remove-AzDataLakeGen2AclRecursive.md) +Remove ACL recursively on the specified path. + +### [Remove-AzDataLakeGen2Item](Remove-AzDataLakeGen2Item.md) +Remove a file or directory. + +### [Remove-AzRmStorageContainer](Remove-AzRmStorageContainer.md) +Removes a Storage blob container + +### [Remove-AzRmStorageContainerImmutabilityPolicy](Remove-AzRmStorageContainerImmutabilityPolicy.md) +Removes ImmutabilityPolicy of a Storage blob container with an unlocked policy + +### [Remove-AzRmStorageContainerLegalHold](Remove-AzRmStorageContainerLegalHold.md) +Removes legal hold tags from a Storage blob container + +### [Remove-AzRmStorageShare](Remove-AzRmStorageShare.md) +Removes a Storage file share. + +### [Remove-AzStorageAccount](Remove-AzStorageAccount.md) +Removes a Storage account from Azure. + +### [Remove-AzStorageAccountManagementPolicy](Remove-AzStorageAccountManagementPolicy.md) +Removes the management policy of an Azure Storage account. + +### [Remove-AzStorageAccountNetworkRule](Remove-AzStorageAccountNetworkRule.md) +Remove IpRules or VirtualNetworkRules from the NetWorkRule property of a Storage account + +### [Remove-AzStorageBlob](Remove-AzStorageBlob.md) +Removes the specified storage blob. + +### [Remove-AzStorageBlobImmutabilityPolicy](Remove-AzStorageBlobImmutabilityPolicy.md) +Removes ImmutabilityPolicy of a Storage blob. + +### [Remove-AzStorageBlobInventoryPolicy](Remove-AzStorageBlobInventoryPolicy.md) +Removes blob inventory policy from a Storage account. + +### [Remove-AzStorageContainer](Remove-AzStorageContainer.md) +Removes the specified storage container. + +### [Remove-AzStorageContainerStoredAccessPolicy](Remove-AzStorageContainerStoredAccessPolicy.md) +Removes a stored access policy from an Azure storage container. + +### [Remove-AzStorageCORSRule](Remove-AzStorageCORSRule.md) +Removes CORS for a Storage service. + +### [Remove-AzStorageDirectory](Remove-AzStorageDirectory.md) +Deletes a directory. + +### [Remove-AzStorageFile](Remove-AzStorageFile.md) +Deletes a file. + +### [Remove-AzStorageObjectReplicationPolicy](Remove-AzStorageObjectReplicationPolicy.md) +Removes the specified object replication policy from a Storage account. + +### [Remove-AzStorageQueue](Remove-AzStorageQueue.md) +Removes a storage queue. + +### [Remove-AzStorageQueueStoredAccessPolicy](Remove-AzStorageQueueStoredAccessPolicy.md) +Removes a stored access policy from an Azure storage queue. + +### [Remove-AzStorageShare](Remove-AzStorageShare.md) +Deletes a file share. + +### [Remove-AzStorageShareStoredAccessPolicy](Remove-AzStorageShareStoredAccessPolicy.md) +Removes a stored access policy from a Storage share. + +### [Remove-AzStorageTable](Remove-AzStorageTable.md) +Removes a storage table. + +### [Remove-AzStorageTableStoredAccessPolicy](Remove-AzStorageTableStoredAccessPolicy.md) +Removes a stored access policy from an Azure storage table. + +### [Restore-AzRmStorageShare](Restore-AzRmStorageShare.md) +Restores a deleted file share. + +### [Restore-AzStorageBlobRange](Restore-AzStorageBlobRange.md) +Restores a Storage account for specific blob ranges. + +### [Restore-AzStorageContainer](Restore-AzStorageContainer.md) +Restores a previously deleted Azure storage blob container. + +### [Revoke-AzStorageAccountUserDelegationKeys](Revoke-AzStorageAccountUserDelegationKeys.md) +Revoke all User Delegation keys of a Storage account. + +### [Set-AzCurrentStorageAccount](Set-AzCurrentStorageAccount.md) +Modifies the current Storage account of the specified subscription. + +### [Set-AzDataLakeGen2AclRecursive](Set-AzDataLakeGen2AclRecursive.md) +Set ACL recursively on the specified path. + +### [Set-AzDataLakeGen2ItemAclObject](Set-AzDataLakeGen2ItemAclObject.md) +Creates/Updates a DataLake gen2 item ACL object, which can be used in Update-AzDataLakeGen2Item cmdlet. + +### [Set-AzRmStorageContainerImmutabilityPolicy](Set-AzRmStorageContainerImmutabilityPolicy.md) +Creates or updates ImmutabilityPolicy of a Storage blob containers + +### [Set-AzStorageAccount](Set-AzStorageAccount.md) +Modifies a Storage account. + +### [Set-AzStorageAccountManagementPolicy](Set-AzStorageAccountManagementPolicy.md) +Creates or modifies the management policy of an Azure Storage account. + +### [Set-AzStorageBlobContent](Set-AzStorageBlobContent.md) +Uploads a local file to an Azure Storage blob. + +### [Set-AzStorageBlobImmutabilityPolicy](Set-AzStorageBlobImmutabilityPolicy.md) +Creates or updates ImmutabilityPolicy of a Storage blob. + +### [Set-AzStorageBlobInventoryPolicy](Set-AzStorageBlobInventoryPolicy.md) +Creates or updates blob inventory policy in a Storage account. + +### [Set-AzStorageBlobLegalHold](Set-AzStorageBlobLegalHold.md) +Enables or disables legal hold on a Storage blob. + +### [Set-AzStorageBlobTag](Set-AzStorageBlobTag.md) +Set blob tags of a specific blob. + +### [Set-AzStorageContainerAcl](Set-AzStorageContainerAcl.md) +Sets the public access permission to a storage container. + +### [Set-AzStorageContainerStoredAccessPolicy](Set-AzStorageContainerStoredAccessPolicy.md) +Sets a stored access policy for an Azure storage container. + +### [Set-AzStorageCORSRule](Set-AzStorageCORSRule.md) +Sets the CORS rules for a type of Storage service. + +### [Set-AzStorageFileContent](Set-AzStorageFileContent.md) +Uploads the contents of a file. + +### [Set-AzStorageObjectReplicationPolicy](Set-AzStorageObjectReplicationPolicy.md) +Creates or updates the specified object replication policy in a Storage account. + +### [Set-AzStorageQueueStoredAccessPolicy](Set-AzStorageQueueStoredAccessPolicy.md) +Sets a stored access policy for an Azure storage queue. + +### [Set-AzStorageServiceLoggingProperty](Set-AzStorageServiceLoggingProperty.md) +Modifies logging for Azure Storage services. + +### [Set-AzStorageServiceMetricsProperty](Set-AzStorageServiceMetricsProperty.md) +Modifies metrics properties for the Azure Storage service. + +### [Set-AzStorageShareQuota](Set-AzStorageShareQuota.md) +Sets the storage capacity for a share. + +### [Set-AzStorageShareStoredAccessPolicy](Set-AzStorageShareStoredAccessPolicy.md) +Updates a stored access policy on a Storage share. + +### [Set-AzStorageTableStoredAccessPolicy](Set-AzStorageTableStoredAccessPolicy.md) +Sets the stored access policy for an Azure storage table. + +### [Start-AzStorageBlobCopy](Start-AzStorageBlobCopy.md) +Starts to copy a blob. + +### [Start-AzStorageBlobIncrementalCopy](Start-AzStorageBlobIncrementalCopy.md) +Start an Incremental copy operation from a Page blob snapshot to the specified destination Page blob. + +### [Start-AzStorageFileCopy](Start-AzStorageFileCopy.md) +Starts to copy a source file. + +### [Stop-AzStorageAccountHierarchicalNamespaceUpgrade](Stop-AzStorageAccountHierarchicalNamespaceUpgrade.md) +Aborts an ongoing HierarchicalNamespace upgrade task on a storage account. + +### [Stop-AzStorageBlobCopy](Stop-AzStorageBlobCopy.md) +Stops a copy operation. + +### [Stop-AzStorageFileCopy](Stop-AzStorageFileCopy.md) +Stops a copy operation to the specified destination file. + +### [Update-AzDataLakeGen2AclRecursive](Update-AzDataLakeGen2AclRecursive.md) +Update ACL recursively on the specified path. + +### [Update-AzDataLakeGen2Item](Update-AzDataLakeGen2Item.md) +Update a file or directory on properties, metadata, permission, ACL, and owner. + +### [Update-AzRmStorageContainer](Update-AzRmStorageContainer.md) +Modifies a Storage blob container + +### [Update-AzRmStorageShare](Update-AzRmStorageShare.md) +Modifies a Storage file share. + +### [Update-AzStorageAccountNetworkRuleSet](Update-AzStorageAccountNetworkRuleSet.md) +Update the NetworkRule property of a Storage account + +### [Update-AzStorageBlobServiceProperty](Update-AzStorageBlobServiceProperty.md) +Modifies the service properties for the Azure Storage Blob service. + +### [Update-AzStorageEncryptionScope](Update-AzStorageEncryptionScope.md) +Modify an encryption scope for a Storage account. + +### [Update-AzStorageFileServiceProperty](Update-AzStorageFileServiceProperty.md) +Modifies the service properties for the Azure Storage File service. + +### [Update-AzStorageServiceProperty](Update-AzStorageServiceProperty.md) +Modifies the properties for the Azure Storage service. + diff --git a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md new file mode 100644 index 000000000000..9e642ba3df27 --- /dev/null +++ b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md @@ -0,0 +1,238 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Storage.dll-Help.xml +Module Name: Az.Storage +online version: https://docs.microsoft.com/powershell/module/az.storage/new-azdatalakegen2sastoken +schema: 2.0.0 +--- + +# New-AzDataLakeGen2SasToken + +## SYNOPSIS +Generates a SAS token for Azure DatalakeGen2 item. + +## SYNTAX + +### ReceiveManual +``` +New-AzDataLakeGen2SasToken [-FileSystem] [-Path ] [-Permission ] + [-Protocol ] [-IPAddressOrRange ] [-StartTime ] + [-ExpiryTime ] [-FullUri] [-Context ] + [-DefaultProfile ] [] +``` + +### ItemPipeline +``` +New-AzDataLakeGen2SasToken -InputObject [-Permission ] + [-Protocol ] [-IPAddressOrRange ] [-StartTime ] + [-ExpiryTime ] [-FullUri] [-Context ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +The **New-AzDataLakeGen2SasToken** cmdlet generates a Shared Access Signature (SAS) token for an Azure DatalakeGen2 item. + +## EXAMPLES + +### Example 1: Generate a SAS token with full permission +``` +PS C:\> New-AzDataLakeGen2SasToken -FileSystem "filesystem1" -Path "dir1/dir2" -Permission racwdlmeop +``` + +This example generates a DatalakeGen2 SAS token with full permission. + +### Example 2: Generate a SAS token with specific StartTime, ExpireTime, Protocal, IPAddressOrRange, by pipeline a datalakegen2 item +``` +PS C:\> Get-AzDataLakeGen2Item -FileSystem test -Path "testdir/dir2" | New-AzDataLakeGen2SasToken -Permission rw -Protocol Https -IPAddressOrRange 10.0.0.0-12.10.0.0 -StartTime (Get-Date) -ExpiryTime (Get-Date).AddDays(6) +``` + +This example generates a DatalakeGen2 SAS token by pipeline a datalake gen2 item, and with specific StartTime, ExpireTime, Protocal, IPAddressOrRange. + +## PARAMETERS + +### -Context +Azure Storage Context Object + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExpiryTime +Expiry Time + +```yaml +Type: System.Nullable`1[System.DateTimeOffset] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FileSystem +FileSystem name + +```yaml +Type: System.String +Parameter Sets: ReceiveManual +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -FullUri +Display full uri with sas token + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Azure Datalake Gen2 Item Object to remove. + +```yaml +Type: Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureDataLakeGen2Item +Parameter Sets: ItemPipeline +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IPAddressOrRange +IP, or IP range ACL (access control list) that the request would be accepted by Azure Storage. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Path +The path in the specified FileSystem that should be retrieved. +Can be a file or directory In the format 'directory/file.txt' or 'directory1/directory2/'. +Skip set this parameter to get the root directory of the Filesystem. + +```yaml +Type: System.String +Parameter Sets: ReceiveManual +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Permission +Permissions for a blob. +Permissions can be any not-empty subset of "racwdlmeop". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Protocol +Protocol can be used in the request with this SAS token. + +```yaml +Type: System.Nullable`1[Azure.Storage.Sas.SasProtocol] +Parameter Sets: (All) +Aliases: +Accepted values: None, HttpsAndHttp, Https + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartTime +Start Time + +```yaml +Type: System.Nullable`1[System.DateTimeOffset] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String + +### Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureDataLakeGen2Item + +### Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext + +## OUTPUTS + +### System.String + +## NOTES + +## RELATED LINKS diff --git a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md.bak b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md.bak new file mode 100644 index 000000000000..b63cea252ed0 --- /dev/null +++ b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md.bak @@ -0,0 +1,238 @@ +--- +external help file: Microsoft.Azure.PowerShell.Cmdlets.Storage.dll-Help.xml +Module Name: Az.Storage +online version: https://docs.microsoft.com/powershell/module/az.storage/new-azdatalakegen2sastoken +schema: 2.0.0 +--- + +# New-AzDataLakeGen2SasToken + +## SYNOPSIS +Generates a SAS token for Azure DatalakeGen2 item. + +## SYNTAX + +### ReceiveManual +``` +New-AzDataLakeGen2SasToken [-FileSystem] [-Path ] [-Permission ] + [-Protocol ] [-IPAddressOrRange ] [-StartTime ] + [-ExpiryTime ] [-FullUri] [-Context ] + [-DefaultProfile ] [] +``` + +### ItemPipeline +``` +New-AzDataLakeGen2SasToken -InputObject [-Permission ] + [-Protocol ] [-IPAddressOrRange ] [-StartTime ] + [-ExpiryTime ] [-FullUri] [-Context ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +The **New-AzDataLakeGen2SasToken** cmdlet generates a Shared Access Signature (SAS) token for an Azure DatalakeGen2 item. + +## EXAMPLES + +### Example 1: Generate a SAS token with full permission +``` +PS C:\> New-AzDataLakeGen2SasToken -FileSystem "filesystem1" -Path "dir1/dir2" -Permission racwdlmeop +``` + +This example generates a DatalakeGen2 SAS token with full permission. + +### Example 2: Generate a SAS token with specific StartTime, ExpireTime, Protocal, IPAddressOrRange +``` +PS C:\> New-AzDataLakeGen2SasToken -FileSystem test -Path "testdir/dir2" -Permission rw -Protocol Https -IPAddressOrRange 10.0.0.0-12.10.0.0 -StartTime (Get-Date) -ExpiryTime (Get-Date).AddDays(6) +``` + +This example generates a DatalakeGen2 SAS token with specific StartTime, ExpireTime, Protocal, IPAddressOrRange. + +## PARAMETERS + +### -Context +Azure Storage Context Object + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExpiryTime +Expiry Time + +```yaml +Type: System.Nullable`1[System.DateTimeOffset] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FileSystem +FileSystem name + +```yaml +Type: System.String +Parameter Sets: ReceiveManual +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -FullUri +Display full uri with sas token + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Azure Datalake Gen2 Item Object to remove. + +```yaml +Type: Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureDataLakeGen2Item +Parameter Sets: ItemPipeline +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IPAddressOrRange +IP, or IP range ACL (access control list) that the request would be accepted by Azure Storage. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Path +The path in the specified FileSystem that should be retrieved. +Can be a file or directory In the format 'directory/file.txt' or 'directory1/directory2/'. +Skip set this parameter to get the root directory of the Filesystem. + +```yaml +Type: System.String +Parameter Sets: ReceiveManual +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Permission +Permissions for a blob. +Permissions can be any not-empty subset of "racwdlmeop". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Protocol +Protocol can be used in the request with this SAS token. + +```yaml +Type: System.Nullable`1[Azure.Storage.Sas.SasProtocol] +Parameter Sets: (All) +Aliases: +Accepted values: None, HttpsAndHttp, Https + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartTime +Start Time + +```yaml +Type: System.Nullable`1[System.DateTimeOffset] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String + +### Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureDataLakeGen2Item + +### Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext + +## OUTPUTS + +### System.String + +## NOTES + +## RELATED LINKS diff --git a/src/Storage/Storage/Blob/StorageCloudBlobCmdletBase.cs b/src/Storage/Storage/Blob/StorageCloudBlobCmdletBase.cs index c04b2b703cf2..9228a4f47fd2 100644 --- a/src/Storage/Storage/Blob/StorageCloudBlobCmdletBase.cs +++ b/src/Storage/Storage/Blob/StorageCloudBlobCmdletBase.cs @@ -74,6 +74,24 @@ public BlobRequestOptions RequestOptions } } + public DataLakeClientOptions DataLakeClientOptions + { + get + { + if (dataLakeClientOptions == null) + { + dataLakeClientOptions = new DataLakeClientOptions(); + dataLakeClientOptions.AddPolicy(new UserAgentPolicy(ApiConstants.UserAgentHeaderValue), HttpPipelinePosition.PerCall); + return dataLakeClientOptions; + } + else + { + return dataLakeClientOptions; + } + } + } + private DataLakeClientOptions dataLakeClientOptions = null; + public BlobClientOptions ClientOptions { get @@ -664,20 +682,20 @@ internal DataLakeFileSystemClient GetFileSystemClientByName(IStorageBlobManageme if (localChannel.StorageContext.StorageAccount.Credentials.IsToken) //Oauth { - fileSystem = new DataLakeFileSystemClient(fileSystemUri, localChannel.StorageContext.Track2OauthToken); + fileSystem = new DataLakeFileSystemClient(fileSystemUri, localChannel.StorageContext.Track2OauthToken, this.DataLakeClientOptions); } else if (localChannel.StorageContext.StorageAccount.Credentials.IsSAS) //SAS { - fileSystem = new DataLakeFileSystemClient(new Uri (fileSystemUri.ToString() + "?" + Util.GetSASStringWithoutQuestionMark(localChannel.StorageContext.StorageAccount.Credentials.SASToken))); + fileSystem = new DataLakeFileSystemClient(new Uri (fileSystemUri.ToString() + "?" + Util.GetSASStringWithoutQuestionMark(localChannel.StorageContext.StorageAccount.Credentials.SASToken)), this.DataLakeClientOptions); } else if (localChannel.StorageContext.StorageAccount.Credentials.IsSharedKey) //Shared Key { fileSystem = new DataLakeFileSystemClient(fileSystemUri, - new StorageSharedKeyCredential(localChannel.StorageContext.StorageAccountName, localChannel.StorageContext.StorageAccount.Credentials.ExportBase64EncodedKey())); + new StorageSharedKeyCredential(localChannel.StorageContext.StorageAccountName, localChannel.StorageContext.StorageAccount.Credentials.ExportBase64EncodedKey()), this.DataLakeClientOptions); } else //Anonymous { - fileSystem = new DataLakeFileSystemClient(fileSystemUri); + fileSystem = new DataLakeFileSystemClient(fileSystemUri, this.DataLakeClientOptions); } return fileSystem; diff --git a/src/Storage/Storage/Common/AzureDataLakeGen2Item.cs b/src/Storage/Storage/Common/AzureDataLakeGen2Item.cs index b5c0e281e904..77b01eff2b94 100644 --- a/src/Storage/Storage/Common/AzureDataLakeGen2Item.cs +++ b/src/Storage/Storage/Common/AzureDataLakeGen2Item.cs @@ -103,6 +103,11 @@ public class AzureDataLakeGen2Item : AzureStorageBase [Ps1Xml(Label = "Group", Target = ViewControl.Table, Position = 7, TableColumnWidth = 10)] public string Group { get; set; } + /// + /// The PathItem properties of the item, the property only exist if the item is listout + /// + public PathItem ListPathItem { get; set; } + /// /// Azure DataLakeGen2 Item constructor /// @@ -190,6 +195,7 @@ public AzureDataLakeGen2Item(PathItem item, DataLakeFileSystemClient fileSystem, { this.Name = item.Name; this.Path = item.Name; + this.ListPathItem = item; this.IsDirectory = item.IsDirectory is null ? false : item.IsDirectory.Value; DataLakePathClient pathclient = null; if (this.IsDirectory) // Directory diff --git a/src/Storage/Storage/Common/SasTokenHelper.cs b/src/Storage/Storage/Common/SasTokenHelper.cs index ad96a7fd0b19..eac2e962f7dd 100644 --- a/src/Storage/Storage/Common/SasTokenHelper.cs +++ b/src/Storage/Storage/Common/SasTokenHelper.cs @@ -29,6 +29,7 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Common using System.Threading; using global::Azure.Storage.Blobs; using global::Azure.Storage; + using global::Azure.Storage.Files.DataLake; internal class SasTokenHelper { @@ -504,6 +505,35 @@ public static string GetBlobSharedAccessSignature(AzureStorageContext context, B } } + /// + /// Get SAS string for DatalakeGen2 + /// + public static string GetDatalakeGen2SharedAccessSignature(AzureStorageContext context, DataLakeSasBuilder sasBuilder, bool generateUserDelegationSas, DataLakeClientOptions clientOptions, CancellationToken cancelToken) + { + if (context != null && context.StorageAccount.Credentials.IsSharedKey) + { + return sasBuilder.ToSasQueryParameters(new StorageSharedKeyCredential(context.StorageAccountName, context.StorageAccount.Credentials.ExportBase64EncodedKey())).ToString(); + } + if (generateUserDelegationSas) + { + global::Azure.Storage.Files.DataLake.Models.UserDelegationKey userDelegationKey = null; + DataLakeServiceClient oauthService = new DataLakeServiceClient(context.StorageAccount.BlobEndpoint, context.Track2OauthToken, clientOptions); + + Util.ValidateUserDelegationKeyStartEndTime(sasBuilder.StartsOn, sasBuilder.ExpiresOn); + + userDelegationKey = oauthService.GetUserDelegationKey( + startsOn: sasBuilder.StartsOn == DateTimeOffset.MinValue || sasBuilder.StartsOn == null ? DateTimeOffset.UtcNow : sasBuilder.StartsOn.ToUniversalTime(), + expiresOn: sasBuilder.ExpiresOn.ToUniversalTime(), + cancellationToken: cancelToken); + + return sasBuilder.ToSasQueryParameters(userDelegationKey, context.StorageAccountName).ToString(); + } + else + { + throw new InvalidOperationException("Create SAS only supported with SharedKey or Oauth credentail."); + } + } + /// /// Create a blob SAS build from Blob Object /// diff --git a/src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs b/src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs new file mode 100644 index 000000000000..a2f500e81e1d --- /dev/null +++ b/src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs @@ -0,0 +1,209 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + using Commands.Common.Storage.ResourceModel; + using Microsoft.WindowsAzure.Commands.Storage.Common; + using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; + using System.Management.Automation; + using System.Security.Permissions; + using global::Azure.Storage.Files.DataLake; + using global::Azure.Storage.Sas; + using System; + + /// + /// list azure blobs in specified azure FileSystem + /// + [Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "DataLakeGen2SasToken"), OutputType(typeof(String))] + public class NewDataLakeGen2SasTokenCommand : StorageCloudBlobCmdletBase + { + /// + /// manually set the name parameter + /// + private const string ManualParameterSet = "ReceiveManual"; + + /// + /// File or Dir pipeline + /// + private const string ItemParameterSet = "ItemPipeline"; + + [Parameter(ValueFromPipeline = true, Position = 0, Mandatory = true, HelpMessage = "FileSystem name", ParameterSetName = ManualParameterSet)] + [ValidateNotNullOrEmpty] + public string FileSystem { get; set; } + + [Parameter(ValueFromPipeline = true, Mandatory = false, HelpMessage = + "The path in the specified FileSystem that should be retrieved. Can be a file or directory " + + "In the format 'directory/file.txt' or 'directory1/directory2/'. Skip set this parameter to get the root directory of the Filesystem.", + ParameterSetName = ManualParameterSet)] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "Azure Datalake Gen2 Item Object to remove.", + ValueFromPipeline = true, ParameterSetName = ItemParameterSet)] + [ValidateNotNull] + public AzureDataLakeGen2Item InputObject { get; set; } + + [Parameter( + Mandatory = false, + HelpMessage = "Permissions for a blob. Permissions can be any not-empty subset of \"racwdlmeop\".")] + [ValidateNotNullOrEmpty] + public string Permission { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")] + [ValidateNotNull] + public SasProtocol? Protocol { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted by Azure Storage.")] + [ValidateNotNullOrEmpty] + public string IPAddressOrRange { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Start Time")] + [ValidateNotNull] + public DateTimeOffset? StartTime { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Expiry Time")] + [ValidateNotNull] + public DateTimeOffset? ExpiryTime { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] + public SwitchParameter FullUri { get; set; } + + // Overwrite the useless parameter + public override int? ConcurrentTaskCount { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ServerTimeoutPerRequest { get; set; } + public override string TagCondition { get; set; } + + /// + /// Initializes a new instance of the GetDataLakeGen2ItemCommand class. + /// + public NewDataLakeGen2SasTokenCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the GetDataLakeGen2ItemCommand class. + /// + /// IStorageBlobManagement channel + public NewDataLakeGen2SasTokenCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + IStorageBlobManagement localChannel = Channel; + + // When the input context is Oauth bases, can't generate normal SAS, but UserDelegationSas + bool generateUserDelegationSas = false; + if (Channel != null && Channel.StorageContext != null && Channel.StorageContext.StorageAccount.Credentials.IsToken) + { + if (ShouldProcess(this.Path, "Generate User Delegation SAS, since input Storage Context is OAuth based.")) + { + generateUserDelegationSas = true; + } + else + { + return; + } + } + + if (this.ParameterSetName == ItemParameterSet) + { + if (this.InputObject.IsDirectory) + { + this.FileSystem = this.InputObject.Directory.FileSystemName; + this.Path = this.InputObject.Directory.Path; + } + else + { + this.FileSystem = this.InputObject.File.FileSystemName; + this.Path = this.InputObject.File.Path; + } + } + + DataLakeSasBuilder sasBuilder = new DataLakeSasBuilder(); + sasBuilder.FileSystemName = this.FileSystem; + sasBuilder.Path = this.Path; + sasBuilder.SetPermissions(this.Permission, true); + if (StartTime != null) + { + sasBuilder.StartsOn = StartTime.Value.ToUniversalTime(); + } + if (ExpiryTime != null) + { + sasBuilder.ExpiresOn = ExpiryTime.Value.ToUniversalTime(); + } + else + { + if (sasBuilder.StartsOn != DateTimeOffset.MinValue) + { + sasBuilder.ExpiresOn = sasBuilder.StartsOn.AddHours(1).ToUniversalTime(); + } + else + { + sasBuilder.ExpiresOn = DateTimeOffset.UtcNow.AddHours(1); + } + } + if (this.IPAddressOrRange != null) + { + sasBuilder.IPRange = Util.SetupIPAddressOrRangeForSASTrack2(this.IPAddressOrRange); + } + if (this.Protocol != null) + { + sasBuilder.Protocol = this.Protocol.Value; + } + + DataLakeFileSystemClient fileSystem = GetFileSystemClientByName(localChannel, this.FileSystem); + + DataLakePathClient pathClient; + DataLakeFileClient fileClient; + DataLakeDirectoryClient dirClient; + if (GetExistDataLakeGen2Item(fileSystem, this.Path, out fileClient, out dirClient)) + { + // Directory + sasBuilder.IsDirectory = true; + pathClient = dirClient; + //WriteDataLakeGen2Item(localChannel, dirClient); + // sasBuilder.ToSasQueryParameters() + } + else + { + //File + sasBuilder.IsDirectory = false; + pathClient = fileClient; + //WriteDataLakeGen2Item(Channel, fileClient); + } + string sasToken = SasTokenHelper.GetDatalakeGen2SharedAccessSignature(Channel.StorageContext, sasBuilder, generateUserDelegationSas, DataLakeClientOptions, CmdletCancellationToken); + + + if (FullUri) + { + string fullUri = pathClient.Uri.ToString(); + fullUri = fullUri + "?" + sasToken; + WriteObject(fullUri); + } + else + { + WriteObject(sasToken); + } + } + } +} diff --git a/src/Storage/Storage/Storage.csproj b/src/Storage/Storage/Storage.csproj index f36e42c3eff6..1004764a728c 100644 --- a/src/Storage/Storage/Storage.csproj +++ b/src/Storage/Storage/Storage.csproj @@ -12,11 +12,11 @@ - - - - - + + + + + From d12c2ae08099e54bdad21606db537029cd09b3be Mon Sep 17 00:00:00 2001 From: "Wei Wei (AZURE)" Date: Thu, 12 May 2022 00:36:08 +0800 Subject: [PATCH 2/3] fix CI failure --- .../Storage.Management/help/New-AzDataLakeGen2SasToken.md | 4 ++-- .../Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs | 2 +- .../StaticAnalysis/Exceptions/Az.Storage/SignatureIssues.csv | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md index 9e642ba3df27..d6fb175a8379 100644 --- a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md +++ b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md @@ -12,7 +12,7 @@ Generates a SAS token for Azure DatalakeGen2 item. ## SYNTAX -### ReceiveManual +### ReceiveManual (Default) ``` New-AzDataLakeGen2SasToken [-FileSystem] [-Path ] [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] @@ -35,7 +35,7 @@ The **New-AzDataLakeGen2SasToken** cmdlet generates a Shared Access Signature (S ### Example 1: Generate a SAS token with full permission ``` -PS C:\> New-AzDataLakeGen2SasToken -FileSystem "filesystem1" -Path "dir1/dir2" -Permission racwdlmeop +PS C:\> New-AzDataLakeGen2SasToken -FileSystem "filesystem1" -Path "dir1/dir2" -Permission racwdlmeop ``` This example generates a DatalakeGen2 SAS token with full permission. diff --git a/src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs b/src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs index a2f500e81e1d..a7395a031b49 100644 --- a/src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs +++ b/src/Storage/Storage/DatalakeGen2/Cmdlet/NewAzDataLakeGen2SasToken.cs @@ -26,7 +26,7 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet /// /// list azure blobs in specified azure FileSystem /// - [Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "DataLakeGen2SasToken"), OutputType(typeof(String))] + [Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "DataLakeGen2SasToken", DefaultParameterSetName = ManualParameterSet), OutputType(typeof(String))] public class NewDataLakeGen2SasTokenCommand : StorageCloudBlobCmdletBase { /// diff --git a/tools/StaticAnalysis/Exceptions/Az.Storage/SignatureIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Storage/SignatureIssues.csv index 8f865f943b22..08784f2a1c3e 100644 --- a/tools/StaticAnalysis/Exceptions/Az.Storage/SignatureIssues.csv +++ b/tools/StaticAnalysis/Exceptions/Az.Storage/SignatureIssues.csv @@ -71,3 +71,4 @@ "Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.UpdateAzStorageFileServicePropertyCommand","Update-AzStorageFileServiceProperty","1","8410","Parameter ShareRetentionDays of cmdlet Update-AzStorageFileServiceProperty does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name." "Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.NewAzureStorageBlobInventoryPolicyRuleCommand","New-AzStorageBlobInventoryPolicyRule","1","8100","New-AzStorageBlobInventoryPolicyRule Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" "Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll","Microsoft.Azure.Commands.Management.Storage.EnableAzStorageContainerDeleteRetentionPolicyCommand","Enable-AzStorageContainerDeleteRetentionPolicy","1","8410","Parameter RetentionDays of cmdlet Enable-AzStorageContainerDeleteRetentionPolicy does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name." +"Az.Storage","Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.NewDataLakeGen2SasTokenCommand","New-AzDataLakeGen2SasToken","1","8100","New-AzDataLakeGen2SasToken Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" From 5169173d4f2e130abb25154afd7a6001d636dd4d Mon Sep 17 00:00:00 2001 From: "Wei Wei (AZURE)" Date: Thu, 12 May 2022 20:39:47 +0800 Subject: [PATCH 3/3] fix review comments --- .../Storage.Management/ChangeLog.md.bak | 620 ------------------ .../Storage.Management/help/Az.Storage.md.bak | 481 -------------- .../help/New-AzDataLakeGen2SasToken.md | 4 +- .../help/New-AzDataLakeGen2SasToken.md.bak | 238 ------- src/Storage/Storage/Storage.csproj | 2 +- 5 files changed, 3 insertions(+), 1342 deletions(-) delete mode 100644 src/Storage/Storage.Management/ChangeLog.md.bak delete mode 100644 src/Storage/Storage.Management/help/Az.Storage.md.bak delete mode 100644 src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md.bak diff --git a/src/Storage/Storage.Management/ChangeLog.md.bak b/src/Storage/Storage.Management/ChangeLog.md.bak deleted file mode 100644 index 6cd4ab3ce0f3..000000000000 --- a/src/Storage/Storage.Management/ChangeLog.md.bak +++ /dev/null @@ -1,620 +0,0 @@ - -## Upcoming Release -* Show OAuth token in debug log in debug build only - - `New-AzStorageContext` - -## Version 4.5.0 -* Supported DaysAfterLastTierChangeGreaterThan in Management Policy - - `Add-AzStorageAccountManagementPolicyAction` -* Fixed the issue that upload blob might fail on Linux [#17743] - - `Set-AzStorageBlobContent` -* Supported AllowPermanentDelete when enable blob soft delete - - `Enable-AzStorageBlobDeleteRetentionPolicy` -* Added breaking change warning message for upcoming cmdlet breaking change - - `Get-AzStorageFile` - -## Version 4.4.1 -* Fixed get blob by tag failure on Powershell 7.2.2 - - `Get-AzStorageBlobByTag` - -## Version 4.4.0 -* Updated examples in reference documentation for `Close-AzStorageFileHandle` -* Supported create storage context with customized blob, queue, file, table service endpoint - - `New-AzStorageContext` -* Fixed copy blob failure on Premium Storage account, or account enabled hierarchical namespace - - `Copy-AzStorageBlob` -* Supported create account SAS token, container SAS token, blob SAS token with EncryptionScope - - `New-AzStorageAccountSASToken` - - `New-AzStorageContainerSASToken` - - `New-AzStorageBlobSASToken` -* Supported asynchronous blob copy run on new API version - - `Start-AzStorageBlobCopy` -* Fixed IpRule examples in help - - `Add-AzStorageAccountNetworkRule` - - `Remove-AzStorageAccountNetworkRule` - - `Update-AzStorageAccountNetworkRuleSet` - -## Version 4.3.0 -* Supported download blob from managed disk account with Sas Uri and bearer token - - `Get-AzStorageBlobContent` -* Supported create/upgrade storage account with ActiveDirectorySamAccountName and ActiveDirectoryAccountType - - `New-AzStorageAccount` - - `Set-AzStorageAccount` - -## Version 4.2.0 -* Fixed the issue that output number in console when update/copy blob sometimes [#16783] - - `Set-AzStorageBlobContent` - - `Copy-AzStorageBlob` -* Updated help file, added more description for the asynchronous blob copy. - - `Start-AzStorageBlobCopy` - -## Version 4.1.1 -* Fixed the failure of sync copy blob with long destination blob name [#16628] - - `Copy-AzStorageBlob` -* Supported AAD oauth storage context in storage table cmdlets. - - `Get-AzStorageCORSRule` - - `Get-AzStorageServiceLoggingProperty` - - `Get-AzStorageServiceMetricsProperty` - - `Get-AzStorageServiceProperty` - - `Get-AzStorageTable` - - `Get-AzStorageTableStoredAccessPolicy` - - `New-AzStorageTable` - - `New-AzStorageTableSASToken` - - `New-AzStorageTableStoredAccessPolicy` - - `Remove-AzStorageCORSRule` - - `Remove-AzStorageTableStoredAccessPolicy` - - `Set-AzStorageCORSRule` - - `Set-AzStorageServiceLoggingProperty` - - `Set-AzStorageServiceMetricsProperty` - - `Set-AzStorageServiceProperty` - - `Set-AzStorageTable` - - `Set-AzStorageTableStoredAccessPolicy` - -## Version 4.1.0 -* Fixed the failure of `Get-AzStorageContainerStoredAccessPolicy` when permission is null [#15644] -* Supported create blob service Sas token or account Sas token with permission i - - `New-AzStorageBlobSASToken` - - `New-AzStorageContainerSASToken` - - `New-AzStorageAccountSASToken` -* Fixed creating container SAS token failed from an access policy without expire time, and set SAS token expire time [#16266] - - `New-AzStorageContainerSASToken` -* Removed parameter -Name from Get-AzRmStorageShare ShareResourceIdParameterSet - - `Get-AzRmStorageShare` -* Supported create or migrate container to enable immutable Storage with versioning. - - `New-AzRmStorageContainer` - - `Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration` -* Supported set/remove immutability policy on a Storage blob. - - `Set-AzStorageBlobImmutabilityPolicy` - - `Remove-AzStorageBlobImmutabilityPolicy` -* Supported enable/disable legal hold on a Storage blob. - - `Set-AzStorageBlobLegalHold` -* Supported create storage account with enable account level immutability with versioning, and create/update storage account with account level immutability policy. - - `New-AzStorageAccount` - - `Set-AzStorageAccount` - -## Version 3.12.0 -* Upgraded Azure.Storage.Blobs to 12.10.0 -* Upgraded Azure.Storage.Files.Shares to 12.8.0 -* Upgraded Azure.Storage.Files.DataLake to 12.8.0 -* Upgraded Azure.Storage.Queues to 12.8.0 -* Supported upgrade storage account to enable HierarchicalNamespace - - `Invoke-AzStorageAccountHierarchicalNamespaceUpgrade` - - `Stop-AzStorageAccountHierarchicalNamespaceUpgrade` -* Supported AccessTierInferred, Tags in blob inventory policy schema - - `New-AzStorageBlobInventoryPolicyRule` -* Supported create/update storage account with PublicNetworkAccess enabled/disabled - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Supported create/update storage blob container with RootSquash - - `New-AzRmStorageContainer` - - `Update-AzRmStorageContainer` -* Supported AllowProtectedAppendWriteAll in set container Immutability Policy, and add container LegalHold - - `Set-AzRmStorageContainerImmutabilityPolicy` - - `Add-AzRmStorageContainerLegalHold` - -## Version 3.11.0 -* Supported get/set blob tags on a specific blob - - `Get-AzStorageBlobTag` - - `Set-AzStorageBlobTag` -* Supported create destination blob with specific blob tags while upload/copy Blob - - `Set-AzStorageBlobContent` - - `Start-AzStorageBlobCopy` -* Supported list blobs across containers with a blob tag filter sql expression - - `Get-AzStorageBlobByTag` -* Supported list blobs inside a container and include Blob Tags - - `Get-AzStorageBlob` -* Supported run blob operation with blob tag condition, and fail the cmdlet when blob tag condition not match - - `Get-AzStorageBlob` - - `Get-AzStorageBlobContent` - - `Get-AzStorageBlobTag` - - `Remove-AzStorageBlob` - - `Set-AzStorageBlobContent` - - `Set-AzStorageBlobTag` - - `Start-AzStorageBlobCopy` - - `Stop-AzStorageBlobCopy` -* Generate blob sas token with new API version - - `New-AzStorageBlobSASToken` - - `New-AzStorageContainerSASToken` - - `New-AzStorageAccountSASToken` -* Fixed blob copy failure with OAuth credential when client and server has time difference [#15644] - - `Copy-AzStorageBlob` -* Fixed remove Data Lake Gen2 item fail with readonly SAS token - - `Remove-AzDataLakeGen2Item` -* Revised destination existing check in move Data Lake Gen2 item - - `Move-AzDataLakeGen2Item` - -## Version 3.10.0 -* Supported Blob Last Access Time - - `Enable-AzStorageBlobLastAccessTimeTracking` - - `Disable-AzStorageBlobLastAccessTimeTracking` - - `Add-AzStorageAccountManagementPolicyAction` -* Made `Get-AzDataLakeGen2ChildItem` list all datalake gen2 items by default, instead of needing user to list chunk by chunk. -* Fixed BlobProperties is empty issue when using sas without prefix '?' [#15460] -* Fixed synchronously copy small blob failure [#15548] - - `Copy-AzStorageBlob` - -## Version 3.9.0 -* Supported enable/disable Blob container soft delete - - `Enable-AzStorageContainerDeleteRetentionPolicy` - - `Disable-AzStorageContainerDeleteRetentionPolicy` -* Supported list deleted Blob containers - - `Get-AzRmStorageContainer` - - `Get-AzStorageContainer` -* Supported restore deleted Blob container - - `Restore-AzStorageContainer` -* Supported secure SMB setting in File service properties - - `Update-AzStorageFileServiceProperty` -* Supported create account with EnableNfsV3 - - `New-AzStorageAccount` -* Supported input more copy blob parameters from pipeline [#15301] - - `Start-AzStorageBlobCopy` - -## Version 3.8.0 -* Supported create file share with NFS/SMB enabledEnabledProtocol and RootSquash, and update share with RootSquash - - `New-AzRmStorageShare` - - `Update-AzRmStorageShare` -* Supported enable Smb Multichannel on File service - - `Update-AzStorageFileServiceProperty` -* Fixed copy inside same account issue by access source with anonymous credential, when copy Blob inside same account with Oauth credential -* Removed StorageFileDataSmbShareOwner from value set of parameter DefaultSharePermission in create/update storage account - - `New-AzStorageAccount` - - `Set-AzStorageAccount` - -## Version 3.7.0 -* Supported file share snapshot - - `New-AzRmStorageShare` - - `Get-AzRmStorageShare` - - `Remove-AzRmStorageShare` -* Supported remove file share with it's snapshot (leased and not leased), by default remove file share will fail when share has snapshot - - `Remove-AzRmStorageShare` -* Supported Set/Get/Remove blob inventory policy - - `New-AzStorageBlobInventoryPolicyRule` - - `Set-AzStorageBlobInventoryPolicy` - - `Get-AzStorageBlobInventoryPolicy` - - `Remove-AzStorageBlobInventoryPolicy` -* Supported DefaultSharePermission in create/update storage account - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Supported AllowCrossTenantReplication in create/update storage account - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Supported Set Object Replication Policy with SourceAccount/DestinationAccount as Storage account resource Id - - `Set-AzStorageObjectReplicationPolicy` -* Supported set SasExpirationPeriod as TimeSpan.Zero - - `New-AzStorageAccount` - - `Set-AzStorageAccount -* Make sure the correct account name is used when create account credential - - `New-AzStorageContext` - -## Version 3.6.0 -* Supported create/update storage account with KeyExpirationPeriod and SasExpirationPeriod - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Supported create/update storage account with keyvault encryption and access keyvault with user assigned identity - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Supported EdgeZone in create storage account - - `New-AzStorageAccount` -* Fixed an issue that delete immutable blob will prompt incorrect message. - - `Remove-AzStorageAccount` -* Allowed update Storage Account KeyVault properties by cleanup Keyversion to enable key auto rotation [#14769] - - `Set-AzStorageAccount` -* Added breaking change warning message for upcoming cmdlet breaking change - - `Remove-AzRmStorageShare` - -## Version 3.5.1 -* Fixed copy blob fail with source context as Oauth [#14662] - - `Start-AzStorageBlobCopy` - -## Version 3.5.0 -* Fixed an issue that list account from resource group won't use nextlink - - `Get-AzStorageAccount` -* Supported ChangeFeedRetentionInDays when Enable ChangeFeed on Blob service - - `Update-AzStorageBlobServiceProperty` - -## Version 3.4.0 -* Upgraded to Microsoft.Azure.Management.Storage 19.0.0, to support new API version 2021-01-01. -* Supported resource access rule in NetworkRuleSet - - `Update-AzStorageAccountNetworkRuleSet` - - `Add-AzStorageAccountNetworkRule` - - `Remove-AzStorageAccountNetworkRule` -* Supported Blob version and Append Blob type in Management Policy - - `Add-AzStorageAccountManagementPolicyAction` - - `New-AzStorageAccountManagementPolicyFilter` - - `Set-AzStorageAccountManagementPolicy` -* Supported create/update account with AllowSharedKeyAccess - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Supported create Encryption Scope with RequireInfrastructureEncryption - - `New-AzStorageEncryptionScope` -* Supported copy block blob synchronously, with encryption scope - - `Copy-AzStorageBlob` -* Fixed issue that Get-AzStorageBlobContent use wrong directory separator char on Linux and MacOS [#14234] - -## Version 3.3.0 -* Supported RoutingPreference settings in create/update Storage account - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Upgraded Azure.Storage.Blobs to 12.8.0 -* Upgraded Azure.Storage.Files.Shares to 12.6.0 -* Upgraded Azure.Storage.Files.DataLake to 12.6.0 - -## Version 3.2.1 -* Fix ContinuationToken never null when list blob with -IncludeVersion - - `Get-AzStorageBlob` - -## Version 3.2.0 -* Supported create/update/get/list EncryptionScope of a Storage account - - `New-AzStorageEncryptionScope` - - `Update-AzStorageEncryptionScope` - - `Get-AzStorageEncryptionScope` -* Supported create container and upload blob with Encryption Scope setting - - `New-AzRmStorageContainer` - - `New-AzStorageContainer` - - `Set-AzStorageBlobContent` - -## Version 3.1.0 -* Supported upload Azure File size up to 4 TiB - - `Set-AzStorageFileContent` -* Upgraded Azure.Storage.Blobs to 12.7.0 -* Upgraded Azure.Storage.Files.Shares to 12.5.0 -* Upgraded Azure.Storage.Files.DataLake to 12.5.0 -* Upgraded Azure.Storage.Queues to 12.5.0 - -## Version 3.0.0 -* Removed obsolete property RestorePolicy.LastEnabledTime - - `Enable-AzStorageBlobRestorePolicy` - - `Disable-AzStorageBlobRestorePolicy` - - `Get-AzStorageBlobServiceProperty` - - `Update-AzStorageBlobServiceProperty` -* Change Type of DaysAfterModificationGreaterThan from int to int? - - `Set-AzStorageAccountManagementPolicy` - - `Get-AzStorageAccountManagementPolicy` - - `Add-AzStorageAccountManagementPolicyAction` - - `New-AzStorageAccountManagementPolicyRule` -* Supported create/update file share with access tier - - `New-AzRmStorageShare` - - `Update-AzRmStorageShare` -* Supported set/update/remove Acl recursively on Datalake Gen2 item - - `Set-AzDataLakeGen2AclRecursive` - - `Update-AzDataLakeGen2AclRecursive` - - `Remove-AzDataLakeGen2AclRecursive` -* Supported Container access policy with new permission x,t - - `New-AzStorageContainerStoredAccessPolicy` - - `Set-AzStorageContainerStoredAccessPolicy` -* Changed the output of get/set Container access policy cmdlet, by change the child property Permission type from enum to String - - `Get-AzStorageContainerStoredAccessPolicy` - - `Set-AzStorageContainerStoredAccessPolicy` -* Fixed a sample script issue of set management policy with json - - `Set-AzStorageAccountManagementPolicy` - -## Version 2.7.0 -* Supported enable/disable/get share soft delete properties on file Service of a Storage account - - `Update-AzStorageFileServiceProperty` - - `Get-AzStorageFileServiceProperty` -* Supported list file shares include the deleted ones of a Storage account, and Get single file share usage - - `Get-AzRmStorageShare` -* Supported restore a deleted file share - - `Restore-AzRmStorageShare` -* Changed the cmdlets for modify blob service properties, won't get the original properties from server, but only set the modified properties to server. - - `Enable-AzStorageBlobDeleteRetentionPolicy` - - `Disable-AzStorageBlobDeleteRetentionPolicy` - - `Enable-AzStorageBlobRestorePolicy` - - `Disable-AzStorageBlobRestorePolicy` - - `Update-AzStorageBlobServiceProperty` -* Fixed help issue for New-AzStorageAccount parameter -Kind default value [#12189] -* Fixed issue by add example to show how to set correct ContentType in blob upload [#12989] - -## Version 2.6.0 -* Fixed upload blob fail by upgrade to Microsoft.Azure.Storage.DataMovement 2.0.0 [#12220] -* Supported Point In Time Restore - - `Enable-AzStorageBlobRestorePolicy` - - `Disable-AzStorageBlobRestorePolicy` - - `New-AzStorageBlobRangeToRestore` - - `Restore-AzStorageBlobRange` -* Supported get blob restore status of Storage account by run get-AzureRMStorageAccount with parameter -IncludeBlobRestoreStatus - - `Get-AzureRMStorageAccount` -* Added breaking change warning message for upcoming cmdlet output change - - `Get-AzStorageContainerStoredAccessPolicy` - - `Set-AzStorageContainerStoredAccessPolicy` - - `Set-AzStorageAccountManagementPolicy` - - `Get-AzStorageAccountManagementPolicy` - - `Add-AzStorageAccountManagementPolicyAction` - - `New-AzStorageAccountManagementPolicyRule` -* Upgraded Microsoft.Azure.Cosmos.Table SDK to 1.0.8 - - -## Version 2.5.0 -* Supported blob query acceleration - - `Get-AzStorageBlobQueryResult` - - `New-AzStorageBlobQueryConfig` -* Updated help file, added more description, and fixed typo - - `Start-AzStorageBlobCopy` - - `Get-AzDataLakeGen2Item` -* Fixed download blob fail when related sub directory not exist [#12592] - - `Get-AzStorageBlobContent` -* Supported Set/Get/Remove Object Replication Policy on Storage accounts - - `New-AzStorageObjectReplicationPolicyRule` - - `Set-AzStorageObjectReplicationPolicy` - - `Get-AzStorageObjectReplicationPolicy` - - `Remove-AzStorageObjectReplicationPolicy` -* Supported enable/disable ChangeFeed on Blob Service of a Storage account - - `Update-AzStorageBlobServiceProperty` - -## Version 2.4.0 -* Supported create container/blob Sas token with new permission x,t - - `New-AzStorageBlobSASToken` - - `New-AzStorageContainerSASToken` -* Supported create account Sas token with new permission x,t,f - - `New-AzStorageAccountSASToken` -* Supported get single file share usage - - `Get-AzRmStorageShare` - -## Version 2.3.0 -* Fixed the issue that UserAgent is not added for some data plane cmdlets. -* Supported create/update Storage account with MinimumTlsVersion and AllowBlobPublicAccess - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Support enable/disable versioning on Blob Service of a Storage account - - `Update-AzStorageBlobServiceProperty` -* Support list blobs with blob versions - - `Get-AzStorageBlob` -* Support get/remove single blob snapshot or blob version - - `Get-AzStorageBlob` - - `Remove-AzStorageBlob` -* Support pipeline from blob object generated from Azure.Storage.Blobs V12 - - `Get-AzStorageBlobContent` - - `New-AzStorageBlobSASToken` - - `Remove-AzStorageBlob` - - `Set-AzStorageBlobContent` - - `Start-AzStorageBlobCopy` - -## Version 2.2.0 -* Supported create Storage account with RequireInfrastructureEncryption - - `New-AzStorageAccount` -* Moved the logic of loading Azure.Core to Az.Accounts - -## Version 2.1.0 -* Updated assembly version of data plane cmdlets - -## Version 2.0.0 -* Added `-AsJob` to get/list account cmdlet `Get-AzStorageAccount` -* Make KeyVersion to optional when update Storage account with KeyvaultEncryption, to support key auto-rotation - - `Set-AzStorageAccount` -* Fixed remove Azure File Directory fail with pipeline - - `Remove-AzStorageDirectory` -* Fixed [#9880]: Change NetWorkRule DefaultAction value defination to align with swagger. - - `Update-AzStorageAccountNetworkRuleSet` - - `Get-AzStorageAccountNetworkRuleSet` -* Fixed [#11624]: Skip duplicated rules when add NetworkRules, to avoid server failure - - `Add-AzStorageAccountNetworkRule` -* Upgraded Microsoft.Azure.Cosmos.Table SDK to 1.0.7 -* Added a warning message to remind user to list again with ContinuationToken when only part items are returned in list DataLake Gen2 Items, - - `Get-AzDataLakeGen2ChildItem` -* Supported to create or update Storage account with Azure Files Active Directory Domain Service Authentication - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Supported to new or list Kerberos keys of Storage account - - `New-AzStorageAccountKey` - - `Get-AzStorageAccountKey` -* Supported failover Storage account - - `Invoke-AzStorageAccountFailover` -* Updated help of `Get-AzStorageBlobCopyState` -* Updated help of `Get-AzStorageFileCopyState` and `Start-AzStorageBlobCopy` -* Integrated Storage client library v12 to Queue and File cmdlets -* Changed output type from CloudFile to AzureStorageFile, the original output will become a child property of the new output - - `Get-AzStorageFile` - - `Remove-AzStorageFile` - - `Get-AzStorageFileContent` - - `Set-AzStorageFileContent` - - `Start-AzStorageFileCopy` -* Changed output type from CloudFileDirectory to AzureStorageFileDirectory, the original output will become a child property of the new output - - `New-AzStorageDirectory` - - `Remove-AzStorageDirectory` -* Changed output type from CloudFileShare to AzureStorageFileShare, the original output will become a child property of the new output - - `Get-AzStorageShare` - - `New-AzStorageShare` - - `Remove-AzStorageShare` -* Changed output type from FileShareProperties to AzureStorageFileShare, the original output will become a sub child property of the new output - - `Set-AzStorageShareQuota` - -## Version 1.14.0 -* Added breaking change notice for Azure File cmdlets output change in a future release -* Supported new SkuName StandardGZRS, StandardRAGZRS when create/update Storage account - - `New-AzStorageAccount` - - `Set-AzStorageAccount` -* Supported DataLake Gen2 - - `New-AzDataLakeGen2Item` - - `Get-AzDataLakeGen2Item` - - `Get-AzDataLakeGen2ChildItem` - - `Move-AzDataLakeGen2Item` - - `Set-AzDataLakeGen2ItemAclObject` - - `Update-AzDataLakeGen2Item` - - `Get-AzDataLakeGen2ItemContent` - - `Remove-AzDataLakeGen2Item` - -## Version 1.13.0 -* Supported AllowProtectedAppendWrite in ImmutabilityPolicy - - `Set-AzRmStorageContainerImmutabilityPolicy` -* Added breaking change warning message for AzureStorageTable type change in a future release - - `New-AzStorageTable` - - `Get-AzStorageTable` - -## Version 1.12.0 -* Support set Table/Queue Encryption Keytype in Create Storage Account - - New-AzRmStorageAccount -* Show RequestId when StorageException don't have ExtendedErrorInformation -* Fix the Example 6 of cmdlet Start-AzStorageBlobCopy - -## Version 1.11.0 -* Add breaking change warning message for DefaultAction Value change in a future release - - Update-AzStorageAccountNetworkRuleSet -* Support Get last sync time of Storage account by run get-AzureRMStorageAccount with parameter -IncludeGeoReplicationStats - - Get-AzureRMStorageAccount - -## Version 1.10.0 -* Update references in .psd1 to use relative path -* Support generate Blob/Constainer Idenity based SAS token with Storage Context based on Oauth authentication - - New-AzStorageContainerSASToken - - New-AzStorageBlobSASToken -* Support revoke Storage Account User Delegation Keys, so all Idenity SAS tokens are revoked - - Revoke-AzStorageAccountUserDelegationKeys -* Upgrade to Microsoft.Azure.Management.Storage 14.2.0, to support new API version 2019-06-01. -* Support Share QuotaGiB more than 5120 in Management plane File Share cmdlets, and add parameter alias "Quota" to parameter "QuotaGiB" - - New-AzRmStorageShare - - Update-AzRmStorageShare -* Add parameter alias "QuotaGiB" to parameter "Quota" - - Set-AzStorageShareQuota -* Fix the issue that Set-AzStorageContainerAcl can clean up the stored Access Policy - - Set-AzStorageContainerAcl - -## Version 1.9.0 -* Support enable Large File share when create or update Storage account - - New-AzStorageAccount - - Set-AzStorageAccount -* When close/get File handle, skip check the input path is File directory or File, to avoid failure with object in DeletePending status - - Get-AzStorageFileHandle - - Close-AzStorageFileHandle - -## Version 1.8.0 -* Upgrade Storage Client Library to 11.1.0 -* List containers with Management plane API, will list with NextPageLink - - Get-AzRmStorageContainer -* List Storage accounts from subscription, will list with NextPageLink - - Get-AzStorageAccount - -## Version 1.7.0 -* Updated example in reference documentation for `Get-AzStorageAccountKey` -* In upload/Downalod Azure File,support perserve the source File SMB properties (File Attributtes, File Creation Time, File Last Write Time) in the destination file - - Set-AzStorageFileContent - - Get-AzStorageFileContent -* Fix Upload block blob with properties/metadate fail on container enabled ImmutabilityPolicy. - - Set-AzStorageBlobContent -* Support manage Azure File shares with Management plane API - - New-AzRmStorageShare - - Get-AzRmStorageShare - - Update-AzRmStorageShare - - Remove-AzRmStorageShare - -## Version 1.6.0 -* Fixed miscellaneous typos across module -* Update help for Get/Close-AzStorageFileHandle, by add more scenarios to cmdlet examples and update parameter descriptions -* Support StandardBlobTier in upload blob and copy blob - - Set-AzStorageBlobContent - - Start-AzStorageBlobCopy -* Support Rehydrate Priority in copy blob - - Start-AzStorageBlobCopy - -## Version 1.5.1 -* Update example in reference documentation for `Get-AzStorageAccount` to use correct parameter name - -## Version 1.5.0 -* Change 2 parameters "-IndexDocument" and "-ErrorDocument404Path" from required to optional in cmdlet: - - Enable-AzStorageStaticWebsite -* Update help of Get-AzStorageBlobContent by add an example -* Show more error information when cmdlet failed with StorageException -* Support create or update Storage account with Azure Files AAD DS Authentication - - New-AzStorageAccount - - Set-AzStorageAccount -* Support list or close file handles of a file share, file directory or a file - - Get-AzStorageFileHandle - - Close-AzStorageFileHandle - -## Version 1.4.0 -* Support Kind FileStorage and SkuName Premium_ZRS when create Storage account - - New-AzStorageAccount -* Clarified description of blob immutability cmdlet - - Remove-AzRmStorageContainerImmutabilityPolicy - -## Version 1.3.0 -* Upgrade to Storage Client Library 10.0.1 (the namespace of all objects from this SDK change from "Microsoft.WindowsAzure.Storage.*" to "Microsoft.Azure.Storage.*") -* Upgrade to Microsoft.Azure.Management.Storage 11.0.0, to support new API version 2019-04-01. -* The default Storage account Kind in Create Storage account change from 'Storage' to 'StorageV2' - - New-AzStorageAccount -* Change the Storage account cmdlet output Sku.Name to be aligned with input SkuName by add '-', like "StandardLRS" change to "Standard_LRS" - - New-AzStorageAccount - - Get-AzStorageAccount - - Set-AzStorageAccount - -## Version 1.2.0 -* Report detail error when create Storage context with parameter -UseConnectedAccount, but without login Azure account - - New-AzStorageContext -* Support Manage Blob Service Properties of a specified Storage account with Management plane API - - Update-AzStorageBlobServiceProperty - - Get-AzStorageBlobServiceProperty - - Enable-AzStorageBlobDeleteRetentionPolicy - - Disable-AzStorageBlobDeleteRetentionPolicy -* -AsJob support for Blob and file upload and download cmdlets - - Get-AzStorageBlobContent - - Set-AzStorageBlobContent - - Get-AzStorageFileContent - - Set-AzStorageFileContent - -## Version 1.1.0 -* Support Get/Set/Remove Management Policy on a Storage account - - Set-AzStorageAccountManagementPolicy - - Get-AzStorageAccountManagementPolicy - - Remove-AzStorageAccountManagementPolicy - - Add-AzStorageAccountManagementPolicyAction - - New-AzStorageAccountManagementPolicyFilter - - New-AzStorageAccountManagementPolicyRule - -## Version 1.0.4 -* Upgrade to Storage Client Library 9.4.2 and Microsoft.Azure.Cosmos.Table 0.10.1-preview - -## Version 1.0.3 -* Support Kind BlockBlobStorage when create Storage account - - New-AzStorageAccount - -## Version 1.0.2 -* Update incorrect online help URLs -* Give detail error message when get/set classic Logging/Metric on Premium Storage Account, since Premium Storage Account not supoort classic Logging/Metric. - - Get/Set-AzStorageServiceLoggingProperty - - Get/Set-AzStorageServiceMetricsProperty - -## Version 1.0.1 -* Set the StorageAccountName of Storage context as the real Storage Account Name, when it's created with Sas Token, OAuth or Anonymous - - New-AzStorageContext -* Create Sas Token of Blob Snapshot Object with '-FullUri' parameter, fix the returned Uri to be the sanpshot Uri - - New-AzStorageBlobSASToken - -## Version 1.0.0 -* General availability of `Az.Storage` module diff --git a/src/Storage/Storage.Management/help/Az.Storage.md.bak b/src/Storage/Storage.Management/help/Az.Storage.md.bak deleted file mode 100644 index 6315e7b77c7d..000000000000 --- a/src/Storage/Storage.Management/help/Az.Storage.md.bak +++ /dev/null @@ -1,481 +0,0 @@ ---- -Module Name: Az.Storage -Module Guid: da67eaa7-4cb1-4bfa-a194-8bf3faae8ac5 -Download Help Link: https://docs.microsoft.com/powershell/module/az.storage -Help Version: 4.2.3.0 -Locale: en-US ---- - -# Az.Storage Module -## Description -This topic displays help topics for the Azure Storage Management Cmdlets. - -## Az.Storage Cmdlets -### [Add-AzRmStorageContainerLegalHold](Add-AzRmStorageContainerLegalHold.md) -Adds legal hold tags to a Storage blob container - -### [Add-AzStorageAccountManagementPolicyAction](Add-AzStorageAccountManagementPolicyAction.md) -Adds an action to the input ManagementPolicy Action Group object, or creates a ManagementPolicy Action Group object with the action. The object can be used in New-AzStorageAccountManagementPolicyRule. - -### [Add-AzStorageAccountNetworkRule](Add-AzStorageAccountNetworkRule.md) - Add IpRules or VirtualNetworkRules to the NetworkRule property of a Storage account - -### [Close-AzStorageFileHandle](Close-AzStorageFileHandle.md) -Closes file handles of a file share, a file directory or a file. - -### [Copy-AzStorageBlob](Copy-AzStorageBlob.md) -Copy a blob synchronously. - -### [Disable-AzStorageBlobDeleteRetentionPolicy](Disable-AzStorageBlobDeleteRetentionPolicy.md) -Disable delete retention policy for the Azure Storage Blob service. - -### [Disable-AzStorageBlobLastAccessTimeTracking](Disable-AzStorageBlobLastAccessTimeTracking.md) -Disable last access time tracking for the Azure Storage Blob service. - -### [Disable-AzStorageBlobRestorePolicy](Disable-AzStorageBlobRestorePolicy.md) -Disables Blob Restore Policy on a Storage account. - -### [Disable-AzStorageContainerDeleteRetentionPolicy](Disable-AzStorageContainerDeleteRetentionPolicy.md) -Disable delete retention policy for Azure Storage blob containers. - -### [Disable-AzStorageDeleteRetentionPolicy](Disable-AzStorageDeleteRetentionPolicy.md) -Disable delete retention policy for the Azure Storage Blob service. - -### [Disable-AzStorageStaticWebsite](Disable-AzStorageStaticWebsite.md) -Disable static website for the Azure Storage account. - -### [Enable-AzStorageBlobDeleteRetentionPolicy](Enable-AzStorageBlobDeleteRetentionPolicy.md) -Enable delete retention policy for the Azure Storage Blob service. - -### [Enable-AzStorageBlobLastAccessTimeTracking](Enable-AzStorageBlobLastAccessTimeTracking.md) -Enable last access time tracking for the Azure Storage Blob service. - -### [Enable-AzStorageBlobRestorePolicy](Enable-AzStorageBlobRestorePolicy.md) -Enables Blob Restore Policy on a Storage account. - -### [Enable-AzStorageContainerDeleteRetentionPolicy](Enable-AzStorageContainerDeleteRetentionPolicy.md) -Enable delete retention policy for Azure Storage blob containers. - -### [Enable-AzStorageDeleteRetentionPolicy](Enable-AzStorageDeleteRetentionPolicy.md) -Enable delete retention policy for the Azure Storage Blob service. - -### [Enable-AzStorageStaticWebsite](Enable-AzStorageStaticWebsite.md) -Enable static website for the Azure Storage account. - -### [Get-AzDataLakeGen2ChildItem](Get-AzDataLakeGen2ChildItem.md) -Lists sub directorys and files from a directory or filesystem root. - -### [Get-AzDataLakeGen2Item](Get-AzDataLakeGen2Item.md) -Gets the details of a file or directory in a filesystem. - -### [Get-AzDataLakeGen2ItemContent](Get-AzDataLakeGen2ItemContent.md) -Download a file. - -### [Get-AzRmStorageContainer](Get-AzRmStorageContainer.md) -Gets or lists Storage blob containers - -### [Get-AzRmStorageContainerImmutabilityPolicy](Get-AzRmStorageContainerImmutabilityPolicy.md) -Gets ImmutabilityPolicy of a Storage blob containers - -### [Get-AzRmStorageShare](Get-AzRmStorageShare.md) -Gets or lists Storage file shares. - -### [Get-AzStorageAccount](Get-AzStorageAccount.md) -Gets a Storage account. - -### [Get-AzStorageAccountKey](Get-AzStorageAccountKey.md) -Gets the access keys for an Azure Storage account. - -### [Get-AzStorageAccountManagementPolicy](Get-AzStorageAccountManagementPolicy.md) -Gets the management policy of an Azure Storage account. - -### [Get-AzStorageAccountNameAvailability](Get-AzStorageAccountNameAvailability.md) -Checks the availability of a Storage account name. - -### [Get-AzStorageAccountNetworkRuleSet](Get-AzStorageAccountNetworkRuleSet.md) -Get the NetWorkRule property of a Storage account - -### [Get-AzStorageBlob](Get-AzStorageBlob.md) -Lists blobs in a container. - -### [Get-AzStorageBlobByTag](Get-AzStorageBlobByTag.md) -Lists blobs in a storage account across containers, with a blob tag filter sql expression. - -### [Get-AzStorageBlobContent](Get-AzStorageBlobContent.md) -Downloads a storage blob. - -### [Get-AzStorageBlobCopyState](Get-AzStorageBlobCopyState.md) -Gets the copy status of an Azure Storage blob. - -### [Get-AzStorageBlobInventoryPolicy](Get-AzStorageBlobInventoryPolicy.md) -Gets blob inventory policy from a Storage account. - -### [Get-AzStorageBlobQueryResult](Get-AzStorageBlobQueryResult.md) -Applies a simple Structured Query Language (SQL) statement on a blob's contents and save only the queried subset of the data to a local file. - -### [Get-AzStorageBlobServiceProperty](Get-AzStorageBlobServiceProperty.md) -Gets service properties for Azure Storage Blob services. - -### [Get-AzStorageBlobTag](Get-AzStorageBlobTag.md) -Get blob tags of a specific blob. - -### [Get-AzStorageContainer](Get-AzStorageContainer.md) -Lists the storage containers. - -### [Get-AzStorageContainerStoredAccessPolicy](Get-AzStorageContainerStoredAccessPolicy.md) -Gets the stored access policy or policies for an Azure storage container. - -### [Get-AzStorageCORSRule](Get-AzStorageCORSRule.md) -Gets CORS rules for a Storage service type. - -### [Get-AzStorageEncryptionScope](Get-AzStorageEncryptionScope.md) -Get or list encryption scopes from a Storage account. - -### [Get-AzStorageFile](Get-AzStorageFile.md) -Lists directories and files for a path. - -### [Get-AzStorageFileContent](Get-AzStorageFileContent.md) -Downloads the contents of a file. - -### [Get-AzStorageFileCopyState](Get-AzStorageFileCopyState.md) -Gets the state of a copy operation. - -### [Get-AzStorageFileHandle](Get-AzStorageFileHandle.md) -Lists file handles of a file share, a file directory or a file. - -### [Get-AzStorageFileServiceProperty](Get-AzStorageFileServiceProperty.md) -Gets service properties for Azure Storage File services. - -### [Get-AzStorageObjectReplicationPolicy](Get-AzStorageObjectReplicationPolicy.md) -Gets or lists object replication policy of a Storage account. - -### [Get-AzStorageQueue](Get-AzStorageQueue.md) -Lists storage queues. - -### [Get-AzStorageQueueStoredAccessPolicy](Get-AzStorageQueueStoredAccessPolicy.md) -Gets the stored access policy or policies for an Azure storage queue. - -### [Get-AzStorageServiceLoggingProperty](Get-AzStorageServiceLoggingProperty.md) -Gets logging properties for Azure Storage services. - -### [Get-AzStorageServiceMetricsProperty](Get-AzStorageServiceMetricsProperty.md) -Gets metrics properties for the Azure Storage service. - -### [Get-AzStorageServiceProperty](Get-AzStorageServiceProperty.md) -Gets properties for Azure Storage services. - -### [Get-AzStorageShare](Get-AzStorageShare.md) -Gets a list of file shares. - -### [Get-AzStorageShareStoredAccessPolicy](Get-AzStorageShareStoredAccessPolicy.md) -Gets stored access policies for a Storage share. - -### [Get-AzStorageTable](Get-AzStorageTable.md) -Lists the storage tables. - -### [Get-AzStorageTableStoredAccessPolicy](Get-AzStorageTableStoredAccessPolicy.md) -Gets the stored access policy or policies for an Azure storage table. - -### [Get-AzStorageUsage](Get-AzStorageUsage.md) -Gets the Storage resource usage of the current subscription. - -### [Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration](Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration.md) -Migrate an existing Storage blob containers to enable immutable Storage with versioning. - -### [Invoke-AzStorageAccountFailover](Invoke-AzStorageAccountFailover.md) -Invokes failover of a Storage account. - -### [Invoke-AzStorageAccountHierarchicalNamespaceUpgrade](Invoke-AzStorageAccountHierarchicalNamespaceUpgrade.md) -Validates if a storage account can be upgraded to enable HierarchicalNamespace, or upgrades a Storage account to enabled HierarchicalNamespace. - -### [Lock-AzRmStorageContainerImmutabilityPolicy](Lock-AzRmStorageContainerImmutabilityPolicy.md) -Locks ImmutabilityPolicy of a Storage blob containers - -### [Move-AzDataLakeGen2Item](Move-AzDataLakeGen2Item.md) -Move a file or directory to another a file or directory in same Storage account. - -### [New-AzDataLakeGen2Item](New-AzDataLakeGen2Item.md) -Create a file or directory in a filesystem. - -### [New-AzDataLakeGen2SasToken](New-AzDataLakeGen2SasToken.md) -{{ Fill in the Synopsis }} - -### [New-AzRmStorageContainer](New-AzRmStorageContainer.md) -Creates a Storage blob container - -### [New-AzRmStorageShare](New-AzRmStorageShare.md) -Creates a Storage file share. - -### [New-AzStorageAccount](New-AzStorageAccount.md) -Creates a Storage account. - -### [New-AzStorageAccountKey](New-AzStorageAccountKey.md) -Regenerates a storage key for an Azure Storage account. - -### [New-AzStorageAccountManagementPolicyFilter](New-AzStorageAccountManagementPolicyFilter.md) -Creates a ManagementPolicy rule filter object, which can be used in New-AzStorageAccountManagementPolicyRule. - -### [New-AzStorageAccountManagementPolicyRule](New-AzStorageAccountManagementPolicyRule.md) -Creates a ManagementPolicy rule object, which can be used in Set-AzStorageAccountManagementPolicy. - -### [New-AzStorageAccountSASToken](New-AzStorageAccountSASToken.md) -Creates an account-level SAS token. - -### [New-AzStorageBlobInventoryPolicyRule](New-AzStorageBlobInventoryPolicyRule.md) -Creates a blob inventory policy rule object, which can be used in Set-AzStorageBlobInventoryPolicy. - -### [New-AzStorageBlobQueryConfig](New-AzStorageBlobQueryConfig.md) -Creates a blob query configuration object, which can be used in Get-AzStorageBlobQueryResult. - -### [New-AzStorageBlobRangeToRestore](New-AzStorageBlobRangeToRestore.md) -Creates a Blob Range object to restores a Storage account. - -### [New-AzStorageBlobSASToken](New-AzStorageBlobSASToken.md) -Generates a SAS token for an Azure storage blob. - -### [New-AzStorageContainer](New-AzStorageContainer.md) -Creates an Azure storage container. - -### [New-AzStorageContainerSASToken](New-AzStorageContainerSASToken.md) -Generates an SAS token for an Azure storage container. - -### [New-AzStorageContainerStoredAccessPolicy](New-AzStorageContainerStoredAccessPolicy.md) -Creates a stored access policy for an Azure storage container. - -### [New-AzStorageContext](New-AzStorageContext.md) -Creates an Azure Storage context. - -### [New-AzStorageDirectory](New-AzStorageDirectory.md) -Creates a directory. - -### [New-AzStorageEncryptionScope](New-AzStorageEncryptionScope.md) -Creates an encryption scope for a Storage account. - -### [New-AzStorageFileSASToken](New-AzStorageFileSASToken.md) -Generates a shared access signature token for a Storage file. - -### [New-AzStorageObjectReplicationPolicyRule](New-AzStorageObjectReplicationPolicyRule.md) -Creates an object replication policy rule. - -### [New-AzStorageQueue](New-AzStorageQueue.md) -Creates a storage queue. - -### [New-AzStorageQueueSASToken](New-AzStorageQueueSASToken.md) -Generates a shared access signature token for an Azure storage queue. - -### [New-AzStorageQueueStoredAccessPolicy](New-AzStorageQueueStoredAccessPolicy.md) -Creates a stored access policy for an Azure storage queue. - -### [New-AzStorageShare](New-AzStorageShare.md) -Creates a file share. - -### [New-AzStorageShareSASToken](New-AzStorageShareSASToken.md) -Generate Shared Access Signature token for Azure Storage share. - -### [New-AzStorageShareStoredAccessPolicy](New-AzStorageShareStoredAccessPolicy.md) -Creates a stored access policy on a Storage share. - -### [New-AzStorageTable](New-AzStorageTable.md) -Creates a storage table. - -### [New-AzStorageTableSASToken](New-AzStorageTableSASToken.md) -Generates an SAS token for an Azure Storage table. - -### [New-AzStorageTableStoredAccessPolicy](New-AzStorageTableStoredAccessPolicy.md) -Creates a stored access policy for an Azure storage table. - -### [Remove-AzDataLakeGen2AclRecursive](Remove-AzDataLakeGen2AclRecursive.md) -Remove ACL recursively on the specified path. - -### [Remove-AzDataLakeGen2Item](Remove-AzDataLakeGen2Item.md) -Remove a file or directory. - -### [Remove-AzRmStorageContainer](Remove-AzRmStorageContainer.md) -Removes a Storage blob container - -### [Remove-AzRmStorageContainerImmutabilityPolicy](Remove-AzRmStorageContainerImmutabilityPolicy.md) -Removes ImmutabilityPolicy of a Storage blob container with an unlocked policy - -### [Remove-AzRmStorageContainerLegalHold](Remove-AzRmStorageContainerLegalHold.md) -Removes legal hold tags from a Storage blob container - -### [Remove-AzRmStorageShare](Remove-AzRmStorageShare.md) -Removes a Storage file share. - -### [Remove-AzStorageAccount](Remove-AzStorageAccount.md) -Removes a Storage account from Azure. - -### [Remove-AzStorageAccountManagementPolicy](Remove-AzStorageAccountManagementPolicy.md) -Removes the management policy of an Azure Storage account. - -### [Remove-AzStorageAccountNetworkRule](Remove-AzStorageAccountNetworkRule.md) -Remove IpRules or VirtualNetworkRules from the NetWorkRule property of a Storage account - -### [Remove-AzStorageBlob](Remove-AzStorageBlob.md) -Removes the specified storage blob. - -### [Remove-AzStorageBlobImmutabilityPolicy](Remove-AzStorageBlobImmutabilityPolicy.md) -Removes ImmutabilityPolicy of a Storage blob. - -### [Remove-AzStorageBlobInventoryPolicy](Remove-AzStorageBlobInventoryPolicy.md) -Removes blob inventory policy from a Storage account. - -### [Remove-AzStorageContainer](Remove-AzStorageContainer.md) -Removes the specified storage container. - -### [Remove-AzStorageContainerStoredAccessPolicy](Remove-AzStorageContainerStoredAccessPolicy.md) -Removes a stored access policy from an Azure storage container. - -### [Remove-AzStorageCORSRule](Remove-AzStorageCORSRule.md) -Removes CORS for a Storage service. - -### [Remove-AzStorageDirectory](Remove-AzStorageDirectory.md) -Deletes a directory. - -### [Remove-AzStorageFile](Remove-AzStorageFile.md) -Deletes a file. - -### [Remove-AzStorageObjectReplicationPolicy](Remove-AzStorageObjectReplicationPolicy.md) -Removes the specified object replication policy from a Storage account. - -### [Remove-AzStorageQueue](Remove-AzStorageQueue.md) -Removes a storage queue. - -### [Remove-AzStorageQueueStoredAccessPolicy](Remove-AzStorageQueueStoredAccessPolicy.md) -Removes a stored access policy from an Azure storage queue. - -### [Remove-AzStorageShare](Remove-AzStorageShare.md) -Deletes a file share. - -### [Remove-AzStorageShareStoredAccessPolicy](Remove-AzStorageShareStoredAccessPolicy.md) -Removes a stored access policy from a Storage share. - -### [Remove-AzStorageTable](Remove-AzStorageTable.md) -Removes a storage table. - -### [Remove-AzStorageTableStoredAccessPolicy](Remove-AzStorageTableStoredAccessPolicy.md) -Removes a stored access policy from an Azure storage table. - -### [Restore-AzRmStorageShare](Restore-AzRmStorageShare.md) -Restores a deleted file share. - -### [Restore-AzStorageBlobRange](Restore-AzStorageBlobRange.md) -Restores a Storage account for specific blob ranges. - -### [Restore-AzStorageContainer](Restore-AzStorageContainer.md) -Restores a previously deleted Azure storage blob container. - -### [Revoke-AzStorageAccountUserDelegationKeys](Revoke-AzStorageAccountUserDelegationKeys.md) -Revoke all User Delegation keys of a Storage account. - -### [Set-AzCurrentStorageAccount](Set-AzCurrentStorageAccount.md) -Modifies the current Storage account of the specified subscription. - -### [Set-AzDataLakeGen2AclRecursive](Set-AzDataLakeGen2AclRecursive.md) -Set ACL recursively on the specified path. - -### [Set-AzDataLakeGen2ItemAclObject](Set-AzDataLakeGen2ItemAclObject.md) -Creates/Updates a DataLake gen2 item ACL object, which can be used in Update-AzDataLakeGen2Item cmdlet. - -### [Set-AzRmStorageContainerImmutabilityPolicy](Set-AzRmStorageContainerImmutabilityPolicy.md) -Creates or updates ImmutabilityPolicy of a Storage blob containers - -### [Set-AzStorageAccount](Set-AzStorageAccount.md) -Modifies a Storage account. - -### [Set-AzStorageAccountManagementPolicy](Set-AzStorageAccountManagementPolicy.md) -Creates or modifies the management policy of an Azure Storage account. - -### [Set-AzStorageBlobContent](Set-AzStorageBlobContent.md) -Uploads a local file to an Azure Storage blob. - -### [Set-AzStorageBlobImmutabilityPolicy](Set-AzStorageBlobImmutabilityPolicy.md) -Creates or updates ImmutabilityPolicy of a Storage blob. - -### [Set-AzStorageBlobInventoryPolicy](Set-AzStorageBlobInventoryPolicy.md) -Creates or updates blob inventory policy in a Storage account. - -### [Set-AzStorageBlobLegalHold](Set-AzStorageBlobLegalHold.md) -Enables or disables legal hold on a Storage blob. - -### [Set-AzStorageBlobTag](Set-AzStorageBlobTag.md) -Set blob tags of a specific blob. - -### [Set-AzStorageContainerAcl](Set-AzStorageContainerAcl.md) -Sets the public access permission to a storage container. - -### [Set-AzStorageContainerStoredAccessPolicy](Set-AzStorageContainerStoredAccessPolicy.md) -Sets a stored access policy for an Azure storage container. - -### [Set-AzStorageCORSRule](Set-AzStorageCORSRule.md) -Sets the CORS rules for a type of Storage service. - -### [Set-AzStorageFileContent](Set-AzStorageFileContent.md) -Uploads the contents of a file. - -### [Set-AzStorageObjectReplicationPolicy](Set-AzStorageObjectReplicationPolicy.md) -Creates or updates the specified object replication policy in a Storage account. - -### [Set-AzStorageQueueStoredAccessPolicy](Set-AzStorageQueueStoredAccessPolicy.md) -Sets a stored access policy for an Azure storage queue. - -### [Set-AzStorageServiceLoggingProperty](Set-AzStorageServiceLoggingProperty.md) -Modifies logging for Azure Storage services. - -### [Set-AzStorageServiceMetricsProperty](Set-AzStorageServiceMetricsProperty.md) -Modifies metrics properties for the Azure Storage service. - -### [Set-AzStorageShareQuota](Set-AzStorageShareQuota.md) -Sets the storage capacity for a share. - -### [Set-AzStorageShareStoredAccessPolicy](Set-AzStorageShareStoredAccessPolicy.md) -Updates a stored access policy on a Storage share. - -### [Set-AzStorageTableStoredAccessPolicy](Set-AzStorageTableStoredAccessPolicy.md) -Sets the stored access policy for an Azure storage table. - -### [Start-AzStorageBlobCopy](Start-AzStorageBlobCopy.md) -Starts to copy a blob. - -### [Start-AzStorageBlobIncrementalCopy](Start-AzStorageBlobIncrementalCopy.md) -Start an Incremental copy operation from a Page blob snapshot to the specified destination Page blob. - -### [Start-AzStorageFileCopy](Start-AzStorageFileCopy.md) -Starts to copy a source file. - -### [Stop-AzStorageAccountHierarchicalNamespaceUpgrade](Stop-AzStorageAccountHierarchicalNamespaceUpgrade.md) -Aborts an ongoing HierarchicalNamespace upgrade task on a storage account. - -### [Stop-AzStorageBlobCopy](Stop-AzStorageBlobCopy.md) -Stops a copy operation. - -### [Stop-AzStorageFileCopy](Stop-AzStorageFileCopy.md) -Stops a copy operation to the specified destination file. - -### [Update-AzDataLakeGen2AclRecursive](Update-AzDataLakeGen2AclRecursive.md) -Update ACL recursively on the specified path. - -### [Update-AzDataLakeGen2Item](Update-AzDataLakeGen2Item.md) -Update a file or directory on properties, metadata, permission, ACL, and owner. - -### [Update-AzRmStorageContainer](Update-AzRmStorageContainer.md) -Modifies a Storage blob container - -### [Update-AzRmStorageShare](Update-AzRmStorageShare.md) -Modifies a Storage file share. - -### [Update-AzStorageAccountNetworkRuleSet](Update-AzStorageAccountNetworkRuleSet.md) -Update the NetworkRule property of a Storage account - -### [Update-AzStorageBlobServiceProperty](Update-AzStorageBlobServiceProperty.md) -Modifies the service properties for the Azure Storage Blob service. - -### [Update-AzStorageEncryptionScope](Update-AzStorageEncryptionScope.md) -Modify an encryption scope for a Storage account. - -### [Update-AzStorageFileServiceProperty](Update-AzStorageFileServiceProperty.md) -Modifies the service properties for the Azure Storage File service. - -### [Update-AzStorageServiceProperty](Update-AzStorageServiceProperty.md) -Modifies the properties for the Azure Storage service. - diff --git a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md index d6fb175a8379..15d3be3a4281 100644 --- a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md +++ b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md @@ -35,14 +35,14 @@ The **New-AzDataLakeGen2SasToken** cmdlet generates a Shared Access Signature (S ### Example 1: Generate a SAS token with full permission ``` -PS C:\> New-AzDataLakeGen2SasToken -FileSystem "filesystem1" -Path "dir1/dir2" -Permission racwdlmeop +New-AzDataLakeGen2SasToken -FileSystem "filesystem1" -Path "dir1/dir2" -Permission racwdlmeop ``` This example generates a DatalakeGen2 SAS token with full permission. ### Example 2: Generate a SAS token with specific StartTime, ExpireTime, Protocal, IPAddressOrRange, by pipeline a datalakegen2 item ``` -PS C:\> Get-AzDataLakeGen2Item -FileSystem test -Path "testdir/dir2" | New-AzDataLakeGen2SasToken -Permission rw -Protocol Https -IPAddressOrRange 10.0.0.0-12.10.0.0 -StartTime (Get-Date) -ExpiryTime (Get-Date).AddDays(6) +Get-AzDataLakeGen2Item -FileSystem test -Path "testdir/dir2" | New-AzDataLakeGen2SasToken -Permission rw -Protocol Https -IPAddressOrRange 10.0.0.0-12.10.0.0 -StartTime (Get-Date) -ExpiryTime (Get-Date).AddDays(6) ``` This example generates a DatalakeGen2 SAS token by pipeline a datalake gen2 item, and with specific StartTime, ExpireTime, Protocal, IPAddressOrRange. diff --git a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md.bak b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md.bak deleted file mode 100644 index b63cea252ed0..000000000000 --- a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md.bak +++ /dev/null @@ -1,238 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Storage.dll-Help.xml -Module Name: Az.Storage -online version: https://docs.microsoft.com/powershell/module/az.storage/new-azdatalakegen2sastoken -schema: 2.0.0 ---- - -# New-AzDataLakeGen2SasToken - -## SYNOPSIS -Generates a SAS token for Azure DatalakeGen2 item. - -## SYNTAX - -### ReceiveManual -``` -New-AzDataLakeGen2SasToken [-FileSystem] [-Path ] [-Permission ] - [-Protocol ] [-IPAddressOrRange ] [-StartTime ] - [-ExpiryTime ] [-FullUri] [-Context ] - [-DefaultProfile ] [] -``` - -### ItemPipeline -``` -New-AzDataLakeGen2SasToken -InputObject [-Permission ] - [-Protocol ] [-IPAddressOrRange ] [-StartTime ] - [-ExpiryTime ] [-FullUri] [-Context ] - [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **New-AzDataLakeGen2SasToken** cmdlet generates a Shared Access Signature (SAS) token for an Azure DatalakeGen2 item. - -## EXAMPLES - -### Example 1: Generate a SAS token with full permission -``` -PS C:\> New-AzDataLakeGen2SasToken -FileSystem "filesystem1" -Path "dir1/dir2" -Permission racwdlmeop -``` - -This example generates a DatalakeGen2 SAS token with full permission. - -### Example 2: Generate a SAS token with specific StartTime, ExpireTime, Protocal, IPAddressOrRange -``` -PS C:\> New-AzDataLakeGen2SasToken -FileSystem test -Path "testdir/dir2" -Permission rw -Protocol Https -IPAddressOrRange 10.0.0.0-12.10.0.0 -StartTime (Get-Date) -ExpiryTime (Get-Date).AddDays(6) -``` - -This example generates a DatalakeGen2 SAS token with specific StartTime, ExpireTime, Protocal, IPAddressOrRange. - -## PARAMETERS - -### -Context -Azure Storage Context Object - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExpiryTime -Expiry Time - -```yaml -Type: System.Nullable`1[System.DateTimeOffset] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FileSystem -FileSystem name - -```yaml -Type: System.String -Parameter Sets: ReceiveManual -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -FullUri -Display full uri with sas token - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Azure Datalake Gen2 Item Object to remove. - -```yaml -Type: Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureDataLakeGen2Item -Parameter Sets: ItemPipeline -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -IPAddressOrRange -IP, or IP range ACL (access control list) that the request would be accepted by Azure Storage. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path -The path in the specified FileSystem that should be retrieved. -Can be a file or directory In the format 'directory/file.txt' or 'directory1/directory2/'. -Skip set this parameter to get the root directory of the Filesystem. - -```yaml -Type: System.String -Parameter Sets: ReceiveManual -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Permission -Permissions for a blob. -Permissions can be any not-empty subset of "racwdlmeop". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Protocol -Protocol can be used in the request with this SAS token. - -```yaml -Type: System.Nullable`1[Azure.Storage.Sas.SasProtocol] -Parameter Sets: (All) -Aliases: -Accepted values: None, HttpsAndHttp, Https - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -StartTime -Start Time - -```yaml -Type: System.Nullable`1[System.DateTimeOffset] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String - -### Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel.AzureDataLakeGen2Item - -### Microsoft.Azure.Commands.Common.Authentication.Abstractions.IStorageContext - -## OUTPUTS - -### System.String - -## NOTES - -## RELATED LINKS diff --git a/src/Storage/Storage/Storage.csproj b/src/Storage/Storage/Storage.csproj index 1004764a728c..40dcb9c26faa 100644 --- a/src/Storage/Storage/Storage.csproj +++ b/src/Storage/Storage/Storage.csproj @@ -12,7 +12,7 @@ - +