diff --git a/AzurePowershell.Test.targets b/AzurePowershell.Test.targets index 1a0ecf86db9f..4cc8b79843ee 100644 --- a/AzurePowershell.Test.targets +++ b/AzurePowershell.Test.targets @@ -29,7 +29,7 @@ .\src\ServiceManagement\Compute\Commands.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Test.dll .\src\ServiceManagement\Sql\Commands.SqlDatabase.Test\bin\Debug\Microsoft.WindowsAzure.Commands.SqlDatabase.Test.dll .\src\ServiceManagement\HDInsight\Commands.HDInsight.Test\bin\Debug\Microsoft.WindowsAzure.Commands.HDInsight.Test.dll - .\src\Common\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll + .\src\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll .\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll .\src\ResourceManager\DataLakeAnalytics\Commands.DataLakeAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.DataLakeAnalytics.Test.dll .\src\ResourceManager\DataLakeStore\Commands.DataLakeStore.Test\bin\Debug\Microsoft.Azure.Commands.DataLakeStore.Test.dll diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi index f6ddfaf6dd25..9b6b76bfbb7b 100644 --- a/setup/azurecmdfiles.wxi +++ b/setup/azurecmdfiles.wxi @@ -4403,12 +4403,6 @@ - - - - - - @@ -4496,18 +4490,6 @@ - - - - - - - - - - - - @@ -4550,9 +4532,6 @@ - - - @@ -6274,8 +6253,6 @@ - - @@ -6305,10 +6282,6 @@ - - - - @@ -6323,7 +6296,6 @@ - diff --git a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj index f28faf21738e..f946a3106b8a 100644 --- a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj +++ b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj @@ -165,6 +165,11 @@ True Resources.resx + + + + + diff --git a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBase.cs similarity index 87% rename from src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs rename to src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBase.cs index b680e3868b46..c77151c42e56 100644 --- a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBase.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { using System; using Microsoft.WindowsAzure.Commands.Common.Storage; diff --git a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBlob.cs similarity index 97% rename from src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs rename to src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBlob.cs index 9f543247e790..de012bd9c00a 100644 --- a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageBlob.cs @@ -12,7 +12,7 @@ // limitations under the License. // --------------------------------------------------------------------------------- -namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { using System; using Microsoft.WindowsAzure.Storage.Blob; diff --git a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageContainer.cs similarity index 97% rename from src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs rename to src/Common/Commands.Common.Storage/ResourceModel/AzureStorageContainer.cs index 8fed95c6e57a..3b1a6b0f554a 100644 --- a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageContainer.cs @@ -12,7 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { using System; using Microsoft.WindowsAzure.Storage.Blob; diff --git a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageQueue.cs similarity index 96% rename from src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs rename to src/Common/Commands.Common.Storage/ResourceModel/AzureStorageQueue.cs index 55e9d9d0bfeb..b43f9bb34a88 100644 --- a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageQueue.cs @@ -12,7 +12,7 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { using System; using Microsoft.WindowsAzure.Storage.Queue; diff --git a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageTable.cs similarity index 95% rename from src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs rename to src/Common/Commands.Common.Storage/ResourceModel/AzureStorageTable.cs index e659989cbc6f..b503e6f98ed7 100644 --- a/src/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs +++ b/src/Common/Commands.Common.Storage/ResourceModel/AzureStorageTable.cs @@ -12,7 +12,7 @@ // limitations under the License. // --------------------------------------------------------------------------------- -namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +namespace Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel { using System; using Microsoft.WindowsAzure.Storage.Table; diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs index bc67f44b47e8..40dda3ceda77 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs @@ -22,19 +22,30 @@ namespace Microsoft.Azure.Commands.Management.Storage [Cmdlet(VerbsCommon.Get, StorageAccountNounStr), OutputType(typeof(PSStorageAccount))] public class GetAzureStorageAccountCommand : StorageAccountBaseCmdlet { + protected const string ResourceGroupParameterSet = "ResourceGroupParameterSet"; + protected const string AccountNameParameterSet = "AccountNameParameterSet"; + [Parameter( Position = 0, Mandatory = false, + ParameterSetName = ResourceGroupParameterSet, ValueFromPipelineByPropertyName = true, - HelpMessage = "Resource Group StorageAccountName.")] + HelpMessage = "Resource Group Name.")] + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = AccountNameParameterSet, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Resource Group Name.")] [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } [Parameter( Position = 1, - Mandatory = false, + Mandatory = true, ValueFromPipelineByPropertyName = true, - HelpMessage = "Storage Account StorageAccountName.")] + ParameterSetName = AccountNameParameterSet, + HelpMessage = "Storage Account Name.")] [Alias(StorageAccountNameAlias, AccountNameAlias)] [ValidateNotNullOrEmpty] public string Name { get; set; } diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs index 7dde7bf5de46..53dd4b00aeb1 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs @@ -38,10 +38,11 @@ public class SetAzureRmCurrentStorageAccount : StorageAccountBaseCmdlet [ValidateNotNullOrEmpty] public string ResourceGroupName { get; set; } - [Parameter(Mandatory=true, ParameterSetName=ResourceNameParameterSet, + [Parameter(Mandatory=true, ParameterSetName=ResourceNameParameterSet, ValueFromPipelineByPropertyName = true)] + [Alias(StorageAccountNameAlias, AccountNameAlias)] [ValidateNotNullOrEmpty] - public string StorageAccountName { get; set; } + public string Name { get; set; } public override void ExecuteCmdlet() { @@ -52,7 +53,7 @@ public override void ExecuteCmdlet() } else { - account = StorageUtilities.GenerateCloudStorageAccount(new ARMStorageProvider(StorageClient), ResourceGroupName, StorageAccountName); + account = StorageUtilities.GenerateCloudStorageAccount(new ARMStorageProvider(StorageClient), ResourceGroupName, Name); } // Clear the current storage account for both SM and RM diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs index 3b9a312d23cf..ad2093b54d5c 100644 --- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs +++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/StorageAccountBaseCmdlet.cs @@ -78,23 +78,23 @@ public string SubscriptionId protected static AccountType ParseAccountType(string accountType) { - if ("Standard_LRS".Equals(accountType, StringComparison.OrdinalIgnoreCase)) + if (AccountTypeString.StandardLRS.Equals(accountType, StringComparison.OrdinalIgnoreCase)) { return AccountType.StandardLRS; } - if ("Standard_ZRS".Equals(accountType, StringComparison.OrdinalIgnoreCase)) + if (AccountTypeString.StandardZRS.Equals(accountType, StringComparison.OrdinalIgnoreCase)) { return AccountType.StandardZRS; } - if ("Standard_GRS".Equals(accountType, StringComparison.OrdinalIgnoreCase)) + if (AccountTypeString.StandardGRS.Equals(accountType, StringComparison.OrdinalIgnoreCase)) { return AccountType.StandardGRS; } - if ("Standard_RAGRS".Equals(accountType, StringComparison.OrdinalIgnoreCase)) + if (AccountTypeString.StandardRAGRS.Equals(accountType, StringComparison.OrdinalIgnoreCase)) { return AccountType.StandardRAGRS; } - if ("Premium_LRS".Equals(accountType, StringComparison.OrdinalIgnoreCase)) + if (AccountTypeString.PremiumLRS.Equals(accountType, StringComparison.OrdinalIgnoreCase)) { return AccountType.PremiumLRS; } diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config index a3a1be515ed0..91e3b00a347c 100644 --- a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config @@ -21,6 +21,5 @@ - diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj b/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj index e6f4fe7ce2a6..187fe2aad2d3 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj @@ -255,10 +255,6 @@ {5ee72c53-1720-4309-b54b-5fb79703195f} Commands.Common - - {08cf7da7-0392-4a19-b79b-e1ff67cdb81a} - Commands.Storage - @@ -275,4 +271,4 @@ - \ No newline at end of file + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs index 38f1914b8c27..0aefc478e3a1 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs @@ -13,16 +13,14 @@ using System; using System.Management.Automation; -using Microsoft.WindowsAzure.Commands.Common; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport; using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Management.Sql; using Microsoft.WindowsAzure.Management.Sql.Models; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet { diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs index fe297507a764..a80665bb290c 100644 --- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs @@ -13,16 +13,14 @@ using System; using System.Management.Automation; -using Microsoft.WindowsAzure.Commands.Common; using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport; using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Management.Sql; using Microsoft.WindowsAzure.Management.Sql.Models; -using Microsoft.Azure.Commands.Common.Authentication; namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet { diff --git a/src/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerTest.cs b/src/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerTest.cs index bdcc21c7a8c9..fb027d5ce756 100644 --- a/src/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerTest.cs +++ b/src/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerTest.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,7 @@ using System; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; diff --git a/src/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageContainerAclTest.cs b/src/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageContainerAclTest.cs index db23b0c84449..13df1edd4a50 100644 --- a/src/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageContainerAclTest.cs +++ b/src/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageContainerAclTest.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,9 +15,9 @@ using System; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Cmdlet; using Microsoft.WindowsAzure.Commands.Storage.Common; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage.Blob; namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob diff --git a/src/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj b/src/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj index e2edece41725..ffac85487b58 100644 --- a/src/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj +++ b/src/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj @@ -122,9 +122,9 @@ ..\..\packages\WindowsAzure.Storage.6.1.0\lib\net40\Microsoft.WindowsAzure.Storage.dll - - False - ..\..\lib\Microsoft.WindowsAzure.Storage.DataMovement.dll + + ..\..\packages\Microsoft.Azure.Storage.DataMovement.0.2.0\lib\net45\Microsoft.WindowsAzure.Storage.DataMovement.dll + True ..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll diff --git a/src/Storage/Commands.Storage.Test/Common/StorageCloudCmdletBaseTest.cs b/src/Storage/Commands.Storage.Test/Common/StorageCloudCmdletBaseTest.cs index 808c9dc52a9e..c08df5c809cb 100644 --- a/src/Storage/Commands.Storage.Test/Common/StorageCloudCmdletBaseTest.cs +++ b/src/Storage/Commands.Storage.Test/Common/StorageCloudCmdletBaseTest.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,9 +16,9 @@ using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; using Microsoft.WindowsAzure.Commands.Storage.Common; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common diff --git a/src/Storage/Commands.Storage.Test/Queue/GetAzureStorageQueueTest.cs b/src/Storage/Commands.Storage.Test/Queue/GetAzureStorageQueueTest.cs index efcc09f8e805..9e115746f16c 100644 --- a/src/Storage/Commands.Storage.Test/Queue/GetAzureStorageQueueTest.cs +++ b/src/Storage/Commands.Storage.Test/Queue/GetAzureStorageQueueTest.cs @@ -16,8 +16,8 @@ using System.Collections.Generic; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Queue; using Microsoft.WindowsAzure.Storage.Queue; diff --git a/src/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueTest.cs b/src/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueTest.cs index 10948b3133c0..bbcb5791646f 100644 --- a/src/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueTest.cs +++ b/src/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueTest.cs @@ -15,8 +15,8 @@ using System; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Queue; namespace Microsoft.WindowsAzure.Commands.Storage.Test.Queue diff --git a/src/Storage/Commands.Storage.Test/Table/NewAzureStorageTableTest.cs b/src/Storage/Commands.Storage.Test/Table/NewAzureStorageTableTest.cs index e2755378fad5..0efee67725e6 100644 --- a/src/Storage/Commands.Storage.Test/Table/NewAzureStorageTableTest.cs +++ b/src/Storage/Commands.Storage.Test/Table/NewAzureStorageTableTest.cs @@ -15,8 +15,8 @@ using System; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet; namespace Microsoft.WindowsAzure.Commands.Storage.Test.Table diff --git a/src/Storage/Commands.Storage.Test/packages.config b/src/Storage/Commands.Storage.Test/packages.config index 4f5ce3d9f58b..a08edb160d93 100644 --- a/src/Storage/Commands.Storage.Test/packages.config +++ b/src/Storage/Commands.Storage.Test/packages.config @@ -2,10 +2,10 @@ - + @@ -29,4 +29,4 @@ - + \ No newline at end of file diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs index a9c5c3284ceb..c9420f43c1d5 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs @@ -18,9 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs index c3c6908f7713..7b6491989ba9 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs @@ -17,9 +17,9 @@ using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.DataMovement; diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs index 2894c51adef3..f910a68f69a6 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,8 +20,8 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet using System.Security.Permissions; using System.Threading; using System.Threading.Tasks; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs index 4de7b2ec71fc..133923abdc84 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,9 +19,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs index 67a7534a8b9e..769c3e9727b9 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs @@ -50,6 +50,7 @@ public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSetWithPolicy)] [Parameter(HelpMessage = "CloudBlob Object", Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSetWithPermision)] + [ValidateNotNull] public CloudBlob CloudBlob { get; set; } [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container Name", @@ -66,8 +67,15 @@ public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase [ValidateNotNullOrEmpty] public string Blob { get; set; } - [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = BlobNamePipelineParmeterSetWithPolicy)] - [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = BlobPipelineParameterSetWithPolicy)] + [Parameter( + Mandatory = true, + HelpMessage = "Policy Identifier", + ParameterSetName = BlobNamePipelineParmeterSetWithPolicy)] + [Parameter( + Mandatory = true, + HelpMessage = "Policy Identifier", + ParameterSetName = BlobPipelineParameterSetWithPolicy)] + [ValidateNotNullOrEmpty] public string Policy { get { return accessPolicyIdentifier; } @@ -75,22 +83,31 @@ public string Policy } private string accessPolicyIdentifier; - [Parameter(HelpMessage = "Permissions for a blob. Permissions can be any not-empty subset of \"rwd\".", + [Parameter( + Mandatory = false, + HelpMessage = "Permissions for a blob. Permissions can be any not-empty subset of \"rwd\".", ParameterSetName = BlobNamePipelineParmeterSetWithPermission)] - [Parameter(HelpMessage = "Permissions for a blob. Permissions can be any not-empty subset of \"rwd\".", + [Parameter( + Mandatory = false, + HelpMessage = "Permissions for a blob. Permissions can be any not-empty subset of \"rwd\".", ParameterSetName = BlobPipelineParameterSetWithPermision)] + [ValidateNotNullOrEmpty] public string Permission { get; set; } [Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")] - public SharedAccessProtocol Protocol { get; set; } + [ValidateNotNull] + public SharedAccessProtocol? Protocol { get; set; } - [Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")] + [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(HelpMessage = "Start Time")] + [Parameter(Mandatory = false, HelpMessage = "Start Time")] + [ValidateNotNull] public DateTime? StartTime { get; set; } - [Parameter(HelpMessage = "Expiry Time")] + [Parameter(Mandatory = false, HelpMessage = "Expiry Time")] + [ValidateNotNull] public DateTime? ExpiryTime { get; set; } [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] @@ -161,7 +178,7 @@ public override void ExecuteCmdlet() /// SharedAccessBlobPolicy object /// The existing policy identifier. /// - private string GetBlobSharedAccessSignature(CloudBlob blob, SharedAccessBlobPolicy accessPolicy, string policyIdentifier, SharedAccessProtocol protocol, IPAddressOrRange iPAddressOrRange) + private string GetBlobSharedAccessSignature(CloudBlob blob, SharedAccessBlobPolicy accessPolicy, string policyIdentifier, SharedAccessProtocol? protocol, IPAddressOrRange iPAddressOrRange) { CloudBlobContainer container = blob.Container; return blob.GetSharedAccessSignature(accessPolicy, null, policyIdentifier, protocol, iPAddressOrRange); diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs index 0ff48d9762db..20d25bf86ef6 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,9 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage.Blob; /// diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs index 87a487f98adf..f15c44d2b572 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs @@ -43,7 +43,11 @@ public class NewAzureStorageContainerSasTokenCommand : StorageCloudBlobCmdletBas [ValidateNotNullOrEmpty] public string Name { get; set; } - [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + [Parameter( + Mandatory = true, + HelpMessage = "Policy Identifier", + ParameterSetName = SasPolicyParmeterSet)] + [ValidateNotNullOrEmpty] public string Policy { get { return accessPolicyIdentifier; } @@ -51,20 +55,27 @@ public string Policy } private string accessPolicyIdentifier; - [Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"rwdl\".", - ParameterSetName = SasPermissionParameterSet)] + [Parameter( + Mandatory = false, + HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"rwdl\".", + ParameterSetName = SasPermissionParameterSet)] + [ValidateNotNullOrEmpty] public string Permission { get; set; } [Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")] - public SharedAccessProtocol Protocol { get; set; } + [ValidateNotNull] + public SharedAccessProtocol? Protocol { get; set; } - [Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")] + [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(HelpMessage = "Start Time")] + [Parameter(Mandatory = false, HelpMessage = "Start Time")] + [ValidateNotNull] public DateTime? StartTime { get; set; } - [Parameter(HelpMessage = "Expiry Time")] + [Parameter(Mandatory = false, HelpMessage = "Expiry Time")] + [ValidateNotNull] public DateTime? ExpiryTime { get; set; } [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs index f5ac2cda5655..12d048b75609 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs @@ -20,11 +20,10 @@ using System.IO; using System.Management.Automation; using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; -using Microsoft.WindowsAzure.Storage.DataMovement; using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; namespace Microsoft.WindowsAzure.Commands.Storage.Blob diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs index 085eba677211..7b12c3722b85 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,9 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Cmdlet using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs index 33a7573993d1..a9e1645f39ca 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,21 +18,18 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet { using System; using System.IO; - using System.Collections.Generic; using System.Management.Automation; + using System.Reflection; using System.Security.Permissions; using System.Threading.Tasks; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.File; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; - using Microsoft.WindowsAzure.Storage.DataMovement; using Microsoft.WindowsAzure.Storage.File; - using Azure.ServiceManagemenet.Common; - using System.Reflection; [Cmdlet(VerbsLifecycle.Start, StorageNouns.CopyBlob, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = ContainerNameParameterSet), OutputType(typeof(AzureStorageBlob))] diff --git a/src/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs b/src/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs index fcf09c7441a8..ef99f10033cd 100644 --- a/src/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs +++ b/src/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,9 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.RetryPolicies; diff --git a/src/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs b/src/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs index c68a7cfe3dad..0d39adce4d3d 100644 --- a/src/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs +++ b/src/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,16 +16,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage { using System; using System.Globalization; - using System.Management.Automation; - using System.Threading.Tasks; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Common.Storage; - using Microsoft.WindowsAzure.Commands.Storage.Blob; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; - using Microsoft.WindowsAzure.Storage.DataMovement; /// /// Base cmdlet for storage blob/container cmdlet diff --git a/src/Storage/Commands.Storage/Commands.Storage.csproj b/src/Storage/Commands.Storage/Commands.Storage.csproj index 485da3c1fd72..c63ec158ec23 100644 --- a/src/Storage/Commands.Storage/Commands.Storage.csproj +++ b/src/Storage/Commands.Storage/Commands.Storage.csproj @@ -108,9 +108,9 @@ False ..\..\packages\WindowsAzure.Storage.6.1.0\lib\net40\Microsoft.WindowsAzure.Storage.dll - - False - ..\..\lib\Microsoft.WindowsAzure.Storage.DataMovement.dll + + ..\..\packages\Microsoft.Azure.Storage.DataMovement.0.2.0\lib\net45\Microsoft.WindowsAzure.Storage.DataMovement.dll + True False @@ -235,16 +235,11 @@ - - - - - diff --git a/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs b/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs index 586c1a195073..de701dec2563 100644 --- a/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs +++ b/src/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageAccountSasToken.cs @@ -29,19 +29,24 @@ public class NewAzureStorageAccountSasTokenCommand : StorageCloudBlobCmdletBase [Parameter(Mandatory = true, HelpMessage = "Resource type that this SAS token applies to.")] public SharedAccessAccountResourceTypes ResourceType { get; set; } - [Parameter(Mandatory = true, HelpMessage = "Permissions.")] + [Parameter(Mandatory = false, HelpMessage = "Permissions.")] + [ValidateNotNullOrEmpty] public string Permission { get; set; } [Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")] - public SharedAccessProtocol Protocol { get; set; } + [ValidateNotNull] + public SharedAccessProtocol? Protocol { get; set; } - [Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")] + [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 DateTime? StartTime { get; set; } [Parameter(Mandatory = false, HelpMessage = "Expiry Time")] + [ValidateNotNull] public DateTime? ExpiryTime { get; set; } // Overwrite the useless parameter diff --git a/src/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs b/src/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs index 4d6b1db45093..a94665d412d5 100644 --- a/src/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs +++ b/src/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs @@ -1,4 +1,4 @@ -// ---------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------- // // Copyright Microsoft Corporation // Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,8 +24,8 @@ using Microsoft.Azure.Commands.Common.Authentication.Models; using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.File; -using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; using Microsoft.WindowsAzure.Storage.File; diff --git a/src/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs b/src/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs index f332645077fa..6291fa9cca0a 100644 --- a/src/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs +++ b/src/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs @@ -27,16 +27,6 @@ public abstract class AzureStorageFileCmdletBase : StorageCloudCmdletBase return this.TransferManager.DownloadAsync( fileToBeDownloaded, targetFile, - null, + new DownloadOptions + { + DisableContentMD5Validation = !this.CheckMd5 + }, this.GetTransferContext(progressRecord, fileToBeDownloaded.Properties.Length), CmdletCancellationToken); }, diff --git a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs index 4569698c7fe8..bf609cf0b3fe 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs @@ -17,6 +17,7 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { using System.Globalization; using System.Management.Automation; + using Microsoft.WindowsAzure.Commands.Common.Storage; using Microsoft.WindowsAzure.Storage.File; [Cmdlet(VerbsCommon.Get, Constants.ShareCmdletName, DefaultParameterSetName = Constants.MatchingPrefixParameterSetName)] @@ -36,6 +37,18 @@ public class GetAzureStorageShare : AzureStorageFileCmdletBase HelpMessage = "A prefix of the file shares to be listed.")] public string Prefix { get; set; } + [Parameter( + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + ParameterSetName = Constants.MatchingPrefixParameterSetName, + HelpMessage = "Azure Storage Context Object")] + [Parameter( + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + ParameterSetName = Constants.SpecificParameterSetName, + HelpMessage = "Azure Storage Context Object")] + public override AzureStorageContext Context { get; set; } + public override void ExecuteCmdlet() { this.RunTask(async taskId => diff --git a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs index 5cdf06e2c140..48d48393356e 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs @@ -90,8 +90,9 @@ public class NewAzureStorageFileSasToken : AzureStorageFileCmdletBase [ValidateNotNull] public CloudFile File { get; set; } - [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = NameSasPolicyParmeterSet)] - [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = CloudFileSasPolicyParmeterSet)] + [Parameter(Mandatory = true, HelpMessage = "Policy Identifier", ParameterSetName = NameSasPolicyParmeterSet)] + [Parameter(Mandatory = true, HelpMessage = "Policy Identifier", ParameterSetName = CloudFileSasPolicyParmeterSet)] + [ValidateNotNullOrEmpty] public string Policy { get { return accessPolicyIdentifier; } @@ -99,35 +100,47 @@ public string Policy } private string accessPolicyIdentifier; - [Parameter(HelpMessage = "Permissions for a file. Permissions can be any subset of \"rwd\".", + [Parameter( + Mandatory = false, + HelpMessage = "Permissions for a file. Permissions can be any subset of \"rwd\".", ParameterSetName = NameSasPermissionParameterSet)] - [Parameter(HelpMessage = "Permissions for a file. Permissions can be any subset of \"rwd\".", + [Parameter( + Mandatory = false, + HelpMessage = "Permissions for a file. Permissions can be any subset of \"rwd\".", ParameterSetName = CloudFileSasPermissionParameterSet)] + [ValidateNotNullOrEmpty] public string Permission { get; set; } [Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")] - public SharedAccessProtocol Protocol { get; set; } + [ValidateNotNull] + public SharedAccessProtocol? Protocol { get; set; } - [Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")] + [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(HelpMessage = "Start Time")] + [Parameter(Mandatory = false, HelpMessage = "Start Time")] + [ValidateNotNull] public DateTime? StartTime { get; set; } - [Parameter(HelpMessage = "Expiry Time")] + [Parameter(Mandatory = false, HelpMessage = "Expiry Time")] + [ValidateNotNull] public DateTime? ExpiryTime { get; set; } [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] public SwitchParameter FullUri { get; set; } [Parameter( + Mandatory = false, ValueFromPipeline = true, HelpMessage = "Azure Storage Context Object", ParameterSetName = NameSasPermissionParameterSet)] [Parameter( + Mandatory = false, ValueFromPipeline = true, HelpMessage = "Azure Storage Context Object", ParameterSetName = NameSasPolicyParmeterSet)] + [ValidateNotNull] public override AzureStorageContext Context { get; set; } // Overwrite the useless parameter diff --git a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs index 62d6f79459f6..db730d87b28f 100644 --- a/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs +++ b/src/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs @@ -45,7 +45,8 @@ public class NewAzureStorageShareSasToken : AzureStorageFileCmdletBase [ValidateNotNullOrEmpty] public string ShareName { get; set; } - [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + [Parameter(Mandatory = true, HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + [ValidateNotNullOrEmpty] public string Policy { get { return accessPolicyIdentifier; } @@ -53,29 +54,36 @@ public string Policy } private string accessPolicyIdentifier; - [Parameter(HelpMessage = "Permissions for a share. Permissions can be any subset of \"rwdl\".", + [Parameter(Mandatory = false, HelpMessage = "Permissions for a share. Permissions can be any subset of \"rwdl\".", ParameterSetName = SasPermissionParameterSet)] + [ValidateNotNullOrEmpty] public string Permission { get; set; } [Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")] - public SharedAccessProtocol Protocol { get; set; } + [ValidateNotNull] + public SharedAccessProtocol? Protocol { get; set; } - [Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")] + [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(HelpMessage = "Start Time")] + [Parameter(Mandatory = false, HelpMessage = "Start Time")] + [ValidateNotNull] public DateTime? StartTime { get; set; } - [Parameter(HelpMessage = "Expiry Time")] + [Parameter(Mandatory = false, HelpMessage = "Expiry Time")] + [ValidateNotNull] public DateTime? ExpiryTime { get; set; } [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] public SwitchParameter FullUri { get; set; } [Parameter( + Mandatory = false, ValueFromPipeline = true, ValueFromPipelineByPropertyName=true, HelpMessage = "Azure Storage Context Object")] + [ValidateNotNull] public override AzureStorageContext Context { get; set; } // Overwrite the useless parameter diff --git a/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1 b/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1 index 9e0747043af0..7631fcd9ec47 100644 --- a/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1 +++ b/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1 @@ -60,7 +60,7 @@ TypesToProcess = @() FormatsToProcess = @() # Modules to import as nested modules of the module specified in ModuleToProcess -NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\Storage\Microsoft.WindowsAzure.Commands.Storage.dll' +NestedModules = '..\..\Package\Debug\Storage\Azure.Storage\Microsoft.WindowsAzure.Commands.Storage.dll' # Functions to export from this module FunctionsToExport = '*' diff --git a/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml b/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml index 49d5885d7288..2a575ff04aa6 100644 --- a/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml +++ b/src/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml @@ -498,7 +498,7 @@ echo "Total $total blobs in container $containerName" CheckMd5 - Whether check the md5 sum for downloaded file. + Whether to check the MD5 sum for downloaded file. SwitchParameter @@ -571,7 +571,7 @@ echo "Total $total blobs in container $containerName" CheckMd5 - Whether check the md5 sum for downloaded file. + Whether to check the MD5 sum for downloaded file. SwitchParameter @@ -651,7 +651,7 @@ echo "Total $total blobs in container $containerName" CheckMd5 - Whether check the md5 sum for downloaded file. + Whether to check the MD5 sum for downloaded file. SwitchParameter @@ -746,7 +746,7 @@ echo "Total $total blobs in container $containerName" CheckMd5 - Whether check the md5 sum for downloaded file. + Whether to check the MD5 sum for downloaded file. SwitchParameter @@ -2529,110 +2529,6 @@ echo "Total $total containers" String - - Get-AzureStorageFile - - Path - - The file or directory path - - String - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - Get-AzureStorageFile - - Path - - The file or directory path - - String - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - @@ -2909,7 +2805,7 @@ echo "Total $total containers" Path - the path of the Azure Storage file to download + The path of the Azure Storage file to download String @@ -2920,6 +2816,13 @@ echo "Total $total containers" String + + CheckMd5 + + Whether to check the MD5 sum for downloaded file. + + SwitchParameter + PassThru @@ -3003,7 +2906,7 @@ echo "Total $total containers" Path - the path of the Azure Storage file to download + The path of the Azure Storage file to download String @@ -3014,6 +2917,13 @@ echo "Total $total containers" String + + CheckMd5 + + Whether to check the MD5 sum for downloaded file. + + SwitchParameter + PassThru @@ -3090,7 +3000,7 @@ echo "Total $total containers" Path - the path of the Azure Storage file to download + The path of the Azure Storage file to download String @@ -3101,6 +3011,13 @@ echo "Total $total containers" String + + CheckMd5 + + Whether to check the MD5 sum for downloaded file. + + SwitchParameter + PassThru @@ -3182,144 +3099,12 @@ echo "Total $total containers" String - PassThru - - - - SwitchParameter - - - Force - - If this parameter is set, it will overwrite the local file when there is name conflict. - - SwitchParameter - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - - - SwitchParameter - - - Confirm - - - - SwitchParameter - - - - Get-AzureStorageFileContent - - PassThru - - - - SwitchParameter - - - Force - - If this parameter is set, it will overwrite the local file when there is name conflict. - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - - - SwitchParameter - - - Confirm + CheckMd5 - + Whether to check the MD5 sum for downloaded file. SwitchParameter - - - Get-AzureStorageFileContent PassThru @@ -3334,13 +3119,6 @@ echo "Total $total containers" SwitchParameter - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - ServerTimeoutPerRequest @@ -3408,7 +3186,7 @@ echo "Total $total containers" Path - the path of the Azure Storage file to download + The path of the Azure Storage file to download String @@ -3429,6 +3207,18 @@ echo "Total $total containers" + + CheckMd5 + + Whether to check the MD5 sum for downloaded file. + + SwitchParameter + + SwitchParameter + + + + PassThru @@ -3715,126 +3505,22 @@ echo "Total $total containers" Get copy state of the specified Azure Storage file. - - Get-AzureStorageFileCopyState - - ShareName - - Azure Storage share name. - - String - - - FilePath - - Relative path in Azure Storage share to the Azure Storage file. - - String - - - WaitForComplete - - Wait for the copy completion. - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side time out for each request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side time out for each request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - The total amount of concurrent async tasks. - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - Get-AzureStorageFileCopyState - - File - - CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet. - - CloudFile - - - WaitForComplete - - Wait for the copy completion. - - SwitchParameter - - - ServerTimeoutPerRequest - - Server side time out for each request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side time out for each request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - The total amount of concurrent async tasks. - - Nullable`1[Int32] - - - InformationAction + + Get-AzureStorageFileCopyState + + ShareName - + Azure Storage share name. - ActionPreference + String - - InformationVariable + + FilePath - + Relative path in Azure Storage share to the Azure Storage file. String - - - Get-AzureStorageFileCopyState WaitForComplete @@ -3887,6 +3573,13 @@ echo "Total $total containers" Get-AzureStorageFileCopyState + + File + + CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet. + + CloudFile + WaitForComplete @@ -3894,13 +3587,6 @@ echo "Total $total containers" SwitchParameter - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - ServerTimeoutPerRequest @@ -5144,51 +4830,6 @@ echo "Total $total containers" String - - Get-AzureStorageShare - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - @@ -6180,19 +5821,19 @@ echo "Total $total containers" SharedAccessAccountResourceTypes - + Permission Permissions for a storage account. Permissions are only valid if they match the specified resource type; otherwise they are ignored. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -6264,7 +5905,7 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Permission Permissions for a storage account. Permissions are only valid if they match the specified resource type; otherwise they are ignored. @@ -6276,14 +5917,14 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] @@ -6482,12 +6123,12 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -6549,19 +6190,19 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. CloudBlob - + Policy Azure Stored Access Policy. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -6630,12 +6271,12 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -6704,19 +6345,19 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Policy Azure Stored Access Policy. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -6807,14 +6448,14 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] @@ -6916,7 +6557,7 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Policy Azure Stored Access Policy. @@ -7331,19 +6972,19 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start String - + Policy Azure Stored Access Policy. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -7412,12 +7053,12 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -7484,7 +7125,7 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Policy Azure Stored Access Policy. @@ -7496,14 +7137,14 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] @@ -8108,10 +7749,17 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - - Environment + + Protocol - Azure Environment + Transfer Protocol (https/http). + + String + + + Endpoint + + Azure Storage Endpoint. String @@ -8140,23 +7788,16 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - Anonymous - - Anonymous storage account. - - SwitchParameter - - - Protocol + SasToken - Transfer Protocol (https/http). + String - - Endpoint + + Environment - Azure Storage Endpoint. + Azure Environment String @@ -8243,10 +7884,10 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - - Environment + + Endpoint - Azure Environment + Azure Storage Endpoint. String @@ -8275,11 +7916,11 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - SasToken + Anonymous - + Anonymous storage account. - String + SwitchParameter Protocol @@ -8288,10 +7929,10 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - - Endpoint + + Environment - Azure Storage Endpoint. + Azure Environment String @@ -8886,104 +8527,7 @@ $context | Get-AzureStorageBlob -Container abc the parent directory object CloudFileDirectory - - - Path - - The path of the file directory to be created - - String - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - New-AzureStorageDirectory - - Path - - The path of the file directory to be created - - String - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - New-AzureStorageDirectory + Path @@ -8991,13 +8535,6 @@ $context | Get-AzureStorageBlob -Container abc String - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - ServerTimeoutPerRequest @@ -9302,19 +8839,19 @@ $context | Get-AzureStorageBlob -Container abc String - - Permission + + Policy - Permissions for a storage file. + Azure Stored Access Policy. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -9384,18 +8921,18 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - Policy + Permission - Azure Stored Access Policy. + Permissions for a storage file. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -9457,19 +8994,19 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. CloudFile - + Policy Azure Stored Access Policy. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -9531,12 +9068,12 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -9608,10 +9145,10 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - - Permission + + Policy - Permissions for a storage file. + Azure Stored Access Policy. String @@ -9620,14 +9157,14 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] @@ -9718,9 +9255,9 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - Policy + Permission - Azure Stored Access Policy. + Permissions for a storage file. String @@ -10065,19 +9602,19 @@ New-AzureStorageFileSASToken -ShareName share -Path filePath -Permission rwd -St String - + Policy Azure Stored Access Policy. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -10146,12 +9683,12 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -10218,7 +9755,7 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Policy Azure Stored Access Policy. @@ -10230,14 +9767,14 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] @@ -10602,212 +10139,108 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. InformationVariable - - String - - String - - - - - - PipelineVariable - - - - string - - string - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Keywords: common, azure, services, data, storage, blob, queue, table - - - - - -------------------------- Create a stored access policy in queue with full permission -------------------------- - - PS C:\> - - PS C:\> New-AzureStorageQueueStoredAccessPolicy -Queue test -Policy testPolicy -Permission arup - - - - - - - - - - - - - - - - - - http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx - - - - - - - - New-AzureStorageShare - - Create a new Azure Storage file share. - - - - - New - AzureStorageShare - - - - Create a new Azure Storage file share. - - - - New-AzureStorageShare - - Name - - The file share name - - String - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - New-AzureStorageShare - - Name - - The file share name - - String - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Keywords: common, azure, services, data, storage, blob, queue, table + + + + + -------------------------- Create a stored access policy in queue with full permission -------------------------- + + PS C:\> + + PS C:\> New-AzureStorageQueueStoredAccessPolicy -Queue test -Policy testPolicy -Permission arup + + + + + + + + + + + + + + + + + + http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx + + + + + + + + New-AzureStorageShare + + Create a new Azure Storage file share. + + + + + New + AzureStorageShare + + + + Create a new Azure Storage file share. + + New-AzureStorageShare @@ -11073,19 +10506,19 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Policy Azure Stored Access Policy name. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -11154,12 +10587,12 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -11226,7 +10659,7 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Policy Azure Stored Access Policy name. @@ -11238,14 +10671,14 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] @@ -11981,19 +11414,19 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Policy Azure Stored Access Policy. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -12090,12 +11523,12 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] IPAddressOrRange @@ -12190,7 +11623,7 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Policy Azure Stored Access Policy. @@ -12202,14 +11635,14 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - + Protocol Protocol permitted for a request made with the account SAS, such as HttpsOrHttp, HttpsOnly. The default value is HttpsOrHttp. - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] - SharedAccessProtocol + Nullable`1[SharedAccessProtocol] @@ -12470,6 +11903,7 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. + http://msdn.microsoft.com/en-us/library/dn806400.aspx @@ -14275,140 +13709,8 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. The path of the file directory to be removed - String - - - PassThru - - - - SwitchParameter - - - ServerTimeoutPerRequest - - Server side timeout value for the request - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - Shows what would happen if the cmdlet runs. The cmdlet is not run. - - SwitchParameter - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - SwitchParameter - - - - Remove-AzureStorageDirectory - - Directory - - The directory object to be removed - - CloudFileDirectory - - - Path - - The path of the file directory to be removed - - String - - - PassThru - - - - SwitchParameter - - - ServerTimeoutPerRequest - - Server side timeout value for the request - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - Shows what would happen if the cmdlet runs. The cmdlet is not run. - - SwitchParameter - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - SwitchParameter - - - - Remove-AzureStorageDirectory + String + PassThru @@ -14416,13 +13718,6 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. SwitchParameter - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - ServerTimeoutPerRequest @@ -14475,6 +13770,20 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. Remove-AzureStorageDirectory + + Directory + + The directory object to be removed + + CloudFileDirectory + + + Path + + The path of the file directory to be removed + + String + PassThru @@ -14482,13 +13791,6 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. SwitchParameter - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - ServerTimeoutPerRequest @@ -15119,138 +14421,6 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. SwitchParameter - - Remove-AzureStorageFile - - PassThru - - - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - Shows what would happen if the cmdlet runs. The cmdlet is not run. - - SwitchParameter - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - SwitchParameter - - - - Remove-AzureStorageFile - - PassThru - - - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - Shows what would happen if the cmdlet runs. The cmdlet is not run. - - SwitchParameter - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - SwitchParameter - - @@ -16067,168 +15237,36 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx - - - - - - - Remove-AzureStorageShare - - Remove an Azure Storage file share. - - - - - Remove - AzureStorageShare - - - - Remove an Azure Storage file share. - - - - Remove-AzureStorageShare - - Name - - The file share name - - String - - - PassThru - - - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - Shows what would happen if the cmdlet runs. The cmdlet is not run. - - SwitchParameter - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - SwitchParameter - - + + + + + + + Remove-AzureStorageShare + + Remove an Azure Storage file share. + + + + + Remove + AzureStorageShare + + + + Remove an Azure Storage file share. + + Remove-AzureStorageShare - - Share - - The file share object - - CloudFileShare - - - PassThru - - - - SwitchParameter - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable + + Name - + The file share name String - - WhatIf - - Shows what would happen if the cmdlet runs. The cmdlet is not run. - - SwitchParameter - - - Confirm - - Prompts you for confirmation before running the cmdlet. - - SwitchParameter - - - - Remove-AzureStorageShare PassThru @@ -16295,6 +15333,13 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. Remove-AzureStorageShare + + Share + + The file share object + + CloudFileShare + PassThru @@ -16302,13 +15347,6 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. SwitchParameter - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - ServerTimeoutPerRequest @@ -16601,7 +15639,7 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. Remove a Stored Access Policy from an Azure Storage share. - + Remove-AzureStorageShareStoredAccessPolicy @@ -17590,19 +16628,12 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String - - Blob - - Blob name. - - String - - CloudBlobContainer + CloudBlob - CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + - CloudBlobContainer + CloudBlob BlobType @@ -17684,12 +16715,19 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. String + + Blob + + Blob name. + + String + - CloudBlob + CloudBlobContainer - + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. - CloudBlob + CloudBlobContainer BlobType @@ -17921,25 +16959,25 @@ For example, 168.1.5.65 or 168.1.5.60-168.1.5.70. - CloudBlobContainer + CloudBlob - CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + - CloudBlobContainer + CloudBlob - CloudBlobContainer + CloudBlob - CloudBlob + CloudBlobContainer - + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. - CloudBlob + CloudBlobContainer - CloudBlob + CloudBlobContainer @@ -19056,127 +18094,33 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRules - - - - - Set-AzureStorageFileContent - - Upload the specified file to azure. - - - - - Set - AzureStorageFileContent - - - - Upload the specified file to azure. - - - - Set-AzureStorageFileContent - - ShareName - - The file share name - - String - - - Source - - The source path of the file to upload - - String - - - Path - - The destination file path to upload the local file - - String - - - PassThru - - - - SwitchParameter - - - Force - - If this parameter is set, it will overwrite the Azure Storage file when there is name conflict. - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - - - SwitchParameter - - - Confirm - - - - SwitchParameter - - + + + + + Set-AzureStorageFileContent + + Upload the specified file to azure. + + + + + Set + AzureStorageFileContent + + + + Upload the specified file to azure. + + Set-AzureStorageFileContent - - Share + + ShareName - The file share object + The file share name - CloudFileShare + String Source @@ -19206,6 +18150,13 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRules SwitchParameter + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + ServerTimeoutPerRequest @@ -19259,11 +18210,11 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRules Set-AzureStorageFileContent - Directory + Share - The destination directory object to upload the file + The file share object - CloudFileDirectory + CloudFileShare Source @@ -19345,93 +18296,13 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRules Set-AzureStorageFileContent - - Source - - The source path of the file to upload - - String - - - Path - - The destination file path to upload the local file - - String - - - PassThru - - - - SwitchParameter - - - Force - - If this parameter is set, it will overwrite the Azure Storage file when there is name conflict. - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side timeout value for the request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side timeout value for the request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - WhatIf - - - - SwitchParameter - - - Confirm + + Directory - + The destination directory object to upload the file - SwitchParameter + CloudFileDirectory - - - Set-AzureStorageFileContent Source @@ -19460,13 +18331,6 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRules SwitchParameter - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - ServerTimeoutPerRequest @@ -20358,6 +19222,7 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRules + http://msdn.microsoft.com/en-us/library/dn806397.aspx @@ -21066,7 +19931,7 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRulesString - + ShareName @@ -21321,7 +20186,7 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRules Permission - Permissions for a storage table. + Permissions for an Azure Storage table. String @@ -21404,7 +20269,7 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRules Permission - Permissions for a storage table. + Permissions for an Azure Storage table. String @@ -22189,18 +21054,11 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRulesCloudFile - DestContainer - - Destination container name. - - String - - - DestBlob + DestCloudBlob - Destination blob name. + Destination CloudBlob object - String + CloudBlob Context @@ -22269,11 +21127,18 @@ PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $corsRulesCloudFile - DestCloudBlob + DestContainer - Destination CloudBlob object + Destination container name. - CloudBlob + String + + + DestBlob + + Destination blob name. + + String Context @@ -22881,11 +21746,11 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String - SrcContainer + SrcContainerName - CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + Source container name. - CloudBlobContainer + String DestShareName @@ -22901,6 +21766,13 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String + + Context + + Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + DestContext @@ -22975,11 +21847,11 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String - SrcContainerName + SrcContainer - Source container name. + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. - String + CloudBlobContainer DestShareName @@ -22995,13 +21867,6 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String - - Context - - Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - DestContext @@ -23076,11 +21941,25 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context CloudBlob - DestFile + DestShareName - CloudFile object from Azure Storage Client library. + Destination share name. - CloudFile + String + + + DestFilePath + + Destination file relative path to destination share. + + String + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext Force @@ -23149,25 +22028,11 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context CloudBlob - DestShareName - - Destination share name. - - String - - - DestFilePath - - Destination file relative path to destination share. - - String - - - DestContext + DestFile - Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + CloudFile object from Azure Storage Client library. - AzureStorageContext + CloudFile Force @@ -23236,11 +22101,11 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String - SrcShare + SrcShareName - CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet. + Source share name. - CloudFileShare + String DestShareName @@ -23256,6 +22121,13 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String + + Context + + Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + DestContext @@ -23330,11 +22202,11 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String - SrcShareName + SrcShare - Source share name. + CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet. - String + CloudFileShare DestShareName @@ -23348,14 +22220,7 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context Destination file relative path to destination share. - String - - - Context - - Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext + String DestContext @@ -23431,11 +22296,25 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context CloudFile - DestFile + DestShareName - CloudFile object from Azure Storage Client library. + Destination share name. - CloudFile + String + + + DestFilePath + + Destination file relative path to destination share. + + String + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext Force @@ -23504,25 +22383,11 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context CloudFile - DestShareName - - Destination share name. - - String - - - DestFilePath - - Destination file relative path to destination share. - - String - - - DestContext + DestFile - Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + CloudFile object from Azure Storage Client library. - AzureStorageContext + CloudFile Force @@ -23591,25 +22456,11 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String - DestShareName - - Destination share name. - - String - - - DestFilePath - - Destination file relative path to destination share. - - String - - - DestContext + DestFile - Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + CloudFile object from Azure Storage Client library. - AzureStorageContext + CloudFile Force @@ -23678,11 +22529,25 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String - DestFile + DestShareName - CloudFile object from Azure Storage Client library. + Destination share name. - CloudFile + String + + + DestFilePath + + Destination file relative path to destination share. + + String + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext Force @@ -23756,13 +22621,13 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context - SrcContainer + SrcContainerName - CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + Source container name. - CloudBlobContainer + String - CloudBlobContainer + String @@ -23791,6 +22656,18 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context + + Context + + Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + DestContext @@ -23900,25 +22777,13 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context - SrcContainerName - - Source container name. - - String - - String - - - - - - Context + SrcContainer - Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. - AzureStorageContext + CloudBlobContainer - AzureStorageContext + CloudBlobContainer @@ -23960,25 +22825,25 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context - SrcShare + SrcShareName - CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet. + Source share name. - CloudFileShare + String - CloudFileShare + String - SrcShareName + SrcShare - Source share name. + CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet. - String + CloudFileShare - String + CloudFileShare @@ -24745,124 +23610,6 @@ Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context String - - Stop-AzureStorageFileCopy - - CopyId - - Copy Id. - - String - - - Force - - Force to stop the current copy task on the specified file. - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side time out for each request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side time out for each request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - The total amount of concurrent async tasks. - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - - - Stop-AzureStorageFileCopy - - CopyId - - Copy Id. - - String - - - Force - - Force to stop the current copy task on the specified file. - - SwitchParameter - - - Context - - Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. - - AzureStorageContext - - - ServerTimeoutPerRequest - - Server side time out for each request. - - Nullable`1[Int32] - - - ClientTimeoutPerRequest - - Client side time out for each request. - - Nullable`1[Int32] - - - ConcurrentTaskCount - - The total amount of concurrent async tasks. - - Nullable`1[Int32] - - - InformationAction - - - - ActionPreference - - - InformationVariable - - - - String - - diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs index 4a5fe3269f10..c9e1e0a20778 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs @@ -18,9 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage.Queue; using Microsoft.WindowsAzure.Storage.Queue.Protocol; diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs index e07da194c89e..482acf9ebde1 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs @@ -17,9 +17,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Queue using System; using System.Management.Automation; using System.Security.Permissions; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage.Queue; [Cmdlet(VerbsCommon.New, "AzureStorageQueue"), diff --git a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs index 4caf798c1839..f2bc01738f8a 100644 --- a/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs +++ b/src/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs @@ -43,7 +43,8 @@ public class NewAzureStorageQueueSasTokenCommand : StorageQueueBaseCmdlet [ValidateNotNullOrEmpty] public string Name { get; set; } - [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + [Parameter(Mandatory = true, HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + [ValidateNotNullOrEmpty] public string Policy { get {return accessPolicyIdentifier;} @@ -51,20 +52,27 @@ public string Policy } private string accessPolicyIdentifier; - [Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"raup\".", + [Parameter( + Mandatory = false, + HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"raup\".", ParameterSetName = SasPermissionParameterSet)] + [ValidateNotNullOrEmpty] public string Permission { get; set; } [Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")] - public SharedAccessProtocol Protocol { get; set; } + [ValidateNotNull] + public SharedAccessProtocol? Protocol { get; set; } [Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")] + [ValidateNotNullOrEmpty] public string IPAddressOrRange { get; set; } - [Parameter(HelpMessage = "Start Time")] + [Parameter(Mandatory = false, HelpMessage = "Start Time")] + [ValidateNotNull] public DateTime? StartTime { get; set; } - [Parameter(HelpMessage = "Expiry Time")] + [Parameter(Mandatory = false, HelpMessage = "Expiry Time")] + [ValidateNotNull] public DateTime? ExpiryTime { get; set; } [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs b/src/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs index c8eddb7248b0..11ebbc694350 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs @@ -18,9 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet using System.Collections.Generic; using System.Management.Automation; using System.Security.Permissions; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage.Table; /// diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs b/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs index 0354bfd6ee39..91c96b4b24de 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs @@ -43,7 +43,8 @@ public class NewAzureStorageTableSasTokenCommand : StorageCloudTableCmdletBase [ValidateNotNullOrEmpty] public string Name { get; set; } - [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + [Parameter(Mandatory = true, HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + [ValidateNotNullOrEmpty] public string Policy { get { return accessPolicyIdentifier; } @@ -52,20 +53,27 @@ public string Policy private string accessPolicyIdentifier; - [Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"audq\".", + [Parameter( + Mandatory = false, + HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"audq\".", ParameterSetName = SasPermissionParameterSet)] + [ValidateNotNullOrEmpty] public string Permission { get; set; } [Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")] - public SharedAccessProtocol Protocol { get; set; } + [ValidateNotNull] + public SharedAccessProtocol? Protocol { get; set; } - [Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")] + [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(HelpMessage = "Start Time")] + [Parameter(Mandatory = false, HelpMessage = "Start Time")] + [ValidateNotNull] public DateTime? StartTime { get; set; } - [Parameter(HelpMessage = "Expiry Time")] + [Parameter(Mandatory = false, HelpMessage = "Expiry Time")] + [ValidateNotNull] public DateTime? ExpiryTime { get; set; } [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] @@ -74,12 +82,15 @@ public string Policy [Alias("startpk")] [Parameter(HelpMessage = "Start Partition Key")] public string StartPartitionKey { get; set; } + [Alias("startrk")] [Parameter(HelpMessage = "Start Row Key")] public string StartRowKey { get; set; } + [Alias("endpk")] [Parameter(HelpMessage = "End Partition Key")] public string EndPartitionKey { get; set; } + [Alias("endrk")] [Parameter(HelpMessage = "End Row Key")] public string EndRowKey { get; set; } diff --git a/src/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs b/src/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs index 996cb9f3b3d8..abd840c5e83e 100644 --- a/src/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs +++ b/src/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs @@ -17,9 +17,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet using System; using System.Management.Automation; using System.Security.Permissions; + using Commands.Common.Storage.ResourceModel; using Microsoft.WindowsAzure.Commands.Storage.Common; using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; - using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; using Microsoft.WindowsAzure.Storage.Table; /// diff --git a/src/Storage/Commands.Storage/packages.config b/src/Storage/Commands.Storage/packages.config index dc591970a3df..e77cb1dab6a9 100644 --- a/src/Storage/Commands.Storage/packages.config +++ b/src/Storage/Commands.Storage/packages.config @@ -5,6 +5,7 @@ + @@ -19,4 +20,4 @@ - + \ No newline at end of file diff --git a/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll b/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll deleted file mode 100644 index ea3f259d8328..000000000000 Binary files a/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll and /dev/null differ