diff --git a/ChangeLog.md b/ChangeLog.md
index 659a4c1bcef1..106e2b729308 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -162,6 +162,8 @@
* New-AzureVirtualNetworkGateway parameter changes
* Removed command Resize-AzureVirtualNetworkGateway
* Reset-AzureVirtualNetworkGatewayConnection renamed to Set-AzureVirtualNetworkGatewayConnection8
+* Azure Storage changes
+ * Fix the bug on aliases Get-AzureStorageContainerAcl, Start-CopyAzureStorageBlob and Stop-CopyAzureStorageBlob
* Azure RedisCache cmdlets
* Set-AzureRedisCache - Added support for scaling, using RedisConfiguration instead of MaxMemoryPolicy #513
* New-AzureRedisCache - Using RedisConfiguration instead of MaxMemoryPolicy #513
diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi
index 274719ff89a1..be09db733fb8 100644
--- a/setup/azurecmdfiles.wxi
+++ b/setup/azurecmdfiles.wxi
@@ -1389,9 +1389,6 @@
-
-
-
@@ -5392,7 +5389,6 @@
-
diff --git a/src/Common/Commands.Common.Storage/AzureStorageContext.cs b/src/Common/Commands.Common.Storage/AzureStorageContext.cs
index 954bfc5df548..9ad76a339bf5 100644
--- a/src/Common/Commands.Common.Storage/AzureStorageContext.cs
+++ b/src/Common/Commands.Common.Storage/AzureStorageContext.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Commands.Common.Storage.Properties;
-using Microsoft.WindowsAzure.Storage;
-
namespace Microsoft.WindowsAzure.Commands.Common.Storage
{
+ using System;
+ using Microsoft.WindowsAzure.Commands.Common.Storage.Properties;
+ using Microsoft.WindowsAzure.Storage;
+
///
/// Storage context
///
diff --git a/src/Common/Commands.Common.Storage/BlobUploadParameters.cs b/src/Common/Commands.Common.Storage/BlobUploadParameters.cs
index 8618681c187a..e0ed93c8764f 100644
--- a/src/Common/Commands.Common.Storage/BlobUploadParameters.cs
+++ b/src/Common/Commands.Common.Storage/BlobUploadParameters.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Common.Storage
{
+ using Microsoft.WindowsAzure.Storage.Blob;
+
public class BlobUploadParameters
{
public string StorageName {get; set;}
diff --git a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
index 2671dd352a13..2e41ebde9f37 100644
--- a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
+++ b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj
@@ -67,14 +67,17 @@
..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -96,8 +99,9 @@
False
..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
+
+ False
+ ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
False
@@ -106,13 +110,13 @@
..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
+
False
- ..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
..\..\packages\Microsoft.Rest.ClientRuntime.1.2.0\lib\net45\Microsoft.Rest.ClientRuntime.dll
@@ -137,8 +141,9 @@
-
- ..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -182,4 +187,4 @@
-
\ No newline at end of file
+
diff --git a/src/Common/Commands.Common.Storage/IStorageClientWrapper.cs b/src/Common/Commands.Common.Storage/IStorageClientWrapper.cs
index e29485436fc4..c4168d3f278c 100644
--- a/src/Common/Commands.Common.Storage/IStorageClientWrapper.cs
+++ b/src/Common/Commands.Common.Storage/IStorageClientWrapper.cs
@@ -12,11 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-
-using System;
-
namespace Microsoft.WindowsAzure.Commands.Common.Storage
{
+ using System;
+
public interface IStorageClientWrapper
{
void DeletePackageFromBlob(
diff --git a/src/Common/Commands.Common.Storage/StorageClientWrapper.cs b/src/Common/Commands.Common.Storage/StorageClientWrapper.cs
index 5e0fc11e0d9c..f9fa33cc92a4 100644
--- a/src/Common/Commands.Common.Storage/StorageClientWrapper.cs
+++ b/src/Common/Commands.Common.Storage/StorageClientWrapper.cs
@@ -12,18 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Globalization;
-using System.IO;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Storage;
-using Microsoft.WindowsAzure.Management.Storage.Models;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Auth;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Common.Storage
{
+ using System;
+ using System.Globalization;
+ using System.IO;
+ using Microsoft.WindowsAzure.Commands.Utilities.Common;
+ using Microsoft.WindowsAzure.Management.Storage;
+ using Microsoft.WindowsAzure.Management.Storage.Models;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Auth;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
///
/// Wrapper class that encapsulates Blob functionality from the StorageClient API
///
diff --git a/src/Common/Commands.Common.Storage/StorageUtilities.cs b/src/Common/Commands.Common.Storage/StorageUtilities.cs
index 69d5d4792319..5fd0a134abe9 100644
--- a/src/Common/Commands.Common.Storage/StorageUtilities.cs
+++ b/src/Common/Commands.Common.Storage/StorageUtilities.cs
@@ -1,13 +1,14 @@
-using System;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
-using Microsoft.WindowsAzure.Management.Storage;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Auth;
-using Microsoft.WindowsAzure.Storage.Blob;
-using Microsoft.WindowsAzure.Storage.Table;
-
+
namespace Microsoft.WindowsAzure.Commands.Common.Storage
{
+ using System;
+ using Microsoft.WindowsAzure.Commands.Utilities.Common;
+ using Microsoft.WindowsAzure.Management.Storage;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Auth;
+ using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Storage.Table;
+
public class StorageUtilities
{
public static CloudStorageAccount GenerateCloudStorageAccount(StorageManagementClient storageClient, string accountName)
diff --git a/src/Common/Commands.Common.Storage/packages.config b/src/Common/Commands.Common.Storage/packages.config
index 6d936383fc8a..3a416314020e 100644
--- a/src/Common/Commands.Common.Storage/packages.config
+++ b/src/Common/Commands.Common.Storage/packages.config
@@ -8,9 +8,9 @@
-
-
-
+
+
+
@@ -18,7 +18,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
index 6c8e1ac64081..36f125f38d12 100644
--- a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
+++ b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj
@@ -70,14 +70,17 @@
..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
True
-
- ..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -108,8 +111,8 @@
..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
@@ -120,17 +123,15 @@
..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
- False
- ..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
- False
- ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -149,8 +150,9 @@
-
- ..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -312,4 +314,4 @@
-
\ No newline at end of file
+
diff --git a/src/Common/Commands.Common.Test/packages.config b/src/Common/Commands.Common.Test/packages.config
index d100035f29ee..014438b9922d 100644
--- a/src/Common/Commands.Common.Test/packages.config
+++ b/src/Common/Commands.Common.Test/packages.config
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -21,9 +21,9 @@
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/Common/Commands.Common/Commands.Common.csproj b/src/Common/Commands.Common/Commands.Common.csproj
index 2fe30d334dc9..7f7f157acc3c 100644
--- a/src/Common/Commands.Common/Commands.Common.csproj
+++ b/src/Common/Commands.Common/Commands.Common.csproj
@@ -219,4 +219,4 @@
-
\ No newline at end of file
+
diff --git a/src/Common/Commands.Common/packages.config b/src/Common/Commands.Common/packages.config
index a6bdc3f7e157..61838124c3ea 100644
--- a/src/Common/Commands.Common/packages.config
+++ b/src/Common/Commands.Common/packages.config
@@ -19,4 +19,5 @@
-
\ No newline at end of file
+
+
diff --git a/src/Common/Commands.Profile/Commands.Profile.csproj b/src/Common/Commands.Profile/Commands.Profile.csproj
index 3321ef499b23..baf144ff4d24 100644
--- a/src/Common/Commands.Profile/Commands.Profile.csproj
+++ b/src/Common/Commands.Profile/Commands.Profile.csproj
@@ -101,9 +101,9 @@
False
..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/Common/Commands.Profile/packages.config b/src/Common/Commands.Profile/packages.config
index c6df1f90f8bf..bfd8225535bb 100644
--- a/src/Common/Commands.Profile/packages.config
+++ b/src/Common/Commands.Profile/packages.config
@@ -13,5 +13,5 @@
-
+
\ No newline at end of file
diff --git a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
index 7427e38cb8d4..189a8a7cd88e 100644
--- a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
+++ b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
@@ -62,14 +62,17 @@
..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
-
- ..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -104,8 +107,8 @@
False
..\lib\Microsoft.Web.Deployment.dll
-
- ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
+
+ ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
@@ -124,13 +127,11 @@
..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.4.2-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll
-
- False
- ..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
- False
- ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -149,8 +150,9 @@
..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
- ..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -565,4 +567,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/Common/Commands.ScenarioTest/packages.config b/src/Common/Commands.ScenarioTest/packages.config
index 93be10145f5d..004b31b98a4e 100644
--- a/src/Common/Commands.ScenarioTest/packages.config
+++ b/src/Common/Commands.ScenarioTest/packages.config
@@ -10,9 +10,9 @@
-
-
-
+
+
+
@@ -23,10 +23,10 @@
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
index db95cfb49cc8..e621d6658d70 100644
--- a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
+++ b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj
@@ -88,9 +88,9 @@
..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
..\..\packages\Microsoft.Rest.ClientRuntime.1.2.0\lib\net45\Microsoft.Rest.ClientRuntime.dll
diff --git a/src/Common/Commands.ScenarioTests.Common/packages.config b/src/Common/Commands.ScenarioTests.Common/packages.config
index f93056433151..eb32f0cffd9d 100644
--- a/src/Common/Commands.ScenarioTests.Common/packages.config
+++ b/src/Common/Commands.ScenarioTests.Common/packages.config
@@ -15,7 +15,7 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj
index 92a212a9681f..30798830878f 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands.ApiManagement.ServiceManagement.csproj
@@ -74,14 +74,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -101,14 +104,6 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.2.1\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
-
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
-
..\..\..\packages\Microsoft.Rest.ClientRuntime.1.2.0\lib\net45\Microsoft.Rest.ClientRuntime.dll
True
@@ -117,6 +112,14 @@
..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.0.9.3\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll
True
+
+ False
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
+
@@ -129,8 +132,9 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config
index 178c055a6437..84c6ff82097a 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config
@@ -10,16 +10,16 @@
-
-
-
+
+
+
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
index 5816b5b1d062..6590056eb55d 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Commands.ApiManagement.Test.csproj
@@ -115,8 +115,9 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config
index 8d048f8eb640..5f561eb23e95 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/packages.config
@@ -19,7 +19,7 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
index a3d81093cd49..0f588d2199a7 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands.ApiManagement.csproj
@@ -73,14 +73,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -116,13 +119,13 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.2.1\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -136,8 +139,9 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -240,4 +244,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config b/src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config
index 178c055a6437..84c6ff82097a 100644
--- a/src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config
+++ b/src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config
@@ -10,16 +10,16 @@
-
-
-
+
+
+
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj b/src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj
index ea44f74d4435..113005a5291d 100644
--- a/src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj
+++ b/src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj
@@ -103,9 +103,9 @@
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
-
+
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/Automation/Commands.Automation.Test/packages.config b/src/ResourceManager/Automation/Commands.Automation.Test/packages.config
index 88d17b8fc2e5..9a376774acdf 100644
--- a/src/ResourceManager/Automation/Commands.Automation.Test/packages.config
+++ b/src/ResourceManager/Automation/Commands.Automation.Test/packages.config
@@ -15,6 +15,6 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj b/src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj
index e180ab0d97e4..c07f6aa16aa5 100644
--- a/src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj
+++ b/src/ResourceManager/Automation/Commands.Automation/Commands.ResourceManagement.Automation.csproj
@@ -95,9 +95,9 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
..\..\..\packages\Microsoft.Rest.ClientRuntime.1.2.0\lib\net45\Microsoft.Rest.ClientRuntime.dll
diff --git a/src/ResourceManager/Automation/Commands.Automation/packages.config b/src/ResourceManager/Automation/Commands.Automation/packages.config
index d634cabdebec..7e0da14fb194 100644
--- a/src/ResourceManager/Automation/Commands.Automation/packages.config
+++ b/src/ResourceManager/Automation/Commands.Automation/packages.config
@@ -14,5 +14,5 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
index b59c801f5618..c642a3d24bb2 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj
@@ -479,4 +479,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/packages.config b/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
index 10558b680b7a..a3ddea770d22 100644
--- a/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
+++ b/src/ResourceManager/Batch/Commands.Batch.Test/packages.config
@@ -29,4 +29,4 @@
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj b/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
index fe0102a832c0..c95dd47e5621 100644
--- a/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
+++ b/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj
@@ -74,17 +74,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
+
False
- ..\..\..\packages\Microsoft.Data.Edm.5.6.2\lib\net40\Microsoft.Data.Edm.dll
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
-
+
False
- ..\..\..\packages\Microsoft.Data.OData.5.6.2\lib\net40\Microsoft.Data.OData.dll
+ ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
-
+
False
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.2\lib\net40\Microsoft.Data.Services.Client.dll
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -105,9 +105,9 @@
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
@@ -140,9 +140,9 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
+
False
- ..\..\..\packages\System.Spatial.5.6.2\lib\net40\System.Spatial.dll
+ ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
@@ -314,4 +314,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Batch/Commands.Batch/packages.config b/src/ResourceManager/Batch/Commands.Batch/packages.config
index 406e4bfe3bfc..ed1854ce274b 100644
--- a/src/ResourceManager/Batch/Commands.Batch/packages.config
+++ b/src/ResourceManager/Batch/Commands.Batch/packages.config
@@ -20,6 +20,6 @@
-
-
-
\ No newline at end of file
+
+
+
diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj b/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj
index 5c415f69ed2e..7edae8be1972 100644
--- a/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj
+++ b/src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj
@@ -120,9 +120,9 @@
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
-
+
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/Compute/Commands.Compute.Test/packages.config b/src/ResourceManager/Compute/Commands.Compute.Test/packages.config
index 5c43b7322539..15465a598838 100644
--- a/src/ResourceManager/Compute/Commands.Compute.Test/packages.config
+++ b/src/ResourceManager/Compute/Commands.Compute.Test/packages.config
@@ -21,7 +21,7 @@
-
+
diff --git a/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj b/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
index 65d4adbb986d..6dd9ded0ce11 100644
--- a/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
+++ b/src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
@@ -93,6 +93,18 @@
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
True
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
True
@@ -113,13 +125,13 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
@@ -147,6 +159,10 @@
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
+
@@ -331,4 +347,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Compute/Commands.Compute/packages.config b/src/ResourceManager/Compute/Commands.Compute/packages.config
index 499f148eb319..e65e5f7a7b16 100644
--- a/src/ResourceManager/Compute/Commands.Compute/packages.config
+++ b/src/ResourceManager/Compute/Commands.Compute/packages.config
@@ -15,9 +15,15 @@
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
index 450f15575551..3b1b10db0a38 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj
@@ -78,6 +78,18 @@
False
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -111,17 +123,15 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -135,6 +145,10 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
+
@@ -313,4 +327,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
index 20e58c47bc13..1f47bc551623 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config
@@ -13,6 +13,9 @@
+
+
+
@@ -20,8 +23,10 @@
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
index d85aa0f37880..9e421596b850 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj
@@ -69,6 +69,18 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
False
..\..\..\packages\Microsoft.DataTransfer.Gateway.Encryption.1.5.1-preview\lib\net45\Microsoft.DataTransfer.Gateway.Encryption.dll
@@ -104,9 +116,13 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -122,12 +138,9 @@
-
+
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
-
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -262,4 +275,4 @@
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
index a2723d4d6f4f..657225ba20d7 100644
--- a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
+++ b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config
@@ -9,11 +9,16 @@
+
+
+
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj b/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj
index 760bdb3903d1..24bcaef706d9 100644
--- a/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj
+++ b/src/ResourceManager/Dns/Commands.Dns.Test/Commands.Dns.Test.csproj
@@ -109,7 +109,7 @@
False
- ..\..\..\packages\Newtonsoft.Json.6.0.6\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/Dns/Commands.Dns.Test/packages.config b/src/ResourceManager/Dns/Commands.Dns.Test/packages.config
index bdfd95c0c314..94a3d4b5fec5 100644
--- a/src/ResourceManager/Dns/Commands.Dns.Test/packages.config
+++ b/src/ResourceManager/Dns/Commands.Dns.Test/packages.config
@@ -16,7 +16,7 @@
-
+
diff --git a/src/ResourceManager/Dns/Commands.Dns/packages.config b/src/ResourceManager/Dns/Commands.Dns/packages.config
index 84977b069819..071ffeb20d0e 100644
--- a/src/ResourceManager/Dns/Commands.Dns/packages.config
+++ b/src/ResourceManager/Dns/Commands.Dns/packages.config
@@ -19,4 +19,4 @@
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
index edc46d66e996..6eb3f88dfe98 100644
--- a/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
+++ b/src/ResourceManager/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
@@ -153,7 +153,6 @@
-
diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj b/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj
index 62fa268c9c35..1170d9393e53 100644
--- a/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj
+++ b/src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj
@@ -79,6 +79,18 @@
..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.0.9.3\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll
True
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -104,14 +116,21 @@
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
+
+ ..\..\..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll
+
+
False
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll
+
+ ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
False
..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll
@@ -254,4 +273,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Insights/Commands.Insights.Test/packages.config b/src/ResourceManager/Insights/Commands.Insights.Test/packages.config
index 9ba872741d91..f56b9e310415 100644
--- a/src/ResourceManager/Insights/Commands.Insights.Test/packages.config
+++ b/src/ResourceManager/Insights/Commands.Insights.Test/packages.config
@@ -21,8 +21,8 @@
-
-
+
+
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj b/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
index 0bd75b0520b9..d60c1bc25a4f 100644
--- a/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
+++ b/src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj
@@ -63,6 +63,18 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
True
@@ -79,17 +91,27 @@
..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.0.9.3\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll
True
-
+
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
-
+
+ False
..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll
+
+
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
@@ -218,4 +240,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Insights/Commands.Insights/packages.config b/src/ResourceManager/Insights/Commands.Insights/packages.config
index abf7f79e1141..e98c3b0559c1 100644
--- a/src/ResourceManager/Insights/Commands.Insights/packages.config
+++ b/src/ResourceManager/Insights/Commands.Insights/packages.config
@@ -18,6 +18,6 @@
-
-
-
\ No newline at end of file
+
+
+
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
index 72785c08c62d..815b39849434 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/Commands.KeyVault.Test.csproj
@@ -128,7 +128,7 @@
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
False
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
index 6128899b6c80..57ec4a851010 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault.Test/packages.config
@@ -20,6 +20,6 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
index 2b8097913530..587d150e96e1 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/Commands.KeyVault.csproj
@@ -177,7 +177,7 @@
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config b/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
index 6d0e9aa3efc1..5862cde254a6 100644
--- a/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
+++ b/src/ResourceManager/KeyVault/Commands.KeyVault/packages.config
@@ -17,5 +17,5 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj b/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj
index c5728d25c4cd..c7d8e5b9cd02 100644
--- a/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj
+++ b/src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj
@@ -112,9 +112,9 @@
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
-
+
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/Network/Commands.Network.Test/packages.config b/src/ResourceManager/Network/Commands.Network.Test/packages.config
index 0707fb5fb4f7..cf4c76f614c4 100644
--- a/src/ResourceManager/Network/Commands.Network.Test/packages.config
+++ b/src/ResourceManager/Network/Commands.Network.Test/packages.config
@@ -19,7 +19,7 @@
-
+
diff --git a/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj b/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
index 893e9d985acb..c1ee3a5d3215 100644
--- a/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
+++ b/src/ResourceManager/Network/Commands.Network/Commands.Network.csproj
@@ -80,6 +80,18 @@
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
True
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
True
@@ -108,9 +120,12 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -126,6 +141,10 @@
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
+
@@ -414,4 +433,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Network/Commands.Network/packages.config b/src/ResourceManager/Network/Commands.Network/packages.config
index 847c410a5885..05f4558aa314 100644
--- a/src/ResourceManager/Network/Commands.Network/packages.config
+++ b/src/ResourceManager/Network/Commands.Network/packages.config
@@ -13,9 +13,14 @@
+
+
+
+
+
+
-
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
index 918f0acf0fe8..fa64ef976698 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj
@@ -108,7 +108,7 @@
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
index cc2857aaac9a..aa807e647b76 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config
@@ -17,7 +17,7 @@
-
+
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
index 80e5923b6d65..01afa21589a1 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj
@@ -100,7 +100,7 @@
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
index 67d90ec51272..fabfab9eda5d 100644
--- a/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
+++ b/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config
@@ -14,5 +14,5 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
index 5a7e82020369..4e7814935db6 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj
@@ -77,6 +77,18 @@
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
False
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -105,19 +117,24 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
+
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -136,6 +153,10 @@
True
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
+
diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
index 2b348d3512d9..aa660283457f 100644
--- a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
+++ b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config
@@ -13,6 +13,9 @@
+
+
+
@@ -20,8 +23,10 @@
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
index 049273471e39..3f7985b02c09 100644
--- a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
+++ b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj
@@ -107,9 +107,9 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/Resources/Commands.Resources/packages.config b/src/ResourceManager/Resources/Commands.Resources/packages.config
index 5dd20763f280..2e6cee768040 100644
--- a/src/ResourceManager/Resources/Commands.Resources/packages.config
+++ b/src/ResourceManager/Resources/Commands.Resources/packages.config
@@ -16,5 +16,5 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
index 49f0bd04e7a5..2061bd2c3c5c 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj
@@ -82,6 +82,18 @@
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
False
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -110,19 +122,24 @@
False
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
+
+ ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
+
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -141,6 +158,10 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
+
diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
index 7b8d20752868..d2a2ffa4095b 100644
--- a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
+++ b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config
@@ -14,6 +14,9 @@
+
+
+
@@ -21,8 +24,10 @@
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
index 8656ac0705c3..137d8396244d 100644
--- a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
+++ b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj
@@ -222,14 +222,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -262,13 +265,13 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -288,8 +291,9 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -314,4 +318,4 @@
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Sql/Commands.Sql/packages.config b/src/ResourceManager/Sql/Commands.Sql/packages.config
index c7a849715b13..9867c87f0005 100644
--- a/src/ResourceManager/Sql/Commands.Sql/packages.config
+++ b/src/ResourceManager/Sql/Commands.Sql/packages.config
@@ -10,6 +10,9 @@
+
+
+
@@ -20,7 +23,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj b/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj
index 412bdd578eba..770b6f1e0794 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj
+++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/Commands.Management.Storage.Test.csproj
@@ -87,8 +87,9 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config b/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config
index dd7d8035f55b..3980471f3421 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config
+++ b/src/ResourceManager/Storage/Commands.Management.Storage.Test/packages.config
@@ -15,9 +15,9 @@
+
-
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/Commands.Management.Storage.csproj b/src/ResourceManager/Storage/Commands.Management.Storage/Commands.Management.Storage.csproj
index 6bba9592f113..9db076d77888 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage/Commands.Management.Storage.csproj
+++ b/src/ResourceManager/Storage/Commands.Management.Storage/Commands.Management.Storage.csproj
@@ -88,8 +88,9 @@
..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/packages.config b/src/ResourceManager/Storage/Commands.Management.Storage/packages.config
index dff201f49cac..8789ade50686 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage/packages.config
+++ b/src/ResourceManager/Storage/Commands.Management.Storage/packages.config
@@ -10,7 +10,7 @@
+
-
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
index d368c0ee1fce..c582aa1d9828 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/Commands.StreamAnalytics.Test.csproj
@@ -75,6 +75,18 @@
False
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -108,17 +120,15 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -132,6 +142,10 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
index 41e79faac197..7fe39fba747a 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics.Test/packages.config
@@ -13,6 +13,9 @@
+
+
+
@@ -20,8 +23,10 @@
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
index 43d3edd6c1d5..6dad4683767c 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Commands.StreamAnalytics.csproj
@@ -69,6 +69,18 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
True
@@ -88,6 +100,14 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
+
+ False
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
+
@@ -101,20 +121,16 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
+
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
-
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
-
@@ -208,4 +224,4 @@
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
index 4f29bb609b31..949e75c6c2f6 100644
--- a/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
+++ b/src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/packages.config
@@ -9,10 +9,15 @@
+
+
+
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
index 3fdb6cc7f1a1..f5787714a7cc 100644
--- a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
+++ b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj
@@ -96,9 +96,9 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ResourceManager/Tags/Commands.Tags/packages.config b/src/ResourceManager/Tags/Commands.Tags/packages.config
index c6df1f90f8bf..bfd8225535bb 100644
--- a/src/ResourceManager/Tags/Commands.Tags/packages.config
+++ b/src/ResourceManager/Tags/Commands.Tags/packages.config
@@ -13,5 +13,5 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj
index 0b662ba511bb..7f5b3db20842 100644
--- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj
+++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj
@@ -85,6 +85,10 @@
..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.0.9.3\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll
True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
+
diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/packages.config b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/packages.config
index 714eb82cf505..4f8241d285b5 100644
--- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/packages.config
+++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/packages.config
@@ -18,7 +18,7 @@
-
+
diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Commands.TrafficManager2.csproj b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Commands.TrafficManager2.csproj
index 3cd481229328..30f0d9e3cf1e 100644
--- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Commands.TrafficManager2.csproj
+++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/Commands.TrafficManager2.csproj
@@ -58,6 +58,10 @@
..\..\..\packages\Microsoft.Azure.Management.TrafficManager.0.9.3-preview\lib\portable-net45+sl50+wp80+win\Microsoft.Azure.Management.TrafficManager.dll
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
+
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
@@ -150,4 +154,4 @@
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/packages.config b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/packages.config
index 9212649c1636..03caa39d1181 100644
--- a/src/ResourceManager/TrafficManager/Commands.TrafficManager2/packages.config
+++ b/src/ResourceManager/TrafficManager/Commands.TrafficManager2/packages.config
@@ -18,6 +18,6 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
index 96c936d7d5cd..c4bb8bd4c982 100644
--- a/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
+++ b/src/ResourceManager/Websites/Commands.Websites.Test/Commands.Websites.Test.csproj
@@ -93,6 +93,10 @@
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
+
@@ -112,10 +116,6 @@
..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll
-
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
-
diff --git a/src/ResourceManager/Websites/Commands.Websites.Test/packages.config b/src/ResourceManager/Websites/Commands.Websites.Test/packages.config
index ea8ef6d42ba3..4ce25a299e4e 100644
--- a/src/ResourceManager/Websites/Commands.Websites.Test/packages.config
+++ b/src/ResourceManager/Websites/Commands.Websites.Test/packages.config
@@ -20,7 +20,7 @@
-
+
\ No newline at end of file
diff --git a/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj b/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
index 295e7d16cbac..05dc375aba89 100644
--- a/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
+++ b/src/ResourceManager/Websites/Commands.Websites/Commands.Websites.csproj
@@ -113,6 +113,10 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
+
diff --git a/src/ResourceManager/Websites/Commands.Websites/packages.config b/src/ResourceManager/Websites/Commands.Websites/packages.config
index a577e824c19d..3068507c2c01 100644
--- a/src/ResourceManager/Websites/Commands.Websites/packages.config
+++ b/src/ResourceManager/Websites/Commands.Websites/packages.config
@@ -17,5 +17,5 @@
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
index dc8d0b3e3fe5..cae6095f5b5c 100644
--- a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
+++ b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj
@@ -106,9 +106,9 @@
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
-
+
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
index 88d17b8fc2e5..9a376774acdf 100644
--- a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
+++ b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config
@@ -15,6 +15,6 @@
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj b/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
index 09ac9c69e06c..ce51c6344b06 100644
--- a/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
+++ b/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj
@@ -105,9 +105,9 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.Automation.1.0.3\lib\net40\Microsoft.WindowsAzure.Management.Automation.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/Automation/Commands.Automation/packages.config b/src/ServiceManagement/Automation/Commands.Automation/packages.config
index a120f3a80816..446c073d2db2 100644
--- a/src/ServiceManagement/Automation/Commands.Automation/packages.config
+++ b/src/ServiceManagement/Automation/Commands.Automation/packages.config
@@ -14,5 +14,5 @@
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
index d3e77a5947c4..d27f0edfc063 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj
@@ -76,14 +76,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -126,13 +129,13 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -150,8 +153,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -245,4 +249,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
index 08cfab86a52e..d51ebf536480 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -20,7 +20,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
index d50c1ef09c70..224b0e687405 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj
@@ -77,14 +77,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -131,13 +134,13 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -156,8 +159,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -351,4 +355,4 @@
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
index ff503a015cab..ffc3eae93c6f 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -21,7 +21,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
index ebf762e88c19..a0b6c2075922 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj
@@ -75,14 +75,17 @@
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
True
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -128,17 +131,15 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
False
@@ -165,8 +166,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -681,4 +683,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
index f452d25b44be..0b617fa66d13 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config
@@ -10,9 +10,9 @@
-
-
-
+
+
+
@@ -23,8 +23,8 @@
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
index 3b06bb1631b3..1a4e41028e7a 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj
@@ -78,14 +78,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -132,13 +135,13 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -160,8 +163,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -557,4 +561,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
index ff503a015cab..ffc3eae93c6f 100644
--- a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
+++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -21,7 +21,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/Compute/Sync/Sync.csproj b/src/ServiceManagement/Compute/Sync/Sync.csproj
index 4eae5389bc32..adb9ffd0ee55 100644
--- a/src/ServiceManagement/Compute/Sync/Sync.csproj
+++ b/src/ServiceManagement/Compute/Sync/Sync.csproj
@@ -51,33 +51,38 @@
false
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
-
- ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
+
+ False
+ ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
+
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -129,4 +134,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs b/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs
index 922219415381..d400a43a1dce 100644
--- a/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs
+++ b/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs
@@ -106,7 +106,7 @@ private void CopyBaseImageToDestination()
var copyStatus = new ProgressStatus(0, source.Properties.Length);
using (new ProgressTracker(copyStatus, Program.SyncOutput.ProgressCopyStatus, Program.SyncOutput.ProgressCopyComplete,TimeSpan.FromSeconds(1)))
{
- destinationBlob.StartCopyFromBlob(source);
+ destinationBlob.StartCopy(source);
destinationBlob.FetchAttributes();
while (true)
diff --git a/src/ServiceManagement/Compute/Sync/packages.config b/src/ServiceManagement/Compute/Sync/packages.config
index af1815e71397..fca0416f88cd 100644
--- a/src/ServiceManagement/Compute/Sync/packages.config
+++ b/src/ServiceManagement/Compute/Sync/packages.config
@@ -1,10 +1,10 @@
-
-
-
+
+
+
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
index f68c351484b7..7368fa1ce173 100644
--- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
+++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj
@@ -93,9 +93,9 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.18.3-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
index 08ca681635a1..0469a294fb82 100644
--- a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
+++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config
@@ -14,5 +14,5 @@
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
index 8fab955800c2..6265678baced 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj
@@ -66,14 +66,17 @@
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
True
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.Hadoop.Client.1.5.9\lib\net45\Microsoft.Hadoop.Client.dll
@@ -126,15 +129,14 @@
..\..\..\packages\Microsoft.Hadoop.Client.1.5.9\lib\net45\Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.dll
-
- ..\..\..\packages\WindowsAzure.Storage.3.0.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -153,8 +155,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -302,4 +305,4 @@
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
index b2d256c67adf..0c150dece940 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config
@@ -10,9 +10,9 @@
-
-
-
+
+
+
@@ -22,10 +22,10 @@
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/HDInsight.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight/HDInsight.csproj
index 3a3e4835e0f2..b96d478c836b 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/HDInsight.csproj
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/HDInsight.csproj
@@ -71,14 +71,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -137,12 +140,13 @@
False
..\..\..\packages\Microsoft.Hadoop.Client.1.5.9\lib\net45\Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.dll
-
- ..\..\..\packages\WindowsAzure.Storage.3.0.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ False
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -159,8 +163,9 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -404,4 +409,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
index 65be88134a1d..7da728f9198c 100644
--- a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
+++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -20,7 +20,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
index 390cd133e48c..f1a359ec6fe6 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj
@@ -107,9 +107,9 @@
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
-
+
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
index 729671040e70..2c64e2683bc8 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config
@@ -19,7 +19,7 @@
-
+
diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config
index b0b087c1c311..d6563afb142a 100644
--- a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config
+++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config
@@ -19,4 +19,4 @@
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj b/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj
index 5779f5eff684..a7d6c3d5b2a5 100644
--- a/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj
+++ b/src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj
@@ -62,14 +62,14 @@
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -120,7 +120,7 @@
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -141,8 +141,8 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
diff --git a/src/ServiceManagement/Network/Commands.Network.Test/packages.config b/src/ServiceManagement/Network/Commands.Network.Test/packages.config
index 174a4fae23a0..dc6c309ca4a4 100644
--- a/src/ServiceManagement/Network/Commands.Network.Test/packages.config
+++ b/src/ServiceManagement/Network/Commands.Network.Test/packages.config
@@ -10,9 +10,9 @@
-
-
-
+
+
+
@@ -22,8 +22,8 @@
-
-
+
+
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Network/Commands.Network/Commands.ServiceManagement.Network.csproj b/src/ServiceManagement/Network/Commands.Network/Commands.ServiceManagement.Network.csproj
index b4e4f9a37c4c..f30ff681eb80 100644
--- a/src/ServiceManagement/Network/Commands.Network/Commands.ServiceManagement.Network.csproj
+++ b/src/ServiceManagement/Network/Commands.Network/Commands.ServiceManagement.Network.csproj
@@ -66,6 +66,18 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
+
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
+
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
True
@@ -96,13 +108,13 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -120,6 +132,10 @@
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
+
@@ -296,4 +312,4 @@
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Network/Commands.Network/packages.config b/src/ServiceManagement/Network/Commands.Network/packages.config
index 4cc160abd166..962d09092868 100644
--- a/src/ServiceManagement/Network/Commands.Network/packages.config
+++ b/src/ServiceManagement/Network/Commands.Network/packages.config
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -20,7 +20,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
index 58538b14e010..03ff5ed68ef0 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj
@@ -97,8 +97,9 @@
False
..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config
index c6fa6fa7da35..a3696bc76dc7 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config
@@ -16,7 +16,7 @@
-
+
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
index 955d95cf1e04..d6caccb00e89 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj
@@ -104,7 +104,7 @@
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
False
diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config
index 021df61a3a11..2d45e08bb12d 100644
--- a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config
+++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config
@@ -16,5 +16,5 @@
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj
index 43d3a7e947cc..1ea41f780056 100644
--- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj
+++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj
@@ -144,9 +144,8 @@
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
False
-
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config
index 4501b459b7e5..6efd4e03933f 100644
--- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config
+++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config
@@ -15,8 +15,8 @@
-
+
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj
index 4e2384e27a7e..a6e807fe54fd 100644
--- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj
+++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj
@@ -69,14 +69,17 @@
False
..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -123,13 +126,13 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -146,8 +149,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -244,4 +248,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config
index 74e2915ce824..fbd77518145a 100644
--- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config
+++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config
@@ -7,9 +7,9 @@
-
-
-
+
+
+
@@ -20,7 +20,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
index e88fe4bac9ee..883102d660a1 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj
@@ -103,9 +103,9 @@
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
index b86765e87636..af3a48739cfb 100644
--- a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
+++ b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config
@@ -16,6 +16,6 @@
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
index feb3a63451f7..34500fdde187 100644
--- a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
+++ b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj
@@ -72,14 +72,17 @@
False
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -148,15 +151,14 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.4.2-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -176,8 +178,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -461,4 +464,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Services/Commands.Test/packages.config b/src/ServiceManagement/Services/Commands.Test/packages.config
index 588dabc38c93..2fcaa904bc59 100644
--- a/src/ServiceManagement/Services/Commands.Test/packages.config
+++ b/src/ServiceManagement/Services/Commands.Test/packages.config
@@ -10,9 +10,9 @@
-
-
-
+
+
+
@@ -28,10 +28,10 @@
-
-
+
+
-
+
diff --git a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
index 12cc090f3f8b..60b1887e001a 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
+++ b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj
@@ -75,14 +75,17 @@
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -172,13 +175,13 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.4.2-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -197,8 +200,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -715,4 +719,4 @@
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Services/Commands.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Utilities/packages.config
index 0912155df4b2..07526ab02713 100644
--- a/src/ServiceManagement/Services/Commands.Utilities/packages.config
+++ b/src/ServiceManagement/Services/Commands.Utilities/packages.config
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -28,8 +28,8 @@
-
-
+
+
-
+
diff --git a/src/ServiceManagement/Services/Commands/Commands.csproj b/src/ServiceManagement/Services/Commands/Commands.csproj
index b111efdde9e9..b056fb4f337f 100644
--- a/src/ServiceManagement/Services/Commands/Commands.csproj
+++ b/src/ServiceManagement/Services/Commands/Commands.csproj
@@ -73,14 +73,14 @@
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -162,13 +162,9 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.4.2-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -191,8 +187,8 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -379,4 +375,4 @@
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Services/Commands/packages.config b/src/ServiceManagement/Services/Commands/packages.config
index 8aee4cc01567..0a1455530e9f 100644
--- a/src/ServiceManagement/Services/Commands/packages.config
+++ b/src/ServiceManagement/Services/Commands/packages.config
@@ -8,9 +8,9 @@
-
-
-
+
+
+
@@ -27,8 +27,7 @@
-
-
+
+
-
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj
index cb4256490731..d9bb6fb1a374 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj
@@ -70,14 +70,14 @@
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
True
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -115,9 +115,9 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.Sql.5.2.0\lib\net40\Microsoft.WindowsAzure.Management.Sql.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -141,8 +141,8 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -299,4 +299,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config
index 834abe839d63..10176ddb7b57 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config
@@ -9,16 +9,16 @@
-
-
-
+
+
+
-
-
+
+
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj b/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj
index ad63d01606fd..4697348adc0b 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj
@@ -68,14 +68,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -115,13 +118,13 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.Sql.5.2.0\lib\net40\Microsoft.WindowsAzure.Management.Sql.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -140,8 +143,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -270,4 +274,4 @@
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs
index c0bd5545d1c9..f8e48688085f 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs
@@ -41,7 +41,12 @@ public abstract class ServerDataServiceContext : ServerContextInternal
protected ServerDataServiceContext(Uri serviceUri)
: base(serviceUri)
{
+
+#pragma warning disable 618
+ // SendingRequest has been deprecated in favor of SendingRequest2, but SendingRequest2 does not
+ // currently expose functionality we depend on, such as the ability to set UserAgent.
this.SendingRequest += new EventHandler(this.BeforeSendingRequest);
+#pragma warning restore 618
// Set the default timeout for the context.
this.Timeout = DefaultDataServiceContextTimeoutInSeconds;
diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config
index 0e465cd6fc9d..00197c1e7083 100644
--- a/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config
+++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config
@@ -8,9 +8,9 @@
-
-
-
+
+
+
@@ -18,7 +18,7 @@
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj
index 997013a307c6..0442ca91057f 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj
+++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj
@@ -53,14 +53,17 @@
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
True
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -77,13 +80,11 @@
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -100,8 +101,9 @@
..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -251,4 +253,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/packages.config b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/packages.config
index d61ba5e842db..9b654ee5f47b 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/packages.config
+++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/packages.config
@@ -5,13 +5,13 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj
index 9d3d6af754fa..ad9f38049d12 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj
+++ b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj
@@ -44,31 +44,33 @@
false
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
- False
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -106,4 +108,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/packages.config b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/packages.config
index f31a6f01c1e7..c6e9c879a28b 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/packages.config
+++ b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/packages.config
@@ -1,11 +1,11 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageBlobTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageBlobTest.cs
index 505e8a058d73..29fcef9e90e2 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageBlobTest.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageBlobTest.cs
@@ -61,32 +61,32 @@ public void ValidatePipelineCloudBlobContainerTest()
}
[TestMethod]
- public void ValidatePipelineICloudBlobTest()
+ public void ValidatePipelineCloudBlobTest()
{
CloudBlockBlob blockBlob = null;
- AssertThrows(() => command.ValidatePipelineICloudBlob(blockBlob),
- String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name));
+ AssertThrows(() => command.ValidatePipelineCloudBlob(blockBlob),
+ String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlob).Name));
string blobUri = "http://127.0.0.1/account/test/";
blockBlob = new CloudBlockBlob(new Uri(blobUri));
- AssertThrows(() => command.ValidatePipelineICloudBlob(blockBlob),
+ AssertThrows(() => command.ValidatePipelineCloudBlob(blockBlob),
String.Format(Resources.InvalidBlobName, blockBlob.Name));
AddTestBlobs();
string container1Uri = "http://127.0.0.1/account/container1/blob0";
blockBlob = new CloudBlockBlob(new Uri(container1Uri));
- command.ValidatePipelineICloudBlob(blockBlob);
+ command.ValidatePipelineCloudBlob(blockBlob);
}
[TestMethod]
- public void RemoveAzureBlobByICloudBlobWithInvliadICloudBlob()
+ public void RemoveAzureBlobByCloudBlobWithInvliadCloudBlob()
{
CloudBlockBlob blockBlob = null;
AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, blockBlob, false),
- String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name));
+ String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlob).Name));
}
[TestMethod]
- public void RemoveAzureBlobByICloudBlobWithNoExistsContainer()
+ public void RemoveAzureBlobByCloudBlobWithNoExistsContainer()
{
CloudBlobContainer container = BlobMock.GetContainerReference("test");
CloudBlockBlob blockBlob = container.GetBlockBlobReference("blob");
@@ -95,7 +95,7 @@ public void RemoveAzureBlobByICloudBlobWithNoExistsContainer()
}
[TestMethod]
- public void RemoveAzureBlobByICloudBlobWithNoExistsBlobTest()
+ public void RemoveAzureBlobByCloudBlobWithNoExistsBlobTest()
{
AddTestContainers();
string blobUri = "http://127.0.0.1/account/test/blob";
@@ -105,7 +105,7 @@ public void RemoveAzureBlobByICloudBlobWithNoExistsBlobTest()
}
[TestMethod]
- public void RemoveAzureBlobByICloudBlobSuccessfulyTest()
+ public void RemoveAzureBlobByCloudBlobSuccessfulyTest()
{
AddTestBlobs();
string blobUri = "http://127.0.0.1/account/container0/blob0";
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageBlobTestBase.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageBlobTestBase.cs
index 2ecb6542b38a..8733daf01b70 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageBlobTestBase.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageBlobTestBase.cs
@@ -132,7 +132,7 @@ public void AddTestBlobs()
/// How many blobs need to be added to the container
private void AddContainerBlobs(string containerName, int count)
{
- List blobList = null;
+ List blobList = null;
if (BlobMock.ContainerBlobs.ContainsKey(containerName))
{
@@ -141,7 +141,7 @@ private void AddContainerBlobs(string containerName, int count)
}
else
{
- blobList = new List();
+ blobList = new List();
BlobMock.ContainerBlobs.Add(containerName, blobList);
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageCloudBlobCmdletBaseTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageCloudBlobCmdletBaseTest.cs
index 4a7d84c48325..9a3c307e24eb 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageCloudBlobCmdletBaseTest.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageCloudBlobCmdletBaseTest.cs
@@ -45,25 +45,25 @@ public void CleanCommand()
}
[TestMethod]
- public void ValidatePipelineICloudBlobWithNullTest()
+ public void ValidatePipelineCloudBlobWithNullTest()
{
- AssertThrows(() => command.ValidatePipelineICloudBlob(null), String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name));
+ AssertThrows(() => command.ValidatePipelineCloudBlob(null), String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlob).Name));
}
[TestMethod]
- public void ValidatePipelineICloudBlobWithInvalidBlobNameTest()
+ public void ValidatePipelineCloudBlobWithInvalidBlobNameTest()
{
CloudBlockBlob blob = new CloudBlockBlob(new Uri("http://127.0.0.1/account/container/"));
- AssertThrows(() => command.ValidatePipelineICloudBlob(blob), String.Format(Resources.InvalidBlobName, blob.Name));
+ AssertThrows(() => command.ValidatePipelineCloudBlob(blob), String.Format(Resources.InvalidBlobName, blob.Name));
}
[TestMethod]
- public void ValidatePipelineICloudBlobSuccessfullyTest()
+ public void ValidatePipelineCloudBlobSuccessfullyTest()
{
AddTestBlobs();
CloudBlockBlob blob = new CloudBlockBlob(new Uri("http://127.0.0.1/account/container1/blob0"));
- command.ValidatePipelineICloudBlob(blob);
+ command.ValidatePipelineCloudBlob(blob);
}
[TestMethod]
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj b/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj
index 28472a4c5b40..8b1be4117fb8 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj
@@ -70,14 +70,17 @@
..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5687.28567-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll
True
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
False
@@ -113,16 +116,15 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
- False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
False
..\..\..\lib\Microsoft.WindowsAzure.Storage.DataMovement.dll
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -142,8 +144,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -282,4 +285,4 @@
-->
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockTransferJobRunner.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockTransferJobRunner.cs
index d9f43c4fd6ad..c21511130539 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockTransferJobRunner.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockTransferJobRunner.cs
@@ -17,22 +17,22 @@
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
+using Microsoft.WindowsAzure.Storage.DataMovement;
namespace Microsoft.WindowsAzure.Management.Storage.Test.Common
{
internal sealed class MockTransferJobRunner : ITransferJobRunner
{
- private Func runnerValidation;
+ private Func runnerValidation;
private AssertFailedException assertException;
- public MockTransferJobRunner(Func runnerValidation)
+ public MockTransferJobRunner(Func runnerValidation)
{
this.runnerValidation = runnerValidation;
}
- public Task RunTransferJob(TransferJobBase job, Action progressReport, CancellationToken cancellationToken)
+ public Task RunTransferJob(TransferJob job, Action progressReport, CancellationToken cancellationToken)
{
try
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileContentTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileContentTest.cs
index c18d1dfb5dc3..c42364b91caa 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileContentTest.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileContentTest.cs
@@ -7,7 +7,6 @@
using Microsoft.WindowsAzure.Commands.Storage.File;
using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet;
using Microsoft.WindowsAzure.Management.Storage.Test.Common;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet
{
@@ -113,11 +112,9 @@ private void DownloadFileInternal(string shareName, string fileName, string dest
var mockupRunner = new MockTransferJobRunner(
job =>
{
- Assert.IsTrue(job is FileDownloadJob, "The transfer job must be an instance of FileDownloadJob.");
- var downloadJob = job as FileDownloadJob;
- Assert.AreEqual(destination, downloadJob.DestPath, "Destination validation failed.");
- Assert.AreEqual(shareName, downloadJob.SourceFile.Share.Name, "Share validation failed.");
- Assert.AreEqual(fileName, downloadJob.SourceFile.Name, "SourceFile validation failed.");
+ Assert.AreEqual(destination, job.Destination.FilePath, "Destination validation failed.");
+ Assert.AreEqual(shareName, job.Source.AzureFile.Share.Name, "Share validation failed.");
+ Assert.AreEqual(fileName, job.Source.AzureFile.Name, "SourceFile validation failed.");
return TaskEx.FromResult(true);
});
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/SetAzureStorageFileContentTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/SetAzureStorageFileContentTest.cs
index 69b19d81f382..0c503c9f1828 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/SetAzureStorageFileContentTest.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/SetAzureStorageFileContentTest.cs
@@ -21,7 +21,6 @@
using Microsoft.WindowsAzure.Commands.Storage.File;
using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet;
using Microsoft.WindowsAzure.Management.Storage.Test.Common;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet
{
@@ -140,11 +139,9 @@ private void UploadFileInternal(string shareName, string sourceFilePath, string
var mockupRunner = new MockTransferJobRunner(
job =>
{
- Assert.IsTrue(job is FileUploadJob, "The transfer job must be an instance of FileUploadJob.");
- var uploadJob = job as FileUploadJob;
- Assert.AreEqual(destinationFileName, uploadJob.DestFile.Name, "Destination file name validation failed.");
- Assert.AreEqual(shareName, uploadJob.DestFile.Share.Name, "Share validation failed.");
- Assert.AreEqual(sourceFilePath, uploadJob.SourcePath, "Source file validation failed.");
+ Assert.AreEqual(destinationFileName, job.Destination.AzureFile.Name, "Destination file name validation failed.");
+ Assert.AreEqual(shareName, job.Destination.AzureFile.Share.Name, "Share validation failed.");
+ Assert.AreEqual(sourceFilePath, job.Source.FilePath, "Source file validation failed.");
return TaskEx.FromResult(true);
});
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageBlobManagement.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageBlobManagement.cs
index 363e4aec4d97..3037b4ddaba0 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageBlobManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageBlobManagement.cs
@@ -82,8 +82,8 @@ public Dictionary ContainerPermissions
///
/// Container blobs list
///
- private Dictionary> containerBlobs = new Dictionary>();
- public Dictionary> ContainerBlobs
+ private Dictionary> containerBlobs = new Dictionary>();
+ public Dictionary> ContainerBlobs
{
get
{
@@ -231,16 +231,16 @@ public void SetContainerPermissions(CloudBlobContainer container, BlobContainerP
/// Access condition
/// Blob request options
/// Operation context
- /// Return an ICloudBlob if the specific blob exists on azure, otherwise return null
- public ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ /// Return an CloudBlob if the specific blob exists on azure, otherwise return null
+ public CloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
string containerName = container.Name;
if (ContainerBlobs.ContainsKey(containerName))
{
- List blobList = ContainerBlobs[containerName];
+ List blobList = ContainerBlobs[containerName];
- foreach (ICloudBlob blob in blobList)
+ foreach (CloudBlob blob in blobList)
{
if (blob.Name == blobName)
{
@@ -265,23 +265,23 @@ public ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, strin
/// Blob listing details
/// Blob request option
/// Operation context
- /// An enumerable collection of icloudblob
+ /// An enumerable collection of CloudBlob
public IEnumerable ListBlobs(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, BlobRequestOptions options, OperationContext operationContext)
{
string containerName = container.Name;
if (ContainerBlobs.ContainsKey(containerName))
{
- List blobList = ContainerBlobs[containerName];
+ List blobList = ContainerBlobs[containerName];
if (string.IsNullOrEmpty(prefix))
{
return blobList;
}
- List prefixBlobs = new List();
+ List prefixBlobs = new List();
- foreach (ICloudBlob blob in blobList)
+ foreach (CloudBlob blob in blobList)
{
if (blob.Name.StartsWith(prefix))
{
@@ -293,7 +293,7 @@ public IEnumerable ListBlobs(CloudBlobContainer container, string
}
else
{
- return new List();
+ return new List();
}
}
@@ -325,11 +325,11 @@ public bool DoesContainerExist(CloudBlobContainer container, BlobRequestOptions
///
/// Whether the blob is exists or not
///
- /// A icloudblob object
+ /// A CloudBlob object
/// Blob request option
/// Operation context
/// True if the specific blob exists, otherwise return false
- public bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext)
+ public bool DoesBlobExist(CloudBlob blob, BlobRequestOptions options, OperationContext operationContext)
{
CloudBlobContainer container = blob.Container;
@@ -339,9 +339,9 @@ public bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, Operation
}
else
{
- List blobList = ContainerBlobs[container.Name];
+ List blobList = ContainerBlobs[container.Name];
- foreach (ICloudBlob blobRef in blobList)
+ foreach (CloudBlob blobRef in blobList)
{
if (blobRef.Name == blob.Name)
{
@@ -356,12 +356,12 @@ public bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, Operation
///
/// Delete azure blob
///
- /// ICloudblob object
+ /// Cloudblob object
/// Delete snapshots option
/// Access condition
/// Operation context
- /// An enumerable collection of icloudblob
- public void DeleteICloudBlob(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ /// An enumerable collection of CloudBlob
+ public void DeleteCloudBlob(CloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
CloudBlobContainer container = blob.Container;
@@ -371,9 +371,9 @@ public void DeleteICloudBlob(ICloudBlob blob, DeleteSnapshotsOption deleteSnapsh
}
else if (ContainerBlobs.ContainsKey(container.Name))
{
- List blobList = ContainerBlobs[container.Name];
+ List blobList = ContainerBlobs[container.Name];
- foreach (ICloudBlob blobRef in blobList)
+ foreach (CloudBlob blobRef in blobList)
{
if (blobRef.Name == blob.Name)
{
@@ -404,7 +404,7 @@ public void FetchContainerAttributes(CloudBlobContainer container, AccessConditi
/// Access condition
/// blob request options
/// An object that represents the context for the current operation.
- public void FetchBlobAttributes(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public void FetchBlobAttributes(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return ;
}
@@ -415,7 +415,7 @@ public void FetchBlobAttributes(ICloudBlob blob, AccessCondition accessCondition
/// Access condition
/// blob request options
/// An object that represents the context for the current operation.
- public void SetBlobProperties(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public void SetBlobProperties(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return;
}
@@ -427,7 +427,7 @@ public void SetBlobProperties(ICloudBlob blob, AccessCondition accessCondition,
/// Access condition
/// blob request options
/// An object that represents the context for the current operation.
- public void SetBlobMetadata(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public void SetBlobMetadata(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return;
}
@@ -435,12 +435,12 @@ public void SetBlobMetadata(ICloudBlob blob, AccessCondition accessCondition, Bl
///
/// Abort copy operation on specified blob
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Copy id
/// Access condition
/// Blob request options
/// Operation context
- public void AbortCopy(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public void AbortCopy(CloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return;
}
@@ -531,12 +531,12 @@ public Task DoesContainerExistAsync(CloudBlobContainer container, BlobRequ
///
/// Return a task that asynchronously check whether the specified blob exists.
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Blob request options
/// Operation context
/// Cancellation token
/// A task object that asynchronously check whether the specified blob exists.
- public Task DoesBlobExistAsync(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
+ public Task DoesBlobExistAsync(CloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return Task.Factory.StartNew(() => this.DoesBlobExist(blob, options, operationContext));
}
@@ -551,7 +551,7 @@ public Task DoesBlobExistAsync(ICloudBlob blob, BlobRequestOptions options
/// Operation context
/// Cancellation token
/// A task object that asynchronously get the blob reference from server
- public Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
+ public Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return Task.Factory.StartNew(() => this.GetBlobReferenceFromServer(container, blobName, accessCondition, options, operationContext));
}
@@ -565,7 +565,7 @@ public Task GetBlobReferenceFromServerAsync(CloudBlobContainer conta
/// Operation context
/// Cancellation token
/// Return a task that asynchronously fetch blob attributes
- public Task FetchBlobAttributesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
+ public Task FetchBlobAttributesAsync(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return Task.Factory.StartNew(() => this.FetchBlobAttributes(blob, accessCondition, options, operationContext));
}
@@ -601,14 +601,14 @@ public Task DeleteContainerAsync(CloudBlobContainer container, AccessCondition a
///
/// Return a task that asynchronously abort the blob copy operation
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Copy id
/// Access condition
/// Blob request options
/// Operation context
/// Cancellation token
/// Return a task that asynchronously abort the blob copy operation
- public Task AbortCopyAsync(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOption, OperationContext operationContext, CancellationToken cmdletCancellationToken)
+ public Task AbortCopyAsync(CloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOption, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return Task.Factory.StartNew(() => this.AbortCopy(blob, copyId, accessCondition, requestOption, operationContext));
}
@@ -629,16 +629,16 @@ public Task SetContainerPermissionsAsync(CloudBlobContainer container, BlobConta
///
/// Return a task that asynchronously delete the specified blob
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Snapshot delete option
/// Access condition
/// Blob request option
/// Operation context
/// Cancellation token
/// Return a task that asynchronously delete the specified blob
- public Task DeleteICloudBlobAsync(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken)
+ public Task DeleteCloudBlobAsync(CloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
- return Task.Factory.StartNew(() => this.DeleteICloudBlob(blob, deleteSnapshotsOption, accessCondition, requestOptions, operationContext));
+ return Task.Factory.StartNew(() => this.DeleteCloudBlob(blob, deleteSnapshotsOption, accessCondition, requestOptions, operationContext));
}
///
@@ -648,7 +648,7 @@ public Task DeleteICloudBlobAsync(ICloudBlob blob, DeleteSnapshotsOption deleteS
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- public Task SetBlobPropertiesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
+ public Task SetBlobPropertiesAsync(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return Task.Factory.StartNew(() => this.SetBlobProperties(blob, accessCondition, options, operationContext));
}
@@ -660,7 +660,7 @@ public Task SetBlobPropertiesAsync(ICloudBlob blob, AccessCondition accessCondit
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- public Task SetBlobMetadataAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
+ public Task SetBlobMetadataAsync(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return Task.Factory.StartNew(() => this.SetBlobMetadata(blob, accessCondition, options, operationContext));
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageFileManagement.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageFileManagement.cs
index f5a8a9fc5ea4..e66a6b2ad88d 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageFileManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageFileManagement.cs
@@ -57,6 +57,16 @@ public CloudFileShare GetShareReference(string shareName)
return client.GetShareReference(shareName);
}
+ public void FetchShareAttributes(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SetShareProperties(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
+ {
+ throw new NotImplementedException();
+ }
+
public Task EnumerateFilesAndDirectoriesAsync(CloudFileDirectory directory, Action enumerationAction, FileRequestOptions options, OperationContext operationContext, CancellationToken token)
{
IListFileItem[] enumerationItems;
@@ -139,5 +149,34 @@ public AzureStorageContext StorageContext
{
get { throw new NotImplementedException(); }
}
+
+ public Task GetSharePermissionsAsync(CloudFileShare share, AccessCondition accessCondition,
+ FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException();
+ }
+
+ public FileSharePermissions GetSharePermissions(CloudFileShare share, AccessCondition accessCondition = null,
+ FileRequestOptions options = null, OperationContext operationContext = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SetSharePermissions(CloudFileShare share, FileSharePermissions permissions,
+ AccessCondition accessCondition = null,
+ FileRequestOptions options = null, OperationContext operationContext = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task FetchFileAttributesAsync(CloudFile file, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken token)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task AbortCopyAsync(CloudFile file, string copyId, AccessCondition accessCondition, FileRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config b/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config
index d3fce4ef9c33..e6dd434765d8 100644
--- a/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config
+++ b/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config
@@ -9,17 +9,17 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs
index a082183566d6..a9c5c3284ceb 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs
@@ -12,18 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ 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;
+
///
/// list azure blobs in specified azure container
///
@@ -180,7 +180,7 @@ internal async Task ListBlobsByName(long taskId, IStorageBlobManagement localCha
wildcard = new WildcardPattern(blobName, options);
}
- Func blobFilter = (blob) => wildcard == null || wildcard.IsMatch(blob.Name);
+ Func blobFilter = (blob) => wildcard == null || wildcard.IsMatch(blob.Name);
await ListBlobsByPrefix(taskId, localChannel, containerName, prefix, blobFilter);
}
else
@@ -192,7 +192,7 @@ internal async Task ListBlobsByName(long taskId, IStorageBlobManagement localCha
throw new ArgumentException(String.Format(Resources.InvalidBlobName, blobName));
}
- ICloudBlob blob = await localChannel.GetBlobReferenceFromServerAsync(container, blobName, accessCondition, requestOptions, OperationContext, CmdletCancellationToken);
+ CloudBlob blob = await localChannel.GetBlobReferenceFromServerAsync(container, blobName, accessCondition, requestOptions, OperationContext, CmdletCancellationToken);
if (null == blob)
{
@@ -200,7 +200,7 @@ internal async Task ListBlobsByName(long taskId, IStorageBlobManagement localCha
}
else
{
- WriteICloudBlobObject(taskId, localChannel, blob);
+ WriteCloudBlobObject(taskId, localChannel, blob);
}
}
}
@@ -211,7 +211,7 @@ internal async Task ListBlobsByName(long taskId, IStorageBlobManagement localCha
/// container name
/// blob preifx
/// An enumerable collection of IListBlobItem
- internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localChannel, string containerName, string prefix, Func blobFilter = null)
+ internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localChannel, string containerName, string prefix, Func blobFilter = null)
{
CloudBlobContainer container = await GetCloudBlobContainerByName(localChannel, containerName);
@@ -234,7 +234,7 @@ internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localC
foreach (IListBlobItem blobItem in blobResult.Results)
{
- ICloudBlob blob = blobItem as ICloudBlob;
+ CloudBlob blob = blobItem as CloudBlob;
if (blob == null)
{
@@ -243,7 +243,7 @@ internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localC
if (blobFilter == null || blobFilter(blob))
{
- WriteICloudBlobObject(taskId, localChannel, blob, blobResult.ContinuationToken);
+ WriteCloudBlobObject(taskId, localChannel, blob, blobResult.ContinuationToken);
realListCount++;
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs
index c982d7df5a60..ee257bd44f58 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs
@@ -22,7 +22,7 @@
using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
+using Microsoft.WindowsAzure.Storage.DataMovement;
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
@@ -45,10 +45,11 @@ public class GetAzureStorageBlobContentCommand : StorageDataMovementCmdletBase
///
private const string ContainerParameterSet = "ContainerPipeline";
+ [Alias("ICloudBlob")]
[Parameter(HelpMessage = "Azure Blob Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = BlobParameterSet)]
[ValidateNotNull]
- public ICloudBlob ICloudBlob { get; set; }
+ public CloudBlob CloudBlob { get; set; }
[Parameter(HelpMessage = "Azure Container Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerParameterSet)]
@@ -92,7 +93,7 @@ public SwitchParameter CheckMd5
}
private bool checkMd5;
- private AzureToFileSystemFileNameResolver fileNameResolver;
+ private BlobToFileSystemNameResolver fileNameResolver;
///
/// Initializes a new instance of the GetAzureStorageBlobContentCommand class.
@@ -109,7 +110,7 @@ public GetAzureStorageBlobContentCommand()
public GetAzureStorageBlobContentCommand(IStorageBlobManagement channel)
{
Channel = channel;
- fileNameResolver = new AzureToFileSystemFileNameResolver(() => NameUtil.WindowsMaxFileNameLength);
+ fileNameResolver = new BlobToFileSystemNameResolver(() => NameUtil.WindowsMaxFileNameLength);
}
///
@@ -117,7 +118,7 @@ public GetAzureStorageBlobContentCommand(IStorageBlobManagement channel)
///
/// Source blob object
/// Destination file path
- internal virtual async Task DownloadBlob(long taskId, IStorageBlobManagement localChannel, ICloudBlob blob, string filePath)
+ internal virtual async Task DownloadBlob(long taskId, IStorageBlobManagement localChannel, CloudBlob blob, string filePath)
{
string activity = String.Format(Resources.ReceiveAzureBlobActivity, blob.Name, filePath);
string status = Resources.PrepareDownloadingBlob;
@@ -130,19 +131,24 @@ internal virtual async Task DownloadBlob(long taskId, IStorageBlobManagement loc
Record = pr
};
- BlobDownloadJob downloadJob = new BlobDownloadJob()
+ TransferJob downloadJob = new TransferJob(
+ new TransferLocation(blob),
+ new TransferLocation(filePath),
+ TransferMethod.SyncCopy);
+
+ BlobRequestOptions requestOptions = downloadJob.Source.RequestOptions as BlobRequestOptions;
+
+ if (null == requestOptions)
{
- SourceBlob = blob,
- DestPath = filePath,
- };
+ requestOptions = new BlobRequestOptions();
+ }
- BlobRequestOptions requestOptions = downloadJob.BlobRequestOptions;
requestOptions.DisableContentMD5Validation = !checkMd5;
- downloadJob.BlobRequestOptions = requestOptions;
+ downloadJob.Source.RequestOptions = requestOptions;
await this.RunTransferJob(downloadJob, data);
- this.WriteICloudBlobObject(data.TaskId, data.Channel, blob);
+ this.WriteCloudBlobObject(data.TaskId, data.Channel, blob);
}
///
@@ -168,12 +174,7 @@ internal void GetBlobContent(string containerName, string blobName, string fileN
BlobRequestOptions requestOptions = RequestOptions;
AccessCondition accessCondition = null;
- ICloudBlob blob = Channel.GetBlobReferenceFromServer(container, blobName, accessCondition, requestOptions, OperationContext);
-
- if (null == blob)
- {
- throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, containerName));
- }
+ CloudBlob blob = GetBlobReferenceFromServerWithContainer(Channel, container, blobName, accessCondition, requestOptions, OperationContext);
GetBlobContent(blob, fileName, true);
}
@@ -197,12 +198,8 @@ internal void GetBlobContent(CloudBlobContainer container, string blobName, stri
ValidatePipelineCloudBlobContainer(container);
AccessCondition accessCondition = null;
BlobRequestOptions requestOptions = RequestOptions;
- ICloudBlob blob = Channel.GetBlobReferenceFromServer(container, blobName, accessCondition, requestOptions, OperationContext);
- if (null == blob)
- {
- throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, container.Name));
- }
+ CloudBlob blob = GetBlobReferenceFromServerWithContainer(Channel, container, blobName, accessCondition, requestOptions, OperationContext);
GetBlobContent(blob, filePath, true);
}
@@ -210,18 +207,20 @@ internal void GetBlobContent(CloudBlobContainer container, string blobName, stri
///
/// get blob content
///
- /// source ICloudBlob object
+ /// source CloudBlob object
/// destination file path
/// whether the source container validated
/// the downloaded AzureStorageBlob object
- internal void GetBlobContent(ICloudBlob blob, string fileName, bool isValidBlob = false)
+ internal void GetBlobContent(CloudBlob blob, string fileName, bool isValidBlob = false)
{
if (null == blob)
{
- throw new ArgumentNullException(typeof(ICloudBlob).Name, String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name));
+ throw new ArgumentNullException(typeof(CloudBlob).Name, String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlob).Name));
}
- //skip download the snapshot except the ICloudBlob pipeline
+ ValidateBlobType(blob);
+
+ //skip download the snapshot except the CloudBlob pipeline
if (IsSnapshot(blob) && ParameterSetName != BlobParameterSet)
{
WriteWarning(String.Format(Resources.SkipDownloadSnapshot, blob.Name, blob.SnapshotTime));
@@ -232,7 +231,7 @@ internal void GetBlobContent(ICloudBlob blob, string fileName, bool isValidBlob
if (!isValidBlob)
{
- ValidatePipelineICloudBlob(blob);
+ ValidatePipelineCloudBlob(blob);
}
//create the destination directory if not exists.
@@ -293,7 +292,7 @@ public override void ExecuteCmdlet()
switch (ParameterSetName)
{
case BlobParameterSet:
- GetBlobContent(ICloudBlob, FileName, true);
+ GetBlobContent(CloudBlob, FileName, true);
break;
case ContainerParameterSet:
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs
index 807f16f963b6..2894c51adef3 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs
@@ -12,19 +12,19 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Concurrent;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
+ using System;
+ using System.Collections.Concurrent;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
[Cmdlet(VerbsCommon.Get, StorageNouns.CopyBlobStatus, DefaultParameterSetName = NameParameterSet),
OutputType(typeof(AzureStorageBlob))]
public class GetAzureStorageBlobCopyState : StorageCloudBlobCmdletBase
@@ -44,9 +44,10 @@ public class GetAzureStorageBlobCopyState : StorageCloudBlobCmdletBase
///
private const string NameParameterSet = "NamePipeline";
- [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true,
+ [Alias("ICloudBlob")]
+ [Parameter(HelpMessage = "CloudBlob Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSet)]
- public ICloudBlob ICloudBlob { get; set; }
+ public CloudBlob CloudBlob { get; set; }
[Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParmeterSet)]
@@ -80,9 +81,9 @@ public SwitchParameter WaitForComplete
private bool waitForComplete;
///
- /// ICloudBlob objects which need to mointor until copy complete
+ /// CloudBlob objects which need to mointor until copy complete
///
- private ConcurrentQueue> jobList = new ConcurrentQueue>();
+ private ConcurrentQueue> jobList = new ConcurrentQueue>();
private ConcurrentDictionary TaskStatus = new ConcurrentDictionary();
///
@@ -110,23 +111,23 @@ protected bool IsTaskCompleted(long taskId)
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public override void ExecuteCmdlet()
{
- ICloudBlob blob = default(ICloudBlob);
+ CloudBlob blob = null;
switch (ParameterSetName)
{
case NameParameterSet:
- blob = GetICloudBlobObject(ContainerName, BlobName);
+ blob = GetCloudBlobObject(ContainerName, BlobName);
break;
case ContainerPipelineParmeterSet:
- blob = GetICloudBlobObject(CloudBlobContainer, BlobName);
+ blob = GetCloudBlobObject(CloudBlobContainer, BlobName);
break;
case BlobPipelineParameterSet:
- blob = GetICloudBlobObject(ICloudBlob);
+ blob = GetCloudBlobObject(CloudBlob);
break;
}
long taskId = InternalTotalTaskCount;
- jobList.Enqueue(new Tuple(taskId, blob));
+ jobList.Enqueue(new Tuple(taskId, blob));
InternalTotalTaskCount++;
}
@@ -172,7 +173,7 @@ private void UpdateTaskCount(CopyStatus status)
///
/// ICloud blob object
/// Progress record
- internal void WriteCopyProgress(ICloudBlob blob, ProgressRecord progress)
+ internal void WriteCopyProgress(CloudBlob blob, ProgressRecord progress)
{
if(blob.CopyState == null) return ;
long bytesCopied = blob.CopyState.BytesCopied ?? 0;
@@ -187,7 +188,7 @@ internal void WriteCopyProgress(ICloudBlob blob, ProgressRecord progress)
string activity = String.Format(Resources.CopyBlobStatus, blob.CopyState.Status.ToString(), blob.Name, blob.Container.Name, blob.CopyState.Source.ToString());
progress.Activity = activity;
- string message = String.Format(Resources.CopyBlobPendingStatus, percent, blob.CopyState.BytesCopied, blob.CopyState.TotalBytes);
+ string message = String.Format(Resources.CopyPendingStatus, percent, blob.CopyState.BytesCopied, blob.CopyState.TotalBytes);
progress.StatusDescription = message;
OutputStream.WriteProgress(progress);
}
@@ -197,11 +198,11 @@ internal void WriteCopyProgress(ICloudBlob blob, ProgressRecord progress)
///
/// Container name
/// blob name
- /// ICloudBlob object
- private ICloudBlob GetICloudBlobObject(string containerName, string blobName)
+ /// CloudBlob object
+ private CloudBlob GetCloudBlobObject(string containerName, string blobName)
{
CloudBlobContainer container = Channel.GetContainerReference(containerName);
- return GetICloudBlobObject(container, blobName);
+ return GetCloudBlobObject(container, blobName);
}
///
@@ -209,33 +210,31 @@ private ICloudBlob GetICloudBlobObject(string containerName, string blobName)
///
/// CloudBlobContainer object
/// Blob name
- /// ICloudBlob object
- private ICloudBlob GetICloudBlobObject(CloudBlobContainer container, string blobName)
+ /// CloudBlob object
+ private CloudBlob GetCloudBlobObject(CloudBlobContainer container, string blobName)
{
AccessCondition accessCondition = null;
BlobRequestOptions options = RequestOptions;
- ValidateBlobName(blobName);
- ValidateContainerName(container.Name);
+ NameUtil.ValidateBlobName(blobName);
+ NameUtil.ValidateContainerName(container.Name);
- ICloudBlob blob = Channel.GetBlobReferenceFromServer(container, blobName, accessCondition, options, OperationContext);
+ CloudBlob blob = GetBlobReferenceFromServerWithContainer(Channel, container, blobName, accessCondition, options, OperationContext);
- if (blob == null)
- {
- throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, container.Name));
- }
-
- return GetICloudBlobObject(blob);
+ return GetCloudBlobObject(blob);
}
///
- /// Get blob with copy status by ICloudBlob object
+ /// Get blob with copy status by CloudBlob object
///
- /// ICloudBlob object
- /// ICloudBlob object
- private ICloudBlob GetICloudBlobObject(ICloudBlob blob)
+ /// CloudBlob object
+ /// CloudBlob object
+ private CloudBlob GetCloudBlobObject(CloudBlob blob)
{
- ValidateBlobName(blob.Name);
+ NameUtil.ValidateBlobName(blob.Name);
+
+ ValidateBlobType(blob);
+
return blob;
}
@@ -260,7 +259,7 @@ protected override void EndProcessing()
protected async Task MonitorBlobCopyStatusAsync(long taskId)
{
ProgressRecord records = new ProgressRecord(OutputStream.GetProgressId(taskId), Resources.CopyBlobActivity, Resources.CopyBlobActivity);
- Tuple monitorRequest = null;
+ Tuple monitorRequest = null;
BlobRequestOptions requestOptions = RequestOptions;
AccessCondition accessCondition = null;
OperationContext context = OperationContext;
@@ -272,7 +271,7 @@ protected async Task MonitorBlobCopyStatusAsync(long taskId)
if(monitorRequest != null)
{
long internalTaskId = monitorRequest.Item1;
- ICloudBlob blob = monitorRequest.Item2;
+ CloudBlob blob = monitorRequest.Item2;
//Just use the last blob management channel since the following operation is context insensitive
await Channel.FetchBlobAttributesAsync(blob, accessCondition, requestOptions, context, CmdletCancellationToken);
bool taskDone = false;
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs
index de5b3c50ae8a..cacbebb0b483 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs
@@ -12,19 +12,19 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
+ using System;
+ using System.Collections.Generic;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ 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;
+
///
/// List azure storage container
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainerStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainerStoredAccessPolicy.cs
index 2e2f223ab9d2..661f094d6848 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainerStoredAccessPolicy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainerStoredAccessPolicy.cs
@@ -22,7 +22,6 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
using Common;
using Microsoft.WindowsAzure.Storage.Blob;
using Model.Contract;
- using Model.ResourceModel;
///
/// create a new azure container
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs
index 71e681d7e719..cd5139d2b278 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
[Cmdlet(VerbsCommon.New, StorageNouns.BlobSas, DefaultParameterSetName = BlobNamePipelineParmeterSetWithPermission), OutputType(typeof(String))]
public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase
{
@@ -44,11 +44,12 @@ public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase
///
private const string BlobPipelineParameterSetWithPolicy = "BlobPipelineWithPolicy";
- [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true,
+ [Alias("ICloudBlob")]
+ [Parameter(HelpMessage = "CloudBlob Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSetWithPolicy)]
- [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true,
+ [Parameter(HelpMessage = "CloudBlob Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSetWithPermision)]
- public ICloudBlob ICloudBlob { get; set; }
+ public CloudBlob CloudBlob { get; set; }
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Container Name",
ParameterSetName = BlobNamePipelineParmeterSetWithPermission)]
@@ -117,16 +118,16 @@ public NewAzureStorageBlobSasTokenCommand(IStorageBlobManagement channel)
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public override void ExecuteCmdlet()
{
- ICloudBlob blob = default(ICloudBlob);
+ CloudBlob blob = null;
if (ParameterSetName == BlobNamePipelineParmeterSetWithPermission ||
ParameterSetName == BlobNamePipelineParmeterSetWithPolicy)
{
- blob = GetICloudBlobByName(Container, Blob);
+ blob = GetCloudBlobByName(Container, Blob);
}
else
{
- blob = ICloudBlob;
+ blob = this.CloudBlob;
}
SharedAccessBlobPolicy accessPolicy = new SharedAccessBlobPolicy();
@@ -149,30 +150,14 @@ public override void ExecuteCmdlet()
///
/// Get blob shared access signature
///
- /// ICloudBlob object
+ /// CloudBlob object
/// SharedAccessBlobPolicy object
/// The existing policy identifier.
///
- private string GetBlobSharedAccessSignature(ICloudBlob blob, SharedAccessBlobPolicy accessPolicy, string policyIdentifier)
+ private string GetBlobSharedAccessSignature(CloudBlob blob, SharedAccessBlobPolicy accessPolicy, string policyIdentifier)
{
CloudBlobContainer container = blob.Container;
- string signature = String.Empty;
-
- switch (blob.BlobType)
- {
- case BlobType.BlockBlob:
- CloudBlockBlob blockBlob = blob as CloudBlockBlob;
- signature = blockBlob.GetSharedAccessSignature(accessPolicy, policyIdentifier);
- break;
- case BlobType.PageBlob:
- CloudPageBlob pageBlob = blob as CloudPageBlob;
- signature = pageBlob.GetSharedAccessSignature(accessPolicy, policyIdentifier);
- break;
- default:
- throw new ArgumentException(Resources.UnknownBlob);
- }
-
- return signature;
+ return blob.GetSharedAccessSignature(accessPolicy, policyIdentifier);
}
///
@@ -221,12 +206,12 @@ internal void SetupAccessPolicyPermission(SharedAccessBlobPolicy policy, string
}
///
- /// Get ICloudBlob object by name
+ /// Get CloudBlob object by name
///
/// Container name
/// Blob name.
- /// ICloudBlob object
- private ICloudBlob GetICloudBlobByName(string ContainerName, string BlobName)
+ /// CloudBlob object
+ private CloudBlob GetCloudBlobByName(string ContainerName, string BlobName)
{
CloudBlobContainer container = Channel.GetContainerReference(ContainerName);
//Create a block blob object in local no mattter what's the real blob type. If so, we can save the unnecessary request calls.
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs
index 705fff66c209..8e56381485a8 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs
@@ -12,17 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ 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;
+
///
/// create a new azure container
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs
index 97f25ba8ad33..5fd18bcfa596 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
[Cmdlet(VerbsCommon.New, StorageNouns.ContainerSas), OutputType(typeof(String))]
public class NewAzureStorageContainerSasTokenCommand : StorageCloudBlobCmdletBase
{
@@ -102,7 +102,7 @@ public override void ExecuteCmdlet()
if (FullUri)
{
- string fullUri = container.Uri.ToString() + sasToken;
+ string fullUri = SasTokenHelper.GetFullUriWithSASToken(container.Uri.AbsoluteUri.ToString(), sasToken);
WriteObject(fullUri);
}
else
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerStoredAccessPolicy.cs
index 2766e505fa0f..61a64de80609 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerStoredAccessPolicy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerStoredAccessPolicy.cs
@@ -18,11 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
using System.Globalization;
using System.Management.Automation;
using System.Security.Permissions;
- using System.Threading.Tasks;
using Common;
using Microsoft.WindowsAzure.Storage.Blob;
using Model.Contract;
- using Model.ResourceModel;
///
/// create a new azure container
@@ -43,7 +41,7 @@ public class NewAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo
[ValidateNotNullOrEmpty]
public string Policy {get; set; }
- [Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"audq\".")]
+ [Parameter(HelpMessage = "Permissions for a container. Permissions can be any subset of \"rwdl\".")]
public string Permission { get; set; }
[Parameter(HelpMessage = "Start Time")]
@@ -96,8 +94,6 @@ internal string CreateAzureContainerStoredAccessPolicy(IStorageBlobManagement lo
return policyName;
}
-
-
///
/// execute command
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs
index 04d274c5db7a..8380eab42e85 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs
@@ -12,17 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
[Cmdlet(VerbsCommon.Remove, StorageNouns.Blob, DefaultParameterSetName = NameParameterSet, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High),
OutputType(typeof(Boolean))]
public class RemoveStorageAzureBlobCommand : StorageCloudBlobCmdletBase
@@ -42,9 +42,10 @@ public class RemoveStorageAzureBlobCommand : StorageCloudBlobCmdletBase
///
private const string NameParameterSet = "NamePipeline";
- [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true,
+ [Alias("ICloudBlob")]
+ [Parameter(HelpMessage = "CloudBlob Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSet)]
- public ICloudBlob ICloudBlob { get; set; }
+ public CloudBlob CloudBlob { get; set; }
[Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParameterSet)]
@@ -108,16 +109,18 @@ public RemoveStorageAzureBlobCommand(IStorageBlobManagement channel)
///
/// remove the azure blob
///
- /// ICloudblob object
- /// whether the ICloudblob parameter is validated
+ /// Cloudblob object
+ /// whether the Cloudblob parameter is validated
/// true if the blob is removed successfully, false if user cancel the remove operation
- internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localChannel, ICloudBlob blob, bool isValidBlob)
+ internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localChannel, CloudBlob blob, bool isValidBlob)
{
if (!isValidBlob)
{
- ValidatePipelineICloudBlob(blob);
+ ValidatePipelineCloudBlob(blob);
}
+ ValidateBlobType(blob);
+
DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None;
bool retryDeleteSnapshot = false;
@@ -146,7 +149,7 @@ internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localCha
try
{
- await DeleteICloudAsync(taskId, localChannel, blob, deleteSnapshotsOption);
+ await DeleteCloudAsync(taskId, localChannel, blob, deleteSnapshotsOption);
retryDeleteSnapshot = false;
}
catch (StorageException e)
@@ -169,7 +172,7 @@ internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localCha
if (await OutputStream.ConfirmAsync(message))
{
deleteSnapshotsOption = DeleteSnapshotsOption.IncludeSnapshots;
- await DeleteICloudAsync(taskId, localChannel, blob, deleteSnapshotsOption);
+ await DeleteCloudAsync(taskId, localChannel, blob, deleteSnapshotsOption);
}
else
{
@@ -179,12 +182,12 @@ internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localCha
}
}
- internal async Task DeleteICloudAsync(long taskId, IStorageBlobManagement localChannel, ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption)
+ internal async Task DeleteCloudAsync(long taskId, IStorageBlobManagement localChannel, CloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption)
{
AccessCondition accessCondition = null;
BlobRequestOptions requestOptions = null;
- await localChannel.DeleteICloudBlobAsync(blob, deleteSnapshotsOption, accessCondition,
+ await localChannel.DeleteCloudBlobAsync(blob, deleteSnapshotsOption, accessCondition,
requestOptions, OperationContext, CmdletCancellationToken);
string result = String.Format(Resources.RemoveBlobSuccessfully, blob.Name, blob.Container.Name);
@@ -214,8 +217,17 @@ internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localCha
AccessCondition accessCondition = null;
BlobRequestOptions requestOptions = null;
- ICloudBlob blob = await localChannel.GetBlobReferenceFromServerAsync(container, blobName, accessCondition,
- requestOptions, OperationContext, CmdletCancellationToken);
+ CloudBlob blob = null;
+
+ try
+ {
+ blob = await localChannel.GetBlobReferenceFromServerAsync(container, blobName, accessCondition,
+ requestOptions, OperationContext, CmdletCancellationToken);
+ }
+ catch (InvalidOperationException)
+ {
+ blob = null;
+ }
if (null == blob && container.ServiceClient.Credentials.IsSharedKey)
{
@@ -255,7 +267,7 @@ public override void ExecuteCmdlet()
switch (ParameterSetName)
{
case BlobPipelineParameterSet:
- ICloudBlob localBlob = ICloudBlob;
+ CloudBlob localBlob = CloudBlob;
taskGenerator = (taskId) => RemoveAzureBlob(taskId, localChannel, localBlob, false);
break;
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs
index b9ff67d67419..fdaf01525b88 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs
@@ -12,17 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
///
/// remove specified azure container
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainerStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainerStoredAccessPolicy.cs
index 99c4d0338499..ba8a479f33c6 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainerStoredAccessPolicy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainerStoredAccessPolicy.cs
@@ -18,11 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
using System.Globalization;
using System.Management.Automation;
using System.Security.Permissions;
- using System.Threading.Tasks;
using Common;
using Microsoft.WindowsAzure.Storage.Blob;
using Model.Contract;
- using Model.ResourceModel;
///
/// create a new azure container
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs
index 6cb7fa0a7100..17f80098fbe9 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs
@@ -12,9 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Management.Automation;
using System.Threading.Tasks;
@@ -22,11 +24,11 @@
using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel;
using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
+using Microsoft.WindowsAzure.Storage.DataMovement;
+using StorageBlob = Microsoft.WindowsAzure.Storage.Blob;
namespace Microsoft.WindowsAzure.Commands.Storage.Blob
{
- using StorageBlob = WindowsAzure.Storage.Blob;
///
/// download blob from azure
@@ -60,6 +62,11 @@ public class SetAzureBlobContentCommand : StorageDataMovementCmdletBase
///
private const string PageBlobType = "Page";
+ ///
+ /// append blob type
+ ///
+ private const string AppendBlobType = "Append";
+
[Alias("FullName")]
[Parameter(Position = 0, Mandatory = true, HelpMessage = "file Path",
ValueFromPipelineByPropertyName = true, ParameterSetName = ManualParameterSet)]
@@ -99,13 +106,14 @@ public string Blob
ParameterSetName = ContainerParameterSet)]
public StorageBlob.CloudBlobContainer CloudBlobContainer { get; set; }
+ [Alias("ICloudBlob")]
[Parameter(HelpMessage = "Azure Blob Object", Mandatory = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = BlobParameterSet)]
- public StorageBlob.ICloudBlob ICloudBlob { get; set; }
+ public StorageBlob.CloudBlob CloudBlob { get; set; }
- [Parameter(HelpMessage = "Blob Type('Block', 'Page')")]
- [ValidateSet(BlockBlobType, PageBlobType, IgnoreCase = true)]
+ [Parameter(HelpMessage = "Blob Type('Block', 'Page', 'Append')")]
+ [ValidateSet(BlockBlobType, PageBlobType, AppendBlobType, IgnoreCase = true)]
public string BlobType
{
get { return blobType; }
@@ -170,7 +178,7 @@ public SetAzureBlobContentCommand(IStorageBlobManagement channel)
/// Task id
/// local file path
/// destination azure blob object
- internal virtual async Task Upload2Blob(long taskId, IStorageBlobManagement localChannel, string filePath, StorageBlob.ICloudBlob blob)
+ internal virtual async Task Upload2Blob(long taskId, IStorageBlobManagement localChannel, string filePath, StorageBlob.CloudBlob blob)
{
string activity = String.Format(Resources.SendAzureBlobActivity, filePath, blob.Name, blob.Container.Name);
string status = Resources.PrepareUploadingBlob;
@@ -184,11 +192,11 @@ internal virtual async Task Upload2Blob(long taskId, IStorageBlobManagement loca
Record = pr
};
- BlobUploadJob uploadJob = new BlobUploadJob()
- {
- DestBlob = blob,
- SourcePath = filePath
- };
+ TransferJob uploadJob =
+ new TransferJob(
+ new TransferLocation(filePath),
+ new TransferLocation(blob),
+ TransferMethod.SyncCopy);
await this.RunTransferJob(uploadJob, data);
@@ -217,7 +225,7 @@ await localChannel.FetchBlobAttributesAsync(
}
}
- WriteICloudBlobObject(data.TaskId, localChannel, blob);
+ WriteCloudBlobObject(data.TaskId, localChannel, blob);
}
///
@@ -248,10 +256,26 @@ internal void SetAzureBlobContent(string fileName, string blobName)
{
StorageBlob.BlobType type = StorageBlob.BlobType.BlockBlob;
- if (string.Compare(blobType, PageBlobType, StringComparison.InvariantCultureIgnoreCase) == 0)
+ if (string.Equals(blobType, BlockBlobType, StringComparison.InvariantCultureIgnoreCase))
+ {
+ type = StorageBlob.BlobType.BlockBlob;
+ }
+ else if (string.Equals(blobType, PageBlobType, StringComparison.InvariantCultureIgnoreCase))
{
type = StorageBlob.BlobType.PageBlob;
}
+ else if (string.Equals(blobType, AppendBlobType, StringComparison.InvariantCultureIgnoreCase))
+ {
+ type = StorageBlob.BlobType.AppendBlob;
+ }
+ else
+ {
+ throw new InvalidOperationException(string.Format(
+ CultureInfo.CurrentCulture,
+ Resources.InvalidBlobType,
+ blobType,
+ blobName));
+ }
if (!string.IsNullOrEmpty(blobName) && !NameUtil.IsValidBlobName(blobName))
{
@@ -272,7 +296,7 @@ protected override void EndProcessing()
{
while (!UploadRequests.IsEmpty())
{
- Tuple uploadRequest = UploadRequests.DequeueRequest();
+ Tuple uploadRequest = UploadRequests.DequeueRequest();
IStorageBlobManagement localChannel = Channel;
Func taskGenerator = (taskId) => Upload2Blob(taskId, localChannel, uploadRequest.Item1, uploadRequest.Item2);
RunTask(taskGenerator);
@@ -283,7 +307,7 @@ protected override void EndProcessing()
//only support the common blob properties for block blob and page blob
//http://msdn.microsoft.com/en-us/library/windowsazure/ee691966.aspx
- private Dictionary> validICloudBlobProperties =
+ private Dictionary> validCloudBlobProperties =
new Dictionary>(StringComparer.OrdinalIgnoreCase)
{
{"CacheControl", (p, v) => p.CacheControl = v},
@@ -307,7 +331,7 @@ private void ValidateBlobProperties(Hashtable properties)
foreach (DictionaryEntry entry in properties)
{
- if (!validICloudBlobProperties.ContainsKey(entry.Key.ToString()))
+ if (!validCloudBlobProperties.ContainsKey(entry.Key.ToString()))
{
throw new ArgumentException(String.Format(Resources.InvalidBlobProperties, entry.Key.ToString(), entry.Value.ToString()));
}
@@ -317,9 +341,9 @@ private void ValidateBlobProperties(Hashtable properties)
///
/// set blob properties
///
- /// ICloudBlob object
+ /// CloudBlob object
/// blob properties hashtable
- private async Task SetBlobProperties(IStorageBlobManagement localChannel, StorageBlob.ICloudBlob blob, Hashtable properties)
+ private async Task SetBlobProperties(IStorageBlobManagement localChannel, StorageBlob.CloudBlob blob, Hashtable properties)
{
if (properties == null)
{
@@ -330,7 +354,7 @@ private async Task SetBlobProperties(IStorageBlobManagement localChannel, Storag
{
string key = entry.Key.ToString();
string value = entry.Value.ToString();
- Action action = validICloudBlobProperties[key];
+ Action action = validCloudBlobProperties[key];
if (action != null)
{
@@ -347,9 +371,9 @@ private async Task SetBlobProperties(IStorageBlobManagement localChannel, Storag
///
/// set blob meta
///
- /// ICloudBlob object
+ /// CloudBlob object
/// meta data hashtable
- private async Task SetBlobMeta(IStorageBlobManagement localChannel, StorageBlob.ICloudBlob blob, Hashtable meta)
+ private async Task SetBlobMeta(IStorageBlobManagement localChannel, StorageBlob.CloudBlob blob, Hashtable meta)
{
if (meta == null)
{
@@ -383,7 +407,7 @@ private async Task SetBlobMeta(IStorageBlobManagement localChannel, StorageBlob.
/// User data
protected override void OnTaskSuccessful(DataMovementUserData data)
{
- StorageBlob.ICloudBlob blob = data.Data as StorageBlob.ICloudBlob;
+ StorageBlob.CloudBlob blob = data.Data as StorageBlob.CloudBlob;
IStorageBlobManagement localChannel = data.Channel;
if (blob != null)
@@ -413,7 +437,7 @@ protected override void OnTaskSuccessful(DataMovementUserData data)
}
}
- WriteICloudBlobObject(data.TaskId, localChannel, blob);
+ WriteCloudBlobObject(data.TaskId, localChannel, blob);
}
}
@@ -437,8 +461,8 @@ public override void ExecuteCmdlet()
break;
case BlobParameterSet:
- SetAzureBlobContent(FileName, ICloudBlob.Name);
- containerName = ICloudBlob.Container.Name;
+ SetAzureBlobContent(FileName, CloudBlob.Name);
+ containerName = CloudBlob.Container.Name;
break;
case ManualParameterSet:
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs
index daf4dadb9d88..085eba677211 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs
@@ -12,18 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ 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;
+
///
/// set access level for specified container
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerStoredAccessPolicy.cs
index fea286e4ca52..6940395b9402 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerStoredAccessPolicy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerStoredAccessPolicy.cs
@@ -18,11 +18,9 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
using System.Globalization;
using System.Management.Automation;
using System.Security.Permissions;
- using System.Threading.Tasks;
using Common;
using Microsoft.WindowsAzure.Storage.Blob;
using Model.Contract;
- using Model.ResourceModel;
///
/// create a new azure container
@@ -43,7 +41,7 @@ public class SetAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo
[ValidateNotNullOrEmpty]
public string Policy {get; set; }
- [Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"audq\".")]
+ [Parameter(HelpMessage = "Permissions for a container. Permissions can be any non-empty subset of \"rdwl\".")]
public string Permission { get; set; }
[Parameter(HelpMessage = "Start Time")]
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs
index 484d26d31fdb..efde651e34d1 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs
@@ -12,63 +12,87 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-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.TransferJobs;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
- [Cmdlet(VerbsLifecycle.Start, StorageNouns.CopyBlob, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = NameParameterSet),
+ using System;
+ using System.Collections.Generic;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ 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;
+
+ [Cmdlet(VerbsLifecycle.Start, StorageNouns.CopyBlob, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = ContainerNameParameterSet),
OutputType(typeof(AzureStorageBlob))]
public class StartAzureStorageBlobCopy : StorageDataMovementCmdletBase
{
///
/// Blob Pipeline parameter set name
///
- private const string SrcBlobParameterSet = "BlobPipeline";
+ private const string BlobParameterSet = "BlobInstance";
///
/// Blob Pipeline parameter set name
///
- private const string DestBlobPipelineParameterSet = "DestBlobPipeline";
+ private const string BlobToBlobParameterSet = "BlobInstanceToBlobInstance";
///
/// Container pipeline paremeter set name
///
- private const string ContainerPipelineParameterSet = "ContainerPipeline";
+ private const string ContainerParameterSet = "ContainerInstance";
///
/// Blob name and container name parameter set
///
- private const string NameParameterSet = "NamePipeline";
+ private const string ContainerNameParameterSet = "ContainerName";
+
+ ///
+ /// To copy from file with share name and file path to a blob represent with container name and blob name.
+ ///
+ private const string ShareNameParameterSet = "ShareName";
+
+ ///
+ /// To copy from file with share instance and file path to a blob represent with container name and blob name.
+ ///
+ private const string ShareParameterSet = "ShareInstance";
+
+ ///
+ /// To copy from file with file directory instance and file path to a blob with container name and blob name.
+ ///
+ private const string DirParameterSet = "DirInstance";
+
+ ///
+ /// To copy from file with file instance to a blob with container name and blob name.
+ ///
+ private const string FileParameterSet = "FileInstance";
+
+ ///
+ /// To copy from file with file instance to a blob with blob instance.
+ ///
+ private const string FileToBlobParameterSet = "FileInstanceToBlobInstance";
///
/// Source uri parameter set
///
private const string UriParameterSet = "UriPipeline";
- [Alias("SrcICloudBlob")]
- [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true,
- ValueFromPipelineByPropertyName = true, ParameterSetName = SrcBlobParameterSet)]
- [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true,
- ValueFromPipelineByPropertyName = true, ParameterSetName = DestBlobPipelineParameterSet)]
- public ICloudBlob ICloudBlob { get; set; }
+ [Alias("SrcICloudBlob", "SrcCloudBlob", "ICloudBlob")]
+ [Parameter(HelpMessage = "CloudBlob Object", Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = BlobParameterSet)]
+ [Parameter(HelpMessage = "CloudBlob Object", Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = BlobToBlobParameterSet)]
+ public CloudBlob CloudBlob { get; set; }
- [Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true,
- ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParameterSet)]
+ [Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerParameterSet)]
public CloudBlobContainer CloudBlobContainer { get; set; }
- [Parameter(ParameterSetName = ContainerPipelineParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")]
- [Parameter(ParameterSetName = NameParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")]
+ [Parameter(HelpMessage = "Blob name", ParameterSetName = ContainerParameterSet, Mandatory = true, Position = 0)]
+ [Parameter(HelpMessage = "Blob name", ParameterSetName = ContainerNameParameterSet, Mandatory = true, Position = 0)]
public string SrcBlob
{
get { return BlobName; }
@@ -76,8 +100,7 @@ public string SrcBlob
}
private string BlobName = String.Empty;
- [Parameter(HelpMessage = "Source Container name", Mandatory = true,
- ParameterSetName = NameParameterSet)]
+ [Parameter(HelpMessage = "Source Container name", Mandatory = true, ParameterSetName = ContainerNameParameterSet)]
[ValidateNotNullOrEmpty]
public string SrcContainer
{
@@ -86,44 +109,69 @@ public string SrcContainer
}
private string ContainerName = String.Empty;
+ [Parameter(HelpMessage = "Source share name", Mandatory = true, ParameterSetName = ShareNameParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string SrcShareName { get; set; }
+
+ [Parameter(HelpMessage = "Source share", Mandatory = true, ParameterSetName = ShareParameterSet)]
+ [ValidateNotNull]
+ public CloudFileShare SrcShare { get; set; }
+
+ [Parameter(HelpMessage = "Source file directory", Mandatory = true, ParameterSetName = DirParameterSet)]
+ [ValidateNotNull]
+ public CloudFileDirectory SrcDir { get; set; }
+
+ [Parameter(HelpMessage = "Source file path", Mandatory = true, ParameterSetName = ShareNameParameterSet)]
+ [Parameter(HelpMessage = "Source file path", Mandatory = true, ParameterSetName = ShareParameterSet)]
+ [Parameter(HelpMessage = "Source file path", Mandatory = true, ParameterSetName = DirParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string SrcFilePath { get; set; }
+
+ [Parameter(HelpMessage = "Source file", Mandatory = true, ValueFromPipeline = true, ParameterSetName = FileParameterSet)]
+ [Parameter(HelpMessage = "Source file", Mandatory = true, ValueFromPipeline = true, ParameterSetName = FileToBlobParameterSet)]
+ [ValidateNotNull]
+ public CloudFile SrcFile { get; set; }
+
[Alias("SrcUri")]
[Parameter(HelpMessage = "Source blob uri", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = UriParameterSet)]
public string AbsoluteUri { get; set; }
- [Parameter(HelpMessage = "Destination container name", Mandatory = true,
- ParameterSetName = NameParameterSet)]
- [Parameter(HelpMessage = "Destination container name", Mandatory = true,
- ParameterSetName = UriParameterSet)]
- [Parameter(HelpMessage = "Destination container name", Mandatory = true,
- ParameterSetName = SrcBlobParameterSet)]
- [Parameter(HelpMessage = "Destination container name", Mandatory = true,
- ParameterSetName = ContainerPipelineParameterSet)]
+ [Parameter(HelpMessage = "Destination container name", Mandatory = true, ParameterSetName = ContainerNameParameterSet)]
+ [Parameter(HelpMessage = "Destination container name", Mandatory = true, ParameterSetName = UriParameterSet)]
+ [Parameter(HelpMessage = "Destination container name", Mandatory = true, ParameterSetName = BlobParameterSet)]
+ [Parameter(HelpMessage = "Destination container name", Mandatory = true, ParameterSetName = ContainerParameterSet)]
+ [Parameter(HelpMessage = "Destination container name", Mandatory = true, ParameterSetName = ShareNameParameterSet)]
+ [Parameter(HelpMessage = "Destination container name", Mandatory = true, ParameterSetName = ShareParameterSet)]
+ [Parameter(HelpMessage = "Destination container name", Mandatory = true, ParameterSetName = DirParameterSet)]
+ [Parameter(HelpMessage = "Destination container name", Mandatory = true, ParameterSetName = FileParameterSet)]
public string DestContainer { get; set; }
- [Parameter(HelpMessage = "Destination blob name", Mandatory = true,
- ParameterSetName = UriParameterSet)]
- [Parameter(HelpMessage = "Destination blob name", Mandatory = false,
- ParameterSetName = NameParameterSet)]
- [Parameter(HelpMessage = "Destination blob name", Mandatory = false,
- ParameterSetName = SrcBlobParameterSet)]
- [Parameter(HelpMessage = "Destination container name", Mandatory = false,
- ParameterSetName = ContainerPipelineParameterSet)]
+ [Parameter(HelpMessage = "Destination blob name", Mandatory = true, ParameterSetName = UriParameterSet)]
+ [Parameter(HelpMessage = "Destination blob name", Mandatory = false, ParameterSetName = ContainerNameParameterSet)]
+ [Parameter(HelpMessage = "Destination blob name", Mandatory = false, ParameterSetName = BlobParameterSet)]
+ [Parameter(HelpMessage = "Destination blob name", Mandatory = false, ParameterSetName = ContainerParameterSet)]
+ [Parameter(HelpMessage = "Destination blob name", Mandatory = false, ParameterSetName = ShareNameParameterSet)]
+ [Parameter(HelpMessage = "Destination blob name", Mandatory = false, ParameterSetName = ShareParameterSet)]
+ [Parameter(HelpMessage = "Destination blob name", Mandatory = false, ParameterSetName = DirParameterSet)]
+ [Parameter(HelpMessage = "Destination blob name", Mandatory = false, ParameterSetName = FileParameterSet)]
public string DestBlob { get; set; }
- [Parameter(HelpMessage = "Destination ICloudBlob object", Mandatory = true,
- ParameterSetName = DestBlobPipelineParameterSet)]
- public ICloudBlob DestICloudBlob { get; set; }
+ [Alias("DestICloudBlob")]
+ [Parameter(HelpMessage = "Destination CloudBlob object", Mandatory = true, ParameterSetName = BlobToBlobParameterSet)]
+ [Parameter(HelpMessage = "Destination CloudBlob object", Mandatory = true, ParameterSetName = FileToBlobParameterSet)]
+ public CloudBlob DestCloudBlob { get; set; }
[Alias("SrcContext")]
- [Parameter(HelpMessage = "Source Azure Storage Context Object",
- ValueFromPipelineByPropertyName = true, ParameterSetName = NameParameterSet)]
- [Parameter(HelpMessage = "Source Azure Storage Context Object",
- ValueFromPipelineByPropertyName = true, ParameterSetName = SrcBlobParameterSet)]
- [Parameter(HelpMessage = "Source Azure Storage Context Object",
- ValueFromPipelineByPropertyName = true, ParameterSetName = DestBlobPipelineParameterSet)]
- [Parameter(HelpMessage = "Source Azure Storage Context Object",
- ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerNameParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = BlobParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = BlobToBlobParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ShareNameParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ShareParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = DirParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = FileParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = FileToBlobParameterSet)]
[Parameter(HelpMessage = "Source Azure Storage Context Object", ParameterSetName = UriParameterSet)]
public override AzureStorageContext Context { get; set; }
@@ -162,7 +210,7 @@ protected override void BeginProcessing()
base.BeginProcessing();
}
- protected async Task EnqueueStartCopyJob(BlobStartCopyJob startCopyJob, DataMovementUserData userData)
+ protected async Task EnqueueStartCopyJob(TransferJob startCopyJob, DataMovementUserData userData)
{
await this.RunTransferJob(startCopyJob, userData);
@@ -174,14 +222,19 @@ protected async Task EnqueueStartCopyJob(BlobStartCopyJob startCopyJob, DataMove
var destChannel = userData.Channel;
this.OutputStream.WriteVerbose(userData.TaskId, String.Format(Resources.CopyDestinationBlobPending, destBlobPath["Blob"], destBlobPath["Container"], startCopyJob.CopyId));
CloudBlobContainer container = destChannel.GetContainerReference(destBlobPath["Container"]);
- ICloudBlob destBlob = this.GetDestinationBlobWithCopyId(destChannel, container, destBlobPath["Blob"]);
+ CloudBlob destBlob = this.GetDestinationBlobWithCopyId(destChannel, container, destBlobPath["Blob"]);
if (destBlob != null)
{
- this.WriteICloudBlobObject(userData.TaskId, destChannel, destBlob);
+ this.WriteCloudBlobObject(userData.TaskId, destChannel, destBlob);
}
}
}
+ private IStorageFileManagement GetFileChannel()
+ {
+ return new StorageFileManagement(GetCmdletStorageContext());
+ }
+
///
/// Set up the Channel object for Destination container and blob
///
@@ -226,7 +279,7 @@ public override void ExecuteCmdlet()
switch (ParameterSetName)
{
- case NameParameterSet:
+ case ContainerNameParameterSet:
StartCopyBlob(srcChannel, destChannel, SrcContainer, SrcBlob, DestContainer, DestBlob);
break;
@@ -234,73 +287,98 @@ public override void ExecuteCmdlet()
StartCopyBlob(destChannel, AbsoluteUri, DestContainer, DestBlob, Context);
break;
- case SrcBlobParameterSet:
- StartCopyBlob(destChannel, ICloudBlob, DestContainer, DestBlob);
+ case BlobParameterSet:
+ StartCopyBlob(destChannel, CloudBlob, DestContainer, DestBlob);
break;
- case ContainerPipelineParameterSet:
+ case ContainerParameterSet:
StartCopyBlob(srcChannel, destChannel, CloudBlobContainer.Name, SrcBlob, DestContainer, DestBlob);
break;
- case DestBlobPipelineParameterSet:
- StartCopyBlob(destChannel, ICloudBlob, DestICloudBlob);
+ case BlobToBlobParameterSet:
+ StartCopyBlob(destChannel, CloudBlob, DestCloudBlob);
+ break;
+ case ShareNameParameterSet:
+ this.StartCopyFromFile(
+ this.GetFileChannel(),
+ destChannel,
+ this.SrcShareName,
+ this.SrcFilePath,
+ this.DestContainer,
+ this.DestBlob);
+ break;
+ case ShareParameterSet:
+ this.StartCopyFromFile(
+ destChannel,
+ this.SrcShare.GetRootDirectoryReference(),
+ this.SrcFilePath,
+ this.DestContainer,
+ this.DestBlob);
+ break;
+ case DirParameterSet:
+ StartCopyFromFile(
+ destChannel,
+ this.SrcDir,
+ this.SrcFilePath,
+ this.DestContainer,
+ this.DestBlob);
+ break;
+ case FileParameterSet:
+ StartCopyFromFile(
+ destChannel,
+ this.SrcFile,
+ this.DestContainer,
+ this.DestBlob);
+ break;
+ case FileToBlobParameterSet:
+ StartCopyFromFile(
+ destChannel,
+ this.SrcFile,
+ this.DestCloudBlob);
break;
}
}
///
- /// Start copy operation by source and destination ICloudBlob object
+ /// Start copy operation by source and destination CloudBlob object
///
- /// Source ICloudBlob object
- /// Destination ICloudBlob object
- /// Destination ICloudBlob object
- private void StartCopyBlob(IStorageBlobManagement destChannel, ICloudBlob srcICloudBlob, ICloudBlob destICloudBlob)
+ /// Source CloudBlob object
+ /// Destination CloudBlob object
+ /// Destination CloudBlob object
+ private void StartCopyBlob(IStorageBlobManagement destChannel, CloudBlob srcCloudBlob, CloudBlob destCloudBlob)
{
- Func taskGenerator = (taskId) => StartCopyInTransferManager(taskId, destChannel, srcICloudBlob, destICloudBlob);
+ ValidateBlobType(srcCloudBlob);
+
+ Func taskGenerator = (taskId) => StartCopyInTransferManager(taskId, destChannel, srcCloudBlob, destCloudBlob);
RunTask(taskGenerator);
}
///
- /// Start copy operation by source ICloudBlob object
+ /// Start copy operation by source CloudBlob object
///
- /// Source ICloudBlob object
+ /// Source CloudBlob object
/// Destinaion container name
/// Destination blob name
- /// Destination ICloudBlob object
- private void StartCopyBlob(IStorageBlobManagement destChannel, ICloudBlob srcICloudBlob, string destContainer, string destBlobName)
+ /// Destination CloudBlob object
+ private void StartCopyBlob(IStorageBlobManagement destChannel, CloudBlob srcCloudBlob, string destContainer, string destBlobName)
{
if (string.IsNullOrEmpty(destBlobName))
{
- destBlobName = srcICloudBlob.Name;
+ destBlobName = srcCloudBlob.Name;
}
- ValidateBlobName(destBlobName);
-
- CloudBlobContainer container = destChannel.GetContainerReference(destContainer);
- ICloudBlob destBlob = null;
- if (BlobType.PageBlob == srcICloudBlob.BlobType)
- {
- destBlob = container.GetPageBlobReference(destBlobName);
- }
- else if (BlobType.BlockBlob == srcICloudBlob.BlobType)
- {
- destBlob = container.GetBlockBlobReference(destBlobName);
- }
- else
- {
- throw new ArgumentException(String.Format(Resources.InvalidBlobType, srcICloudBlob.Name));
- }
+ CloudBlob destBlob = this.GetDestBlob(destChannel, destContainer, destBlobName, srcCloudBlob.BlobType);
- this.StartCopyBlob(destChannel, srcICloudBlob, destBlob);
+ this.StartCopyBlob(destChannel, srcCloudBlob, destBlob);
}
///
/// Start copy operation by source uri
///
- /// Source uri
+ /// Source uri
/// Destinaion container name
/// Destination blob name
- /// Destination ICloudBlob object
+ /// Destination CloudBlob object
private void StartCopyBlob(IStorageBlobManagement destChannel, string srcUri, string destContainer, string destBlobName, AzureStorageContext context)
{
if (context != null)
@@ -311,7 +389,22 @@ private void StartCopyBlob(IStorageBlobManagement destChannel, string srcUri, st
if (sourceUri.Host.ToLower() == contextUri.Host.ToLower())
{
CloudBlobClient blobClient = context.StorageAccount.CreateCloudBlobClient();
- ICloudBlob blobReference = blobClient.GetBlobReferenceFromServer(sourceUri);
+ CloudBlob blobReference = null;
+
+ try
+ {
+ blobReference = Util.GetBlobReferenceFromServer(blobClient, sourceUri);
+ }
+ catch (InvalidOperationException)
+ {
+ blobReference = null;
+ }
+
+ if (null == blobReference)
+ {
+ throw new ResourceNotFoundException(String.Format(Resources.BlobUriNotFound, sourceUri.ToString()));
+ }
+
StartCopyBlob(destChannel, blobReference, destContainer, destBlobName);
}
else
@@ -334,45 +427,132 @@ private void StartCopyBlob(IStorageBlobManagement destChannel, string srcUri, st
/// Source blob name
/// Destinaion container name
/// Destination blob name
- /// Destination ICloudBlob object
+ /// Destination CloudBlob object
private void StartCopyBlob(IStorageBlobManagement SrcChannel, IStorageBlobManagement destChannel, string srcContainerName, string srcBlobName, string destContainerName, string destBlobName)
{
- ValidateBlobName(srcBlobName);
- ValidateContainerName(srcContainerName);
- ValidateContainerName(destContainerName);
+ NameUtil.ValidateBlobName(srcBlobName);
+ NameUtil.ValidateContainerName(srcContainerName);
if (string.IsNullOrEmpty(destBlobName))
{
destBlobName = srcBlobName;
}
- ValidateBlobName(destBlobName);
-
AccessCondition accessCondition = null;
BlobRequestOptions options = RequestOptions;
CloudBlobContainer container = SrcChannel.GetContainerReference(srcContainerName);
- ICloudBlob blob = SrcChannel.GetBlobReferenceFromServer(container, srcBlobName, accessCondition, options, OperationContext);
+ CloudBlob blob = GetBlobReferenceFromServerWithContainer(SrcChannel, container, srcBlobName, accessCondition, options, OperationContext);
+
+ this.StartCopyBlob(destChannel, blob, destContainerName, destBlobName);
+ }
- if (blob == null)
+ private void StartCopyFromFile(IStorageFileManagement srcChannel, IStorageBlobManagement destChannel, string srcShareName, string srcFilePath, string destContainerName, string destBlobName)
+ {
+ NamingUtil.ValidateShareName(srcShareName, false);
+ CloudFileShare share = srcChannel.GetShareReference(srcShareName);
+
+ this.StartCopyFromFile(destChannel, share.GetRootDirectoryReference(), srcFilePath, destContainerName, destBlobName);
+ }
+
+ private void StartCopyFromFile(IStorageBlobManagement destChannel, CloudFileDirectory srcDir, string srcFilePath, string destContainerName, string destBlobName)
+ {
+ string[] path = NamingUtil.ValidatePath(srcFilePath, true);
+ CloudFile file = srcDir.GetFileReferenceByPath(path);
+
+ this.StartCopyFromFile(destChannel, file, destContainerName, destBlobName);
+ }
+
+ private void StartCopyFromFile(IStorageBlobManagement destChannel, CloudFile srcFile, string destContainerName, string destBlobName)
+ {
+ if (string.IsNullOrEmpty(destBlobName))
{
- throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, srcBlobName, srcContainerName));
+ destBlobName = srcFile.GetFullPath();
}
- this.StartCopyBlob(destChannel, blob, destContainerName, destBlobName);
+ CloudBlob destBlob = this.GetDestBlob(destChannel, destContainerName, destBlobName, BlobType.BlockBlob);
+
+ this.StartCopyFromFile(destChannel, srcFile, destBlob);
+ }
+
+ private void StartCopyFromFile(IStorageBlobManagement destChannel, CloudFile srcFile, CloudBlob destBlob)
+ {
+ CloudBlockBlob destBlockBlob = destBlob as CloudBlockBlob;
+
+ if (null == destBlockBlob)
+ {
+ throw new InvalidOperationException(Resources.OnlyCopyFromBlockBlobToAzureFile);
+ }
+
+ Func taskGenerator = (taskId) => this.StartCopyFromFile(taskId, destChannel, srcFile, destBlockBlob); ;
+ RunTask(taskGenerator);
+ }
+
+ private async Task StartCopyFromFile(long taskId, IStorageBlobManagement destChannel, CloudFile srcFile, CloudBlockBlob destBlob)
+ {
+ bool destExist = true;
+ try
+ {
+ await destBlob.FetchAttributesAsync(null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
+ }
+ catch (StorageException ex)
+ {
+ if (ex.IsNotFoundException())
+ {
+ destExist = false;
+ }
+ else
+ {
+ throw;
+ }
+ }
+
+ if (!destExist || this.ConfirmOverwrite(srcFile.Uri.ToString(), destBlob.Uri.ToString()))
+ {
+ string copyId = await destBlob.StartCopyAsync(srcFile.GenerateCopySourceFile(), null, null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
+ this.OutputStream.WriteVerbose(taskId, String.Format(Resources.CopyDestinationBlobPending, destBlob.Name, destBlob.Container.Name, copyId));
+ this.WriteCloudBlobObject(taskId, destChannel, destBlob);
+ }
+ }
+
+ private CloudBlob GetDestBlob(IStorageBlobManagement destChannel, string destContainerName, string destBlobName, BlobType blobType)
+ {
+ NameUtil.ValidateContainerName(destContainerName);
+ NameUtil.ValidateBlobName(destBlobName);
+
+ CloudBlobContainer container = destChannel.GetContainerReference(destContainerName);
+ CloudBlob destBlob = null;
+ if (BlobType.PageBlob == blobType)
+ {
+ destBlob = container.GetPageBlobReference(destBlobName);
+ }
+ else if (BlobType.BlockBlob == blobType)
+ {
+ destBlob = container.GetBlockBlobReference(destBlobName);
+ }
+ else if (BlobType.AppendBlob == blobType)
+ {
+ destBlob = container.GetAppendBlobReference(destBlobName);
+ }
+ else
+ {
+ throw new ArgumentException(String.Format(Resources.InvalidBlobType, blobType, destBlobName));
+ }
+
+ return destBlob;
}
///
- /// Start copy using transfer mangager by source ICloudBlob object
+ /// Start copy using transfer mangager by source CloudBlob object
///
- /// Source ICloudBlob object
+ /// Source CloudBlob object
/// Destination CloudBlobContainer object
/// Destination blob name
- /// Destination ICloudBlob object
- private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagement DestChannel, ICloudBlob sourceBlob, ICloudBlob destBlob)
+ /// Destination CloudBlob object
+ private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagement DestChannel, CloudBlob sourceBlob, CloudBlob destBlob)
{
- ValidateBlobName(sourceBlob.Name);
- ValidateContainerName(destBlob.Container.Name);
- ValidateBlobName(destBlob.Name);
+ NameUtil.ValidateBlobName(sourceBlob.Name);
+ NameUtil.ValidateContainerName(destBlob.Container.Name);
+ NameUtil.ValidateBlobName(destBlob.Name);
Dictionary BlobPath = new Dictionary()
{
@@ -388,11 +568,7 @@ private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagemen
Record = null
};
- BlobStartCopyJob startCopyJob = new BlobStartCopyJob()
- {
- SourceBlob = sourceBlob,
- DestBlob = destBlob
- };
+ TransferJob startCopyJob = new TransferJob(new TransferLocation(sourceBlob), new TransferLocation(destBlob), TransferMethod.AsyncCopyInAzureStorageWithoutMonitor);
await this.EnqueueStartCopyJob(startCopyJob, data);
}
@@ -403,11 +579,11 @@ private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagemen
/// source uri
/// Destination CloudBlobContainer object
/// Destination blob name
- /// Destination ICloudBlob object
+ /// Destination CloudBlob object
private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagement destChannel, Uri uri, CloudBlobContainer destContainer, string destBlobName)
{
- ValidateContainerName(destContainer.Name);
- ValidateBlobName(destBlobName);
+ NameUtil.ValidateContainerName(destContainer.Name);
+ NameUtil.ValidateBlobName(destBlobName);
Dictionary BlobPath = new Dictionary()
{
{"Container", destContainer.Name},
@@ -422,11 +598,10 @@ private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagemen
Record = null
};
- BlobStartCopyJob startCopyJob = new BlobStartCopyJob()
- {
- SourceUri = uri,
- DestBlob = destContainer.GetBlockBlobReference(destBlobName)
- };
+ TransferJob startCopyJob = new TransferJob(
+ new TransferLocation(uri),
+ new TransferLocation(destContainer.GetBlockBlobReference(destBlobName)),
+ TransferMethod.AsyncCopyInAzureStorageWithoutMonitor);
await this.EnqueueStartCopyJob(startCopyJob, data);
}
@@ -437,12 +612,12 @@ private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagemen
/// CloudBlobContainer object
/// Blob name
/// Current CopyId
- /// Destination ICloudBlob object
- private ICloudBlob GetDestinationBlobWithCopyId(IStorageBlobManagement destChannel, CloudBlobContainer container, string blobName)
+ /// Destination CloudBlob object
+ private CloudBlob GetDestinationBlobWithCopyId(IStorageBlobManagement destChannel, CloudBlobContainer container, string blobName)
{
AccessCondition accessCondition = null;
BlobRequestOptions options = RequestOptions;
- ICloudBlob blob = destChannel.GetBlobReferenceFromServer(container, blobName, accessCondition, options, OperationContext);
+ CloudBlob blob = destChannel.GetBlobReferenceFromServer(container, blobName, accessCondition, options, OperationContext);
return blob;
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs
index f0d62a15b52a..fcf09c7441a8 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs
@@ -12,19 +12,19 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ 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;
+
[Cmdlet(VerbsLifecycle.Stop, StorageNouns.CopyBlob, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = NameParameterSet),
OutputType(typeof(AzureStorageBlob))]
public class StopAzureStorageBlobCopy : StorageCloudBlobCmdletBase
@@ -44,9 +44,10 @@ public class StopAzureStorageBlobCopy : StorageCloudBlobCmdletBase
///
private const string NameParameterSet = "NamePipeline";
- [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true,
+ [Alias("ICloudBlob")]
+ [Parameter(HelpMessage = "CloudBlob Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSet)]
- public ICloudBlob ICloudBlob { get; set; }
+ public CloudBlob CloudBlob { get; set; }
[Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true,
ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParmeterSet)]
@@ -110,7 +111,7 @@ public override void ExecuteCmdlet()
taskGenerator = (taskId) => StopCopyBlob(taskId, localChannel, localContainer, localName, copyId);
break;
case BlobPipelineParameterSet:
- ICloudBlob localBlob = ICloudBlob;
+ CloudBlob localBlob = CloudBlob;
taskGenerator = (taskId) => StopCopyBlob(taskId, localChannel, localBlob, copyId, true);
break;
}
@@ -138,29 +139,25 @@ private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel
/// Copy id
private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel, CloudBlobContainer container, string blobName, string copyId)
{
- ValidateBlobName(blobName);
-
- ValidateContainerName(container.Name);
+ NameUtil.ValidateBlobName(blobName);
+ NameUtil.ValidateContainerName(container.Name);
AccessCondition accessCondition = null;
BlobRequestOptions options = RequestOptions;
- ICloudBlob blob = localChannel.GetBlobReferenceFromServer(container, blobName, accessCondition, options, OperationContext);
-
- if (blob == null)
- {
- throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, container.Name));
- }
+ CloudBlob blob = GetBlobReferenceFromServerWithContainer(localChannel, container, blobName, accessCondition, options, OperationContext);
await StopCopyBlob(taskId, localChannel, blob, copyId);
}
///
- /// Stop copy operation by ICloudBlob object
+ /// Stop copy operation by CloudBlob object
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Copy id
- private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel, ICloudBlob blob, string copyId, bool fetchCopyIdFromBlob = false)
+ private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel, CloudBlob blob, string copyId, bool fetchCopyIdFromBlob = false)
{
+ ValidateBlobType(blob);
+
AccessCondition accessCondition = null;
BlobRequestOptions abortRequestOption = RequestOptions ?? new BlobRequestOptions();
@@ -169,7 +166,7 @@ private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel
if (null == blob)
{
- throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name));
+ throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlob).Name));
}
string specifiedCopyId = copyId;
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/DataMovementUserData.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/DataMovementUserData.cs
index ad64717d2c6f..ca52eb707e34 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/DataMovementUserData.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/DataMovementUserData.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using System.Management.Automation;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob
{
+ using System.Management.Automation;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+
///
/// User data for data movement library
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs
index 47897f8ae841..dd57ca684d72 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs
@@ -12,15 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage
{
+ using System;
+ using System.Globalization;
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+ 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;
+
///
/// Base cmdlet for storage blob/container cmdlet
///
@@ -54,15 +56,50 @@ public BlobRequestOptions RequestOptions
}
}
+ protected static CloudBlob GetBlobReferenceFromServerWithContainer(
+ IStorageBlobManagement localChannel,
+ CloudBlobContainer container,
+ string blobName,
+ AccessCondition accessCondition = null,
+ BlobRequestOptions requestOptions = null,
+ OperationContext operationContext = null)
+ {
+ return GetBlobReferenceWrapper(() =>
+ {
+ try
+ {
+ return localChannel.GetBlobReferenceFromServer(container, blobName, accessCondition, requestOptions, operationContext);
+ }
+ catch (InvalidOperationException)
+ {
+ return null;
+ }
+ },
+ blobName,
+ container.Name);
+ }
+
+ protected static CloudBlob GetBlobReferenceWrapper(Func getBlobReference, string blobName, string containerName)
+ {
+ CloudBlob blob = getBlobReference();
+
+ if (null == blob)
+ {
+ throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, containerName));
+ }
+
+ return blob;
+ }
+
///
/// Make sure the pipeline blob is valid and already existing
///
- /// ICloudBlob object
- internal void ValidatePipelineICloudBlob(ICloudBlob blob)
+ /// CloudBlob object
+ internal void ValidatePipelineCloudBlob(CloudBlob blob)
{
if (null == blob)
{
- throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name));
+ throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlob).Name));
}
if (!NameUtil.IsValidBlobName(blob.Name))
@@ -132,19 +169,19 @@ protected IStorageBlobManagement CreateChannel(AzureStorageContext context)
///
/// whether the specified blob is a snapshot
///
- /// ICloudBlob object
+ /// CloudBlob object
/// true if the specified blob is snapshot, otherwise false
- internal bool IsSnapshot(ICloudBlob blob)
+ internal bool IsSnapshot(CloudBlob blob)
{
return !string.IsNullOrEmpty(blob.Name) && blob.SnapshotTime != null;
}
///
- /// Write ICloudBlob to output using specified service channel
+ /// Write CloudBlob to output using specified service channel
///
- /// The output ICloudBlob object
+ /// The output CloudBlob object
/// IStorageBlobManagement channel object
- internal void WriteICloudBlobObject(long taskId, IStorageBlobManagement channel, ICloudBlob blob, BlobContinuationToken continuationToken = null)
+ internal void WriteCloudBlobObject(long taskId, IStorageBlobManagement channel, CloudBlob blob, BlobContinuationToken continuationToken = null)
{
AzureStorageBlob azureBlob = new AzureStorageBlob(blob);
azureBlob.Context = channel.StorageContext;
@@ -153,9 +190,9 @@ internal void WriteICloudBlobObject(long taskId, IStorageBlobManagement channel,
}
///
- /// Write ICloudBlob to output using specified service channel
+ /// Write CloudBlob to output using specified service channel
///
- /// The output ICloudBlob object
+ /// The output CloudBlob object
/// IStorageBlobManagement channel object
internal void WriteCloudContainerObject(long taskId, IStorageBlobManagement channel,
CloudBlobContainer container, BlobContainerPermissions permissions, BlobContinuationToken continuationToken = null)
@@ -164,29 +201,19 @@ internal void WriteCloudContainerObject(long taskId, IStorageBlobManagement chan
azureContainer.Context = channel.StorageContext;
azureContainer.ContinuationToken = continuationToken;
OutputStream.WriteObject(taskId, azureContainer);
- }
-
- ///
- /// Check whether the blob name is valid. If not throw an exception
- ///
- /// Blob name
- protected void ValidateBlobName(string name)
- {
- if (!NameUtil.IsValidBlobName(name))
- {
- throw new ArgumentException(String.Format(Resources.InvalidBlobName, name));
- }
- }
+ }
- ///
- /// Check whether the container name is valid. If not throw an exception
- ///
- /// Container name
- protected void ValidateContainerName(string name)
+ protected void ValidateBlobType(CloudBlob blob)
{
- if (!NameUtil.IsValidContainerName(name))
+ if ((BlobType.BlockBlob != blob.BlobType)
+ && (BlobType.PageBlob != blob.BlobType)
+ && (BlobType.AppendBlob != blob.BlobType))
{
- throw new ArgumentException(String.Format(Resources.InvalidContainerName, name));
+ throw new InvalidOperationException(string.Format(
+ CultureInfo.CurrentCulture,
+ Resources.InvalidBlobType,
+ blob.BlobType,
+ blob.Name));
}
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs
index 9b6997e49a32..261e41d1c646 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs
@@ -12,16 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Globalization;
-using System.Management.Automation;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Storage.Blob;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Blob
{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Storage.DataMovement;
+
public class StorageDataMovementCmdletBase : StorageCloudBlobCmdletBase, IDisposable
{
///
@@ -43,7 +43,7 @@ public SwitchParameter Force
///
/// Confirmation message
/// True if the opeation is confirmed, otherwise return false
- private bool ConfirmOverwrite(string sourcePath, string destinationPath)
+ protected bool ConfirmOverwrite(string sourcePath, string destinationPath)
{
string overwriteMessage = string.Format(CultureInfo.CurrentCulture, Resources.OverwriteConfirmation, destinationPath);
return overwrite || OutputStream.ConfirmAsync(overwriteMessage).Result;
@@ -67,7 +67,7 @@ protected override void BeginProcessing()
this.transferJobRunner = TransferJobRunnerFactory.CreateRunner(this.GetCmdletConcurrency());
}
- protected async Task RunTransferJob(BlobTransferJob transferJob, DataMovementUserData userData)
+ protected async Task RunTransferJob(TransferJob transferJob, DataMovementUserData userData)
{
this.SetRequestOptionsInTransferJob(transferJob);
transferJob.OverwritePromptCallback = ConfirmOverwrite;
@@ -114,7 +114,7 @@ await this.transferJobRunner.RunTransferJob(
}
}
- protected void SetRequestOptionsInTransferJob(BlobTransferJob transferJob)
+ protected void SetRequestOptionsInTransferJob(TransferJob transferJob)
{
BlobRequestOptions cmdletOptions = RequestOptions;
@@ -123,7 +123,25 @@ protected void SetRequestOptionsInTransferJob(BlobTransferJob transferJob)
return;
}
- BlobRequestOptions requestOptions = transferJob.BlobRequestOptions;
+ if (null != transferJob.Source.Blob)
+ {
+ this.SetRequestOptions(transferJob.Source, cmdletOptions);
+ }
+
+ if (null != transferJob.Destination.Blob)
+ {
+ this.SetRequestOptions(transferJob.Destination, cmdletOptions);
+ }
+ }
+
+ protected void SetRequestOptions(TransferLocation location, BlobRequestOptions cmdletOptions)
+ {
+ BlobRequestOptions requestOptions = location.RequestOptions as BlobRequestOptions;
+
+ if (null == requestOptions)
+ {
+ requestOptions = new BlobRequestOptions();
+ }
if (cmdletOptions.MaximumExecutionTime != null)
{
@@ -135,16 +153,21 @@ protected void SetRequestOptionsInTransferJob(BlobTransferJob transferJob)
requestOptions.ServerTimeout = cmdletOptions.ServerTimeout;
}
- transferJob.BlobRequestOptions = requestOptions;
+ location.RequestOptions = requestOptions;
}
protected override void EndProcessing()
{
- base.EndProcessing();
- WriteTaskSummary();
-
- this.transferJobRunner.Dispose();
- this.transferJobRunner = null;
+ try
+ {
+ base.EndProcessing();
+ WriteTaskSummary();
+ }
+ finally
+ {
+ this.transferJobRunner.Dispose();
+ this.transferJobRunner = null;
+ }
}
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
index 18a9210956b6..1522e8d9f16a 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
+++ b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj
@@ -61,14 +61,17 @@
False
..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.4-preview\lib\net40\Microsoft.Azure.ResourceManager.dll
-
- ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll
-
- ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll
-
- ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll
+
+ False
+ ..\..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll
..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
@@ -104,16 +107,16 @@
..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll
-
+
False
- ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
+ ..\..\..\packages\WindowsAzure.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll
..\..\..\lib\Microsoft.WindowsAzure.Storage.DataMovement.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
@@ -134,8 +137,9 @@
-
- ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll
+
+ False
+ ..\..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll
@@ -161,14 +165,19 @@
+
+
-
+
+
+
+
@@ -186,6 +195,7 @@
+
@@ -194,13 +204,23 @@
+
+
+
+
+
+
+
+
+
+
@@ -216,6 +236,7 @@
+
@@ -294,4 +315,4 @@
powershell.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)\PostBuild.ps1" "..\..\..\ResourceManager\AzureResourceManager"
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/AccessPolicyHelper.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/AccessPolicyHelper.cs
index d115657d405f..ecbcfef4b0e0 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/AccessPolicyHelper.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/AccessPolicyHelper.cs
@@ -15,17 +15,13 @@
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
using System;
- using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Management.Automation;
- using System.Reflection;
- using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
using Microsoft.WindowsAzure.Commands.Utilities.Common;
- using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Storage.File;
using Microsoft.WindowsAzure.Storage.Queue;
- using Microsoft.WindowsAzure.Storage.Queue.Protocol;
using Microsoft.WindowsAzure.Storage.Table;
internal class AccessPolicyHelper
@@ -41,6 +37,7 @@ internal class AccessPolicyHelper
internal static void SetupAccessPolicy(T policy, DateTime? startTime, DateTime? expiryTime, string permission, bool noStartTime = false, bool noExpiryTime = false)
{
if (!(typeof(T) == typeof(SharedAccessTablePolicy) ||
+ typeof(T) == typeof(SharedAccessFilePolicy) ||
typeof(T) == typeof(SharedAccessBlobPolicy) ||
(typeof(T) == typeof(SharedAccessQueuePolicy))))
{
@@ -112,6 +109,10 @@ internal static void SetupAccessPolicyPermission(T policy, string permission)
{
SetupAccessPolicyPermission((SharedAccessTablePolicy)(Object)policy, permission);
}
+ else if (typeof(T) == typeof(SharedAccessFilePolicy))
+ {
+ SetupAccessPolicyPermission((SharedAccessFilePolicy)(Object)policy, permission);
+ }
else if (typeof(T) == typeof(SharedAccessBlobPolicy))
{
SetupAccessPolicyPermission((SharedAccessBlobPolicy)(Object)policy, permission);
@@ -165,6 +166,43 @@ internal static void SetupAccessPolicyPermission(SharedAccessTablePolicy policy,
}
}
+ ///
+ /// Set up shared access policy permission for SharedAccessFilePolicy
+ ///
+ /// SharedAccessFilePolicy object
+ /// Permission
+ internal static void SetupAccessPolicyPermission(SharedAccessFilePolicy policy, string permission)
+ {
+ //skip set the permission if passed-in value is null
+ if (permission == null) return;
+
+ policy.Permissions = SharedAccessFilePermissions.None;
+
+ //set permission as none if passed-in value is empty
+ if (string.IsNullOrEmpty(permission)) return;
+
+ permission = permission.ToLower();
+ foreach (char op in permission)
+ {
+ switch (op)
+ {
+ case StorageNouns.Permission.Read:
+ policy.Permissions |= SharedAccessFilePermissions.Read;
+ break;
+ case StorageNouns.Permission.Write:
+ policy.Permissions |= SharedAccessFilePermissions.Write;
+ break;
+ case StorageNouns.Permission.Delete:
+ policy.Permissions |= SharedAccessFilePermissions.Delete;
+ break;
+ case StorageNouns.Permission.List:
+ policy.Permissions |= SharedAccessFilePermissions.List;
+ break;
+ default:
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidAccessPermission, op));
+ }
+ }
+ }
///
/// Set up shared access policy permission for SharedAccessBlobPolicy
@@ -246,7 +284,8 @@ internal static PSObject ConstructPolicyOutputPSObject(IDictionary
{
if (!(typeof(T) == typeof(SharedAccessTablePolicy) ||
typeof(T) == typeof(SharedAccessBlobPolicy) ||
- (typeof(T) == typeof(SharedAccessQueuePolicy))))
+ (typeof(T) == typeof(SharedAccessQueuePolicy)) ||
+ (typeof(T) == typeof(SharedAccessFilePolicy))))
{
throw new ArgumentException(Resources.InvalidAccessPolicyType);
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/BlobToAzureFileNameResolver.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobToAzureFileNameResolver.cs
new file mode 100644
index 000000000000..c55ebc6bdea8
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobToAzureFileNameResolver.cs
@@ -0,0 +1,83 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Globalization;
+using System.Text;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.Common
+{
+ class BlobToAzureFileNameResolver : BlobToFileNameResolver
+ {
+ private static char[] invalidPathChars = new char[] {'"', '\\', ':', '|', '<', '>', '*', '?'};
+
+ public BlobToAzureFileNameResolver(Func getMaxFileNameLength)
+ : base(getMaxFileNameLength)
+ {
+ }
+
+ protected override string DirSeparator
+ {
+ get
+ {
+ return "/";
+ }
+ }
+
+ protected override char[] InvalidPathChars
+ {
+ get
+ {
+ return BlobToAzureFileNameResolver.invalidPathChars;
+ }
+ }
+
+ protected override string EscapeInvalidCharacters(string fileName)
+ {
+ StringBuilder sb = new StringBuilder();
+ char separator = this.DirSeparator.ToCharArray()[0];
+ string escapedSeparator = string.Format(CultureInfo.InvariantCulture, "%{0:X2}", (int)separator);
+
+ bool followSeparator = false;
+ char[] fileNameChars = fileName.ToCharArray();
+ int lastIndex = fileNameChars.Length - 1;
+
+ for (int i = 0; i < fileNameChars.Length; ++i)
+ {
+ if (fileNameChars[i] == separator)
+ {
+ if (followSeparator || (0 == i) || (lastIndex == i))
+ {
+ sb.Append(escapedSeparator);
+ }
+ else
+ {
+ sb.Append(fileNameChars[i]);
+ }
+
+ followSeparator = true;
+ }
+ else
+ {
+ followSeparator = false;
+ sb.Append(fileNameChars[i]);
+ }
+ }
+
+ fileName = sb.ToString();
+
+ return base.EscapeInvalidCharacters(fileName);
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/AzureToFileSystemFileNameResolver.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobToFileNameResolver.cs
similarity index 75%
rename from src/ServiceManagement/Storage/Commands.Storage/Common/AzureToFileSystemFileNameResolver.cs
rename to src/ServiceManagement/Storage/Commands.Storage/Common/BlobToFileNameResolver.cs
index b0dac23ff42a..ad6a7bd6e275 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/AzureToFileSystemFileNameResolver.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobToFileNameResolver.cs
@@ -14,15 +14,16 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
///
- /// File name resolver class for translating Azure file names to Windows file names.
+ /// File name resolver class for translating Azure blob names to file/azure file names.
///
- internal class AzureToFileSystemFileNameResolver
+ abstract class BlobToFileNameResolver
{
///
/// These filenames are reserved on windows, regardless of the file extension.
@@ -46,29 +47,48 @@ internal class AzureToFileSystemFileNameResolver
/// Chars invalid for file name.
///
private static char[] invalidFileNameChars = Path.GetInvalidFileNameChars();
-
+
///
- /// Chars invalid for path name.
+ /// Regular expression string format for replacing delimiters
+ /// that we consider as directory separators:
+ /// Translate delimiters to '\' if it is:
+ /// not the first or the last character in the file name
+ /// and not following another delimiter
+ /// /folder1//folder2/ with '/' as delimiter gets translated to: /folder1\/folder2/ .
///
- private static char[] invalidPathChars = AzureToFileSystemFileNameResolver.GetInvalidPathChars();
+ private const string translateDelimitersRegexFormat = "(?<=[^{0}]+){0}(?=.+)";
+
+ private const string blobDelimiter = "/";
///
- /// Regular expression for replacing slashes that we don't consider directory separators:
- /// Translate / to %2F if it is:
- /// - the first character in the file name
- /// - the last character in the file name
- /// - preceeded by another /.
- /// /abc//def/ gets translated to: %2Fabc/%2Fdef%2F.
+ /// Regular expression for replacing delimiters that we consider as directory separators:
+ /// Translate delimiters to '\' if it is:
+ /// not the first or the last character in the file name
+ /// and not following another delimiter
+ /// /folder1//folder2/ with '/' as delimiter gets translated to: /folder1\/folder2/ .
///
- private static Regex translateSlashesRegex = new Regex("(^/)|(?<=/)/|(/$)", RegexOptions.Compiled);
-
+ private Regex translateDelimitersRegex;
+
private Dictionary resolvedFilesCache = new Dictionary();
private Func getMaxFileNameLength;
- public AzureToFileSystemFileNameResolver(Func getMaxFileNameLength)
+ protected abstract string DirSeparator
+ {
+ get;
+ }
+
+ protected abstract char[] InvalidPathChars
+ {
+ get;
+ }
+
+ public BlobToFileNameResolver(Func getMaxFileNameLength)
{
this.getMaxFileNameLength = getMaxFileNameLength;
+
+ string delimiterTemp = "\\/";
+ this.translateDelimitersRegex = new Regex(string.Format(CultureInfo.InvariantCulture, translateDelimitersRegexFormat, delimiterTemp), RegexOptions.Compiled);
}
public string ResolveFileName(string relativePath, DateTimeOffset? snapshotTime)
@@ -76,11 +96,11 @@ public string ResolveFileName(string relativePath, DateTimeOffset? snapshotTime)
// 1) Unescape original string, original string is UrlEncoded.
// 2) Replace Azure directory separator with Windows File System directory separator.
// 3) Trim spaces at the end of the file name.
- string destinationRelativePath = TranslateSlashes(relativePath).TrimEnd(new char[] { ' ' });
+ string destinationRelativePath = EscapeInvalidCharacters(this.TranslateDelimiters(relativePath).TrimEnd(new char[] { ' ' }));
// Split into path + filename parts.
- int lastSlash = destinationRelativePath.LastIndexOf('\\');
-
+ int lastSlash = destinationRelativePath.LastIndexOf(this.DirSeparator, StringComparison.Ordinal);
+
string destinationFileName;
string destinationPath;
@@ -95,25 +115,11 @@ public string ResolveFileName(string relativePath, DateTimeOffset? snapshotTime)
destinationFileName = destinationRelativePath.Substring(lastSlash + 1);
}
- if (!string.IsNullOrEmpty(destinationPath))
- {
- // Replace invalid path characters with %HH, with HH being the hexadecimal
- // representation of the invalid characters.
- destinationPath = EscapeInvalidCharacters(destinationPath, invalidPathChars);
- }
-
- if (!string.IsNullOrEmpty(destinationFileName))
- {
- // Replace invalid file name characters with %HH, with HH being the hexadecimal
- // representation of the invalid character.
- destinationFileName = EscapeInvalidCharacters(destinationFileName, invalidFileNameChars);
- }
-
// Append snapshot time to filename.
destinationFileName = AppendSnapShotToFileName(destinationFileName, snapshotTime);
// Combine path and filename back together again.
- destinationRelativePath = Path.Combine(destinationPath, destinationFileName);
+ destinationRelativePath = this.CombinePath(destinationPath, destinationFileName);
// Check if the destination name is
// - already used by a previously resolved file.
@@ -129,6 +135,37 @@ public string ResolveFileName(string relativePath, DateTimeOffset? snapshotTime)
return destinationRelativePath;
}
+ private string CombinePath(string folder, string name)
+ {
+ if (!string.IsNullOrEmpty(folder))
+ {
+ if (folder.EndsWith(this.DirSeparator, StringComparison.Ordinal))
+ {
+ return string.Format(CultureInfo.CurrentCulture, "{0}{1}", folder, name);
+ }
+ else
+ {
+ return string.Format(CultureInfo.CurrentCulture, "{0}{1}{2}", folder, this.DirSeparator, name);
+ }
+ }
+
+ return name;
+ }
+
+ private string TranslateDelimiters(string source)
+ {
+ if (string.Equals(this.DirSeparator, blobDelimiter, StringComparison.Ordinal))
+ {
+ return source;
+ }
+ else
+ {
+ // Transform delimiters used for directory separators to windows file system directory separator "\"
+ // or azure file separator "/" according to destination location type.
+ return this.translateDelimitersRegex.Replace(source, this.DirSeparator);
+ }
+ }
+
///
/// Append snapshot time to a file name.
///
@@ -188,47 +225,16 @@ private static string ResolveFileNameConflict(string baseFileName, Func charSet = new HashSet(Path.GetInvalidPathChars());
-
- foreach (char c in invalidFileNameChars)
- {
- if ('\\' == c || '/' == c || charSet.Contains(c))
- {
- continue;
- }
-
- charSet.Add(c);
- }
-
- invalidPathChars = new char[charSet.Count];
- charSet.CopyTo(invalidPathChars);
-
- return invalidPathChars;
- }
-
- private static string TranslateSlashes(string source)
- {
- // Transform slashes not used for directory separators to %2F.
- string output = translateSlashesRegex.Replace(source, string.Format("%{0:X2}", (int)'/'));
-
- // Translate remaining slashes to backslashes.
- return output.Replace('/', '\\');
- }
-
- private static string EscapeInvalidCharacters(string fileName, params char[] invalidChars)
+
+ protected virtual string EscapeInvalidCharacters(string fileName)
{
- if (null != invalidChars)
+ if (null != this.InvalidPathChars)
{
// Replace invalid characters with %HH, with HH being the hexadecimal
// representation of the invalid character.
- foreach (char c in invalidChars)
+ foreach (char c in this.InvalidPathChars)
{
- fileName = fileName.Replace(c.ToString(), string.Format("%{0:X2}", (int)c));
+ fileName = fileName.Replace(c.ToString(), string.Format(CultureInfo.InvariantCulture, "%{0:X2}", (int)c));
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/BlobToFileSystemNameResolver.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobToFileSystemNameResolver.cs
new file mode 100644
index 000000000000..601d06aeb598
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobToFileSystemNameResolver.cs
@@ -0,0 +1,79 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.Common
+{
+ ///
+ /// File name resolver class for translating blob names to Windows file names.
+ ///
+ internal class BlobToFileSystemNameResolver : BlobToFileNameResolver
+ {
+ ///
+ /// Chars invalid for file name.
+ ///
+ private static char[] invalidFileNameChars = Path.GetInvalidFileNameChars();
+
+ ///
+ /// Chars invalid for path name.
+ ///
+ private static char[] invalidPathChars = BlobToFileSystemNameResolver.GetInvalidPathChars();
+
+ protected override string DirSeparator
+ {
+ get
+ {
+ return "\\";
+ }
+ }
+
+ protected override char[] InvalidPathChars
+ {
+ get
+ {
+ return BlobToFileSystemNameResolver.invalidPathChars;
+ }
+ }
+
+ public BlobToFileSystemNameResolver(Func getMaxFileNameLength)
+ : base(getMaxFileNameLength)
+ {
+ }
+
+ private static char[] GetInvalidPathChars()
+ {
+ // Union InvalidFileNameChars and InvalidPathChars together
+ // while excluding slash.
+ HashSet charSet = new HashSet(Path.GetInvalidPathChars());
+
+ foreach (char c in invalidFileNameChars)
+ {
+ if ('\\' == c || '/' == c || charSet.Contains(c))
+ {
+ continue;
+ }
+
+ charSet.Add(c);
+ }
+
+ invalidPathChars = new char[charSet.Count];
+ charSet.CopyTo(invalidPathChars);
+
+ return invalidPathChars;
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs
index 6d5447109493..85a67aafee6b 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs
@@ -12,14 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.IO;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.IO;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
internal class BlobUploadRequestQueue
{
private string root;
@@ -90,7 +91,7 @@ public bool IsEmpty()
return Requests.Count == 0;
}
- public Tuple DequeueRequest()
+ public Tuple DequeueRequest()
{
string filePath = Requests.Dequeue();
string blobName = string.Empty;
@@ -106,20 +107,9 @@ public Tuple DequeueRequest()
blobName = NameUtil.ResolveBlobName(blobName);
- ICloudBlob blob = default(ICloudBlob);
-
- switch (Type)
- {
- case BlobType.PageBlob:
- blob = Container.GetPageBlobReference(blobName);
- break;
- case BlobType.BlockBlob:
- default:
- blob = Container.GetBlockBlobReference(blobName);
- break;
- }
+ CloudBlob blob = Util.GetBlobReference(Container, blobName, Type);
- return new Tuple(filePath, blob);
+ return new Tuple(filePath, blob);
}
private string GetCommonDirectory(string dir1, string dir2)
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageCORSRule.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageCORSRule.cs
new file mode 100644
index 000000000000..8c1c134976cd
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageCORSRule.cs
@@ -0,0 +1,90 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Management.Automation;
+using System.Security.Permissions;
+using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel;
+using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet
+{
+ ///
+ /// Show azure storage CORS rule properties
+ ///
+ [Cmdlet(VerbsCommon.Get, StorageNouns.StorageCORSRule),
+ OutputType(typeof(PSCorsRule))]
+ public class GetAzureStorageCORSRuleCommand : StorageCloudBlobCmdletBase
+ {
+ [Parameter(Mandatory = true, Position = 0, HelpMessage = GetAzureStorageServiceLoggingCommand.ServiceTypeHelpMessage)]
+ public StorageServiceType ServiceType { get; set; }
+
+ public GetAzureStorageCORSRuleCommand()
+ {
+ EnableMultiThread = false;
+ }
+
+ ///
+ /// Execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ ServiceProperties currentServiceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext);
+ List ruleList = new List();
+
+ foreach (var corsRule in currentServiceProperties.Cors.CorsRules)
+ {
+ PSCorsRule psCorsRule = new PSCorsRule();
+ psCorsRule.AllowedOrigins = this.ListToArray(corsRule.AllowedOrigins);
+ psCorsRule.AllowedHeaders = this.ListToArray(corsRule.AllowedHeaders);
+ psCorsRule.ExposedHeaders = this.ListToArray(corsRule.ExposedHeaders);
+ psCorsRule.AllowedMethods = this.ConvertCorsHttpMethodToString(corsRule.AllowedMethods);
+ psCorsRule.MaxAgeInSeconds = corsRule.MaxAgeInSeconds;
+ ruleList.Add(psCorsRule);
+ }
+
+ WriteObject(ruleList.ToArray());
+ }
+
+ private string[] ConvertCorsHttpMethodToString(CorsHttpMethods methods)
+ {
+ List methodList = new List();
+
+ foreach (CorsHttpMethods methodValue in Enum.GetValues(typeof(CorsHttpMethods)).Cast())
+ {
+ if (methodValue != CorsHttpMethods.None && (methods & methodValue) != 0)
+ {
+ methodList.Add(methodValue.ToString());
+ }
+ }
+
+ return methodList.ToArray();
+ }
+
+ private string[] ListToArray(IList stringList)
+ {
+ if (null == stringList)
+ {
+ return null;
+ }
+
+ string[] stringArray = new string[stringList.Count];
+ stringList.CopyTo(stringArray, 0);
+ return stringArray;
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs
index fa243c14619a..15f690f8f565 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Storage.Shared.Protocol;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet
{
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+
///
/// Show azure storage service properties
///
@@ -45,6 +45,11 @@ public GetAzureStorageServiceLoggingCommand()
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public override void ExecuteCmdlet()
{
+ if (StorageServiceType.File == ServiceType)
+ {
+ throw new PSInvalidOperationException(Resources.FileNotSupportLogging);
+ }
+
ServiceProperties serviceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext);
WriteObject(serviceProperties.Logging);
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs
index 5b0092b9db99..2b01a3d55fca 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Storage.Shared.Protocol;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet
{
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+
///
/// Show azure storage service properties
///
@@ -47,6 +47,11 @@ public GetAzureStorageServiceMetricsCommand()
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public override void ExecuteCmdlet()
{
+ if (StorageServiceType.File == ServiceType)
+ {
+ throw new PSInvalidOperationException(Resources.FileNotSupportMetrics);
+ }
+
ServiceProperties serviceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType) , OperationContext);
switch (MetricsType)
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs
index 2b6b26dc4b04..844042f1fe10 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs
@@ -296,20 +296,16 @@ internal CloudStorageAccount GetStorageAccountWithEndPoint(StorageCredentials cr
throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, StorageNouns.StorageAccountName));
}
+ if (string.IsNullOrEmpty(endPoint))
+ {
+ return GetStorageAccountWithAzureEnvironment(credential, storageAccountName, useHttps);
+ }
+
string blobEndpoint = string.Empty;
string tableEndpoint = string.Empty;
string queueEndpoint = string.Empty;
string fileEndpoint = string.Empty;
- string domain = string.Empty;
-
- if (string.IsNullOrEmpty(endPoint))
- {
- domain = GetDefaultEndPointDomain();
- }
- else
- {
- domain = endPoint.Trim();
- }
+ string domain = endPoint.Trim();
if (useHttps)
{
@@ -341,30 +337,51 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
string storageAccountName, bool useHttps, string azureEnvironmentName = "")
{
AzureEnvironment azureEnvironment = null;
-
- if (string.IsNullOrEmpty(azureEnvironmentName))
+
+ if (null != Profile)
{
- azureEnvironment = Profile.Context.Environment;
+ if (string.IsNullOrEmpty(azureEnvironmentName) && (null != Profile.Context))
+ {
+ azureEnvironment = Profile.Context.Environment;
+
+ if (null == azureEnvironment)
+ {
+ azureEnvironmentName = EnvironmentName.AzureCloud;
+ }
+ }
+
+ if (null == azureEnvironment)
+ {
+ try
+ {
+ var profileClient = new ProfileClient(Profile);
+ azureEnvironment = profileClient.GetEnvironmentOrDefault(azureEnvironmentName);
+ }
+ catch (ArgumentException e)
+ {
+ throw new ArgumentException(e.Message + " " + string.Format(CultureInfo.CurrentCulture, Resources.ValidEnvironmentName, EnvironmentName.AzureCloud, EnvironmentName.AzureChinaCloud));
+ }
+ }
}
- else
+
+ if (null != azureEnvironment)
{
try
{
- var profileClient = new ProfileClient(Profile);
- azureEnvironment = profileClient.GetEnvironmentOrDefault(azureEnvironmentName);
+ Uri blobEndPoint = azureEnvironment.GetStorageBlobEndpoint(storageAccountName, useHttps);
+ Uri queueEndPoint = azureEnvironment.GetStorageQueueEndpoint(storageAccountName, useHttps);
+ Uri tableEndPoint = azureEnvironment.GetStorageTableEndpoint(storageAccountName, useHttps);
+ Uri fileEndPoint = azureEnvironment.GetStorageFileEndpoint(storageAccountName, useHttps);
+
+ return new CloudStorageAccount(credential, blobEndPoint, queueEndPoint, tableEndPoint, fileEndPoint);
}
- catch (ArgumentException e)
+ catch (ArgumentNullException)
{
- throw new ArgumentException(e.Message + " " + string.Format(CultureInfo.CurrentCulture, Resources.ValidEnvironmentName, EnvironmentName.AzureCloud, EnvironmentName.AzureChinaCloud));
+ // the environment may not have value for StorageEndpointSuffix, in this case, we'll still use the default domain of "core.windows.net"
}
}
-
- Uri blobEndPoint = azureEnvironment.GetStorageBlobEndpoint(storageAccountName, useHttps);
- Uri queueEndPoint = azureEnvironment.GetStorageQueueEndpoint(storageAccountName, useHttps);
- Uri tableEndPoint = azureEnvironment.GetStorageTableEndpoint(storageAccountName, useHttps);
- Uri fileEndPoint = azureEnvironment.GetStorageFileEndpoint(storageAccountName, useHttps);
-
- return new CloudStorageAccount(credential, blobEndPoint, queueEndPoint, tableEndPoint, fileEndPoint);
+
+ return GetStorageAccountWithEndPoint(credential, storageAccountName, useHttps, Resources.DefaultDomain);
}
///
@@ -420,4 +437,4 @@ public override void ExecuteCmdlet()
WriteObject(context);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/RemoveAzureStorageCORSRule.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/RemoveAzureStorageCORSRule.cs
new file mode 100644
index 000000000000..3619ed6fd26a
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/RemoveAzureStorageCORSRule.cs
@@ -0,0 +1,51 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System.Management.Automation;
+using System.Security.Permissions;
+using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet
+{
+ ///
+ /// Remove all azure storage CORS rules
+ ///
+ [Cmdlet(VerbsCommon.Remove, StorageNouns.StorageCORSRule)]
+ public class RemoveAzureStorageCORSRuleCommand : StorageCloudBlobCmdletBase
+ {
+ [Parameter(Mandatory = true, Position = 0, HelpMessage = GetAzureStorageServiceLoggingCommand.ServiceTypeHelpMessage)]
+ public StorageServiceType ServiceType { get; set; }
+
+ public RemoveAzureStorageCORSRuleCommand()
+ {
+ EnableMultiThread = false;
+ }
+
+ ///
+ /// Execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ ServiceProperties currentServiceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext);
+ ServiceProperties serviceProperties = new ServiceProperties();
+ serviceProperties.Clean();
+ serviceProperties.Cors = currentServiceProperties.Cors;
+ serviceProperties.Cors.CorsRules.Clear();
+
+ Channel.SetStorageServiceProperties(ServiceType, serviceProperties,
+ GetRequestOptions(ServiceType), OperationContext);
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageCORSRule.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageCORSRule.cs
new file mode 100644
index 000000000000..61062cf257c3
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageCORSRule.cs
@@ -0,0 +1,123 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Management.Automation;
+using System.Security.Permissions;
+using System.Globalization;
+using SharedProtocol = Microsoft.WindowsAzure.Storage.Shared.Protocol;
+using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+using System.Collections.Generic;
+using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel;
+using Microsoft.WindowsAzure.Storage;
+using System.Net;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet
+{
+ ///
+ /// Define cmdlet to set azure storage CORS rules to service, it will overwrite all of the CORS rules in the service.
+ ///
+ [Cmdlet(VerbsCommon.Set, StorageNouns.StorageCORSRule),
+ OutputType(typeof(PSCorsRule))]
+ public class SetAzureStorageCORSRuleCommand : StorageCloudBlobCmdletBase
+ {
+ private const string InvalidXMLNodeValueError = "InvalidXmlNodeValue";
+ private const string InvalidXMLDocError = "InvalidXmlDocument";
+
+ [Parameter(Mandatory = true, Position = 0, HelpMessage = GetAzureStorageServiceLoggingCommand.ServiceTypeHelpMessage)]
+ public StorageServiceType ServiceType { get; set; }
+
+ [Parameter(Mandatory = true,
+ HelpMessage = "CorsRule instances to represent rules to be set.")]
+ [ValidateNotNull]
+ public PSCorsRule[] CorsRules { get; set; }
+
+ [Parameter(Mandatory = false, HelpMessage = "Display ServiceProperties")]
+ public SwitchParameter PassThru { get; set; }
+
+ public SetAzureStorageCORSRuleCommand()
+ {
+ EnableMultiThread = false;
+ }
+
+ ///
+ /// Execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ ServiceProperties serviceProperties = new ServiceProperties();
+ serviceProperties.Clean();
+ serviceProperties.Cors = new CorsProperties();
+
+ foreach (var corsRuleObject in this.CorsRules)
+ {
+ CorsRule corsRule = new CorsRule();
+ corsRule.AllowedHeaders = corsRuleObject.AllowedHeaders;
+ corsRule.AllowedOrigins = corsRuleObject.AllowedOrigins;
+ corsRule.ExposedHeaders = corsRuleObject.ExposedHeaders;
+ corsRule.MaxAgeInSeconds = corsRuleObject.MaxAgeInSeconds;
+ this.SetAllowedMethods(corsRule, corsRuleObject.AllowedMethods);
+ serviceProperties.Cors.CorsRules.Add(corsRule);
+ }
+
+ try
+ {
+ Channel.SetStorageServiceProperties(ServiceType, serviceProperties,
+ GetRequestOptions(ServiceType), OperationContext);
+ }
+ catch (StorageException se)
+ {
+ if ((null != se.RequestInformation) &&
+ ((int)HttpStatusCode.BadRequest == se.RequestInformation.HttpStatusCode) &&
+ (null != se.RequestInformation.ExtendedErrorInformation) &&
+ (string.Equals(InvalidXMLNodeValueError, se.RequestInformation.ExtendedErrorInformation.ErrorCode, StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(InvalidXMLDocError, se.RequestInformation.ExtendedErrorInformation.ErrorCode, StringComparison.OrdinalIgnoreCase)))
+ {
+ throw new InvalidOperationException(Resources.CORSRuleError);
+ }
+ else
+ {
+ throw;
+ }
+ }
+
+ if (PassThru)
+ {
+ WriteObject(this.CorsRules);
+ }
+ }
+
+ private void SetAllowedMethods(CorsRule corsRule, string[] allowedMethods)
+ {
+ corsRule.AllowedMethods = SharedProtocol.CorsHttpMethods.None;
+
+ if (null != allowedMethods)
+ {
+ foreach (var method in allowedMethods)
+ {
+ SharedProtocol.CorsHttpMethods allowedCorsMethod = SharedProtocol.CorsHttpMethods.None;
+ if (Enum.TryParse(method, true, out allowedCorsMethod))
+ {
+ corsRule.AllowedMethods |= allowedCorsMethod;
+ }
+ else
+ {
+ throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidHTTPMethod, method));
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs
index a9c1907c86ac..75163eaecb58 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs
@@ -12,12 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
using StorageClient = WindowsAzure.Storage.Shared.Protocol;
///
@@ -162,6 +161,11 @@ internal StorageClient.LoggingOperations GetLoggingOperations(string LoggingOper
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public override void ExecuteCmdlet()
{
+ if (StorageServiceType.File == ServiceType)
+ {
+ throw new PSInvalidOperationException(Resources.FileNotSupportLogging);
+ }
+
StorageClient.ServiceProperties currentServiceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext);
StorageClient.ServiceProperties serviceProperties = new StorageClient.ServiceProperties();
serviceProperties.Clean();
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs
index 005dfa407b91..7f4717ddae05 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs
@@ -12,13 +12,13 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Storage.Shared.Protocol;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+
///
/// Show azure storage service properties
///
@@ -120,6 +120,11 @@ internal MetricsLevel GetMetricsLevel(string MetricsLevel)
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public override void ExecuteCmdlet()
{
+ if (StorageServiceType.File == ServiceType)
+ {
+ throw new PSInvalidOperationException(Resources.FileNotSupportMetrics);
+ }
+
ServiceProperties currentServiceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext);
ServiceProperties serviceProperties = new ServiceProperties();
serviceProperties.Clean();
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/CmdletOperationContext.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/CmdletOperationContext.cs
index 4a3362307bff..8e1c1830b414 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/CmdletOperationContext.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/CmdletOperationContext.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Threading;
-using Microsoft.WindowsAzure.Storage;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+ using System.Threading;
+ using Microsoft.WindowsAzure.Storage;
+
internal class CmdletOperationContext
{
private static volatile bool inited;
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/CommunicationExceptionUtil.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/CommunicationExceptionUtil.cs
index e1ba78ad83fe..6635ef3ff616 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/CommunicationExceptionUtil.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/CommunicationExceptionUtil.cs
@@ -12,11 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.ServiceModel;
-using Microsoft.WindowsAzure.Commands.Utilities.Common;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System.ServiceModel;
+ using Microsoft.WindowsAzure.Commands.Utilities.Common;
+
///
/// Communication exception utility
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs
index 05b7e24f84f2..5adb6cc046e3 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Threading.Tasks;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System.Threading.Tasks;
+
///
/// Async prompt confirm task completion source
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/DataManagementWrapper.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/DataManagementWrapper.cs
index cbb597f34d0f..769bf8137066 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/DataManagementWrapper.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/DataManagementWrapper.cs
@@ -12,14 +12,13 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Storage.DataMovement;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Storage.DataMovement;
+
internal sealed class DataManagementWrapper : ITransferJobRunner
{
// Powershell could be ran either in 32bit or 64bit
@@ -32,8 +31,7 @@ public DataManagementWrapper(int concurrency, string clientRequestId)
{
TransferOptions options = new TransferOptions()
{
- ParallelOperations = concurrency,
- ClientRequestIdPrefix = clientRequestId
+ ParallelOperations = concurrency
};
if (!Environment.Is64BitProcess && options.MaximumCacheSize > Maximum32bitCacheSize)
@@ -44,11 +42,11 @@ public DataManagementWrapper(int concurrency, string clientRequestId)
this.manager = new TransferManager(options);
}
- public Task RunTransferJob(TransferJobBase job, Action progressReport, CancellationToken cancellationToken)
+ public Task RunTransferJob(TransferJob job, Action progressReport, CancellationToken cancellationToken)
{
TaskCompletionSource
internal interface ITransferJobRunner : IDisposable
{
- Task RunTransferJob(TransferJobBase job, Action progressReport, CancellationToken cancellationToken);
+ Task RunTransferJob(TransferJob job, Action progressReport, CancellationToken cancellationToken);
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs
index 11bf9e3ad553..fa4b15b8db49 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs
@@ -12,14 +12,14 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Concurrent;
-using System.Diagnostics;
-using System.Threading;
-using System.Threading.Tasks;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+ using System.Collections.Concurrent;
+ using System.Diagnostics;
+ using System.Threading;
+ using System.Threading.Tasks;
+
///
/// A task scheduler with limited concurrency.
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/NameUtil.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/NameUtil.cs
index 1c0840c5a664..82134122856f 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/NameUtil.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/NameUtil.cs
@@ -12,20 +12,23 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Management.Automation;
-using System.Text.RegularExpressions;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.IO;
+ using System.Linq;
+ using System.Management.Automation;
+ using System.Text.RegularExpressions;
+
///
/// Name utility
///
internal class NameUtil
{
+ public const int MaxFileNameLength = 1024;
+
///
/// Max file length in windows
///
@@ -36,6 +39,33 @@ internal class NameUtil
///
public const int MaxStoredAccessPolicyNameLength = 64;
+ ///
+ /// Check whether the blob name is valid. If not throw an exception
+ ///
+ /// Blob name
+ public static void ValidateBlobName(string name)
+ {
+ if (!NameUtil.IsValidBlobName(name))
+ {
+ throw new ArgumentException(String.Format(
+ CultureInfo.CurrentCulture,
+ Resources.InvalidBlobName,
+ name));
+ }
+ }
+
+ ///
+ /// Check whether the container name is valid. If not throw an exception
+ ///
+ /// Container name
+ public static void ValidateContainerName(string name)
+ {
+ if (!NameUtil.IsValidContainerName(name))
+ {
+ throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, Resources.InvalidContainerName, name));
+ }
+ }
+
///
/// Is valid container name
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs
index de49c4e6d98d..939a62277d4e 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+
///
/// Resource already exist exception
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceNotFoundException.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceNotFoundException.cs
index aa9bdee5b388..c9a53be7f0d0 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceNotFoundException.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceNotFoundException.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ------------------------------------------------------------------------------------
-using System;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+
///
/// Resource not found exception
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/SasTokenHelper.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/SasTokenHelper.cs
index 303ffc563757..d25dda4d3440 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/SasTokenHelper.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/SasTokenHelper.cs
@@ -12,17 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Blob;
-using Microsoft.WindowsAzure.Storage.Queue;
-using Microsoft.WindowsAzure.Storage.Queue.Protocol;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+ using System.Collections.Generic;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Storage.File;
+ using Microsoft.WindowsAzure.Storage.Queue;
+ using Microsoft.WindowsAzure.Storage.Queue.Protocol;
+ using Microsoft.WindowsAzure.Storage.Table;
+
internal class SasTokenHelper
{
///
@@ -55,6 +56,39 @@ public static bool ValidateContainerAccessPolicy(IStorageBlobManagement channel,
return !sharedAccessPolicy.SharedAccessExpiryTime.HasValue;
}
+
+ ///
+ /// Validate the file share access policy
+ ///
+ /// SharedAccessFilePolicy object
+ /// The policy identifier which need to be checked.
+ public static bool ValidateShareAccessPolicy(IStorageFileManagement channel, string shareName,
+ string policyIdentifier, bool shouldNoPermission, bool shouldNoStartTime, bool shouldNoExpiryTime)
+ {
+ if (string.IsNullOrEmpty(policyIdentifier)) return true;
+ CloudFileShare fileShare = channel.GetShareReference(shareName);
+ FileSharePermissions permission = fileShare.GetPermissions();
+
+ SharedAccessFilePolicy sharedAccessPolicy =
+ GetExistingPolicy(permission.SharedAccessPolicies, policyIdentifier);
+
+ if (shouldNoPermission && sharedAccessPolicy.Permissions != SharedAccessFilePermissions.None)
+ {
+ throw new InvalidOperationException(Resources.SignedPermissionsMustBeOmitted);
+ }
+
+ if (shouldNoStartTime && sharedAccessPolicy.SharedAccessStartTime.HasValue)
+ {
+ throw new InvalidOperationException(Resources.SignedStartTimeMustBeOmitted);
+ }
+
+ if (shouldNoExpiryTime && sharedAccessPolicy.SharedAccessExpiryTime.HasValue)
+ {
+ throw new InvalidOperationException(Resources.SignedExpiryTimeMustBeOmitted);
+ }
+
+ return !sharedAccessPolicy.SharedAccessExpiryTime.HasValue;
+ }
///
/// Validate the queue access policy
@@ -171,5 +205,20 @@ public static void SetupAccessPolicyLifeTime(DateTime? startTime, DateTime? expi
SharedAccessExpiryTime.ToString(), SharedAccessStartTime.ToString()));
}
}
+
+ public static string GetFullUriWithSASToken(string absoluteUri, string sasToken)
+ {
+
+ if (absoluteUri.Contains("?"))
+ {
+ // There is already a query string in the URI,
+ // remove "?" from sas token.
+ return absoluteUri + sasToken.Substring(1);
+ }
+ else
+ {
+ return absoluteUri + sasToken;
+ }
+ }
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ServiceMetricsType.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ServiceMetricsType.cs
index 11010262cdfb..4da7e4a20b40 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/ServiceMetricsType.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ServiceMetricsType.cs
@@ -14,7 +14,6 @@
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
-
public enum ServiceMetricsType
{
Hour,
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs
index cdaa9ed93646..a3c176d7bb90 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Storage.Shared.Protocol;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+
public static class ServicePropertiesExtension
{
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs
index c964a994d9c6..395897ef4287 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs
@@ -21,6 +21,7 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Common.Authentication.Models;
+using Microsoft.WindowsAzure.Commands.Common;
using Microsoft.WindowsAzure.Commands.Common.Storage;
using Microsoft.WindowsAzure.Commands.Storage.File;
using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel;
@@ -33,6 +34,7 @@
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+
///
/// Base cmdlet for all storage cmdlet that works with cloud
///
@@ -175,9 +177,16 @@ public IRequestOptions GetRequestOptions(StorageServiceType type)
/// Storage account
internal AzureStorageContext GetCmdletStorageContext()
{
- if (Context != null)
+ this.Context = this.GetCmdletStorageContext(this.Context);
+
+ return this.Context;
+ }
+
+ internal AzureStorageContext GetCmdletStorageContext(AzureStorageContext context)
+ {
+ if (context != null)
{
- WriteDebugLog(String.Format(Resources.UseStorageAccountFromContext, Context.StorageAccountName));
+ WriteDebugLog(String.Format(Resources.UseStorageAccountFromContext, context.StorageAccountName));
}
else
{
@@ -202,10 +211,10 @@ internal AzureStorageContext GetCmdletStorageContext()
}
//Set the storage context and use it in pipeline
- Context = new AzureStorageContext(account);
+ context = new AzureStorageContext(account);
}
- return Context;
+ return context;
}
///
@@ -549,6 +558,12 @@ protected override void BeginProcessing()
SetUpMultiThreadEnvironment();
}
+ OperationContext.GlobalSendingRequest +=
+ (sender, args) =>
+ {
+ args.Request.UserAgent = Microsoft.WindowsAzure.Storage.Shared.Protocol.Constants.HeaderConstants.UserAgent + " " + ApiConstants.UserAgentHeaderValue;
+ };
+
base.BeginProcessing();
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExceptionUtil.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExceptionUtil.cs
index cece55bfbc3f..97e5a1bab125 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExceptionUtil.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExceptionUtil.cs
@@ -12,11 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Storage;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+ using Microsoft.WindowsAzure.Storage;
+
///
/// Storage exception utility
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExtensions.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExtensions.cs
new file mode 100644
index 000000000000..eb2a8f55ce88
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExtensions.cs
@@ -0,0 +1,170 @@
+//------------------------------------------------------------------------------
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//
+//
+// Extensions methods for CloudBlobs and CloudFiles for use with BlobTransfer
+//
+//------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Commands.Storage.Common
+{
+ using System;
+ using System.Globalization;
+ using Microsoft.WindowsAzure.Storage.Auth;
+ using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Storage.File;
+
+ ///
+ /// Extension methods for CloudBlobs and CloudFiles.
+ ///
+ internal static class StorageExtensions
+ {
+ private const int CopySASLifeTimeInMinutes = 7 * 24 * 60;
+
+ internal static CloudFile GenerateCopySourceFile(
+ this CloudFile file)
+ {
+ if (null == file)
+ {
+ throw new ArgumentNullException("file");
+ }
+
+ string sasToken = GetFileSASToken(file);
+
+ if (string.IsNullOrEmpty(sasToken))
+ {
+ return file;
+ }
+
+ return new CloudFile(file.Uri, new StorageCredentials(sasToken));
+ }
+
+ private static string GetFileSASToken(CloudFile file)
+ {
+ if (null == file.ServiceClient.Credentials
+ || file.ServiceClient.Credentials.IsAnonymous)
+ {
+ return string.Empty;
+ }
+ else if (file.ServiceClient.Credentials.IsSAS)
+ {
+ return file.ServiceClient.Credentials.SASToken;
+ }
+
+ // SAS life time is at least 10 minutes.
+ TimeSpan sasLifeTime = TimeSpan.FromMinutes(CopySASLifeTimeInMinutes);
+
+ SharedAccessFilePolicy policy = new SharedAccessFilePolicy()
+ {
+ SharedAccessExpiryTime = DateTime.Now.Add(sasLifeTime),
+ Permissions = SharedAccessFilePermissions.Read,
+ };
+
+ return file.GetSharedAccessSignature(policy);
+ }
+
+ ///
+ /// Append an auto generated SAS to a blob uri.
+ ///
+ /// Blob to append SAS.
+ /// Blob Uri with SAS appended.
+ internal static CloudBlob GenerateCopySourceBlob(
+ this CloudBlob blob)
+ {
+ if (null == blob)
+ {
+ throw new ArgumentNullException("blob");
+ }
+
+ string sasToken = GetBlobSasToken(blob);
+
+ if (string.IsNullOrEmpty(sasToken))
+ {
+ return blob;
+ }
+
+ Uri blobUri = null;
+
+ if (blob.IsSnapshot)
+ {
+ blobUri = blob.SnapshotQualifiedUri;
+ }
+ else
+ {
+ blobUri = blob.Uri;
+ }
+
+ return Util.GetBlobReference(blobUri, new StorageCredentials(sasToken), blob.BlobType);
+ }
+
+ ///
+ /// Append an auto generated SAS to a blob uri.
+ ///
+ /// Blob to append SAS.
+ /// Blob Uri with SAS appended.
+ internal static Uri GenerateUriWithCredentials(
+ this CloudBlob blob)
+ {
+ if (null == blob)
+ {
+ throw new ArgumentNullException("blob");
+ }
+
+ string sasToken = GetBlobSasToken(blob);
+
+ if (string.IsNullOrEmpty(sasToken))
+ {
+ return blob.SnapshotQualifiedUri;
+ }
+
+ string uriStr = null;
+
+ if (blob.IsSnapshot)
+ {
+ uriStr = string.Format(CultureInfo.InvariantCulture, "{0}&{1}", blob.SnapshotQualifiedUri.AbsoluteUri, sasToken.Substring(1));
+ }
+ else
+ {
+ uriStr = string.Format(CultureInfo.InvariantCulture, "{0}{1}", blob.Uri.AbsoluteUri, sasToken);
+ }
+
+ return new Uri(uriStr);
+ }
+
+ private static string GetBlobSasToken(CloudBlob blob)
+ {
+ if (null == blob.ServiceClient.Credentials
+ || blob.ServiceClient.Credentials.IsAnonymous)
+ {
+ return string.Empty;
+ }
+ else if (blob.ServiceClient.Credentials.IsSAS)
+ {
+ return blob.ServiceClient.Credentials.SASToken;
+ }
+
+ // SAS life time is at least 10 minutes.
+ TimeSpan sasLifeTime = TimeSpan.FromMinutes(CopySASLifeTimeInMinutes);
+
+ SharedAccessBlobPolicy policy = new SharedAccessBlobPolicy()
+ {
+ SharedAccessExpiryTime = DateTime.Now.Add(sasLifeTime),
+ Permissions = SharedAccessBlobPermissions.Read,
+ };
+
+ CloudBlob rootBlob = null;
+
+ if (!blob.IsSnapshot)
+ {
+ rootBlob = blob;
+ }
+ else
+ {
+ rootBlob = Util.GetBlobReference(blob.Uri, blob.ServiceClient.Credentials, blob.BlobType);
+ }
+
+ return rootBlob.GetSharedAccessSignature(policy);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageNouns.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageNouns.cs
index 0d145ddd4552..1c7bb28e2ed7 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageNouns.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageNouns.cs
@@ -99,6 +99,11 @@ public static class StorageNouns
///
public const string StorageServiceLogging = "AzureStorageServiceLoggingProperty";
+ ///
+ /// Azure storage CORS rule
+ ///
+ public const string StorageCORSRule = "AzureStorageCORSRule";
+
///
/// Azure storage container sas
///
@@ -109,6 +114,16 @@ public static class StorageNouns
///
public const string BlobSas = "AzureStorageBlobSASToken";
+ ///
+ /// Azure storage file share sas
+ ///
+ public const string ShareSas = "AzureStorageShareSASToken";
+
+ ///
+ /// Azure storage file sas
+ ///
+ public const string FileSas = "AzureStorageFileSASToken";
+
///
/// Azure storage table sas
///
@@ -124,6 +139,11 @@ public static class StorageNouns
///
public const string TableStoredAccessPolicy = "AzureStorageTableStoredAccessPolicy";
+ ///
+ /// Azure storage share stored access policy
+ ///
+ public const string ShareStoredAccessPolicy = "AzureStorageShareStoredAccessPolicy";
+
///
/// Azure storage container stored access policy
///
@@ -135,6 +155,11 @@ public static class StorageNouns
///
public const string QueueStoredAccessPolicy = "AzureStorageQueueStoredAccessPolicy";
+ ///
+ /// Azure storage share quota
+ ///
+ public const string ShareQuota = "AzureStorageShareQuota";
+
///
/// Default service metrics version
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/TaskOutputStream.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/TaskOutputStream.cs
index cdba18bfc1c9..21abe38b54f5 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/TaskOutputStream.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/TaskOutputStream.cs
@@ -12,16 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Management.Automation;
-using System.Threading;
-using System.Threading.Tasks;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+ using System.Collections.Concurrent;
+ using System.Collections.Generic;
+ using System.Diagnostics;
+ using System.Management.Automation;
+ using System.Threading;
+ using System.Threading.Tasks;
+
///
/// Task output stream in multithread environment
/// It's the multithread version of WriteOuput/WriterVerbose/WriteError and etc.
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Util.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Util.cs
index 2c1b91317744..cae189794e84 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Common/Util.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Util.cs
@@ -14,6 +14,12 @@
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using System;
+using System.Globalization;
+using System.Net;
+using Microsoft.WindowsAzure.Storage;
+using Microsoft.WindowsAzure.Storage.Auth;
+using Microsoft.WindowsAzure.Storage.Blob;
internal static class Util
{
@@ -48,5 +54,112 @@ public static string BytesToHumanReadableSize(double size)
return string.Format(sizeFormats[order], size);
}
+
+ public static CloudBlob GetBlobReferenceFromServer(
+ CloudBlobContainer container,
+ string blobName,
+ AccessCondition accessCondition = null,
+ BlobRequestOptions options = null,
+ OperationContext operationContext = null)
+ {
+ CloudBlob blob = container.GetBlobReference(blobName);
+ return GetBlobReferenceFromServer(blob, accessCondition, options, operationContext);
+ }
+
+ public static CloudBlob GetBlobReferenceFromServer(CloudBlobClient client, Uri blobUri)
+ {
+ CloudBlob blob = new CloudBlob(blobUri, client.Credentials);
+ return GetBlobReferenceFromServer(blob);
+ }
+
+ private static CloudBlob GetBlobReferenceFromServer(
+ CloudBlob blob,
+ AccessCondition accessCondition = null,
+ BlobRequestOptions options = null,
+ OperationContext operationContext = null)
+ {
+ try
+ {
+ blob.FetchAttributes(accessCondition, options, operationContext);
+ }
+ catch (StorageException se)
+ {
+ if (se.RequestInformation == null ||
+ (se.RequestInformation.HttpStatusCode != (int)HttpStatusCode.NotFound))
+ {
+ throw;
+ }
+
+ return null;
+ }
+
+ return GetCorrespondingTypeBlobReference(blob);
+ }
+
+ public static CloudBlob GetCorrespondingTypeBlobReference(CloudBlob blob)
+ {
+ CloudBlob targetBlob;
+ switch(blob.Properties.BlobType)
+ {
+ case BlobType.BlockBlob:
+ targetBlob = new CloudBlockBlob(blob.SnapshotQualifiedUri, blob.ServiceClient.Credentials);
+ break;
+ case BlobType.PageBlob:
+ targetBlob = new CloudPageBlob(blob.SnapshotQualifiedUri, blob.ServiceClient.Credentials);
+ break;
+ case BlobType.AppendBlob:
+ targetBlob = new CloudAppendBlob(blob.SnapshotQualifiedUri, blob.ServiceClient.Credentials);
+ break;
+ default:
+ throw new InvalidOperationException(string.Format(
+ CultureInfo.CurrentCulture,
+ Resources.InvalidBlobType,
+ blob.Properties.BlobType,
+ blob.Name));
+ }
+
+ targetBlob.FetchAttributes();
+ return targetBlob;
+ }
+
+ public static CloudBlob GetBlobReference(CloudBlobContainer container, string blobName, BlobType blobType)
+ {
+ switch(blobType)
+ {
+ case BlobType.BlockBlob:
+ return container.GetBlockBlobReference(blobName);
+ case BlobType.PageBlob:
+ return container.GetPageBlobReference(blobName);
+ case BlobType.AppendBlob:
+ return container.GetAppendBlobReference(blobName);
+ default:
+ throw new ArgumentException(String.Format(
+ CultureInfo.CurrentCulture,
+ Resources.InvalidBlobType,
+ blobType,
+ blobName));
+ }
+ }
+
+ public static CloudBlob GetBlobReference(Uri blobUri, StorageCredentials storageCredentials, BlobType blobType)
+ {
+ switch (blobType)
+ {
+ case BlobType.BlockBlob:
+ return new CloudBlockBlob(blobUri, storageCredentials);
+ case BlobType.PageBlob:
+ return new CloudPageBlob(blobUri, storageCredentials);
+ case BlobType.AppendBlob:
+ return new CloudAppendBlob(blobUri, storageCredentials);
+ case BlobType.Unspecified:
+ return new CloudBlob(blobUri, storageCredentials);
+ default:
+ throw new ArgumentException(String.Format(
+ CultureInfo.CurrentCulture,
+ Resources.InvalidBlobType,
+ blobType,
+ blobUri));
+ }
+ }
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs
index 7f91b09b062f..351b6b81007b 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs
@@ -12,15 +12,14 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Management.Automation;
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File
{
+ using System.Management.Automation;
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.File;
+
public abstract class AzureStorageFileCmdletBase : StorageCloudCmdletBase
{
[Parameter(
@@ -45,14 +44,6 @@ protected FileRequestOptions RequestOptions
}
}
- protected AccessCondition AccessCondition
- {
- get
- {
- return AccessCondition.GenerateEmptyCondition();
- }
- }
-
protected override IStorageFileManagement CreateChannel()
{
if (this.Channel == null || !this.ShareChannel)
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileException.cs b/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileException.cs
index 476e47017065..3a688c652c8a 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileException.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileException.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Runtime.Serialization;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File
{
+ using System;
+ using System.Management.Automation;
+ using System.Runtime.Serialization;
+
///
/// Provides the exception object thrown by AzureStorageFile cmdlets.
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs
index 9e49b912eb25..157422850f31 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Globalization;
-using System.Management.Automation;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
+ using System.Globalization;
+ using System.Management.Automation;
+ using Microsoft.WindowsAzure.Storage.File;
+
[Cmdlet(VerbsCommon.Get, Constants.FileCmdletName, DefaultParameterSetName = Constants.ShareNameParameterSetName)]
public class GetAzureStorageFile : AzureStorageFileCmdletBase
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs
index b9cd69f41e86..7d79bcf1448c 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs
@@ -15,21 +15,22 @@
using System.Globalization;
using System.IO;
using System.Management.Automation;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
using Microsoft.WindowsAzure.Storage.File;
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
+ using Microsoft.WindowsAzure.Storage.DataMovement;
+ using LocalConstants = Microsoft.WindowsAzure.Commands.Storage.File.Constants;
using LocalDirectory = System.IO.Directory;
using LocalPath = System.IO.Path;
- [Cmdlet(VerbsCommon.Get, Constants.FileContentCmdletName, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = Constants.ShareNameParameterSetName)]
+ [Cmdlet(VerbsCommon.Get, LocalConstants.FileContentCmdletName, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = LocalConstants.ShareNameParameterSetName)]
public class GetAzureStorageFileContent : StorageFileDataManagementCmdletBase
{
[Parameter(
Position = 0,
Mandatory = true,
- ParameterSetName = Constants.ShareNameParameterSetName,
+ ParameterSetName = LocalConstants.ShareNameParameterSetName,
HelpMessage = "Name of the file share where the file would be downloaded.")]
[ValidateNotNullOrEmpty]
public string ShareName { get; set; }
@@ -38,7 +39,7 @@ public class GetAzureStorageFileContent : StorageFileDataManagementCmdletBase
Position = 0,
Mandatory = true,
ValueFromPipeline = true,
- ParameterSetName = Constants.ShareParameterSetName,
+ ParameterSetName = LocalConstants.ShareParameterSetName,
HelpMessage = "CloudFileShare object indicated the share where the file would be downloaded.")]
[ValidateNotNull]
public CloudFileShare Share { get; set; }
@@ -47,7 +48,7 @@ public class GetAzureStorageFileContent : StorageFileDataManagementCmdletBase
Position = 0,
Mandatory = true,
ValueFromPipeline = true,
- ParameterSetName = Constants.DirectoryParameterSetName,
+ ParameterSetName = LocalConstants.DirectoryParameterSetName,
HelpMessage = "CloudFileDirectory object indicated the cloud directory where the file would be downloaded.")]
[ValidateNotNull]
public CloudFileDirectory Directory { get; set; }
@@ -56,7 +57,7 @@ public class GetAzureStorageFileContent : StorageFileDataManagementCmdletBase
Position = 0,
Mandatory = true,
ValueFromPipeline = true,
- ParameterSetName = Constants.FileParameterSetName,
+ ParameterSetName = LocalConstants.FileParameterSetName,
HelpMessage = "CloudFile object indicated the cloud file to be downloaded.")]
[ValidateNotNull]
public CloudFile File { get; set; }
@@ -64,36 +65,36 @@ public class GetAzureStorageFileContent : StorageFileDataManagementCmdletBase
[Parameter(
Position = 1,
Mandatory = true,
- ParameterSetName = Constants.ShareNameParameterSetName,
+ ParameterSetName = LocalConstants.ShareNameParameterSetName,
HelpMessage = "Path to the cloud file to be downloaded.")]
[Parameter(
Position = 1,
Mandatory = true,
- ParameterSetName = Constants.ShareParameterSetName,
+ ParameterSetName = LocalConstants.ShareParameterSetName,
HelpMessage = "Path to the cloud file to be downloaded.")]
[Parameter(
Position = 1,
Mandatory = true,
- ParameterSetName = Constants.DirectoryParameterSetName,
+ ParameterSetName = LocalConstants.DirectoryParameterSetName,
HelpMessage = "Path to the cloud file to be downloaded.")]
[ValidateNotNullOrEmpty]
public string Path { get; set; }
[Parameter(
Position = 2,
- ParameterSetName = Constants.ShareNameParameterSetName,
+ ParameterSetName = LocalConstants.ShareNameParameterSetName,
HelpMessage = "Path to the local file or directory when the downloaded file would be put.")]
[Parameter(
Position = 2,
- ParameterSetName = Constants.ShareParameterSetName,
+ ParameterSetName = LocalConstants.ShareParameterSetName,
HelpMessage = "Path to the local file or directory when the downloaded file would be put.")]
[Parameter(
Position = 2,
- ParameterSetName = Constants.DirectoryParameterSetName,
+ ParameterSetName = LocalConstants.DirectoryParameterSetName,
HelpMessage = "Path to the local file or directory when the downloaded file would be put.")]
[Parameter(
Position = 1,
- ParameterSetName = Constants.FileParameterSetName,
+ ParameterSetName = LocalConstants.FileParameterSetName,
HelpMessage = "Path to the local file or directory when the downloaded file would be put.")]
[ValidateNotNullOrEmpty]
public string Destination { get; set; }
@@ -107,20 +108,20 @@ public override void ExecuteCmdlet()
string[] path = NamingUtil.ValidatePath(this.Path, true);
switch (this.ParameterSetName)
{
- case Constants.FileParameterSetName:
+ case LocalConstants.FileParameterSetName:
fileToBeDownloaded = this.File;
break;
- case Constants.ShareNameParameterSetName:
+ case LocalConstants.ShareNameParameterSetName:
var share = this.BuildFileShareObjectFromName(this.ShareName);
fileToBeDownloaded = share.GetRootDirectoryReference().GetFileReferenceByPath(path);
break;
- case Constants.ShareParameterSetName:
+ case LocalConstants.ShareParameterSetName:
fileToBeDownloaded = this.Share.GetRootDirectoryReference().GetFileReferenceByPath(path);
break;
- case Constants.DirectoryParameterSetName:
+ case LocalConstants.DirectoryParameterSetName:
fileToBeDownloaded = this.Directory.GetFileReferenceByPath(path);
break;
@@ -150,11 +151,10 @@ public override void ExecuteCmdlet()
this.RunTask(async taskId =>
{
- var downloadJob = new FileDownloadJob()
- {
- SourceFile = fileToBeDownloaded,
- DestPath = targetFile
- };
+ var downloadJob = new TransferJob(
+ new TransferLocation(fileToBeDownloaded),
+ new TransferLocation(targetFile),
+ TransferMethod.SyncCopy);
var progressRecord = new ProgressRecord(
this.OutputStream.GetProgressId(taskId),
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs
new file mode 100644
index 000000000000..3219b898b62c
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs
@@ -0,0 +1,247 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Concurrent;
+using System.Management.Automation;
+using System.Security.Permissions;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.WindowsAzure.Storage;
+using Microsoft.WindowsAzure.Storage.Blob;
+using Microsoft.WindowsAzure.Storage.File;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ [Cmdlet(VerbsCommon.Get, Constants.FileCopyCmdletStateName)]
+ public class GetAzureStorageFileCopyStateCommand : AzureStorageFileCmdletBase
+ {
+ [Parameter(
+ Position = 0,
+ HelpMessage = "Target share name",
+ Mandatory = true,
+ ParameterSetName = Constants.ShareNameParameterSetName)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(
+ Position = 1,
+ HelpMessage = "Target file path",
+ Mandatory = true,
+ ParameterSetName = Constants.ShareNameParameterSetName)]
+ [ValidateNotNullOrEmpty]
+ public string FilePath { get; set; }
+
+ [Parameter(
+ Position = 0,
+ HelpMessage = "Target file instance", Mandatory = true,
+ ValueFromPipeline = true,
+ ParameterSetName = Constants.FileParameterSetName)]
+ [ValidateNotNull]
+ public CloudFile File { get; set; }
+
+ [Parameter(HelpMessage = "Indicates whether or not to wait util the copying finished.")]
+ public SwitchParameter WaitForComplete { get; set; }
+
+ ///
+ /// CloudFile objects which need to mointor until copy complete
+ ///
+ private ConcurrentQueue> jobList = new ConcurrentQueue>();
+ private ConcurrentDictionary TaskStatus = new ConcurrentDictionary();
+
+ ///
+ /// Is the specified task completed
+ ///
+ /// Task id
+ /// True if the specified task completed, otherwise false
+ protected bool IsTaskCompleted(long taskId)
+ {
+ bool finished = false;
+ bool existed = TaskStatus.TryGetValue(taskId, out finished);
+ return existed && finished;
+ }
+
+ ///
+ /// Copy task count
+ ///
+ private long InternalTotalTaskCount = 0;
+ private long InternalFailedCount = 0;
+ private long InternalFinishedCount = 0;
+
+ ///
+ /// Execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ CloudFile file = null;
+
+ if (null != this.File)
+ {
+ file = this.File;
+ }
+ else
+ {
+ string[] path = NamingUtil.ValidatePath(this.FilePath, true);
+ file = this.BuildFileShareObjectFromName(this.ShareName).GetRootDirectoryReference().GetFileReferenceByPath(path);
+ }
+
+ long taskId = InternalTotalTaskCount;
+ jobList.Enqueue(new Tuple(taskId, file));
+ InternalTotalTaskCount++;
+ }
+
+ ///
+ /// Write transmit summary status
+ ///
+ protected override void WriteTransmitSummaryStatus()
+ {
+ long localTotal = Interlocked.Read(ref InternalTotalTaskCount);
+ long localFailed = Interlocked.Read(ref InternalFailedCount);
+ long localFinished = Interlocked.Read(ref InternalFinishedCount);
+
+ string summary = String.Format(Resources.TransmitActiveSummary, localTotal,
+ localFailed, localFinished, (localTotal - localFailed - localFinished));
+ summaryRecord.StatusDescription = summary;
+ WriteProgress(summaryRecord);
+ }
+
+ ///
+ /// Update failed/finished task count
+ ///
+ /// Copy status
+ private void UpdateTaskCount(CopyStatus status)
+ {
+ switch (status)
+ {
+ case CopyStatus.Invalid:
+ case CopyStatus.Failed:
+ case CopyStatus.Aborted:
+ Interlocked.Increment(ref InternalFailedCount);
+ break;
+ case CopyStatus.Pending:
+ break;
+ case CopyStatus.Success:
+ default:
+ Interlocked.Increment(ref InternalFinishedCount);
+ break;
+ }
+ }
+
+ ///
+ /// Write copy progress
+ ///
+ /// CloudFile instance
+ /// Progress record
+ internal void WriteCopyProgress(CloudFile file, ProgressRecord progress)
+ {
+ if (file.CopyState == null) return;
+ long bytesCopied = file.CopyState.BytesCopied ?? 0;
+ long totalBytes = file.CopyState.TotalBytes ?? 0;
+ int percent = 0;
+
+ if (totalBytes != 0)
+ {
+ percent = (int)(bytesCopied * 100 / totalBytes);
+ progress.PercentComplete = percent;
+ }
+
+ string activity = String.Format(Resources.CopyFileStatus, file.CopyState.Status.ToString(), file.GetFullPath(), file.Share.Name, file.CopyState.Source.ToString());
+ progress.Activity = activity;
+ string message = String.Format(Resources.CopyPendingStatus, percent, file.CopyState.BytesCopied, file.CopyState.TotalBytes);
+ progress.StatusDescription = message;
+ OutputStream.WriteProgress(progress);
+ }
+
+ protected override void EndProcessing()
+ {
+ int currency = GetCmdletConcurrency();
+
+ OutputStream.TaskStatusQueryer = IsTaskCompleted;
+
+ for (int i = 0; i < currency; i++)
+ {
+ Func taskGenerator = (taskId) => MonitorFileCopyStatusAsync(taskId);
+ RunTask(taskGenerator);
+ }
+
+ base.EndProcessing();
+ }
+
+ ///
+ /// Cmdlet end processing
+ ///
+ protected async Task MonitorFileCopyStatusAsync(long taskId)
+ {
+ ProgressRecord records = new ProgressRecord(OutputStream.GetProgressId(taskId), Resources.CopyFileActivity, Resources.CopyFileActivity);
+ Tuple monitorRequest = null;
+ FileRequestOptions requestOptions = RequestOptions;
+ AccessCondition accessCondition = null;
+ OperationContext context = OperationContext;
+
+ while (!jobList.IsEmpty)
+ {
+ jobList.TryDequeue(out monitorRequest);
+
+ if (monitorRequest != null)
+ {
+ long internalTaskId = monitorRequest.Item1;
+ CloudFile file = monitorRequest.Item2;
+ //Just use the last file management channel since the following operation is context insensitive
+ await Channel.FetchFileAttributesAsync(file, accessCondition, requestOptions, context, CmdletCancellationToken);
+ bool taskDone = false;
+
+ if (file.CopyState == null)
+ {
+ ArgumentException e = new ArgumentException(String.Format(Resources.FileCopyTaskNotFound, file.Uri.ToString()));
+ OutputStream.WriteError(internalTaskId, e);
+ Interlocked.Increment(ref InternalFailedCount);
+ taskDone = true;
+ }
+ else
+ {
+ WriteCopyProgress(file, records);
+ UpdateTaskCount(file.CopyState.Status);
+
+ if (file.CopyState.Status == CopyStatus.Pending && this.WaitForComplete)
+ {
+ jobList.Enqueue(monitorRequest);
+ }
+ else
+ {
+ OutputStream.WriteObject(internalTaskId, file.CopyState);
+ taskDone = true;
+ }
+ }
+
+ if (taskDone)
+ {
+ SetInternalTaskDone(internalTaskId);
+ }
+ }
+
+ if (ShouldForceQuit)
+ {
+ break;
+ }
+ }
+ }
+
+ private void SetInternalTaskDone(long taskId)
+ {
+ bool finishedTaskStatus = true;
+ TaskStatus.TryAdd(taskId, finishedTaskStatus);
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs
index 245a9cc3443e..4569698c7fe8 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs
@@ -12,12 +12,13 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Globalization;
-using System.Management.Automation;
-using Microsoft.WindowsAzure.Storage.File;
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
+ using System.Globalization;
+ using System.Management.Automation;
+ using Microsoft.WindowsAzure.Storage.File;
+
[Cmdlet(VerbsCommon.Get, Constants.ShareCmdletName, DefaultParameterSetName = Constants.MatchingPrefixParameterSetName)]
public class GetAzureStorageShare : AzureStorageFileCmdletBase
{
@@ -44,7 +45,7 @@ public override void ExecuteCmdlet()
case Constants.SpecificParameterSetName:
NamingUtil.ValidateShareName(this.Name, false);
var share = this.Channel.GetShareReference(this.Name);
- await this.Channel.FetchShareAttributesAsync(share, this.AccessCondition, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
+ await this.Channel.FetchShareAttributesAsync(share, null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
this.OutputStream.WriteObject(taskId, share);
break;
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShareStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShareStoredAccessPolicy.cs
new file mode 100644
index 000000000000..04194ba13ae6
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShareStoredAccessPolicy.cs
@@ -0,0 +1,90 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ using Common;
+ using Microsoft.WindowsAzure.Storage.File;
+ using Model.Contract;
+
+ ///
+ /// create a new azure container
+ ///
+ [Cmdlet(VerbsCommon.Get, StorageNouns.ShareStoredAccessPolicy), OutputType(typeof(SharedAccessFilePolicy))]
+ public class GetAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase
+ {
+ [Alias("N", "Name")]
+ [Parameter(Position = 0, Mandatory = true,
+ ParameterSetName = Constants.ShareNameParameterSetName,
+ HelpMessage = "Share name",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(Position = 1,
+ HelpMessage = "Policy Identifier",
+ ValueFromPipelineByPropertyName = true)]
+ public string Policy { get; set; }
+
+ internal async Task GetAzureShareStoredAccessPolicyAsync(long taskId, IStorageFileManagement localChannel, string shareName, string policyName)
+ {
+ SharedAccessFilePolicies shareAccessPolicies = await GetPoliciesAsync(localChannel, shareName, policyName);
+
+ if (!String.IsNullOrEmpty(policyName))
+ {
+ if (shareAccessPolicies.Keys.Contains(policyName))
+ {
+ OutputStream.WriteObject(taskId, AccessPolicyHelper.ConstructPolicyOutputPSObject(shareAccessPolicies, policyName));
+ }
+ else
+ {
+ throw new ResourceNotFoundException(String.Format(CultureInfo.CurrentCulture, Resources.PolicyNotFound, policyName));
+ }
+ }
+ else
+ {
+ foreach (string key in shareAccessPolicies.Keys)
+ {
+ OutputStream.WriteObject(taskId, AccessPolicyHelper.ConstructPolicyOutputPSObject(shareAccessPolicies, key));
+ }
+ }
+ }
+
+ internal async Task GetPoliciesAsync(IStorageFileManagement localChannel, string shareName, string policyName)
+ {
+ CloudFileShare share = localChannel.GetShareReference(shareName);
+ FileSharePermissions permissions = await localChannel.GetSharePermissionsAsync(share, null, null, null, CmdletCancellationToken);
+ return permissions.SharedAccessPolicies;
+ }
+
+
+ ///
+ /// execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ Func taskGenerator = (taskId) => GetAzureShareStoredAccessPolicyAsync(taskId, Channel, ShareName, Policy);
+ RunTask(taskGenerator);
+ }
+ }
+}
+
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs
index 2497168bddf5..c588de50e622 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Globalization;
-using System.Management.Automation;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
+ using System.Globalization;
+ using System.Management.Automation;
+ using Microsoft.WindowsAzure.Storage.File;
+
[Cmdlet(VerbsCommon.New, Constants.FileDirectoryCmdletName, DefaultParameterSetName = Constants.ShareNameParameterSetName)]
public class NewAzureStorageDirectory : AzureStorageFileCmdletBase
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs
new file mode 100644
index 000000000000..b5bf925035d1
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageFileSasToken.cs
@@ -0,0 +1,213 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Management.Automation;
+using System.Security.Permissions;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.WindowsAzure.Commands.Common.Storage;
+using Microsoft.WindowsAzure.Commands.Storage.Common;
+using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+using Microsoft.WindowsAzure.Storage.File;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ [Cmdlet(VerbsCommon.New, StorageNouns.FileSas), OutputType(typeof(String))]
+ public class NewAzureStorageFileSasToken : AzureStorageFileCmdletBase
+ {
+ ///
+ /// Sas permission with share name and path parameter set name
+ ///
+ private const string NameSasPermissionParameterSet = "NameSasPermission";
+
+ ///
+ /// Sas policy with share name and pathparemeter set name
+ ///
+ private const string NameSasPolicyParmeterSet = "NameSasPolicy";
+
+ ///
+ /// Sas permission with CloudFile instance parameter set name
+ ///
+ private const string CloudFileSasPermissionParameterSet = "FileSasPermission";
+
+ ///
+ /// Sas policy with CloudFile instance parameter set name
+ ///
+ private const string CloudFileSasPolicyParmeterSet = "FileSasPolicy";
+
+ [Parameter(Position = 0, Mandatory = true,
+ HelpMessage = "Share Name",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true,
+ ParameterSetName = NameSasPermissionParameterSet)]
+ [Parameter(Position = 0, Mandatory = true,
+ HelpMessage = "Share Name",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true,
+ ParameterSetName = NameSasPolicyParmeterSet)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(Position = 1, Mandatory = true,
+ HelpMessage = "Path to the cloud file to generate sas token against.",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true,
+ ParameterSetName = NameSasPermissionParameterSet)]
+ [Parameter(Position = 1, Mandatory = true,
+ HelpMessage = "Path to the cloud file to generate sas token against.",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true,
+ ParameterSetName = NameSasPolicyParmeterSet)]
+ [ValidateNotNullOrEmpty]
+ public string Path { get; set; }
+
+ [Parameter(Mandatory = true,
+ HelpMessage = "CloudFile instance to represent the file to get SAS token against.",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true,
+ ParameterSetName = CloudFileSasPermissionParameterSet)]
+ [Parameter(Mandatory = true,
+ HelpMessage = "CloudFile instance to represent the file to get SAS token against.",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true,
+ ParameterSetName = CloudFileSasPolicyParmeterSet)]
+ [ValidateNotNull]
+ public CloudFile File { get; set; }
+
+ [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = NameSasPolicyParmeterSet)]
+ [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = CloudFileSasPolicyParmeterSet)]
+ public string Policy
+ {
+ get { return accessPolicyIdentifier; }
+ set { accessPolicyIdentifier = value; }
+ }
+ private string accessPolicyIdentifier;
+
+ [Parameter(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\".",
+ ParameterSetName = CloudFileSasPermissionParameterSet)]
+ public string Permission { get; set; }
+
+ [Parameter(HelpMessage = "Start Time")]
+ public DateTime? StartTime { get; set; }
+
+ [Parameter(HelpMessage = "Expiry Time")]
+ public DateTime? ExpiryTime { get; set; }
+
+ [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")]
+ public SwitchParameter FullUri { get; set; }
+
+ [Parameter(
+ ValueFromPipeline = true,
+ HelpMessage = "Azure Storage Context Object",
+ ParameterSetName = NameSasPermissionParameterSet)]
+ [Parameter(
+ ValueFromPipeline = true,
+ HelpMessage = "Azure Storage Context Object",
+ ParameterSetName = NameSasPolicyParmeterSet)]
+ public override AzureStorageContext Context { get; set; }
+
+ ///
+ /// Execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ if (String.IsNullOrEmpty(ShareName)) return;
+
+ CloudFileShare fileShare = null;
+ CloudFile file = null;
+
+ if (null != this.File)
+ {
+ file = this.File;
+ fileShare = this.File.Share;
+ }
+ else
+ {
+ string[] path = NamingUtil.ValidatePath(this.Path, true);
+ fileShare = Channel.GetShareReference(this.ShareName);
+ file = fileShare.GetRootDirectoryReference().GetFileReferenceByPath(path);
+ }
+
+ SharedAccessFilePolicy accessPolicy = new SharedAccessFilePolicy();
+
+ bool shouldSetExpiryTime = SasTokenHelper.ValidateShareAccessPolicy(
+ Channel,
+ fileShare.Name,
+ accessPolicyIdentifier,
+ !string.IsNullOrEmpty(this.Permission),
+ this.StartTime.HasValue,
+ this.ExpiryTime.HasValue);
+
+ SetupAccessPolicy(accessPolicy, shouldSetExpiryTime);
+
+ string sasToken = file.GetSharedAccessSignature(accessPolicy, accessPolicyIdentifier);
+
+ if (FullUri)
+ {
+ string fullUri = SasTokenHelper.GetFullUriWithSASToken(file.Uri.AbsoluteUri.ToString(), sasToken);
+
+ WriteObject(fullUri);
+ }
+ else
+ {
+ WriteObject(sasToken);
+ }
+ }
+
+ protected override IStorageFileManagement CreateChannel()
+ {
+ if (this.Channel == null || !this.ShareChannel)
+ {
+ this.Channel = new StorageFileManagement(this.GetCmdletStorageContext());
+ }
+
+ return this.Channel;
+ }
+
+ ///
+ /// Update the access policy
+ ///
+ /// Access policy object
+ /// Should set the default expiry time
+ private void SetupAccessPolicy(SharedAccessFilePolicy policy, bool shouldSetExpiryTime)
+ {
+ DateTimeOffset? accessStartTime;
+ DateTimeOffset? accessEndTime;
+ SasTokenHelper.SetupAccessPolicyLifeTime(StartTime, ExpiryTime,
+ out accessStartTime, out accessEndTime, shouldSetExpiryTime);
+ policy.SharedAccessStartTime = accessStartTime;
+ policy.SharedAccessExpiryTime = accessEndTime;
+ SetupAccessPolicyPermission(policy, Permission);
+ }
+
+ ///
+ /// Set up access policy permission
+ ///
+ /// SharedAccessFilePolicy object
+ /// Permission
+ internal void SetupAccessPolicyPermission(SharedAccessFilePolicy policy, string permission)
+ {
+ if (string.IsNullOrEmpty(permission)) return;
+ permission = permission.ToLower(CultureInfo.CurrentCulture);
+ policy.Permissions = SharedAccessFilePolicy.PermissionsFromString(permission);
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs
index f932ee115ea5..a08a4de7915c 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Management.Automation;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
+ using System.Management.Automation;
+
[Cmdlet(VerbsCommon.New, Constants.ShareCmdletName, DefaultParameterSetName = Constants.ShareNameParameterSetName)]
public class NewAzureStorageShare : AzureStorageFileCmdletBase
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs
new file mode 100644
index 000000000000..063b8e6e82b5
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs
@@ -0,0 +1,149 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.File;
+
+ [Cmdlet(VerbsCommon.New, StorageNouns.ShareSas), OutputType(typeof(String))]
+ public class NewAzureStorageShareSasToken : AzureStorageFileCmdletBase
+ {
+ ///
+ /// Sas permission parameter set name
+ ///
+ private const string SasPermissionParameterSet = "SasPermission";
+
+ ///
+ /// Sas policy paremeter set name
+ ///
+ private const string SasPolicyParmeterSet = "SasPolicy";
+
+ [Alias("N", "Name")]
+ [Parameter(Position = 0, Mandatory = true,
+ HelpMessage = "Share Name",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)]
+ public string Policy
+ {
+ get { return accessPolicyIdentifier; }
+ set { accessPolicyIdentifier = value; }
+ }
+ private string accessPolicyIdentifier;
+
+ [Parameter(HelpMessage = "Permissions for a share. Permissions can be any subset of \"rwdl\".",
+ ParameterSetName = SasPermissionParameterSet)]
+ public string Permission { get; set; }
+
+ [Parameter(HelpMessage = "Start Time")]
+ public DateTime? StartTime { get; set; }
+
+ [Parameter(HelpMessage = "Expiry Time")]
+ public DateTime? ExpiryTime { get; set; }
+
+ [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")]
+ public SwitchParameter FullUri { get; set; }
+
+ [Parameter(
+ ValueFromPipeline = true,
+ HelpMessage = "Azure Storage Context Object")]
+ public override AzureStorageContext Context { get; set; }
+
+ // Overwrite the useless parameter
+ public override int? ServerTimeoutPerRequest { get; set; }
+ public override int? ClientTimeoutPerRequest { get; set; }
+ public override int? ConcurrentTaskCount { get; set; }
+
+ ///
+ /// Execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ if (String.IsNullOrEmpty(ShareName)) return;
+ CloudFileShare fileShare = Channel.GetShareReference(this.ShareName);
+ SharedAccessFilePolicy accessPolicy = new SharedAccessFilePolicy();
+
+ bool shouldSetExpiryTime = SasTokenHelper.ValidateShareAccessPolicy(
+ Channel,
+ this.ShareName,
+ accessPolicyIdentifier,
+ !string.IsNullOrEmpty(this.Permission),
+ this.StartTime.HasValue,
+ this.ExpiryTime.HasValue);
+
+ SetupAccessPolicy(accessPolicy, shouldSetExpiryTime);
+ string sasToken = fileShare.GetSharedAccessSignature(accessPolicy, accessPolicyIdentifier);
+
+ if (FullUri)
+ {
+ string fullUri = SasTokenHelper.GetFullUriWithSASToken(fileShare.Uri.AbsoluteUri.ToString(), sasToken);
+
+ WriteObject(fullUri);
+ }
+ else
+ {
+ WriteObject(sasToken);
+ }
+ }
+
+ protected override IStorageFileManagement CreateChannel()
+ {
+ if (this.Channel == null || !this.ShareChannel)
+ {
+ this.Channel = new StorageFileManagement(this.GetCmdletStorageContext());
+ }
+
+ return this.Channel;
+ }
+
+ ///
+ /// Update the access policy
+ ///
+ /// Access policy object
+ /// Should set the default expiry time
+ private void SetupAccessPolicy(SharedAccessFilePolicy policy, bool shouldSetExpiryTime)
+ {
+ DateTimeOffset? accessStartTime;
+ DateTimeOffset? accessEndTime;
+ SasTokenHelper.SetupAccessPolicyLifeTime(StartTime, ExpiryTime,
+ out accessStartTime, out accessEndTime, shouldSetExpiryTime);
+ policy.SharedAccessStartTime = accessStartTime;
+ policy.SharedAccessExpiryTime = accessEndTime;
+ SetupAccessPolicyPermission(policy, Permission);
+ }
+
+ ///
+ /// Set up access policy permission
+ ///
+ /// SharedAccessFilePolicy object
+ /// Permission
+ internal void SetupAccessPolicyPermission(SharedAccessFilePolicy policy, string permission)
+ {
+ if (string.IsNullOrEmpty(permission)) return;
+ permission = permission.ToLower(CultureInfo.CurrentCulture);
+ policy.Permissions = SharedAccessFilePolicy.PermissionsFromString(permission);
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareStoredAccessPolicy.cs
new file mode 100644
index 000000000000..c2a35b2a1aa2
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareStoredAccessPolicy.cs
@@ -0,0 +1,88 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Common;
+ using Microsoft.WindowsAzure.Storage.File;
+
+ ///
+ /// create a new stored access policy to a specific azure share.
+ ///
+ [Cmdlet(VerbsCommon.New, StorageNouns.ShareStoredAccessPolicy, DefaultParameterSetName = Constants.ShareNameParameterSetName), OutputType(typeof(String))]
+ public class NewAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase
+ {
+ [Alias("N", "Name")]
+ [Parameter(Position = 0, Mandatory = true,
+ ParameterSetName = Constants.ShareNameParameterSetName,
+ HelpMessage = "Share name",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(Position = 1, Mandatory = true,
+ HelpMessage = "Policy Identifier. Need to be unique in the Share")]
+ [ValidateNotNullOrEmpty]
+ public string Policy {get; set; }
+
+ [Parameter(HelpMessage = "Permissions for a share. Permissions can be any subset of \"rwdl\".")]
+ public string Permission { get; set; }
+
+ [Parameter(HelpMessage = "Start Time")]
+ public DateTime? StartTime { get; set; }
+
+ [Parameter(HelpMessage = "Expiry Time")]
+ public DateTime? ExpiryTime { get; set; }
+
+ ///
+ /// execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ if (String.IsNullOrEmpty(ShareName) || String.IsNullOrEmpty(Policy)) return;
+
+ NamingUtil.ValidateShareName(this.ShareName, false);
+
+ if (!NameUtil.IsValidStoredAccessPolicyName(this.Policy))
+ {
+ throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, Resources.InvalidAccessPolicyName, this.Policy));
+ }
+
+ //Get existing permissions
+ CloudFileShare fileShare = this.Channel.GetShareReference(this.ShareName);
+
+ FileSharePermissions fileSharePermissions = fileShare.GetPermissions();
+
+ //Add new policy
+ if (fileSharePermissions.SharedAccessPolicies.Keys.Contains(this.Policy))
+ {
+ throw new ResourceAlreadyExistException(String.Format(CultureInfo.CurrentCulture, Resources.PolicyAlreadyExists, this.Policy));
+ }
+
+ SharedAccessFilePolicy policy = new SharedAccessFilePolicy();
+ AccessPolicyHelper.SetupAccessPolicy(policy, this.StartTime, this.ExpiryTime, this.Permission);
+ fileSharePermissions.SharedAccessPolicies.Add(this.Policy, policy);
+
+ //Set permissions back to container
+ fileShare.SetPermissions(fileSharePermissions);
+ WriteObject(Policy);
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs
index 0e56d2600e02..ba7645be61c7 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Globalization;
-using System.Management.Automation;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
+ using System.Globalization;
+ using System.Management.Automation;
+ using Microsoft.WindowsAzure.Storage.File;
+
[Cmdlet(
VerbsCommon.Remove,
Constants.FileDirectoryCmdletName,
@@ -101,7 +101,7 @@ public override void ExecuteCmdlet()
{
if (this.ShouldProcess(directoryToBeRemoved.GetFullPath()))
{
- await this.Channel.DeleteDirectoryAsync(directoryToBeRemoved, this.AccessCondition, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
+ await this.Channel.DeleteDirectoryAsync(directoryToBeRemoved, null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
}
if (this.PassThru)
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs
index f6fc8ff87b6d..02af2f15f395 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Globalization;
-using System.Management.Automation;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
+ using System.Globalization;
+ using System.Management.Automation;
+ using Microsoft.WindowsAzure.Storage.File;
+
[Cmdlet(
VerbsCommon.Remove,
Constants.FileCmdletName,
@@ -113,7 +113,7 @@ public override void ExecuteCmdlet()
{
if (this.ShouldProcess(fileToBeRemoved.GetFullPath()))
{
- await this.Channel.DeleteFileAsync(fileToBeRemoved, this.AccessCondition, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
+ await this.Channel.DeleteFileAsync(fileToBeRemoved, null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
}
if (this.PassThru)
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs
index eab3e00f0bb4..0116c82e5c21 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Globalization;
-using System.Management.Automation;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
+ using System.Globalization;
+ using System.Management.Automation;
+ using Microsoft.WindowsAzure.Storage.File;
+
[Cmdlet(
VerbsCommon.Remove,
Constants.ShareCmdletName,
@@ -68,7 +68,7 @@ public override void ExecuteCmdlet()
{
if (this.ShouldProcess(share.Name))
{
- await this.Channel.DeleteShareAsync(share, this.AccessCondition, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
+ await this.Channel.DeleteShareAsync(share, null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
}
if (this.PassThru)
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShareStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShareStoredAccessPolicy.cs
new file mode 100644
index 000000000000..64f5e969ae9e
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShareStoredAccessPolicy.cs
@@ -0,0 +1,109 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Common;
+ using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Storage.File;
+ using Model.Contract;
+
+ ///
+ /// create a new azure container
+ ///
+ [Cmdlet(VerbsCommon.Remove, StorageNouns.ShareStoredAccessPolicy, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(Boolean))]
+ public class RemoveAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase
+ {
+ [Alias("N", "Name")]
+ [Parameter(Position = 0, Mandatory = true,
+ ParameterSetName = Constants.ShareNameParameterSetName,
+ HelpMessage = "Share name",
+ ValueFromPipelineByPropertyName = true)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(Position = 1, Mandatory = true,
+ HelpMessage = "Policy Identifier",
+ ValueFromPipelineByPropertyName = true)]
+ [ValidateNotNullOrEmpty]
+ public string Policy { get; set; }
+
+ [Parameter(HelpMessage = "Force to remove the policy without confirm")]
+ public SwitchParameter Force { get; set; }
+
+ [Parameter(Mandatory = false, HelpMessage = "Return whether the specified policy is successfully removed")]
+ public SwitchParameter PassThru { get; set; }
+
+ internal virtual bool ConfirmRemove(string message)
+ {
+ return ShouldProcess(message);
+ }
+
+ internal bool RemoveAzureShareStoredAccessPolicy(IStorageFileManagement localChannel, string shareName, string policyName)
+ {
+ bool success = false;
+ string result = string.Empty;
+
+ //Get existing permissions
+ CloudFileShare share = localChannel.GetShareReference(shareName);
+ FileSharePermissions permissions = localChannel.GetSharePermissions(share);
+
+ //remove the specified policy
+ if (!permissions.SharedAccessPolicies.Keys.Contains(policyName))
+ {
+ throw new ResourceNotFoundException(String.Format(CultureInfo.CurrentCulture, Resources.PolicyNotFound, policyName));
+ }
+
+ if (this.Force || ConfirmRemove(policyName))
+ {
+ permissions.SharedAccessPolicies.Remove(policyName);
+ localChannel.SetSharePermissions(share, permissions);
+ success = true;
+ }
+
+ return success;
+ }
+
+ ///
+ /// execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ bool success = RemoveAzureShareStoredAccessPolicy(Channel, ShareName, Policy);
+ string result = string.Empty;
+
+ if (success)
+ {
+ result = String.Format(CultureInfo.CurrentCulture, Resources.RemovePolicySuccessfully, Policy);
+ }
+ else
+ {
+ result = String.Format(CultureInfo.CurrentCulture, Resources.RemovePolicyCancelled, Policy);
+ }
+
+ WriteVerbose(result);
+
+ if (PassThru)
+ {
+ WriteObject(success);
+ }
+ }
+ }
+}
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs
index 545d610be675..3c501b1d2030 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs
@@ -12,24 +12,25 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Globalization;
-using System.IO;
-using System.Management.Automation;
-using System.Net;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
{
- [Cmdlet(VerbsCommon.Set, Constants.FileContentCmdletName, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = Constants.ShareNameParameterSetName)]
+ using System.Globalization;
+ using System.IO;
+ using System.Management.Automation;
+ using System.Net;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.DataMovement;
+ using Microsoft.WindowsAzure.Storage.File;
+ using LocalConstants = Microsoft.WindowsAzure.Commands.Storage.File.Constants;
+
+ [Cmdlet(VerbsCommon.Set, LocalConstants.FileContentCmdletName, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = LocalConstants.ShareNameParameterSetName)]
public class SetAzureStorageFileContent : StorageFileDataManagementCmdletBase
{
[Parameter(
Position = 0,
Mandatory = true,
- ParameterSetName = Constants.ShareNameParameterSetName,
+ ParameterSetName = LocalConstants.ShareNameParameterSetName,
HelpMessage = "Name of the file share where the file would be uploaded to.")]
[ValidateNotNullOrEmpty]
public string ShareName { get; set; }
@@ -38,7 +39,7 @@ public class SetAzureStorageFileContent : StorageFileDataManagementCmdletBase
Position = 0,
Mandatory = true,
ValueFromPipeline = true,
- ParameterSetName = Constants.ShareParameterSetName,
+ ParameterSetName = LocalConstants.ShareParameterSetName,
HelpMessage = "CloudFileShare object indicated the share where the file would be uploaded to.")]
[ValidateNotNull]
public CloudFileShare Share { get; set; }
@@ -47,7 +48,7 @@ public class SetAzureStorageFileContent : StorageFileDataManagementCmdletBase
Position = 0,
Mandatory = true,
ValueFromPipeline = true,
- ParameterSetName = Constants.DirectoryParameterSetName,
+ ParameterSetName = LocalConstants.DirectoryParameterSetName,
HelpMessage = "CloudFileDirectory object indicated the cloud directory where the file would be uploaded.")]
[ValidateNotNull]
public CloudFileDirectory Directory { get; set; }
@@ -87,11 +88,10 @@ public override void ExecuteCmdlet()
string[] path = NamingUtil.ValidatePath(this.Path, out isDirectory);
var cloudFileToBeUploaded = await this.BuildCloudFileInstanceFromPathAsync(localFile.Name, path, isDirectory);
- var uploadJob = new FileUploadJob()
- {
- SourcePath = localFile.FullName,
- DestFile = cloudFileToBeUploaded,
- };
+ var uploadJob = new TransferJob(
+ new TransferLocation(localFile.FullName),
+ new TransferLocation(cloudFileToBeUploaded),
+ TransferMethod.SyncCopy);
var progressRecord = new ProgressRecord(
this.OutputStream.GetProgressId(taskId),
@@ -113,16 +113,16 @@ private async Task BuildCloudFileInstanceFromPathAsync(string default
bool isPathEmpty = path.Length == 0;
switch (this.ParameterSetName)
{
- case Constants.DirectoryParameterSetName:
+ case LocalConstants.DirectoryParameterSetName:
baseDirectory = this.Directory;
break;
- case Constants.ShareNameParameterSetName:
+ case LocalConstants.ShareNameParameterSetName:
NamingUtil.ValidateShareName(this.ShareName, false);
baseDirectory = this.BuildFileShareObjectFromName(this.ShareName).GetRootDirectoryReference();
break;
- case Constants.ShareParameterSetName:
+ case LocalConstants.ShareParameterSetName:
baseDirectory = this.Share.GetRootDirectoryReference();
break;
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareQuota.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareQuota.cs
new file mode 100644
index 000000000000..bc6237cd24f1
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareQuota.cs
@@ -0,0 +1,88 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Management.Automation;
+using System.Security.Permissions;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.WindowsAzure.Commands.Storage.Common;
+using Microsoft.WindowsAzure.Storage.File;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ [Cmdlet(VerbsCommon.Set, StorageNouns.ShareQuota), OutputType(typeof(FileShareProperties))]
+ public class SetAzureStorageShareQuota : AzureStorageFileCmdletBase
+ {
+ [Alias("N", "Name")]
+ [Parameter(Position = 0, Mandatory = true,
+ HelpMessage = "Share name",
+ ParameterSetName = Constants.ShareNameParameterSetName,
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(
+ Position = 0,
+ Mandatory = true,
+ ValueFromPipeline = true,
+ ParameterSetName = Constants.ShareParameterSetName,
+ HelpMessage = "CloudFileShare object indicated the share whose quota to set.")]
+ [ValidateNotNull]
+ public CloudFileShare Share { get; set; }
+
+ [Parameter(Position = 1, Mandatory = true,
+ HelpMessage = "Share Quota")]
+ [ValidateRange(1, 5120)]
+ public int Quota { get; set; }
+
+ ///
+ /// execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ CloudFileShare fileShare = null;
+
+ switch (this.ParameterSetName)
+ {
+ case Constants.ShareNameParameterSetName:
+ fileShare = this.BuildFileShareObjectFromName(this.ShareName);
+ break;
+
+ case Constants.ShareParameterSetName:
+ fileShare = this.Share;
+ break;
+
+ default:
+ throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName));
+ }
+
+ this.Channel.FetchShareAttributes(fileShare, null, this.RequestOptions, this.OperationContext);
+
+ if (fileShare.Properties.Quota != this.Quota)
+ {
+ fileShare.Properties.Quota = this.Quota;
+ this.Channel.SetShareProperties(fileShare, null, this.RequestOptions, this.OperationContext);
+ }
+
+ WriteObject(fileShare.Properties);
+ }
+ }
+}
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareStoredAccessPolicy.cs
new file mode 100644
index 000000000000..328d1663173d
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageShareStoredAccessPolicy.cs
@@ -0,0 +1,103 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Common;
+ using Microsoft.WindowsAzure.Storage.File;
+ using Model.Contract;
+
+ ///
+ /// create a new azure container
+ ///
+ [Cmdlet(VerbsCommon.Set, StorageNouns.ShareStoredAccessPolicy), OutputType(typeof(String))]
+ public class SetAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase
+ {
+ [Alias("N", "Name")]
+ [Parameter(Position = 0, Mandatory = true,
+ ParameterSetName = Constants.ShareNameParameterSetName,
+ HelpMessage = "Share name",
+ ValueFromPipeline = true,
+ ValueFromPipelineByPropertyName = true)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(Position = 1, Mandatory = true,
+ HelpMessage = "Policy Identifier")]
+ [ValidateNotNullOrEmpty]
+ public string Policy { get; set; }
+
+ [Parameter(HelpMessage = "Permissions for a share. Permissions can be any non-empty subset of \"rwdl\".")]
+ public string Permission { get; set; }
+
+ [Parameter(HelpMessage = "Start Time")]
+ public DateTime? StartTime { get; set; }
+
+ [Parameter(HelpMessage = "Expiry Time")]
+ public DateTime? ExpiryTime { get; set; }
+
+ [Parameter(HelpMessage = "Set StartTime as null for the policy")]
+ public SwitchParameter NoStartTime { get; set; }
+
+ [Parameter(HelpMessage = "Set ExpiryTime as null for the policy")]
+ public SwitchParameter NoExpiryTime { get; set; }
+
+ internal string SetAzureShareStoredAccessPolicy(IStorageFileManagement localChannel, string shareName, string policyName, DateTime? startTime, DateTime? expiryTime, string permission, bool noStartTime, bool noExpiryTime)
+ {
+ //Get existing permissions
+ CloudFileShare share = localChannel.GetShareReference(shareName);
+ FileSharePermissions permissions = localChannel.GetSharePermissions(share);
+
+ //Set the policy with new value
+ if (!permissions.SharedAccessPolicies.Keys.Contains(policyName))
+ {
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.PolicyNotFound, policyName));
+ }
+
+ SharedAccessFilePolicy policy = permissions.SharedAccessPolicies[policyName];
+ AccessPolicyHelper.SetupAccessPolicy(policy, startTime, expiryTime, permission, noStartTime, noExpiryTime);
+ permissions.SharedAccessPolicies[policyName] = policy;
+
+ //Set permission back to share
+ localChannel.SetSharePermissions(share, permissions);
+ WriteObject(AccessPolicyHelper.ConstructPolicyOutputPSObject(permissions.SharedAccessPolicies, policyName));
+ return policyName;
+ }
+
+
+ ///
+ /// execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ if (NoStartTime && StartTime != null)
+ {
+ throw new ArgumentException(Resources.StartTimeParameterConflict);
+ }
+
+ if (NoExpiryTime && ExpiryTime != null)
+ {
+ throw new ArgumentException(Resources.ExpiryTimeParameterConflict);
+ }
+
+ SetAzureShareStoredAccessPolicy(Channel, ShareName, Policy, StartTime, ExpiryTime, Permission, NoStartTime, NoExpiryTime);
+ }
+ }
+}
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs
new file mode 100644
index 000000000000..d352c84f3d0e
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs
@@ -0,0 +1,382 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Management.Automation;
+using System.Security.Permissions;
+using System.Threading.Tasks;
+using Microsoft.WindowsAzure.Commands.Common.Storage;
+using Microsoft.WindowsAzure.Commands.Storage.Common;
+using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+using Microsoft.WindowsAzure.Storage;
+using Microsoft.WindowsAzure.Storage.Blob;
+using Microsoft.WindowsAzure.Storage.File;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ [Cmdlet(VerbsLifecycle.Start, Constants.FileCopyCmdletName, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)]
+ public class StartAzureStorageFileCopyCommand : StorageFileDataManagementCmdletBase
+ {
+ private const string ContainerNameParameterSet = "ContainerName";
+ private const string ContainerParameterSet = "ContainerInstance";
+ private const string BlobFilePathParameterSet = "BlobInstanceFilePath";
+ private const string BlobFileParameterSet = "BlobInstanceFileInstance";
+ private const string ShareNameParameterSet = "ShareName";
+ private const string ShareParameterSet = "ShareInstance";
+ private const string FileFilePathParameterSet = "FileInstanceToFilePath";
+ private const string FileFileParameterSet = "FileInstanceToFileInstance";
+ private const string UriFilePathParameterSet = "UriToFilePath";
+ private const string UriFileParameterSet = "UriToFileInstance";
+
+ [Parameter(HelpMessage = "Source blob name", Mandatory = true, ParameterSetName = ContainerNameParameterSet)]
+ [Parameter(HelpMessage = "Source blob name", Mandatory = true, ParameterSetName = ContainerParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string SrcBlobName { get; set; }
+
+ [Parameter(HelpMessage = "Source container name", Mandatory = true, ParameterSetName = ContainerNameParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string SrcContainerName { get; set; }
+
+ [Parameter(HelpMessage = "Source container instance", Mandatory = true, ParameterSetName = ContainerParameterSet)]
+ [ValidateNotNull]
+ public CloudBlobContainer SrcContainer { get; set; }
+
+ [Alias("ICloudBlob")]
+ [Parameter(HelpMessage = "Source blob instance", Mandatory = true,
+ ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = BlobFilePathParameterSet)]
+ [Parameter(HelpMessage = "Source blob instance", Mandatory = true,
+ ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = BlobFileParameterSet)]
+ [ValidateNotNull]
+ public CloudBlob SrcBlob { get; set; }
+
+ [Parameter(HelpMessage = "Source file path", Mandatory = true, ParameterSetName = ShareNameParameterSet)]
+ [Parameter(HelpMessage = "Source file path", Mandatory = true, ParameterSetName = ShareParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string SrcFilePath { get; set; }
+
+ [Parameter(HelpMessage = "Source share name", Mandatory = true, ParameterSetName = ShareNameParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string SrcShareName { get; set; }
+
+ [Parameter(HelpMessage = "Source share instance", Mandatory = true, ParameterSetName = ShareParameterSet)]
+ [ValidateNotNull]
+ public CloudFileShare SrcShare { get; set; }
+
+ [Parameter(HelpMessage = "Source file instance", Mandatory = true,
+ ValueFromPipeline = true, ParameterSetName = FileFilePathParameterSet)]
+ [Parameter(HelpMessage = "Source file instance", Mandatory = true,
+ ValueFromPipeline = true, ParameterSetName = FileFileParameterSet)]
+ [ValidateNotNull]
+ public CloudFile SrcFile { get; set; }
+
+ [Parameter(HelpMessage = "Source Uri", Mandatory = true, ParameterSetName = UriFilePathParameterSet)]
+ [Parameter(HelpMessage = "Source Uri", Mandatory = true, ParameterSetName = UriFileParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string AbsoluteUri { get; set; }
+
+ [Parameter(HelpMessage = "Dest share name", Mandatory = true, ParameterSetName = ContainerNameParameterSet)]
+ [Parameter(HelpMessage = "Dest share name", Mandatory = true, ParameterSetName = ContainerParameterSet)]
+ [Parameter(HelpMessage = "Dest share name", Mandatory = true, ParameterSetName = BlobFilePathParameterSet)]
+ [Parameter(HelpMessage = "Dest share name", Mandatory = true, ParameterSetName = ShareNameParameterSet)]
+ [Parameter(HelpMessage = "Dest share name", Mandatory = true, ParameterSetName = ShareParameterSet)]
+ [Parameter(HelpMessage = "Dest share name", Mandatory = true, ParameterSetName = FileFilePathParameterSet)]
+ [Parameter(HelpMessage = "Dest share name", Mandatory = true, ParameterSetName = UriFilePathParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string DestShareName { get; set; }
+
+ [Parameter(HelpMessage = "Dest file path", Mandatory = true, ParameterSetName = ContainerNameParameterSet)]
+ [Parameter(HelpMessage = "Dest file path", Mandatory = true, ParameterSetName = ContainerParameterSet)]
+ [Parameter(HelpMessage = "Dest file path", Mandatory = true, ParameterSetName = BlobFilePathParameterSet)]
+ [Parameter(HelpMessage = "Dest file path", Mandatory = true, ParameterSetName = ShareNameParameterSet)]
+ [Parameter(HelpMessage = "Dest file path", Mandatory = true, ParameterSetName = ShareParameterSet)]
+ [Parameter(HelpMessage = "Dest file path", Mandatory = true, ParameterSetName = FileFilePathParameterSet)]
+ [Parameter(HelpMessage = "Dest file path", Mandatory = true, ParameterSetName = UriFilePathParameterSet)]
+ [ValidateNotNullOrEmpty]
+ public string DestFilePath { get; set; }
+
+ [Parameter(HelpMessage = "Dest file instance", Mandatory = true, ParameterSetName = BlobFileParameterSet)]
+ [Parameter(HelpMessage = "Dest file instance", Mandatory = true, ParameterSetName = FileFileParameterSet)]
+ [Parameter(HelpMessage = "Dest file instance", Mandatory = true, ParameterSetName = UriFileParameterSet)]
+ [ValidateNotNull]
+ public CloudFile DestFile { get; set; }
+
+ [Alias("SrcContext")]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object",
+ Mandatory = false,
+ ValueFromPipelineByPropertyName = true,
+ ParameterSetName = ContainerNameParameterSet)]
+ [Parameter(HelpMessage = "Source Azure Storage Context Object",
+ Mandatory = false,
+ ValueFromPipelineByPropertyName = true,
+ ParameterSetName = ShareNameParameterSet)]
+ public override AzureStorageContext Context { get; set; }
+
+ [Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = ContainerNameParameterSet)]
+ [Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = ContainerParameterSet)]
+ [Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = BlobFilePathParameterSet)]
+ [Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = ShareNameParameterSet)]
+ [Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = ShareParameterSet)]
+ [Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = FileFilePathParameterSet)]
+ [Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = UriFilePathParameterSet)]
+ public AzureStorageContext DestContext { get; set; }
+
+ private IStorageBlobManagement blobChannel = null;
+
+ private BlobToAzureFileNameResolver nameResolver = new BlobToAzureFileNameResolver(() => NameUtil.MaxFileNameLength);
+
+ private IStorageFileManagement destChannel = null;
+
+ public StartAzureStorageFileCopyCommand()
+ {
+ EnableMultiThread = true;
+ }
+
+ ///
+ /// Create file client and storage service management channel if need to.
+ ///
+ /// IStorageFileManagement object
+ protected override IStorageFileManagement CreateChannel()
+ {
+ if (this.Channel == null || !this.ShareChannel)
+ {
+ this.Channel = new StorageFileManagement(this.GetSourceContext());
+ }
+
+ return this.Channel;
+ }
+
+ private IStorageBlobManagement GetBlobChannel()
+ {
+ return new StorageBlobManagement(this.GetSourceContext());
+ }
+
+ private AzureStorageContext GetSourceContext()
+ {
+ if (this.ParameterSetName == ContainerNameParameterSet ||
+ this.ParameterSetName == ShareNameParameterSet)
+ {
+ return this.GetCmdletStorageContext();
+ }
+ else
+ {
+ return AzureStorageContext.EmptyContextInstance;
+ }
+ }
+
+ ///
+ /// Set up the Channel object for destination share and file
+ ///
+ internal IStorageFileManagement GetDestinationChannel()
+ {
+ //If destChannel exits, reuse it.
+ //If desContext exits, use it.
+ //If Channl object exists, use it.
+ //Otherwise, create a new channel.
+ IStorageFileManagement destChannel = default(IStorageFileManagement);
+
+ if (destChannel == null)
+ {
+ AzureStorageContext context = null;
+
+ if (ContainerNameParameterSet == this.ParameterSetName ||
+ ContainerParameterSet == this.ParameterSetName ||
+ BlobFilePathParameterSet == this.ParameterSetName ||
+ ShareNameParameterSet == this.ParameterSetName ||
+ ShareParameterSet == this.ParameterSetName ||
+ FileFilePathParameterSet == this.ParameterSetName ||
+ UriFilePathParameterSet == this.ParameterSetName)
+ {
+ context = this.GetCmdletStorageContext(DestContext);
+ }
+ else
+ {
+ context = AzureStorageContext.EmptyContextInstance;
+ }
+
+ destChannel = new StorageFileManagement(context);
+ }
+
+ return destChannel;
+ }
+
+ ///
+ /// Execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ blobChannel = this.GetBlobChannel();
+ destChannel = GetDestinationChannel();
+ IStorageFileManagement srcChannel = Channel;
+
+ switch (ParameterSetName)
+ {
+ case ContainerNameParameterSet:
+ case ContainerParameterSet:
+ case BlobFilePathParameterSet:
+ case BlobFileParameterSet:
+ this.StartCopyFromBlob();
+ break;
+ case ShareNameParameterSet:
+ case ShareParameterSet:
+ case FileFilePathParameterSet:
+ case FileFileParameterSet:
+ this.StartCopyFromFile();
+ break;
+ case UriFilePathParameterSet:
+ case UriFileParameterSet:
+ this.StartCopyFromUri();
+ break;
+ }
+ }
+
+ private void StartCopyFromBlob()
+ {
+ CloudBlob blob = null;
+ string sourceBlobRelativeName = null;
+
+ if (null != this.SrcBlob)
+ {
+ blob = this.SrcBlob;
+ sourceBlobRelativeName = blob.Name;
+ }
+ else
+ {
+ CloudBlobContainer srcContainer = null;
+
+ if (null != this.SrcContainer)
+ {
+ srcContainer = this.SrcContainer;
+ }
+ else
+ {
+ NameUtil.ValidateContainerName(this.SrcContainerName);
+ srcContainer = this.blobChannel.GetContainerReference(this.SrcContainerName);
+ }
+ NameUtil.ValidateBlobName(this.SrcBlobName);
+ blob = srcContainer.GetBlobReference(this.SrcBlobName);
+ sourceBlobRelativeName = this.SrcBlobName;
+ }
+
+ CloudFile destFile = GetDestFile();
+
+ Func taskGenerator = (taskId) => StartAsyncCopy(
+ taskId,
+ destFile,
+ () => this.ConfirmOverwrite(blob.SnapshotQualifiedUri.ToString(), destFile.Uri.ToString()),
+ () => destFile.StartCopyAsync(blob.GenerateCopySourceBlob(), null, null, this.RequestOptions, this.OperationContext, CmdletCancellationToken));
+
+ this.RunTask(taskGenerator);
+ }
+
+ private void StartCopyFromFile()
+ {
+ CloudFile sourceFile = null;
+ string filePath = null;
+
+ if (null != this.SrcFile)
+ {
+ sourceFile = this.SrcFile;
+ filePath = this.SrcFile.GetFullPath();
+ }
+ else
+ {
+ CloudFileDirectory dir = null;
+
+ if (null != this.SrcShare)
+ {
+ dir = this.SrcShare.GetRootDirectoryReference();
+ }
+ else
+ {
+ NamingUtil.ValidateShareName(this.SrcShareName, false);
+ dir = this.BuildFileShareObjectFromName(this.SrcShareName).GetRootDirectoryReference();
+ }
+
+ string[] path = NamingUtil.ValidatePath(this.SrcFilePath, true);
+ sourceFile = dir.GetFileReferenceByPath(path);
+ filePath = this.SrcFilePath;
+ }
+
+ CloudFile destFile = this.GetDestFile();
+
+ Func taskGenerator = (taskId) => StartAsyncCopy(
+ taskId,
+ destFile,
+ () => this.ConfirmOverwrite(sourceFile.Uri.ToString(), destFile.Uri.ToString()),
+ () => destFile.StartCopyAsync(sourceFile.GenerateCopySourceFile(), null, null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken));
+
+ this.RunTask(taskGenerator);
+ }
+
+ private void StartCopyFromUri()
+ {
+ CloudFile destFile = this.GetDestFile();
+
+ Func taskGenerator = (taskId) => StartAsyncCopy(
+ taskId,
+ destFile,
+ () => this.ConfirmOverwrite(this.AbsoluteUri, destFile.Uri.ToString()),
+ () => destFile.StartCopyAsync(new Uri(this.AbsoluteUri), null, null, this.RequestOptions, this.OperationContext));
+
+ this.RunTask(taskGenerator);
+ }
+
+ private CloudFile GetDestFile()
+ {
+ var destChannal = this.GetDestinationChannel();
+
+ if (null != this.DestFile)
+ {
+ return this.DestFile;
+ }
+ else
+ {
+ string destPath = this.DestFilePath;
+
+ NamingUtil.ValidateShareName(this.DestShareName, false);
+ CloudFileShare share = destChannal.GetShareReference(this.DestShareName);
+
+ string[] path = NamingUtil.ValidatePath(destPath, true);
+ return share.GetRootDirectoryReference().GetFileReferenceByPath(path);
+ }
+ }
+
+ private async Task StartAsyncCopy(long taskId, CloudFile destFile, Func checkOverwrite, Func> startCopy)
+ {
+ bool destExist = true;
+ try
+ {
+ await destFile.FetchAttributesAsync(null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken);
+ }
+ catch (StorageException ex)
+ {
+ if (!ex.IsNotFoundException())
+ {
+ throw;
+ }
+
+ destExist = false;
+ }
+
+ if (!destExist || checkOverwrite())
+ {
+ string copyId = await startCopy();
+
+ this.OutputStream.WriteVerbose(taskId, String.Format(Resources.CopyDestinationBlobPending, destFile.GetFullPath(), destFile.Share.Name, copyId));
+ this.OutputStream.WriteObject(taskId, destFile);
+ }
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/StopAzureStorageFileCopy.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/StopAzureStorageFileCopy.cs
new file mode 100644
index 000000000000..b38cf5884baa
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/StopAzureStorageFileCopy.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Management.Automation;
+using System.Security.Permissions;
+using System.Threading.Tasks;
+using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+using Microsoft.WindowsAzure.Storage.File;
+using Microsoft.WindowsAzure.Storage.RetryPolicies;
+
+namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet
+{
+ [Cmdlet(VerbsLifecycle.Stop, Constants.FileCopyCmdletName)]
+ public class StopAzureStorageFileCopyCommand : AzureStorageFileCmdletBase
+ {
+ [Parameter(
+ Position = 0,
+ HelpMessage = "Target share name",
+ Mandatory = true,
+ ParameterSetName = Constants.ShareNameParameterSetName)]
+ [ValidateNotNullOrEmpty]
+ public string ShareName { get; set; }
+
+ [Parameter(
+ Position = 1,
+ HelpMessage = "Target file path",
+ Mandatory = true,
+ ParameterSetName = Constants.ShareNameParameterSetName)]
+ [ValidateNotNullOrEmpty]
+ public string FilePath { get; set; }
+
+ [Parameter(
+ Position = 0,
+ HelpMessage = "Target file instance", Mandatory = true,
+ ValueFromPipeline = true,
+ ParameterSetName = Constants.FileParameterSetName)]
+ [ValidateNotNull]
+ public CloudFile File { get; set; }
+
+ [Parameter(HelpMessage = "Copy Id", Mandatory = false)]
+ public string CopyId { get; set; }
+
+
+ [Parameter(HelpMessage = "Whether to stop the copy when copy id is different with the one input.", Mandatory = false)]
+ public SwitchParameter Force { get; set; }
+
+ ///
+ /// Execute command
+ ///
+ [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
+ public override void ExecuteCmdlet()
+ {
+ IStorageFileManagement localChannel = Channel;
+
+ CloudFile file = null;
+
+ if (null != this.File)
+ {
+ file = this.File;
+ }
+ else
+ {
+ string[] path = NamingUtil.ValidatePath(this.FilePath);
+ file = this.BuildFileShareObjectFromName(this.ShareName).GetRootDirectoryReference().GetFileReferenceByPath(path);
+ }
+
+ Func taskGenerator = (taskId) => this.StopCopyFile(taskId, localChannel, file, CopyId);
+
+ RunTask(taskGenerator);
+ }
+
+ ///
+ /// Stop copy operation by CloudBlob object
+ ///
+ /// CloudBlob object
+ /// Copy id
+ private async Task StopCopyFile(long taskId, IStorageFileManagement localChannel, CloudFile file, string copyId)
+ {
+ FileRequestOptions requestOptions = RequestOptions;
+
+ //Set no retry to resolve the 409 conflict exception
+ requestOptions.RetryPolicy = new NoRetry();
+
+ string abortCopyId = string.Empty;
+
+ if (string.IsNullOrEmpty(copyId) || Force)
+ {
+ //Make sure we use the correct copy id to abort
+ //Use default retry policy for FetchBlobAttributes
+ FileRequestOptions options = RequestOptions;
+ await localChannel.FetchFileAttributesAsync(file, null, options, OperationContext, CmdletCancellationToken);
+
+ if (file.CopyState == null || string.IsNullOrEmpty(file.CopyState.CopyId))
+ {
+ ArgumentException e = new ArgumentException(String.Format(Resources.FileCopyTaskNotFound, file.Uri.ToString()));
+ OutputStream.WriteError(taskId, e);
+ }
+ else
+ {
+ abortCopyId = file.CopyState.CopyId;
+ }
+
+ if (!Force)
+ {
+ string confirmation = String.Format(Resources.ConfirmAbortFileCopyOperation, file.Uri.ToString(), abortCopyId);
+ if (!await OutputStream.ConfirmAsync(confirmation))
+ {
+ string cancelMessage = String.Format(Resources.StopCopyOperationCancelled, file.Uri.ToString());
+ OutputStream.WriteVerbose(taskId, cancelMessage);
+ }
+ }
+ }
+ else
+ {
+ abortCopyId = copyId;
+ }
+
+ await localChannel.AbortCopyAsync(file, abortCopyId, null, requestOptions, OperationContext, CmdletCancellationToken);
+ string message = String.Format(Resources.StopCopyFileSuccessfully, file.Uri.ToString());
+ OutputStream.WriteObject(taskId, message);
+ }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Constants.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Constants.cs
index d4c91e242ca6..f7e3b8e67a43 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/Constants.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/Constants.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File
{
+ using System;
+
///
/// Provides constants for cmdlets.
///
@@ -56,6 +56,16 @@ internal static class Constants
///
public const string FileContentCmdletName = "AzureStorageFileContent";
+ ///
+ /// Cmdlet name for file copy.
+ ///
+ public const string FileCopyCmdletName = "AzureStorageFileCopy";
+
+ ///
+ /// Cmdlet name for file copy state.
+ ///
+ public const string FileCopyCmdletStateName = "AzureStorageFileCopyState";
+
///
/// Stores the default endpoint suffix for storage accounts.
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/ErrorIdConstants.cs b/src/ServiceManagement/Storage/Commands.Storage/File/ErrorIdConstants.cs
index e3febd8a155c..a8a5ab09e457 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/ErrorIdConstants.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/ErrorIdConstants.cs
@@ -11,6 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------
+
namespace Microsoft.WindowsAzure.Commands.Storage.File
{
internal static class ErrorIdConstants
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/NamingUtil.cs b/src/ServiceManagement/Storage/Commands.Storage/File/NamingUtil.cs
index 69631a39369e..fd854af08988 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/NamingUtil.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/NamingUtil.cs
@@ -12,13 +12,13 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Globalization;
-using System.Linq;
-using System.Text.RegularExpressions;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File
{
+ using System;
+ using System.Globalization;
+ using System.Linq;
+ using System.Text.RegularExpressions;
+
///
/// Provides utilities to determining whether the given string is a valid
/// name of some component.
@@ -33,7 +33,7 @@ internal static class NamingUtil
private const string InvalidFileNamePattern = @"^((LPT\d)|(COM\d)|(PRN)|(AUX)|(NUL)|(CON)|(CLOCK\$))$";
- private const int MaxPathLength = 1024;
+ private const int MaxPathLength = 2048;
private static readonly char[] PathSeparators = new char[] { '/', '\\' };
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/StorageClientExtensions.cs b/src/ServiceManagement/Storage/Commands.Storage/File/StorageClientExtensions.cs
index e9d06c1beac9..6d11e3d1127d 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/StorageClientExtensions.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/StorageClientExtensions.cs
@@ -12,13 +12,13 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Diagnostics;
-using System.Linq;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File
{
+ using System;
+ using System.Diagnostics;
+ using System.Linq;
+ using Microsoft.WindowsAzure.Storage.File;
+
///
/// Provides extension methods for storage client lib.
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs
index 18e39cfb93b6..ca8ab7140eec 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs
@@ -12,15 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Globalization;
-using System.Management.Automation;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs;
-
namespace Microsoft.WindowsAzure.Commands.Storage.File
{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Storage.DataMovement;
+ using Microsoft.WindowsAzure.Storage.File;
+
public abstract class StorageFileDataManagementCmdletBase : AzureStorageFileCmdletBase
{
///
@@ -49,7 +50,7 @@ public SwitchParameter Force
/// Indicating the source path.
/// Indicating the destination path.
/// Returns a value indicating whether to overwrite.
- private bool ConfirmOverwrite(string sourcePath, string destinationPath)
+ protected bool ConfirmOverwrite(string sourcePath, string destinationPath)
{
return this.Force || this.OutputStream.ConfirmAsync(string.Format(CultureInfo.CurrentCulture, Resources.OverwriteConfirmation, destinationPath)).Result;
}
@@ -63,17 +64,21 @@ protected override void BeginProcessing()
protected override void EndProcessing()
{
- base.EndProcessing();
- this.WriteTaskSummary();
-
- this.transferJobRunner.Dispose();
- this.transferJobRunner = null;
+ try
+ {
+ base.EndProcessing();
+ this.WriteTaskSummary();
+ }
+ finally
+ {
+ this.transferJobRunner.Dispose();
+ this.transferJobRunner = null;
+ }
}
- protected async Task RunTransferJob(FileTransferJob job, ProgressRecord record)
+ protected async Task RunTransferJob(TransferJob job, ProgressRecord record)
{
this.SetRequestOptionsInTransferJob(job);
- job.AccessCondition = this.AccessCondition;
job.OverwritePromptCallback = this.ConfirmOverwrite;
try
@@ -104,7 +109,7 @@ await this.transferJobRunner.RunTransferJob(job,
}
}
- protected void SetRequestOptionsInTransferJob(FileTransferJob transferJob)
+ protected void SetRequestOptionsInTransferJob(TransferJob transferJob)
{
var cmdletOptions = this.RequestOptions;
@@ -113,7 +118,25 @@ protected void SetRequestOptionsInTransferJob(FileTransferJob transferJob)
return;
}
- var requestOptions = transferJob.FileRequestOptions;
+ if (null != transferJob.Source.AzureFile)
+ {
+ this.SetRequestOptions(transferJob.Source, cmdletOptions);
+ }
+
+ if (null != transferJob.Destination.AzureFile)
+ {
+ this.SetRequestOptions(transferJob.Destination, cmdletOptions);
+ }
+ }
+
+ private void SetRequestOptions(TransferLocation location, FileRequestOptions cmdletOptions)
+ {
+ FileRequestOptions requestOptions = location.RequestOptions as FileRequestOptions;
+
+ if (null == requestOptions)
+ {
+ requestOptions = new FileRequestOptions();
+ }
if (cmdletOptions.MaximumExecutionTime != null)
{
@@ -127,7 +150,7 @@ protected void SetRequestOptionsInTransferJob(FileTransferJob transferJob)
requestOptions.DisableContentMD5Validation = true;
- transferJob.FileRequestOptions = requestOptions;
+ location.RequestOptions = requestOptions;
}
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml
index b7611ccd82ec..776124a35a3c 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml
+++ b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml
@@ -277,7 +277,7 @@
AzureStorageBlob
- ICloudBlob object and Azure storage context and etc.
+ CloudBlob object and Azure storage context and etc.
@@ -469,11 +469,11 @@ echo "Total $total blobs in container $containerName"
Get-AzureStorageBlobContent
- ICloudBlob
+ CloudBlob
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- ICloudBlob
+ CloudBlob
Destination
@@ -702,13 +702,13 @@ echo "Total $total blobs in container $containerName"
ProcessorCount * 8
- ICloudBlob
+ CloudBlob
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- ICloudBlob
+ CloudBlob
- ICloudBlob
+ CloudBlob
@@ -906,11 +906,11 @@ echo "Total $total blobs in container $containerName"
Get-AzureStorageBlobCopyState
- ICloudBlob
+ CloudBlob
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- ICloudBlob
+ CloudBlob
WaitForComplete
@@ -1087,13 +1087,13 @@ echo "Total $total blobs in container $containerName"
- ICloudBlob
+ CloudBlob
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- ICloudBlob
+ CloudBlob
- ICloudBlob
+ CloudBlob
@@ -1593,7 +1593,7 @@ echo "Total $total containers"
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -1627,7 +1627,7 @@ echo "Total $total containers"
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -1720,6 +1720,163 @@ echo "Total $total containers"
+
+
+
+ Get-AzureStorageCORSRule
+
+ Retrieve the service CORS rules for a specific service type. If it succeeds, the cmdlet will return an array of CORS rule objects. You can add, remove, change this array of rule objects and set them back to service using Set-AzureStorageCORSRule cmdlet.
+
+
+
+
+ Get
+ AzureStorageCORSRule
+
+
+
+ Get azure storage service CORS rules.
+
+
+
+ Get-AzureStorageCORSRule
+
+ ServiceType
+
+ Azure storage service type, such as Blob, Table, Queue.
+
+ StorageServiceType
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ServiceType
+
+ Azure storage service type, such as Blob, Table, Queue.
+
+ StorageServiceType
+
+ StorageServiceType
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An array of PSCORSRule objects which represent the CORS rules currently set on the service.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Get CORS rules of blob service. --------------------------
+
+ PS C:\>
+
+ PS C:\> Get-AzureStorageCORSRule -ServiceType Blob
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2845,89 +3002,236 @@ echo "Total $total containers"
-
+
- Get-AzureStorageQueue
+ Get-AzureStorageFileCopyState
- list azure storage queues
+ Get copy state of the specified azure storage file.
Get
- AzureStorageQueue
+ AzureStorageFileCopyState
-
- list azure storage queues
+ Get copy state of the specified azure storage file.
- Get-AzureStorageQueue
-
- Name
+ Get-AzureStorageFileCopyState
+
+ ShareName
- Queue name. If queue name is empty, this will list all the queues. Otherwise, this will list the queues whose name matched the name regular pattern.
+ 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]
+
+
+ Profile
+
+
+
+ AzureProfile
+
- Get-AzureStorageQueue
-
- Prefix
+ Get-AzureStorageFileCopyState
+
+ File
- Queue name prefix
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
- String
+ 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]
+
+
+ Profile
+
+
+
+ AzureProfile
+
+
+
+ Get-AzureStorageFileCopyState
+
+ WaitForComplete
+
+ Wait for the copy completion.
+
+ SwitchParameter
+
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
-
-
-
-
- Name
-
- Queue name. If queue name is empty, this will list all the queues. Otherwise, this will list the queues whose name matched the name regular pattern.
-
- String
-
- String
-
-
-
-
-
- Context
+
+ 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]
+
+
+ Profile
+
+
+
+ AzureProfile
+
+
+
+ Get-AzureStorageFileCopyState
+
+ 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]
+
+
+ Profile
+
+
+
+ AzureProfile
+
+
+
+
+
+ ShareName
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure storage share name.
- AzureStorageContext
+ String
- AzureStorageContext
+ String
-
- Prefix
+
+ FilePath
- Queue name prefix
+ Relative path in azure storage share to the azure storage file.
String
@@ -2937,37 +3241,85 @@ echo "Total $total containers"
+ WaitForComplete
+
+ Wait for the copy completion.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
ServerTimeoutPerRequest
Server side time out for each request.
- int32
+ Nullable`1[Int32]
- int32
+ Nullable`1[Int32]
-
+
ClientTimeoutPerRequest
Client side time out for each request.
- int32
+ Nullable`1[Int32]
- int32
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+ The total amount of concurrent async tasks.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
- PipelineVariable
+ Profile
-
+
- string
+ AzureProfile
- string
+ AzureProfile
+
+
+
+
+
+ File
+
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
+
+ CloudFile
+
+ CloudFile
@@ -2977,77 +3329,54 @@ echo "Total $total containers"
-
-
-
-
+
+
-
+
+
+
+
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
-
+
- -------------------------- List all azure storage queues --------------------------
-
-
-
- PS C:\> Get-AzureStorageQueue
-
-
-
-
-
-
-
-
-
-
- -------------------------- List azure storage queues using wildcard --------------------------
-
-
-
- PS C:\> Get-AzureStorageQueue queue*
-
-
-
-
-
-
-
-
-
-
- -------------------------- List azure storage queues using queue name prefix --------------------------
+ -------------------------- Get copy state by name. --------------------------
-
+ PS C:\>
- PS C:\> Get-AzureStorageQueue -Prefix queue
+ PS C:\> Get-AzureStorageFileCopyState -ShareName share -FilePath filePath
+
+
+
-
+
+
+
@@ -3058,52 +3387,62 @@ echo "Total $total containers"
- Get-AzureStorageQueueStoredAccessPolicy
+ Get-AzureStorageQueue
- List the specified Stored Access Policy for an azure storage queue, or list all the Stored Access Policies for an azure storage queue.
+ list azure storage queues
Get
- AzureStorageQueueStoredAccessPolicy
+ AzureStorageQueue
- List the specified Stored Access Policy for an azure storage queue, or list all the Stored Access Policies for an azure storage queue.
+ list azure storage queues
- Get-AzureStorageQueueStoredAccessPolicy
-
- Queue
+ Get-AzureStorageQueue
+
+ Name
- Azure storage queue name.
+ Queue name. If queue name is empty, this will list all the queues. Otherwise, this will list the queues whose name matched the name regular pattern.
String
-
- Policy
+
+ Context
- Azure Stored Access Policy.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+ Get-AzureStorageQueue
+
+ Prefix
+
+ Queue name prefix
String
Context
- Azure storage context
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
-
- Queue
+
+ Name
- Azure storage queue name.
+ Queue name. If queue name is empty, this will list all the queues. Otherwise, this will list the queues whose name matched the name regular pattern.
String
@@ -3112,32 +3451,232 @@ echo "Total $total containers"
-
- Policy
+
+ Context
- Azure Stored Access Policy.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- String
+ AzureStorageContext
- String
+ AzureStorageContext
-
- Context
+
+ Prefix
- Azure storage context
+ Queue name prefix
- AzureStorageContext
+ String
- AzureStorageContext
+ String
- PipelineVariable
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ int32
+
+ int32
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ int32
+
+ int32
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- List all azure storage queues --------------------------
+
+
+
+ PS C:\> Get-AzureStorageQueue
+
+
+
+
+
+
+
+
+
+
+ -------------------------- List azure storage queues using wildcard --------------------------
+
+
+
+ PS C:\> Get-AzureStorageQueue queue*
+
+
+
+
+
+
+
+
+
+
+ -------------------------- List azure storage queues using queue name prefix --------------------------
+
+
+
+ PS C:\> Get-AzureStorageQueue -Prefix queue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-AzureStorageQueueStoredAccessPolicy
+
+ List the specified Stored Access Policy for an azure storage queue, or list all the Stored Access Policies for an azure storage queue.
+
+
+
+
+ Get
+ AzureStorageQueueStoredAccessPolicy
+
+
+
+
+ List the specified Stored Access Policy for an azure storage queue, or list all the Stored Access Policies for an azure storage queue.
+
+
+
+ Get-AzureStorageQueueStoredAccessPolicy
+
+ Queue
+
+ Azure storage queue name.
+
+ String
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+
+
+ Queue
+
+ Azure storage queue name.
+
+ String
+
+ String
+
+
+
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+ String
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ PipelineVariable
@@ -3250,7 +3789,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -3272,7 +3811,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -3408,7 +3947,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -3442,7 +3981,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -3843,65 +4382,82 @@ echo "Total $total containers"
-
+
- Get-AzureStorageTable
+ Get-AzureStorageShareStoredAccessPolicy
- List azure storage tables
+ Get the specified Stored Access Policy for an azure storage share, or list all the Stored Access Policies for an azure storage share.
Get
- AzureStorageTable
+ AzureStorageShareStoredAccessPolicy
-
- List azure storage tables
+ Get the specified Stored Access Policy for an azure storage share, or list all the Stored Access Policies for an azure storage share.
- Get-AzureStorageTable
-
- Name
+ Get-AzureStorageShareStoredAccessPolicy
+
+ ShareName
- Table name. If table name is empty, this will list all the queues. Otherwise, this will list the tables whose name matched the name regular pattern.
+ Azure storage share name.
String
-
+
+ Policy
+
+ Azure Stored Access Policy name.
+
+ String
+
+
Context
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
-
-
- Get-AzureStorageTable
-
- Prefix
+
+ ServerTimeoutPerRequest
- Table name prefix
+
- String
+ Nullable`1[Int32]
-
- Context
+
+ ClientTimeoutPerRequest
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
- AzureStorageContext
+ Nullable`1[Int32]
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+
+
+ AzureProfile
-
- Name
+
+ ShareName
- Table name. If table name is empty, this will list all the queues. Otherwise, this will list the tables whose name matched the name regular pattern.
+ Azure storage share name.
String
@@ -3910,8 +4466,225 @@ echo "Total $total containers"
-
- Context
+
+ Policy
+
+ Azure Stored Access Policy name.
+
+ String
+
+ String
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ Profile
+
+
+
+ AzureProfile
+
+ AzureProfile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- List a stored access policy in share --------------------------
+
+ PS C:\>
+
+ PS C:\> Get-AzureStorageShareStoredAccessPolicy -ShareName test -Policy testPolicy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- List all the stored access policies in share --------------------------
+
+ PS C:\>
+
+ PS C:\> Get-AzureStorageShareStoredAccessPolicy -ShareName test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-AzureStorageTable
+
+ List azure storage tables
+
+
+
+
+ Get
+ AzureStorageTable
+
+
+
+
+ List azure storage tables
+
+
+
+ Get-AzureStorageTable
+
+ Name
+
+ Table name. If table name is empty, this will list all the queues. Otherwise, this will list the tables whose name matched the name regular pattern.
+
+ String
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+ Get-AzureStorageTable
+
+ Prefix
+
+ Table name prefix
+
+ String
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+
+
+ Name
+
+ Table name. If table name is empty, this will list all the queues. Otherwise, this will list the tables whose name matched the name regular pattern.
+
+ String
+
+ String
+
+
+
+
+
+ Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -4091,7 +4864,7 @@ echo "Total $total containers"
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -4125,7 +4898,7 @@ echo "Total $total containers"
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -4284,7 +5057,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -4292,11 +5065,11 @@ echo "Total $total containers"
New-AzureStorageBlobSASToken
- ICloudBlob
+ CloudBlob
- ICloudBlob object
+ CloudBlob object
- ICloudBlob
+ CloudBlob
Permission
@@ -4329,7 +5102,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -4337,11 +5110,11 @@ echo "Total $total containers"
New-AzureStorageBlobSASToken
- ICloudBlob
+ CloudBlob
- ICloudBlob object
+ CloudBlob object
- ICloudBlob
+ CloudBlob
Policy
@@ -4374,7 +5147,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -4426,7 +5199,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -4508,7 +5281,7 @@ echo "Total $total containers"
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -4518,13 +5291,13 @@ echo "Total $total containers"
- ICloudBlob
+ CloudBlob
- ICloudBlob object
+ CloudBlob object
- ICloudBlob
+ CloudBlob
- ICloudBlob
+ CloudBlob
@@ -4915,7 +5688,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -4960,7 +5733,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -5030,7 +5803,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -5208,7 +5981,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -5278,7 +6051,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -5338,7 +6111,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
- PS C:\> New-AzureStorageContainerStoredAccessPolicy -Container test -Policy testPolicy -Permission audq
+ PS C:\> New-AzureStorageContainerStoredAccessPolicy -Container test -Policy testPolicy -Permission rwdl
@@ -6303,197 +7076,117 @@ $context | Get-AzureStorageBlob -Container abc
-
+
- New-AzureStorageQueue
+ New-AzureStorageFileSASToken
- Create an azure storage queue
+ Generate Shared Access Signature token for azure storage file.
New
- AzureStorageQueue
+ AzureStorageFileSASToken
-
- Create an azure storage queue
+ Generate Shared Access Signature token for azure storage file.
- New-AzureStorageQueue
+ New-AzureStorageFileSASToken
- Name
+ ShareName
- Queue name
+ Azure storage share name.
String
-
+
+ Path
+
+ Relative path in azure storage share to the azure storage file.
+
+ String
+
+
+ Permission
+
+ Permissions for a storage file.
+
+ String
+
+
+ StartTime
+
+ The time at which the shared access signature becomes valid.
+
+ Nullable`1[DateTime]
+
+
+ ExpiryTime
+
+ The time at which the shared access signature becomes invalid.
+
+ Nullable`1[DateTime]
+
+
+ FullUri
+
+ Return the full blob uri with sas token.
+
+ SwitchParameter
+
+
Context
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
-
-
-
-
- Name
-
- Queue name
-
- String
-
- String
-
-
-
-
-
- Context
-
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
- AzureStorageContext
-
-
-
-
-
- ServerTimeoutPerRequest
-
- Server side time out for each request.
-
- int32
-
- int32
-
-
-
-
-
- ClientTimeoutPerRequest
-
- Client side time out for each request.
-
- int32
-
- int32
-
-
-
-
-
- PipelineVariable
-
-
-
- string
-
- string
-
-
-
-
-
-
-
-
-
-
+
+ ServerTimeoutPerRequest
-
+ Server side time out for each request.
-
-
-
-
-
-
-
-
-
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
-
+ Client side time out for each request.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- Create an azure storage queue --------------------------
-
-
-
- PS C:\> New-AzureStorageQueue queueabc
-
-
-
-
-
-
-
-
-
-
- -------------------------- Create multiple azure storage queues --------------------------
-
-
-
- PS C:\> "queue1 queue2 queue3".split() | New-AzureStorageQueue
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- New-AzureStorageQueueSASToken
-
- Generate Shared Access Signature token for azure storage queue.
-
-
-
-
- New
- AzureStorageQueueSASToken
-
-
-
-
- Generate Shared Access Signature token for azure storage queue.
-
-
+ Nullable`1[Int32]
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+ AzureProfile instance
+
+ AzureProfile
+
+
- New-AzureStorageQueueSASToken
+ New-AzureStorageFileSASToken
- Name
+ ShareName
- Azure storage queue name.
+ Azure storage share name.
+
+ String
+
+
+ Path
+
+ Relative path in azure storage share to the azure storage file.
String
@@ -6521,31 +7214,59 @@ $context | Get-AzureStorageBlob -Container abc
FullUri
- Return the full queue uri with sas token
+ Return the full blob uri with sas token.
SwitchParameter
-
+
Context
- Azure storage 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
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+ AzureProfile instance
+
+ AzureProfile
+
- New-AzureStorageQueueSASToken
-
- Name
+ New-AzureStorageFileSASToken
+
+ File
- Azure storage queue name.
+ CloudFile object.
- String
+ CloudFile
Permission
- Permissions for a storage queue.
+ Permissions for a storage file.
String
@@ -6566,58 +7287,157 @@ $context | Get-AzureStorageBlob -Container abc
FullUri
- Return the full queue uri with sas token
+ Return the full blob uri with sas token.
SwitchParameter
-
- Context
+
+ ServerTimeoutPerRequest
- Azure storage context.
+ Server side time out for each request.
- AzureStorageContext
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ Nullable`1[Int32]
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+ AzureProfile instance
+
+ AzureProfile
-
-
-
- Name
-
- Azure storage queue name.
-
- String
-
- String
-
-
-
-
-
- Policy
-
- Azure Stored Access Policy.
-
- String
-
- String
-
-
-
-
-
- StartTime
-
- The time at which the shared access signature becomes valid.
-
- Nullable`1[DateTime]
-
- Nullable`1[DateTime]
-
-
-
-
-
- ExpiryTime
+
+ New-AzureStorageFileSASToken
+
+ File
+
+ CloudFile object.
+
+ CloudFile
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+
+ StartTime
+
+ The time at which the shared access signature becomes valid.
+
+ Nullable`1[DateTime]
+
+
+ ExpiryTime
+
+ The time at which the shared access signature becomes invalid.
+
+ Nullable`1[DateTime]
+
+
+ FullUri
+
+ Return the full blob uri with sas token.
+
+ SwitchParameter
+
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ Nullable`1[Int32]
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+ AzureProfile instance
+
+ AzureProfile
+
+
+
+
+
+ ShareName
+
+ Azure storage share name.
+
+ String
+
+ String
+
+
+
+
+
+ Path
+
+ Relative path in azure storage share to the azure storage file.
+
+ String
+
+ String
+
+
+
+
+
+ Permission
+
+ Permissions for a storage file.
+
+ String
+
+ String
+
+
+
+
+
+ StartTime
+
+ The time at which the shared access signature becomes valid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ ExpiryTime
The time at which the shared access signature becomes invalid.
@@ -6631,7 +7451,7 @@ $context | Get-AzureStorageBlob -Container abc
FullUri
- Return the full queue uri with sas token
+ Return the full blob uri with sas token.
SwitchParameter
@@ -6640,10 +7460,10 @@ $context | Get-AzureStorageBlob -Container abc
-
+
Context
- Azure storage context.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -6652,10 +7472,58 @@ $context | Get-AzureStorageBlob -Container abc
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
- Permission
+ Profile
- Permissions for a storage queue.
+ AzureProfile instance
+
+ AzureProfile
+
+ AzureProfile
+
+
+
+
+
+ Policy
+
+ Azure Stored Access Policy.
String
@@ -6664,14 +7532,14 @@ $context | Get-AzureStorageBlob -Container abc
-
- PipelineVariable
+
+ File
-
+ CloudFile object.
- string
+ CloudFile
- string
+ CloudFile
@@ -6681,132 +7549,115 @@ $context | Get-AzureStorageBlob -Container abc
-
-
-
-
+
+
-
+
+
+
+
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
-
+
- -------------------------- Generate a queue sas token with full permission --------------------------
+ -------------------------- Generate a file sas token with full file permission. --------------------------
-
+ PS C:\>
- PS C:\> New-AzureStorageQueueSASToken -Name test -Permission raup
+ PS C:\> New-AzureStorageFileSASToken -ShareName share -Path filePath -Permission rwd
+
+
+
-
+
+
+
- -------------------------- Generate a queue sas token with shared access policy --------------------------
+ -------------------------- Generate a file sas token with life time. --------------------------
-
+ PS C:\>
- PS C:\> New-AzureStorageQueueSASToken -Name test -Policy policyName
+ PS C:\> $startTime = Get-Date
+$endTime = $startTime.AddHours(2.0)
+New-AzureStorageFileSASToken -ShareName share -Path filePath -Permission rwd -StartTime $startTime -ExpiryTime $endTime
+
+
+
-
+
+
+
-
- http://msdn.microsoft.com/en-us/library/dn806410.aspx
-
- New-AzureStorageQueueStoredAccessPolicy
+ New-AzureStorageQueue
- Create Stored Access Policy for azure storage queue.
+ Create an azure storage queue
New
- AzureStorageQueueStoredAccessPolicy
+ AzureStorageQueue
- Create Stored Access Policy for azure storage queue.
+ Create an azure storage queue
- New-AzureStorageQueueStoredAccessPolicy
+ New-AzureStorageQueue
- Queue
-
- Azure storage queue name.
-
- String
-
-
- Policy
-
- Azure Stored Access Policy.
-
- String
-
-
- Permission
+ Name
- Permissions for a storage queue.
+ Queue name
String
-
- StartTime
-
- The time at which the stored access policy becomes valid.
-
- Nullable`1[DateTime]
-
-
- ExpiryTime
-
- The time at which the stored access policy becomes invalid.
-
- Nullable`1[DateTime]
-
Context
- Azure storage context
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -6814,9 +7665,9 @@ $context | Get-AzureStorageBlob -Container abc
- Queue
+ Name
- Azure storage queue name.
+ Queue name
String
@@ -6825,62 +7676,38 @@ $context | Get-AzureStorageBlob -Container abc
-
- Policy
+
+ Context
- Azure Stored Access Policy.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- String
+ AzureStorageContext
- String
+ AzureStorageContext
-
- Permission
-
- Permissions for a storage queue.
-
- String
-
- String
-
-
-
-
-
- StartTime
-
- The time at which the stored access policy becomes valid.
-
- Nullable`1[DateTime]
-
- Nullable`1[DateTime]
-
-
-
-
-
- ExpiryTime
+
+ ServerTimeoutPerRequest
- The time at which the stored access policy becomes invalid.
+ Server side time out for each request.
- Nullable`1[DateTime]
+ int32
- Nullable`1[DateTime]
+ int32
-
- Context
+
+ ClientTimeoutPerRequest
- Azure storage context
+ Client side time out for each request.
- AzureStorageContext
+ int32
- AzureStorageContext
+ int32
@@ -6932,11 +7759,26 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Create a stored access policy in queue with full permission --------------------------
+ -------------------------- Create an azure storage queue --------------------------
- PS C:\> New-AzureStorageQueueStoredAccessPolicy -Queue test -Policy testPolicy -Permission arup
+ PS C:\> New-AzureStorageQueue queueabc
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Create multiple azure storage queues --------------------------
+
+
+
+ PS C:\> "queue1 queue2 queue3".split() | New-AzureStorageQueue
@@ -6948,151 +7790,123 @@ $context | Get-AzureStorageBlob -Container abc
-
- http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
-
-
- New-AzureStorageShare
+ New-AzureStorageQueueSASToken
- Create a new Azure storage file share.
+ Generate Shared Access Signature token for azure storage queue.
New
- AzureStorageShare
+ AzureStorageQueueSASToken
- Create a new Azure storage file share.
+ Generate Shared Access Signature token for azure storage queue.
- New-AzureStorageShare
-
+ New-AzureStorageQueueSASToken
+
Name
- The file share name
+ Azure storage queue name.
String
-
- Context
-
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
-
- ServerTimeoutPerRequest
+
+ Policy
- Server side timeout value for the request.
+ Azure Stored Access Policy.
- Nullable`1[Int32]
+ String
- ClientTimeoutPerRequest
+ StartTime
- Client side timeout value for the request.
+ The time at which the shared access signature becomes valid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
- ConcurrentTaskCount
+ ExpiryTime
-
+ The time at which the shared access signature becomes invalid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
-
-
- New-AzureStorageShare
-
- Name
+
+ FullUri
- The file share name
+ Return the full queue uri with sas token
- String
+ SwitchParameter
-
+
Context
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ 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]
-
- New-AzureStorageShare
-
+ New-AzureStorageQueueSASToken
+
Name
- The file share name
+ Azure storage queue name.
String
-
- Context
+
+ Permission
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Permissions for a storage queue.
- AzureStorageContext
+ String
- ServerTimeoutPerRequest
+ StartTime
- Server side timeout value for the request.
+ The time at which the shared access signature becomes valid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
- ClientTimeoutPerRequest
+ ExpiryTime
- Client side timeout value for the request.
+ The time at which the shared access signature becomes invalid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
-
- ConcurrentTaskCount
+
+ FullUri
-
+ Return the full queue uri with sas token
- Nullable`1[Int32]
+ SwitchParameter
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
-
+
Name
- The file share name
+ Azure storage queue name.
String
@@ -7101,62 +7915,74 @@ $context | Get-AzureStorageBlob -Container abc
-
- Context
+
+ Policy
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure Stored Access Policy.
- AzureStorageContext
+ String
- AzureStorageContext
+ String
- ServerTimeoutPerRequest
+ StartTime
- Server side timeout value for the request.
+ The time at which the shared access signature becomes valid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
- Nullable`1[Int32]
+ Nullable`1[DateTime]
- ClientTimeoutPerRequest
+ ExpiryTime
- Client side timeout value for the request.
+ The time at which the shared access signature becomes invalid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
- Nullable`1[Int32]
+ Nullable`1[DateTime]
-
- ConcurrentTaskCount
+
+ FullUri
-
+ Return the full queue uri with sas token
- Nullable`1[Int32]
+ SwitchParameter
- Nullable`1[Int32]
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
- ClientRequestId
+ Permission
-
+ Permissions for a storage queue.
- string
+ String
- string
+ String
@@ -7208,13 +8034,13 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Example 1 --------------------------
+ -------------------------- Generate a queue sas token with full permission --------------------------
- PS C:\> New-AzureStorageShare -Name sample
+ PS C:\> New-AzureStorageQueueSASToken -Name test -Permission raup
- This example creates a file share named sample.
+
@@ -7222,58 +8048,88 @@ $context | Get-AzureStorageBlob -Container abc
-
-
-
- Unkown
-
-
-
- Remove-AzureStorageShare
-
-
-
- Unkown
-
-
+
+ -------------------------- Generate a queue sas token with shared access policy --------------------------
+
+
+
+ PS C:\> New-AzureStorageQueueSASToken -Name test -Policy policyName
+
+
+
+
+
+
+
+
+
+
+
- Get-AzureStorageShare
-
+ http://msdn.microsoft.com/en-us/library/dn806410.aspx
- New-AzureStorageTable
+ New-AzureStorageQueueStoredAccessPolicy
- Create an azure storage table
+ Create Stored Access Policy for azure storage queue.
New
- AzureStorageTable
+ AzureStorageQueueStoredAccessPolicy
- Create an azure storage table
+ Create Stored Access Policy for azure storage queue.
- New-AzureStorageTable
+ New-AzureStorageQueueStoredAccessPolicy
- Name
+ Queue
- Table name
+ Azure storage queue name.
+
+ String
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+
+ Permission
+
+ Permissions for a storage queue.
String
+
+ StartTime
+
+ The time at which the stored access policy becomes valid.
+
+ Nullable`1[DateTime]
+
+
+ ExpiryTime
+
+ The time at which the stored access policy becomes invalid.
+
+ Nullable`1[DateTime]
+
Context
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -7281,9 +8137,9 @@ $context | Get-AzureStorageBlob -Container abc
- Name
+ Queue
- Table name
+ Azure storage queue name.
String
@@ -7292,38 +8148,62 @@ $context | Get-AzureStorageBlob -Container abc
-
- Context
+
+ Policy
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure Stored Access Policy.
- AzureStorageContext
+ String
- AzureStorageContext
+ String
-
- ServerTimeoutPerRequest
+
+ Permission
- Server side time out for each request.
+ Permissions for a storage queue.
- int32
+ String
- int32
+ String
-
- ClientTimeoutPerRequest
+
+ StartTime
- Client side time out for each request.
+ The time at which the stored access policy becomes valid.
- int32
+ Nullable`1[DateTime]
- int32
+ Nullable`1[DateTime]
+
+
+
+
+
+ ExpiryTime
+
+ The time at which the stored access policy becomes invalid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
@@ -7375,26 +8255,11 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Create an azure storage table --------------------------
-
-
-
- PS C:\> New-AzureStorageTable tableabc
-
-
-
-
-
-
-
-
-
-
- -------------------------- Create multiple azure storage tables --------------------------
+ -------------------------- Create a stored access policy in queue with full permission --------------------------
- PS C:\> "table1 table2 table3".split() | New-AzureStorageTable
+ PS C:\> New-AzureStorageQueueStoredAccessPolicy -Queue test -Policy testPolicy -Permission arup
@@ -7406,179 +8271,151 @@ $context | Get-AzureStorageBlob -Container abc
+
+ http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
+
+
- New-AzureStorageTableSASToken
+ New-AzureStorageShare
- Generate Shared Access Signature token for azure storage table.
+ Create a new Azure storage file share.
New
- AzureStorageTableSASToken
+ AzureStorageShare
- Generate Shared Access Signature token for azure storage table.
+ Create a new Azure storage file share.
- New-AzureStorageTableSASToken
-
+ New-AzureStorageShare
+
Name
- Azure storage table name.
+ The file share name
String
-
- Policy
+
+ Context
- Azure Stored Access Policy.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- String
+ AzureStorageContext
- StartTime
+ ServerTimeoutPerRequest
- The time at which the shared access signature becomes valid.
+ Server side timeout value for the request.
- Nullable`1[DateTime]
+ Nullable`1[Int32]
- ExpiryTime
+ ClientTimeoutPerRequest
- The time at which the shared access signature becomes invalid.
+ Client side timeout value for the request.
- Nullable`1[DateTime]
+ Nullable`1[Int32]
-
- FullUri
+
+ ConcurrentTaskCount
- Return the full queue uri with sas token
+
- SwitchParameter
+ Nullable`1[Int32]
-
- StartPartitionKey
+
+
+ New-AzureStorageShare
+
+ Name
- Start partition key.
+ The file share name
String
-
- StartRowKey
+
+ Context
- Start row key.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- String
+ AzureStorageContext
-
- EndPartitionKey
+
+ ServerTimeoutPerRequest
- End partition key.
+ Server side timeout value for the request.
- String
+ Nullable`1[Int32]
-
- EndRowKey
+
+ ClientTimeoutPerRequest
- End row key.
+ Client side timeout value for the request.
- String
+ Nullable`1[Int32]
-
- Context
+
+ ConcurrentTaskCount
- Azure storage context
+
- AzureStorageContext
+ Nullable`1[Int32]
- New-AzureStorageTableSASToken
-
+ New-AzureStorageShare
+
Name
- Azure storage table name.
+ The file share name
String
-
- Permission
+
+ Context
- Permissions for a storage table.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- String
+ AzureStorageContext
- StartTime
+ ServerTimeoutPerRequest
- The time at which the shared access signature becomes valid.
+ Server side timeout value for the request.
- Nullable`1[DateTime]
+ Nullable`1[Int32]
- ExpiryTime
+ ClientTimeoutPerRequest
- The time at which the shared access signature becomes invalid.
+ Client side timeout value for the request.
- Nullable`1[DateTime]
+ Nullable`1[Int32]
-
- FullUri
-
- Return the full queue uri with sas token
-
- SwitchParameter
-
-
- StartPartitionKey
-
- Start partition key.
-
- String
-
-
- StartRowKey
-
- Start row key.
-
- String
-
-
- EndPartitionKey
-
- End partition key.
-
- String
-
-
- EndRowKey
-
- End row key.
-
- String
-
-
- Context
+
+ ConcurrentTaskCount
- Azure storage context
+
- AzureStorageContext
+ Nullable`1[Int32]
-
+
Name
- Azure storage table name.
+ The file share name
String
@@ -7587,122 +8424,62 @@ $context | Get-AzureStorageBlob -Container abc
-
- Policy
+
+ Context
- Azure Stored Access Policy.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- String
+ AzureStorageContext
- String
+ AzureStorageContext
- StartTime
+ ServerTimeoutPerRequest
- The time at which the shared access signature becomes valid.
+ Server side timeout value for the request.
- Nullable`1[DateTime]
+ Nullable`1[Int32]
- Nullable`1[DateTime]
+ Nullable`1[Int32]
- ExpiryTime
-
- The time at which the shared access signature becomes invalid.
-
- Nullable`1[DateTime]
-
- Nullable`1[DateTime]
-
-
-
-
-
- FullUri
-
- Return the full queue uri with sas token
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- StartPartitionKey
-
- Start partition key.
-
- String
-
- String
-
-
-
-
-
- StartRowKey
-
- Start row key.
-
- String
-
- String
-
-
-
-
-
- EndPartitionKey
-
- End partition key.
-
- String
-
- String
-
-
-
-
-
- EndRowKey
+ ClientTimeoutPerRequest
- End row key.
+ Client side timeout value for the request.
- String
+ Nullable`1[Int32]
- String
+ Nullable`1[Int32]
-
- Context
+
+ ConcurrentTaskCount
- Azure storage context
+
- AzureStorageContext
+ Nullable`1[Int32]
- AzureStorageContext
+ Nullable`1[Int32]
- Permission
+ ClientRequestId
- Permissions for a storage table.
+
- String
+ string
- String
+ string
@@ -7754,43 +8531,13 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Generate a table sas token with full permission --------------------------
-
-
-
- PS C:\> New-AzureStorageTableSASToken -Name test -Permission raud
-
-
-
-
-
-
-
-
-
-
- -------------------------- Generate a table sas token with partition key and row key. --------------------------
-
-
-
- PS C:\> New-AzureStorageTableSASToken -Name test -Permission raud -StartPartitionKey a -EndPartitionKey b
-
-
-
-
-
-
-
-
-
-
- -------------------------- Generate a table sas token with shared access policy --------------------------
+ -------------------------- Example 1 --------------------------
- PS C:\> New-AzureStorageTableSASToken -Name test -Policy policyName
+ PS C:\> New-AzureStorageShare -Name sample
-
+ This example creates a file share named sample.
@@ -7801,104 +8548,163 @@ $context | Get-AzureStorageBlob -Container abc
- http://msdn.microsoft.com/en-us/library/dn806400.aspx
+ Unkown
+
+
+
+ Remove-AzureStorageShare
+
+
+
+ Unkown
+
+
+
+ Get-AzureStorageShare
+
-
+
- New-AzureStorageTableStoredAccessPolicy
+ New-AzureStorageShareSASToken
- Create Stored Access Policy for azure storage table.
+ Generate Shared Access Signature token for azure storage share.
New
- AzureStorageTableStoredAccessPolicy
+ AzureStorageShareSASToken
-
- Create Stored Access Policy for azure storage table.
+ Generate Shared Access Signature token for azure storage share.
- New-AzureStorageTableStoredAccessPolicy
+ New-AzureStorageShareSASToken
- Table
+ ShareName
- Azure storage table name.
+ Azure storage share name.
String
-
+
Policy
- Azure Stored Access Policy.
-
- String
-
-
- Permission
-
- Permissions for a storage table.
+ Azure Stored Access Policy name.
String
StartTime
- The time at which the stored access policy becomes valid.
+ The time at which the shared access signature becomes valid.
Nullable`1[DateTime]
ExpiryTime
- The time at which the stored access policy becomes invalid.
+ The time at which the shared access signature becomes invalid.
Nullable`1[DateTime]
-
+
+ FullUri
+
+ Return the full share uri with sas token.
+
+ SwitchParameter
+
+
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
+
+ Profile
+
+
+
+ AzureProfile
+
-
-
-
- Table
-
- Azure storage table name.
-
- String
-
- String
-
-
-
-
-
- Policy
-
- Azure Stored Access Policy.
-
- String
-
- String
+
+ New-AzureStorageShareSASToken
+
+ ShareName
+
+ Azure storage share name.
+
+ String
+
+
+ Permission
+
+ Permissions in the SAS token to access the share and files under the share.
+
+ String
+
+
+ StartTime
+
+ The time at which the shared access signature becomes valid.
+
+ Nullable`1[DateTime]
+
+
+ ExpiryTime
+
+ The time at which the shared access signature becomes invalid.
+
+ Nullable`1[DateTime]
+
+
+ FullUri
+
+ Return the full share uri with sas token.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Profile
+
+
+
+ AzureProfile
+
+
+
+
+
+ ShareName
+
+ Azure storage share name.
+
+ String
+
+ String
-
- Permission
+
+ Policy
- Permissions for a storage table.
+ Azure Stored Access Policy name.
String
@@ -7910,7 +8716,7 @@ $context | Get-AzureStorageBlob -Container abc
StartTime
- The time at which the stored access policy becomes valid.
+ The time at which the shared access signature becomes valid.
Nullable`1[DateTime]
@@ -7922,7 +8728,7 @@ $context | Get-AzureStorageBlob -Container abc
ExpiryTime
- The time at which the stored access policy becomes invalid.
+ The time at which the shared access signature becomes invalid.
Nullable`1[DateTime]
@@ -7931,10 +8737,22 @@ $context | Get-AzureStorageBlob -Container abc
-
+
+ FullUri
+
+ Return the full share uri with sas token.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -7944,13 +8762,25 @@ $context | Get-AzureStorageBlob -Container abc
- PipelineVariable
+ Profile
-
+
- string
+ AzureProfile
- string
+ AzureProfile
+
+
+
+
+
+ Permission
+
+ Permissions in the SAS token to access the share and files under the share.
+
+ String
+
+ String
@@ -7960,316 +8790,198 @@ $context | Get-AzureStorageBlob -Container abc
-
-
-
-
+
+
-
+
+
+
+
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
-
+
- -------------------------- Create a stored access policy in table with full permission --------------------------
+ -------------------------- Generate a share sas token with full share permission. --------------------------
+ PS C:\>
+
+ PS C:\> New-AzureStorageShareSASToken -ShareName test -Permission rwdl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Generate multiple share sas token by pipeline --------------------------
+
+ PS C:\>
- PS C:\> New-AzureStorageTableStoredAccessPolicy -Table test -Policy testPolicy -Permission raud
+ PS C:\> Get-AzureStorageShare -Prefix test | New-AzureStorageShareSASToken -Permission rwdl
+
+
+
-
+
+
+
+
+
+
+
+ -------------------------- Generate share sas token with a shared access policy --------------------------
+
+ PS C:\>
+
+ PS C:\> New-AzureStorageShareSASToken -ShareName test -Policy policyName
+
+
+
+
+
+
+
+
+
+
+
-
- http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
-
-
-
+
- Remove-AzureStorageBlob
+ New-AzureStorageShareStoredAccessPolicy
- Remove the specified azure storage blob.
+ Create Stored Access Policy on an azure storage share.
- Remove
- AzureStorageBlob
+ New
+ AzureStorageShareStoredAccessPolicy
-
- Remove the specified azure storage blob.
+ Create Stored Access Policy on an azure storage share.
- Remove-AzureStorageBlob
-
- Blob
+ New-AzureStorageShareStoredAccessPolicy
+
+ ShareName
- Blob name.
+ Azure storage share name.
String
- Container
+ Policy
- Container name.
+ Azure Stored Access Policy name.
String
- DeleteSnapshot
-
- Only delete blob snapshots.
-
- SwitchParameter
-
-
- Force
-
- Force to remove the blob and its snapshot without confirmation.
-
- SwitchParameter
-
-
- PassThru
-
-
-
- SwitchParameter
-
-
- Context
-
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
-
- ServerTimeoutPerRequest
+ Permission
- Server side time out for each request.
+ Permissions in the Shared Access Policy to access the storage share or files under it.
- Nullable`1[Int32]
+ String
- ClientTimeoutPerRequest
+ StartTime
- Client side time out for each request.
+ The time at which the stored access policy becomes valid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
- ConcurrentTaskCount
-
-
-
- Nullable`1[Int32]
-
-
- WhatIf
-
-
-
- SwitchParameter
-
-
- Confirm
-
-
-
- SwitchParameter
-
-
-
- Remove-AzureStorageBlob
-
- ICloudBlob
-
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
-
- ICloudBlob
-
-
- DeleteSnapshot
-
- Only delete blob snapshots.
-
- SwitchParameter
-
-
- Force
-
- Force to remove the blob and its snapshot without confirmation.
-
- SwitchParameter
-
-
- PassThru
+ ExpiryTime
-
+ The time at which the stored access policy becomes invalid.
- SwitchParameter
+ Nullable`1[DateTime]
-
+
Context
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ 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
-
+
Nullable`1[Int32]
- WhatIf
+ Profile
-
+
- SwitchParameter
-
-
- Confirm
-
-
-
- SwitchParameter
-
-
-
- Remove-AzureStorageBlob
-
- CloudBlobContainer
-
- CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
-
- CloudBlobContainer
-
-
- Blob
-
- Blob name.
-
- String
-
-
- DeleteSnapshot
-
- Only delete blob snapshots.
-
- SwitchParameter
-
-
- Force
-
- Force to remove the blob and its snapshot without confirmation.
-
- SwitchParameter
-
-
- PassThru
-
-
-
- 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
-
-
-
- Nullable`1[Int32]
-
-
- WhatIf
-
-
-
- SwitchParameter
-
-
- Confirm
-
-
-
- SwitchParameter
+ AzureProfile
-
- Blob
+
+ ShareName
- Blob name.
+ Azure storage share name.
String
@@ -8279,9 +8991,9 @@ $context | Get-AzureStorageBlob -Container abc
- Container
+ Policy
- Container name.
+ Azure Stored Access Policy name.
String
@@ -8291,45 +9003,45 @@ $context | Get-AzureStorageBlob -Container abc
- DeleteSnapshot
+ Permission
- Only delete blob snapshots.
+ Permissions in the Shared Access Policy to access the storage share or files under it.
- SwitchParameter
+ String
- SwitchParameter
+ String
-
- Force
+
+ StartTime
- Force to remove the blob and its snapshot without confirmation.
+ The time at which the stored access policy becomes valid.
- SwitchParameter
+ Nullable`1[DateTime]
- SwitchParameter
+ Nullable`1[DateTime]
-
- PassThru
+
+ ExpiryTime
-
+ The time at which the stored access policy becomes invalid.
- SwitchParameter
+ Nullable`1[DateTime]
- SwitchParameter
+ Nullable`1[DateTime]
-
+
Context
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -8341,7 +9053,7 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side time out for each request.
+
Nullable`1[Int32]
@@ -8353,7 +9065,7 @@ $context | Get-AzureStorageBlob -Container abc
ClientTimeoutPerRequest
- Client side time out for each request.
+
Nullable`1[Int32]
@@ -8365,7 +9077,7 @@ $context | Get-AzureStorageBlob -Container abc
ConcurrentTaskCount
-
+
Nullable`1[Int32]
@@ -8375,49 +9087,159 @@ $context | Get-AzureStorageBlob -Container abc
- WhatIf
+ Profile
-
+
- SwitchParameter
+ AzureProfile
- SwitchParameter
+ AzureProfile
-
- Confirm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Create a Stored Access Policy in a share with full permission --------------------------
+
+ PS C:\>
+
+ PS C:\> New-AzureStorageShareStoredAccessPolicy -ShareName test -Policy testPolicy -Permission rwdl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New-AzureStorageTable
+
+ Create an azure storage table
+
+
+
+
+ New
+ AzureStorageTable
+
+
+
+
+ Create an azure storage table
+
+
+
+ New-AzureStorageTable
+
+ Name
+
+ Table name
+
+ String
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+
+
+ Name
+
+ Table name
- SwitchParameter
+ String
- SwitchParameter
+ String
-
- ICloudBlob
+
+ Context
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- ICloudBlob
+ AzureStorageContext
- ICloudBlob
+ AzureStorageContext
-
- CloudBlobContainer
+
+ ServerTimeoutPerRequest
- CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+ Server side time out for each request.
- CloudBlobContainer
+ int32
- CloudBlobContainer
+ int32
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ int32
+
+ int32
@@ -8469,11 +9291,11 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Remove azure storage blob by name --------------------------
+ -------------------------- Create an azure storage table --------------------------
- PS C:\> Remove-AzureStorageBlob -Container containername -Blob blobname
+ PS C:\> New-AzureStorageTable tableabc
@@ -8484,26 +9306,11 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Remove azure storage blob using pipeline from GetAzureStorageBlob --------------------------
+ -------------------------- Create multiple azure storage tables --------------------------
- PS C:\> Get-AzureStorageBlob -Container containername -Blob blobname | Remove-AzureStorageBlob
-
-
-
-
-
-
-
-
-
-
- -------------------------- Remove azure storage blob using pipeline from GetAzureStorageContainer --------------------------
-
-
-
- PS C:\> Get-AzureStorageContainer container* | Remove-AzureStorageBlob blobname
+ PS C:\> "table1 table2 table3".split() | New-AzureStorageTable
@@ -8515,103 +9322,171 @@ $context | Get-AzureStorageBlob -Container abc
-
- Get-AzureStorageBlob
-
-
-
- Get-AzureStorageBlobContent
-
-
-
- Set-AzureStorageBlobContent
-
-
- Remove-AzureStorageContainer
+ New-AzureStorageTableSASToken
- Remove the specified azure storage container.
+ Generate Shared Access Signature token for azure storage table.
- Remove
- AzureStorageContainer
+ New
+ AzureStorageTableSASToken
- Remove the specified azure storage container.
+ Generate Shared Access Signature token for azure storage table.
- Remove-AzureStorageContainer
+ New-AzureStorageTableSASToken
Name
-
+ Azure storage table name.
String
- Force
+ Policy
-
+ Azure Stored Access Policy.
- SwitchParameter
+ String
+
+
+ StartTime
+
+ The time at which the shared access signature becomes valid.
+
+ Nullable`1[DateTime]
+
+
+ ExpiryTime
+
+ The time at which the shared access signature becomes invalid.
+
+ Nullable`1[DateTime]
- PassThru
+ FullUri
-
+ Return the full queue uri with sas token
SwitchParameter
+
+ StartPartitionKey
+
+ Start partition key.
+
+ String
+
+
+ StartRowKey
+
+ Start row key.
+
+ String
+
+
+ EndPartitionKey
+
+ End partition key.
+
+ String
+
+
+ EndRowKey
+
+ End row key.
+
+ String
+
Context
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
-
- ServerTimeoutPerRequest
+
+
+ New-AzureStorageTableSASToken
+
+ Name
- Server side time out for each request.
+ Azure storage table name.
- Nullable`1[Int32]
+ String
+
+
+ Permission
+
+ Permissions for a storage table.
+
+ String
- ClientTimeoutPerRequest
+ StartTime
- Client side time out for each request.
+ The time at which the shared access signature becomes valid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
- ConcurrentTaskCount
+ ExpiryTime
-
+ The time at which the shared access signature becomes invalid.
- Nullable`1[Int32]
+ Nullable`1[DateTime]
- WhatIf
+ FullUri
-
+ Return the full queue uri with sas token
SwitchParameter
- Confirm
+ StartPartitionKey
-
+ Start partition key.
- SwitchParameter
+ String
+
+
+ StartRowKey
+
+ Start row key.
+
+ String
+
+
+ EndPartitionKey
+
+ End partition key.
+
+ String
+
+
+ EndRowKey
+
+ End row key.
+
+ String
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
@@ -8619,7 +9494,7 @@ $context | Get-AzureStorageBlob -Container abc
Name
-
+ Azure storage table name.
String
@@ -8629,21 +9504,45 @@ $context | Get-AzureStorageBlob -Container abc
- Force
+ Policy
-
+ Azure Stored Access Policy.
- SwitchParameter
+ String
- SwitchParameter
+ String
+
+
+
+
+
+ StartTime
+
+ The time at which the shared access signature becomes valid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ ExpiryTime
+
+ The time at which the shared access signature becomes invalid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
- PassThru
+ FullUri
-
+ Return the full queue uri with sas token
SwitchParameter
@@ -8652,74 +9551,74 @@ $context | Get-AzureStorageBlob -Container abc
-
- Context
+
+ StartPartitionKey
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Start partition key.
- AzureStorageContext
+ String
- AzureStorageContext
+ String
-
- ServerTimeoutPerRequest
+
+ StartRowKey
- Server side time out for each request.
+ Start row key.
- Nullable`1[Int32]
+ String
- Nullable`1[Int32]
+ String
-
- ClientTimeoutPerRequest
+
+ EndPartitionKey
- Client side time out for each request.
+ End partition key.
- Nullable`1[Int32]
+ String
- Nullable`1[Int32]
+ String
-
- ConcurrentTaskCount
+
+ EndRowKey
-
+ End row key.
- Nullable`1[Int32]
+ String
- Nullable`1[Int32]
+ String
-
- WhatIf
+
+ Context
-
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
- SwitchParameter
+ AzureStorageContext
- SwitchParameter
+ AzureStorageContext
- Confirm
+ Permission
-
+ Permissions for a storage table.
- SwitchParameter
+ String
- SwitchParameter
+ String
@@ -8770,39 +9669,87 @@ $context | Get-AzureStorageBlob -Container abc
-
+
+ -------------------------- Generate a table sas token with full permission --------------------------
+
+
+
+ PS C:\> New-AzureStorageTableSASToken -Name test -Permission raud
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Generate a table sas token with partition key and row key. --------------------------
+
+
+
+ PS C:\> New-AzureStorageTableSASToken -Name test -Permission raud -StartPartitionKey a -EndPartitionKey b
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Generate a table sas token with shared access policy --------------------------
+
+
+
+ PS C:\> New-AzureStorageTableSASToken -Name test -Policy policyName
+
+
+
+
+
+
+
+
+
+
+
+ http://msdn.microsoft.com/en-us/library/dn806400.aspx
+
- Remove-AzureStorageContainerStoredAccessPolicy
+ New-AzureStorageTableStoredAccessPolicy
- Remove Stored Access Policy from azure storage container.
+ Create Stored Access Policy for azure storage table.
- Remove
- AzureStorageContainerStoredAccessPolicy
+ New
+ AzureStorageTableStoredAccessPolicy
- Remove Stored Access Policy from azure storage container.
+ Create Stored Access Policy for azure storage table.
- Remove-AzureStorageContainerStoredAccessPolicy
-
- Container
+ New-AzureStorageTableStoredAccessPolicy
+
+ Table
- Azure storage container name.
+ Azure storage table name.
String
-
+
Policy
Azure Stored Access Policy.
@@ -8810,47 +9757,40 @@ $context | Get-AzureStorageBlob -Container abc
String
- Force
-
- Force to remove the policy without confirmation
-
- SwitchParameter
-
-
- PassThru
+ Permission
- Output a bool value in order to indicate whether the specified policy is remove successfully.
+ Permissions for a storage table.
- SwitchParameter
+ String
-
- Context
+
+ StartTime
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ The time at which the stored access policy becomes valid.
- AzureStorageContext
+ Nullable`1[DateTime]
-
- WhatIf
+
+ ExpiryTime
-
+ The time at which the stored access policy becomes invalid.
- SwitchParameter
+ Nullable`1[DateTime]
-
- Confirm
+
+ Context
-
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
- SwitchParameter
+ AzureStorageContext
-
- Container
+
+ Table
- Azure storage container name.
+ Azure storage table name.
String
@@ -8859,7 +9799,7 @@ $context | Get-AzureStorageBlob -Container abc
-
+
Policy
Azure Stored Access Policy.
@@ -8871,62 +9811,50 @@ $context | Get-AzureStorageBlob -Container abc
-
- Force
-
- Force to remove the policy without confirmation
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- PassThru
+
+ Permission
- Output a bool value in order to indicate whether the specified policy is remove successfully.
+ Permissions for a storage table.
- SwitchParameter
+ String
- SwitchParameter
+ String
-
- Context
+
+ StartTime
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ The time at which the stored access policy becomes valid.
- AzureStorageContext
+ Nullable`1[DateTime]
- AzureStorageContext
+ Nullable`1[DateTime]
-
- WhatIf
+
+ ExpiryTime
-
+ The time at which the stored access policy becomes invalid.
- SwitchParameter
+ Nullable`1[DateTime]
- SwitchParameter
+ Nullable`1[DateTime]
-
- Confirm
+
+ Context
-
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
- SwitchParameter
+ AzureStorageContext
- SwitchParameter
+ AzureStorageContext
@@ -8978,11 +9906,11 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Remove a stored access policy from container --------------------------
+ -------------------------- Create a stored access policy in table with full permission --------------------------
- PS C:\> Remove-AzureStorageContainerStoredAccessPolicy -Container test -Policy testPolicy
+ PS C:\> New-AzureStorageTableStoredAccessPolicy -Table test -Policy testPolicy -Permission raud
@@ -9003,38 +9931,52 @@ $context | Get-AzureStorageBlob -Container abc
- Remove-AzureStorageDirectory
+ Remove-AzureStorageBlob
- Remove an azure storage file directory.
+ Remove the specified azure storage blob.
Remove
- AzureStorageDirectory
+ AzureStorageBlob
- Remove an azure storage file directory.
+ Remove the specified azure storage blob.
- Remove-AzureStorageDirectory
+ Remove-AzureStorageBlob
- ShareName
+ Blob
- The file share name
+ Blob name.
String
- Path
+ Container
- The path of the file directory to be removed
+ Container name.
String
+
+ DeleteSnapshot
+
+ Only delete blob snapshots.
+
+ SwitchParameter
+
+
+ Force
+
+ Force to remove the blob and its snapshot without confirmation.
+
+ SwitchParameter
+
PassThru
@@ -9042,7 +9984,7 @@ $context | Get-AzureStorageBlob -Container abc
SwitchParameter
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -9052,14 +9994,14 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side timeout value for the request
+ Server side time out for each request.
Nullable`1[Int32]
ClientTimeoutPerRequest
- Client side timeout value for the request
+ Client side time out for each request.
Nullable`1[Int32]
@@ -9073,33 +10015,40 @@ $context | Get-AzureStorageBlob -Container abc
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
-
- Share
+ Remove-AzureStorageBlob
+
+ ICloudBlob
- The file share object
+ ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- CloudFileShare
+ ICloudBlob
-
- Path
+
+ DeleteSnapshot
- The path of the file directory to be removed
+ Only delete blob snapshots.
- String
+ SwitchParameter
+
+
+ Force
+
+ Force to remove the blob and its snapshot without confirmation.
+
+ SwitchParameter
PassThru
@@ -9108,17 +10057,24 @@ $context | Get-AzureStorageBlob -Container abc
SwitchParameter
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
ServerTimeoutPerRequest
- Server side timeout value for the request
+ Server side time out for each request.
Nullable`1[Int32]
ClientTimeoutPerRequest
- Client side timeout value for the request
+ Client side time out for each request.
Nullable`1[Int32]
@@ -9132,79 +10088,48 @@ $context | Get-AzureStorageBlob -Container abc
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
+ Remove-AzureStorageBlob
+
+ CloudBlobContainer
- The directory object to be removed
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
- CloudFileDirectory
+ CloudBlobContainer
-
- Path
+
+ Blob
- The path of the file directory to be removed
+ Blob name.
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]
-
-
- WhatIf
+ DeleteSnapshot
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Only delete blob snapshots.
SwitchParameter
- Confirm
+ Force
- Prompts you for confirmation before running the cmdlet.
+ Force to remove the blob and its snapshot without confirmation.
SwitchParameter
-
-
- Remove-AzureStorageDirectory
PassThru
@@ -9212,7 +10137,7 @@ $context | Get-AzureStorageBlob -Container abc
SwitchParameter
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -9222,14 +10147,14 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side timeout value for the request
+ Server side time out for each request.
Nullable`1[Int32]
ClientTimeoutPerRequest
- Client side timeout value for the request
+ Client side time out for each request.
Nullable`1[Int32]
@@ -9242,67 +10167,15 @@ $context | Get-AzureStorageBlob -Container abc
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
-
- 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]
-
-
- 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
@@ -9310,9 +10183,9 @@ $context | Get-AzureStorageBlob -Container abc
- ShareName
+ Blob
- The file share name
+ Blob name.
String
@@ -9322,9 +10195,9 @@ $context | Get-AzureStorageBlob -Container abc
- Path
+ Container
- The path of the file directory to be removed
+ Container name.
String
@@ -9333,6 +10206,30 @@ $context | Get-AzureStorageBlob -Container abc
+
+ DeleteSnapshot
+
+ Only delete blob snapshots.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Force
+
+ Force to remove the blob and its snapshot without confirmation.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
PassThru
@@ -9345,7 +10242,7 @@ $context | Get-AzureStorageBlob -Container abc
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -9360,7 +10257,7 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side timeout value for the request
+ Server side time out for each request.
Nullable`1[Int32]
@@ -9372,7 +10269,7 @@ $context | Get-AzureStorageBlob -Container abc
ClientTimeoutPerRequest
- Client side timeout value for the request
+ Client side time out for each request.
Nullable`1[Int32]
@@ -9396,7 +10293,7 @@ $context | Get-AzureStorageBlob -Container abc
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
SwitchParameter
@@ -9408,7 +10305,7 @@ $context | Get-AzureStorageBlob -Container abc
Confirm
- Prompts you for confirmation before running the cmdlet.
+
SwitchParameter
@@ -9417,38 +10314,26 @@ $context | Get-AzureStorageBlob -Container abc
-
- Share
-
- The file share object
-
- CloudFileShare
-
- CloudFileShare
-
-
-
-
-
- Directory
+
+ ICloudBlob
- The directory object to be removed
+ ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- CloudFileDirectory
+ ICloudBlob
- CloudFileDirectory
+ ICloudBlob
-
- ClientRequestId
+
+ CloudBlobContainer
-
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
- string
+ CloudBlobContainer
- string
+ CloudBlobContainer
@@ -9500,13 +10385,13 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Example 1 --------------------------
+ -------------------------- Remove azure storage blob by name --------------------------
- PS C:\> Get-AzureStorageShare -Name sample | Remove-AzureStorageDirectory -Path sampledir
+ PS C:\> Remove-AzureStorageBlob -Container containername -Blob blobname
- This example removes a file directory named sampledir under the sample file share.
+
@@ -9515,13 +10400,28 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Example 2 --------------------------
+ -------------------------- Remove azure storage blob using pipeline from GetAzureStorageBlob --------------------------
- PS C:\> Remove-AzureStorageDirectory -ShareName sample -Path sampledir
+ PS C:\> Get-AzureStorageBlob -Container containername -Blob blobname | Remove-AzureStorageBlob
- This example removes a file directory named sampledir under the sample file share.
+
+
+
+
+
+
+
+
+
+ -------------------------- Remove azure storage blob using pipeline from GetAzureStorageContainer --------------------------
+
+
+
+ PS C:\> Get-AzureStorageContainer container* | Remove-AzureStorageBlob blobname
+
+
@@ -9532,11 +10432,15 @@ $context | Get-AzureStorageBlob -Container abc
- Get-AzureStorageFile
+ Get-AzureStorageBlob
- New-AzureStorageDirectory
+ Get-AzureStorageBlobContent
+
+
+
+ Set-AzureStorageBlobContent
@@ -9544,37 +10448,37 @@ $context | Get-AzureStorageBlob -Container abc
- Remove-AzureStorageFile
+ Remove-AzureStorageContainer
- Remove the specified file
+ Remove the specified azure storage container.
Remove
- AzureStorageFile
+ AzureStorageContainer
- Remove the specified file
+ Remove the specified azure storage container.
- Remove-AzureStorageFile
-
- ShareName
+ Remove-AzureStorageContainer
+
+ Name
- The file share name
+
String
-
- Path
+
+ Force
- The path of the file to be removed
+
- String
+ SwitchParameter
PassThru
@@ -9583,7 +10487,7 @@ $context | Get-AzureStorageBlob -Container abc
SwitchParameter
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -9593,14 +10497,14 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side timeout value for the request.
+ Server side time out for each request.
Nullable`1[Int32]
ClientTimeoutPerRequest
- Client side timeout value for the request.
+ Client side time out for each request.
Nullable`1[Int32]
@@ -9614,298 +10518,255 @@ $context | Get-AzureStorageBlob -Container abc
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
-
- Share
-
- The file share object
-
- CloudFileShare
-
-
- Path
-
- The path of the file to be removed
-
- String
-
-
- PassThru
+
+
+
+ Name
+
+
+
+ String
+
+ String
+
+
+
+
+
+ Force
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ PassThru
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
- SwitchParameter
-
-
- ServerTimeoutPerRequest
+
+
+
+
+
+
+
+
+
- Server side timeout value for the request.
+
- Nullable`1[Int32]
-
-
- ClientTimeoutPerRequest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-AzureStorageContainerStoredAccessPolicy
+
+ Remove Stored Access Policy from azure storage container.
+
+
+
+
+ Remove
+ AzureStorageContainerStoredAccessPolicy
+
+
+
+
+ Remove Stored Access Policy from azure storage container.
+
+
+
+ Remove-AzureStorageContainerStoredAccessPolicy
+
+ Container
- Client side timeout value for the request.
+ Azure storage container name.
- Nullable`1[Int32]
+ String
-
- ConcurrentTaskCount
+
+ Policy
-
+ Azure Stored Access Policy.
- Nullable`1[Int32]
+ String
-
- WhatIf
+
+ Force
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ Force to remove the policy without confirmation
SwitchParameter
- Confirm
+ PassThru
- Prompts you for confirmation before running the cmdlet.
+ Output a bool value in order to indicate whether the specified policy is remove successfully.
SwitchParameter
-
-
- Remove-AzureStorageFile
-
- Directory
-
-
-
- CloudFileDirectory
-
-
- Path
+
+ Context
- The path of the file to be removed
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- String
+ AzureStorageContext
- PassThru
+ WhatIf
SwitchParameter
-
- ServerTimeoutPerRequest
+
+ Confirm
- 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]
-
-
- 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
-
- File
-
- The file object to remove
-
- CloudFile
-
-
- 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]
-
-
- 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]
-
-
- 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]
-
-
- 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
+ SwitchParameter
-
- ShareName
+
+ Container
- The file share name
+ Azure storage container name.
String
@@ -9914,10 +10775,10 @@ $context | Get-AzureStorageBlob -Container abc
-
- Path
+
+ Policy
- The path of the file to be removed
+ Azure Stored Access Policy.
String
@@ -9927,9 +10788,9 @@ $context | Get-AzureStorageBlob -Container abc
- PassThru
+ Force
-
+ Force to remove the policy without confirmation
SwitchParameter
@@ -9938,50 +10799,26 @@ $context | Get-AzureStorageBlob -Container abc
-
- Context
-
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
- AzureStorageContext
-
-
-
-
-
- ServerTimeoutPerRequest
-
- Server side timeout value for the request.
-
- Nullable`1[Int32]
-
- Nullable`1[Int32]
-
-
-
-
-
- ClientTimeoutPerRequest
+
+ PassThru
- Client side timeout value for the request.
+ Output a bool value in order to indicate whether the specified policy is remove successfully.
- Nullable`1[Int32]
+ SwitchParameter
- Nullable`1[Int32]
+ SwitchParameter
-
- ConcurrentTaskCount
+
+ Context
-
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- Nullable`1[Int32]
+ AzureStorageContext
- Nullable`1[Int32]
+ AzureStorageContext
@@ -9989,7 +10826,7 @@ $context | Get-AzureStorageBlob -Container abc
WhatIf
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
SwitchParameter
@@ -10001,7 +10838,7 @@ $context | Get-AzureStorageBlob -Container abc
Confirm
- Prompts you for confirmation before running the cmdlet.
+
SwitchParameter
@@ -10010,62 +10847,14 @@ $context | Get-AzureStorageBlob -Container abc
-
- Share
+
+ PipelineVariable
- The file share object
+
- CloudFileShare
+ string
- CloudFileShare
-
-
-
-
-
- Directory
-
-
-
- CloudFileDirectory
-
- CloudFileDirectory
-
-
-
-
-
- File
-
- The file object to remove
-
- CloudFile
-
- CloudFile
-
-
-
-
-
- ClientRequestId
-
-
-
- string
-
- string
-
-
-
-
-
- PipelineVariable
-
-
-
- string
-
- string
+ string
@@ -10105,13 +10894,13 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Example 1 --------------------------
+ -------------------------- Remove a stored access policy from container --------------------------
- PS C:\> Remove-AzureStorageFile –ShareName sample –FilePath samplefile
+ PS C:\> Remove-AzureStorageContainerStoredAccessPolicy -Container test -Policy testPolicy
- This example removes the samplefile file from the sample file share.
+
@@ -10122,52 +10911,37 @@ $context | Get-AzureStorageBlob -Container abc
- Get-AzureStorageFile
+ http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
-
+
- Remove-AzureStorageQueue
+ Remove-AzureStorageCORSRule
- Remove the specified azure storage queue
+ Clear the CORS rules for a specific type of storage service (blob, table or queue).
Remove
- AzureStorageQueue
+ AzureStorageCORSRule
-
- Remove the specified azure storage queue
+ Clear azure storage service CORS rules. This cmdlet will delete all CORS rules in the specific azure storage service.
- Remove-AzureStorageQueue
-
- Name
-
- Queue name
-
- String
-
-
- Force
-
- Force to remove the queue without confirmation
-
- SwitchParameter
-
-
- PassThru
+ Remove-AzureStorageCORSRule
+
+ ServiceType
- Output a bool value in order to indicate whether the specified queue is remove successfully.
+ Azure storage service type, such as Blob, Table, Queue.
- SwitchParameter
+ StorageServiceType
Context
@@ -10176,55 +10950,31 @@ $context | Get-AzureStorageBlob -Container abc
AzureStorageContext
-
- WhatIf
+
+ ServerTimeoutPerRequest
-
+
- SwitchParameter
+ Nullable`1[Int32]
-
- Confirm
+
+ ClientTimeoutPerRequest
-
+
- SwitchParameter
+ Nullable`1[Int32]
-
- Name
-
- Queue name
-
- String
-
- String
-
-
-
-
-
- Force
-
- Force to remove the queue without confirmation
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- PassThru
+
+ ServiceType
- Output a bool value in order to indicate whether the specified queue is remove successfully.
+ Azure storage service type, such as Blob, Table, Queue.
- SwitchParameter
+ StorageServiceType
- SwitchParameter
+ StorageServiceType
@@ -10241,62 +10991,50 @@ $context | Get-AzureStorageBlob -Container abc
-
- WhatIf
-
-
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- Confirm
+
+ ServerTimeoutPerRequest
-
+
- SwitchParameter
+ Nullable`1[Int32]
- SwitchParameter
+ Nullable`1[Int32]
-
- ServerTimeoutPerRequest
+
+ ClientTimeoutPerRequest
- Server side time out for each request.
+
- int32
+ Nullable`1[Int32]
- int32
+ Nullable`1[Int32]
-
- ClientTimeoutPerRequest
+
+ ConcurrentTaskCount
- Client side time out for each request.
+
- int32
+ Nullable`1[Int32]
- int32
+ Nullable`1[Int32]
- PipelineVariable
+ Profile
-
+
- string
+ AzureProfile
- string
+ AzureProfile
@@ -10306,62 +11044,52 @@ $context | Get-AzureStorageBlob -Container abc
-
-
-
-
+
+
-
+
+
+
-
-
-
-
+
+
-
-
-
+
+
+
+
+
-
+
- -------------------------- Remove azure storage queue by queue name --------------------------
-
-
-
- PS C:\> Remove-AzureStorageQueue queueabc
-
-
-
-
-
-
-
-
-
-
- -------------------------- Remove azure storage queue using GetAzureStorageQueue --------------------------
+ -------------------------- Clear CORS rules of blob service. --------------------------
-
+ PS C:\>
- PS C:\> Get-AzureStorageQueue queue* | Remove-AzureStorageQueue
+ Remove-AzureStorageCORSRule -ServiceType Blob
+
+
+
-
+
+
+
@@ -10372,536 +11100,131 @@ $context | Get-AzureStorageBlob -Container abc
- Remove-AzureStorageQueueStoredAccessPolicy
+ Remove-AzureStorageDirectory
- Remove Stored Access Policy from azure storage queue.
+ Remove an azure storage file directory.
Remove
- AzureStorageQueueStoredAccessPolicy
+ AzureStorageDirectory
- Remove Stored Access Policy from azure storage queue.
+ Remove an azure storage file directory.
- Remove-AzureStorageQueueStoredAccessPolicy
-
- Queue
+ Remove-AzureStorageDirectory
+
+ ShareName
- Azure storage queue name.
+ The file share name
String
-
- Policy
+
+ Path
- Azure Stored Access Policy.
+ The path of the file directory to be removed
String
-
- Force
-
- Force to remove the policy without confirmation
-
- SwitchParameter
-
PassThru
- Output a bool value in order to indicate whether the specified policy is remove successfully.
+
SwitchParameter
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
-
- WhatIf
+
+ ServerTimeoutPerRequest
-
+ Server side timeout value for the request
- SwitchParameter
+ Nullable`1[Int32]
-
- Confirm
+
+ ClientTimeoutPerRequest
-
+ Client side timeout value for the request
- SwitchParameter
+ Nullable`1[Int32]
-
-
-
-
- Queue
-
- Azure storage queue name.
-
- String
-
- String
-
-
-
-
-
- Policy
-
- Azure Stored Access Policy.
-
- String
-
- String
-
-
-
-
-
- Force
-
- Force to remove the policy without confirmation
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- PassThru
-
- Output a bool value in order to indicate whether the specified policy is remove successfully.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- Context
-
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
- AzureStorageContext
-
-
-
-
-
- WhatIf
-
-
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- Confirm
-
-
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- PipelineVariable
-
-
-
- string
-
- string
-
-
-
-
-
-
-
-
-
-
+
+ ConcurrentTaskCount
-
-
-
-
-
-
-
-
-
+ Nullable`1[Int32]
+
+
+ WhatIf
-
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- Remove a stored access policy from queue --------------------------
-
-
-
- PS C:\> Remove-AzureStorageQueueStoredAccessPolicy -Queue test -Policy testPolicy
-
-
-
-
-
-
-
-
-
-
-
-
- http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
-
-
-
-
-
-
-
- Set-AzureStorageQueueStoredAccessPolicy
-
- Set Stored Access Policy for azure storage queue.
-
-
-
-
- Set
- AzureStorageQueueStoredAccessPolicy
-
-
-
-
- Set Stored Access Policy for azure storage queue.
-
-
+ SwitchParameter
+
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+ SwitchParameter
+
+
- Set-AzureStorageQueueStoredAccessPolicy
-
- Queue
+ Remove-AzureStorageDirectory
+
+ Share
- Azure storage queue name.
+ The file share object
- String
+ CloudFileShare
- Policy
+ Path
- Azure Stored Access Policy.
+ The path of the file directory to be removed
String
-
- Permission
+
+ PassThru
- Permissions for a storage queue.
+
- String
+ SwitchParameter
- StartTime
+ ServerTimeoutPerRequest
- The time at which the stored access policy becomes valid.
+ Server side timeout value for the request
- Nullable`1[DateTime]
+ Nullable`1[Int32]
- ExpiryTime
+ ClientTimeoutPerRequest
- The time at which the stored access policy becomes invalid.
+ Client side timeout value for the request
- Nullable`1[DateTime]
+ Nullable`1[Int32]
-
- NoStartTime
-
- Set the StartTime to be Null.
-
- SwitchParameter
-
-
- NoExpiryTime
-
- Set the ExpiryTime to be Null.
-
- SwitchParameter
-
-
- Context
+
+ ConcurrentTaskCount
- Azure storage context
+
- AzureStorageContext
-
-
-
-
-
- Queue
-
- Azure storage queue name.
-
- String
-
- String
-
-
-
-
-
- Policy
-
- Azure Stored Access Policy.
-
- String
-
- String
-
-
-
-
-
- Permission
-
- Permissions for a storage queue.
-
- String
-
- String
-
-
-
-
-
- StartTime
-
- The time at which the stored access policy becomes valid.
-
- Nullable`1[DateTime]
-
- Nullable`1[DateTime]
-
-
-
-
-
- ExpiryTime
-
- The time at which the stored access policy becomes invalid.
-
- Nullable`1[DateTime]
-
- Nullable`1[DateTime]
-
-
-
-
-
- NoStartTime
-
- Set the StartTime to be Null.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- NoExpiryTime
-
- Set the ExpiryTime to be Null.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- Context
-
- Azure storage context
-
- AzureStorageContext
-
- AzureStorageContext
-
-
-
-
-
- PipelineVariable
-
-
-
- string
-
- string
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- Set a stored access policy in queue with full permission --------------------------
-
-
-
- PS C:\> Set-AzureStorageQueueStoredAccessPolicy -Queue test -Policy testPolicy -Permission arup
-
-
-
-
-
-
-
-
-
-
-
-
- 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]
+ Nullable`1[Int32]
WhatIf
@@ -10919,13 +11242,20 @@ $context | Get-AzureStorageBlob -Container abc
- Remove-AzureStorageShare
+ Remove-AzureStorageDirectory
- Share
+ Directory
- The file share object
+ The directory object to be removed
- CloudFileShare
+ CloudFileDirectory
+
+
+ Path
+
+ The path of the file directory to be removed
+
+ String
PassThru
@@ -10937,14 +11267,14 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side timeout value for the request.
+ Server side timeout value for the request
Nullable`1[Int32]
ClientTimeoutPerRequest
- Client side timeout value for the request.
+ Client side timeout value for the request
Nullable`1[Int32]
@@ -10971,7 +11301,7 @@ $context | Get-AzureStorageBlob -Container abc
- Remove-AzureStorageShare
+ Remove-AzureStorageDirectory
PassThru
@@ -10989,14 +11319,14 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side timeout value for the request.
+ Server side timeout value for the request
Nullable`1[Int32]
ClientTimeoutPerRequest
- Client side timeout value for the request.
+ Client side timeout value for the request
Nullable`1[Int32]
@@ -11023,7 +11353,7 @@ $context | Get-AzureStorageBlob -Container abc
- Remove-AzureStorageShare
+ Remove-AzureStorageDirectory
PassThru
@@ -11041,14 +11371,14 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side timeout value for the request.
+ Server side timeout value for the request
Nullable`1[Int32]
ClientTimeoutPerRequest
- Client side timeout value for the request.
+ Client side timeout value for the request
Nullable`1[Int32]
@@ -11077,7 +11407,7 @@ $context | Get-AzureStorageBlob -Container abc
- Name
+ ShareName
The file share name
@@ -11088,10 +11418,22 @@ $context | Get-AzureStorageBlob -Container abc
-
- PassThru
+
+ Path
-
+ The path of the file directory to be removed
+
+ String
+
+ String
+
+
+
+
+
+ PassThru
+
+
SwitchParameter
@@ -11115,7 +11457,7 @@ $context | Get-AzureStorageBlob -Container abc
ServerTimeoutPerRequest
- Server side timeout value for the request.
+ Server side timeout value for the request
Nullable`1[Int32]
@@ -11127,7 +11469,7 @@ $context | Get-AzureStorageBlob -Container abc
ClientTimeoutPerRequest
- Client side timeout value for the request.
+ Client side timeout value for the request
Nullable`1[Int32]
@@ -11184,6 +11526,18 @@ $context | Get-AzureStorageBlob -Container abc
+
+ Directory
+
+ The directory object to be removed
+
+ CloudFileDirectory
+
+ CloudFileDirectory
+
+
+
+
ClientRequestId
@@ -11247,9 +11601,24 @@ $context | Get-AzureStorageBlob -Container abc
- PS C:\> Remove-AzureStorageShare -Name sample
+ PS C:\> Get-AzureStorageShare -Name sample | Remove-AzureStorageDirectory -Path sampledir
- This example removes a file share named sample.
+ This example removes a file directory named sampledir under the sample file share.
+
+
+
+
+
+
+
+
+ -------------------------- Example 2 --------------------------
+
+
+
+ PS C:\> Remove-AzureStorageDirectory -ShareName sample -Path sampledir
+
+ This example removes a file directory named sampledir under the sample file share.
@@ -11260,11 +11629,11 @@ $context | Get-AzureStorageBlob -Container abc
- New-AzureStorageShare
+ Get-AzureStorageFile
- Get-AzureStorageShare
+ New-AzureStorageDirectory
@@ -11272,350 +11641,384 @@ $context | Get-AzureStorageBlob -Container abc
- Remove-AzureStorageTable
+ Remove-AzureStorageFile
- Remove azure storage table
+ Remove the specified file
Remove
- AzureStorageTable
+ AzureStorageFile
- Remove azure storage table
+ Remove the specified file
- Remove-AzureStorageTable
-
- Name
+ Remove-AzureStorageFile
+
+ ShareName
- The name of the table to be removed.
+ The file share name
String
-
- Force
+
+ Path
- Force to remove the table without confirmation
+ The path of the file to be removed
- SwitchParameter
+ String
PassThru
- Output a bool value in order to indicate whether the specified table is remove successfully.
+
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]
+
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
-
-
-
- Name
-
- The name of the table to be removed.
-
- String
-
- String
-
-
-
-
-
- Force
-
- Force to remove the table without confirmation
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- PassThru
-
- Output a bool value in order to indicate whether the specified table is remove successfully.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- Context
-
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
- AzureStorageContext
-
-
-
-
-
- WhatIf
-
-
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- Confirm
-
-
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- ServerTimeoutPerRequest
-
- Server side time out for each request.
-
- int32
-
- int32
-
-
-
-
-
- ClientTimeoutPerRequest
-
- Client side time out for each request.
-
- int32
-
- int32
-
-
-
-
-
- PipelineVariable
-
-
-
- string
-
- string
-
-
-
-
-
-
-
-
-
-
+
+ Remove-AzureStorageFile
+
+ Share
-
+ The file share object
-
-
-
-
-
-
-
-
-
+ CloudFileShare
+
+
+ Path
+
+ The path of the file to be removed
+
+ String
+
+
+ PassThru
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- Remove azure storage table by table name --------------------------
-
-
-
- PS C:\> Remove-AzureStorageTable tableabc
-
-
-
-
-
-
-
-
-
-
- -------------------------- Remove azure storage tables using GetAzureStorageTable --------------------------
-
-
-
- PS C:\> Get-AzureStorageTable table* | Remove-AzureStorageTable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Remove-AzureStorageTableStoredAccessPolicy
-
- Remove Stored Access Policy from azure storage table.
-
-
-
-
- Remove
- AzureStorageTableStoredAccessPolicy
-
-
-
-
- Remove Stored Access Policy from azure storage table.
-
-
+ 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]
+
+
+ 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-AzureStorageTableStoredAccessPolicy
-
- Table
+ Remove-AzureStorageFile
+
+ Directory
- Azure storage table name.
+
- String
+ CloudFileDirectory
-
- Policy
+
+ Path
- Azure Stored Access Policy.
+ The path of the file to be removed
String
-
- Force
+
+ PassThru
- Force to remove the policy without confirmation
+
+
+ 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]
+
+
+ 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
+
+ File
+
+ The file object to remove
+
+ CloudFile
+
PassThru
- Output a bool value in order to indicate whether the specified policy is remove successfully.
+
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]
+
+
+ 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]
+
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
-
-
-
- Table
-
- Azure storage table name.
-
- String
-
- String
-
-
-
-
-
- Policy
-
- Azure Stored Access Policy.
-
- String
-
+
+ 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]
+
+
+ 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
+
+
+
+
+
+ ShareName
+
+ The file share name
+
+ String
+
String
-
- Force
+
+ Path
- Force to remove the policy without confirmation
+ The path of the file to be removed
- SwitchParameter
+ String
- SwitchParameter
+ String
@@ -11623,7 +12026,7 @@ $context | Get-AzureStorageBlob -Container abc
PassThru
- Output a bool value in order to indicate whether the specified policy is remove successfully.
+
SwitchParameter
@@ -11632,7 +12035,7 @@ $context | Get-AzureStorageBlob -Container abc
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -11644,10 +12047,46 @@ $context | Get-AzureStorageBlob -Container abc
+
+ ServerTimeoutPerRequest
+
+ Server side timeout value for the request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side timeout value for the request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
WhatIf
-
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
SwitchParameter
@@ -11659,7 +12098,7 @@ $context | Get-AzureStorageBlob -Container abc
Confirm
-
+ Prompts you for confirmation before running the cmdlet.
SwitchParameter
@@ -11668,6 +12107,54 @@ $context | Get-AzureStorageBlob -Container abc
+
+ Share
+
+ The file share object
+
+ CloudFileShare
+
+ CloudFileShare
+
+
+
+
+
+ Directory
+
+
+
+ CloudFileDirectory
+
+ CloudFileDirectory
+
+
+
+
+
+ File
+
+ The file object to remove
+
+ CloudFile
+
+ CloudFile
+
+
+
+
+
+ ClientRequestId
+
+
+
+ string
+
+ string
+
+
+
+
PipelineVariable
@@ -11715,13 +12202,13 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Remove a stored access policy from table --------------------------
+ -------------------------- Example 1 --------------------------
- PS C:\> Remove-AzureStorageTableStoredAccessPolicy -Table test -Policy testPolicy
+ PS C:\> Remove-AzureStorageFile –ShareName sample –FilePath samplefile
-
+ This example removes the samplefile file from the sample file share.
@@ -11732,7 +12219,7 @@ $context | Get-AzureStorageBlob -Container abc
- http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
+ Get-AzureStorageFile
@@ -11740,70 +12227,42 @@ $context | Get-AzureStorageBlob -Container abc
- Set-AzureStorageBlobContent
+ Remove-AzureStorageQueue
- Upload local file to azure storage blob.
+ Remove the specified azure storage queue
- Set
- AzureStorageBlobContent
+ Remove
+ AzureStorageQueue
- Upload local file to azure storage blob.
+ Remove the specified azure storage queue
- Set-AzureStorageBlobContent
-
- File
-
- Local file path.
-
- String
-
-
- Container
-
- Container name
-
- String
-
-
- Blob
-
- Blob name.
-
- String
-
-
- BlobType
+ Remove-AzureStorageQueue
+
+ Name
- Destination Blob Type (Block/Page).
+ Queue name
String
- Properties
-
- Blob properties.
-
- Hashtable
-
-
- Metadata
+ Force
- Blob metadata.
+ Force to remove the queue without confirmation
- Hashtable
+ SwitchParameter
- Force
+ PassThru
- Force to overwrite the existing blob.
+ Output a bool value in order to indicate whether the specified queue is remove successfully.
SwitchParameter
@@ -11814,199 +12273,27 @@ $context | Get-AzureStorageBlob -Container abc
AzureStorageContext
-
- ServerTimeoutPerRequest
-
- Server side time out for each request.
-
- Nullable`1[Int32]
-
-
- ClientTimeoutPerRequest
+
+ WhatIf
- Client side time out for each request.
+
- Nullable`1[Int32]
+ SwitchParameter
-
- ConcurrentTaskCount
+
+ Confirm
- The total amount of concurrent async tasks.
+
- Nullable`1[Int32]
-
-
-
- Set-AzureStorageBlobContent
-
- File
-
- Local file path.
-
- String
-
-
- Blob
-
- Blob name.
-
- String
-
-
- CloudBlobContainer
-
- CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
-
- CloudBlobContainer
-
-
- BlobType
-
- Destination Blob Type (Block/Page).
-
- String
-
-
- Properties
-
- Blob properties.
-
- Hashtable
-
-
- Metadata
-
- Blob metadata.
-
- Hashtable
-
-
- Force
-
- Force to overwrite the existing blob.
-
- 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]
-
-
-
- Set-AzureStorageBlobContent
-
- File
-
- Local file path.
-
- String
-
-
- ICloudBlob
-
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
-
- ICloudBlob
-
-
- BlobType
-
- Destination Blob Type (Block/Page).
-
- String
-
-
- Properties
-
- Blob properties.
-
- Hashtable
-
-
- Metadata
-
- Blob metadata.
-
- Hashtable
-
-
- Force
-
- Force to overwrite the existing blob.
-
- 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]
+ SwitchParameter
-
- File
-
- Local file path.
-
- String
-
- String
-
-
-
-
-
- Container
+
+ Name
- Container name
+ Queue name
String
@@ -12016,57 +12303,57 @@ $context | Get-AzureStorageBlob -Container abc
- Blob
+ Force
- Blob name.
+ Force to remove the queue without confirmation
- String
+ SwitchParameter
- String
+ SwitchParameter
- BlobType
+ PassThru
- Destination Blob Type (Block/Page).
+ Output a bool value in order to indicate whether the specified queue is remove successfully.
- String
+ SwitchParameter
- String
+ SwitchParameter
-
- Properties
+
+ Context
- Blob properties.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- Hashtable
+ AzureStorageContext
- Hashtable
+ AzureStorageContext
- Metadata
+ WhatIf
- Blob metadata.
+
- Hashtable
+ SwitchParameter
- Hashtable
+ SwitchParameter
- Force
+ Confirm
- Force to overwrite the existing blob.
+
SwitchParameter
@@ -12075,95 +12362,47 @@ $context | Get-AzureStorageBlob -Container abc
-
- Context
-
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
- AzureStorageContext
-
-
-
-
-
+
ServerTimeoutPerRequest
Server side time out for each request.
- Nullable`1[Int32]
+ int32
- Nullable`1[Int32]
+ int32
-
+
ClientTimeoutPerRequest
Client side time out for each request.
- Nullable`1[Int32]
+ int32
- Nullable`1[Int32]
+ int32
-
- ConcurrentTaskCount
-
- The total amount of concurrent async tasks.
-
- Nullable`1[Int32]
-
- Nullable`1[Int32]
-
-
- ProcessorCount * 8
-
-
- CloudBlobContainer
+
+ PipelineVariable
- CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+
- CloudBlobContainer
+ string
- CloudBlobContainer
+ string
-
- ICloudBlob
-
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
-
- ICloudBlob
+
+
+
- ICloudBlob
-
-
-
-
-
- PipelineVariable
-
-
-
- string
-
- string
-
-
-
-
-
-
-
-
-
+
@@ -12194,56 +12433,11 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Upload file by name. --------------------------
-
-
-
- PS C:\> Set-AzureStorageBlobContent -Container upload -File .\filename -Blob blobname
-
-
-
-
-
-
-
-
-
-
- -------------------------- Upload file using ls command. --------------------------
-
-
-
- PS C:\> ls -File -Recurse | Set-AzureStorageBlobContent -Container upload
-
-
-
-
-
-
-
-
-
-
- -------------------------- Upload file using pipeline from GetAzureStorageBlob --------------------------
-
-
-
- PS C:\> Get-AzureStorageBlob -Container containername -Blob blobname | Set-AzureStorageBlobContent -File filename
-
-
-
-
-
-
-
-
-
-
- -------------------------- Upload file using pipeline from GetAzureStorageContainer --------------------------
+ -------------------------- Remove azure storage queue by queue name --------------------------
- PS C:\> Get-AzureStorageContainer -Container container* | Set-AzureStorageBlobContent -File filename -Blob blobname
+ PS C:\> Remove-AzureStorageQueue queueabc
@@ -12254,12 +12448,11 @@ $context | Get-AzureStorageBlob -Container abc
- -------------------------- Upload file and set metadata --------------------------
+ -------------------------- Remove azure storage queue using GetAzureStorageQueue --------------------------
- PS C:\> $meta = @{"key" = "value"; "name" = "test"}
-Set-AzureStorageBlobContent -File filename -Container containername -Metadata $meta
+ PS C:\> Get-AzureStorageQueue queue* | Remove-AzureStorageQueue
@@ -12271,59 +12464,54 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- Get-AzureStorageBlobContent
-
-
-
- Get-AzureStorageBlob
-
-
-
- Remove-AzureStorageBlob
-
-
- Set-AzureStorageContainerAcl
+ Remove-AzureStorageQueueStoredAccessPolicy
- Set the public access permission to the specified azure storage container.
+ Remove Stored Access Policy from azure storage queue.
- Set
- AzureStorageContainerAcl
+ Remove
+ AzureStorageQueueStoredAccessPolicy
- Set the public access permission to the specified azure storage container.
+ Remove Stored Access Policy from azure storage queue.
- Set-AzureStorageContainerAcl
-
- Name
+ Remove-AzureStorageQueueStoredAccessPolicy
+
+ Queue
- Container name.
+ Azure storage queue name.
String
-
- Permission
+
+ Policy
- Container public access permission (Off/Blob/Container).
+ Azure Stored Access Policy.
- BlobContainerPublicAccessType
+ String
+
+
+ Force
+
+ Force to remove the policy without confirmation
+
+ SwitchParameter
PassThru
- Output the sepcified container.
+ Output a bool value in order to indicate whether the specified policy is remove successfully.
SwitchParameter
@@ -12334,34 +12522,27 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
AzureStorageContext
-
- ServerTimeoutPerRequest
-
- Server side time out for each request.
-
- Nullable`1[Int32]
-
-
- ClientTimeoutPerRequest
+
+ WhatIf
- Client side time out for each request.
+
- Nullable`1[Int32]
+ SwitchParameter
-
- ConcurrentTaskCount
+
+ Confirm
- Nullable`1[Int32]
+ SwitchParameter
-
- Name
+
+ Queue
- Container name.
+ Azure storage queue name.
String
@@ -12370,22 +12551,22 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- Permission
+
+ Policy
- Container public access permission (Off/Blob/Container).
+ Azure Stored Access Policy.
- BlobContainerPublicAccessType
+ String
- BlobContainerPublicAccessType
+ String
- PassThru
+ Force
- Output the sepcified container.
+ Force to remove the policy without confirmation
SwitchParameter
@@ -12394,50 +12575,50 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- Context
+
+ PassThru
- Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Output a bool value in order to indicate whether the specified policy is remove successfully.
- AzureStorageContext
+ SwitchParameter
- AzureStorageContext
+ SwitchParameter
-
- ServerTimeoutPerRequest
+
+ Context
- Server side time out for each request.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- Nullable`1[Int32]
+ AzureStorageContext
- Nullable`1[Int32]
+ AzureStorageContext
-
- ClientTimeoutPerRequest
+
+ WhatIf
- Client side time out for each request.
+
- Nullable`1[Int32]
+ SwitchParameter
- Nullable`1[Int32]
+ SwitchParameter
-
- ConcurrentTaskCount
+
+ Confirm
- Nullable`1[Int32]
+ SwitchParameter
- Nullable`1[Int32]
+ SwitchParameter
@@ -12489,26 +12670,11 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- -------------------------- Set azure storage container acl by name. --------------------------
-
-
-
- PS C:\> Set-AzureStorageContainerAcl -Container container1 -Permission off -PassThru
-
-
-
-
-
-
-
-
-
-
- -------------------------- Set azure storage container acl using pipeline by GetAzureStorageContainer --------------------------
+ -------------------------- Remove a stored access policy from queue --------------------------
- PS C:\> Get-AzureStorageContainer container* | Set-AzureStorageContainerAcl -Permission blob -PassThru
+ PS C:\> Remove-AzureStorageQueueStoredAccessPolicy -Queue test -Policy testPolicy
@@ -12521,19 +12687,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- Get-AzureStorageContainerAcl
-
-
-
- Get-AzureStorageContainer
-
-
-
- New-AzureStorageContainer
-
-
-
- Remove-AzureStorageContainer
+ http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
@@ -12541,28 +12695,28 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- Set-AzureStorageContainerStoredAccessPolicy
+ Set-AzureStorageQueueStoredAccessPolicy
- Set Stored Access Policy for azure storage container.
+ Set Stored Access Policy for azure storage queue.
Set
- AzureStorageContainerStoredAccessPolicy
+ AzureStorageQueueStoredAccessPolicy
- Set Stored Access Policy for azure storage container.
+ Set Stored Access Policy for azure storage queue.
- Set-AzureStorageContainerStoredAccessPolicy
+ Set-AzureStorageQueueStoredAccessPolicy
- Container
+ Queue
- Azure storage container name.
+ Azure storage queue name.
String
@@ -12576,7 +12730,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
Permission
- Permissions for a storage container.
+ Permissions for a storage queue.
String
@@ -12611,7 +12765,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -12619,9 +12773,9 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- Container
+ Queue
- Azure storage container name.
+ Azure storage queue name.
String
@@ -12645,7 +12799,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
Permission
- Permissions for a storage container.
+ Permissions for a storage queue.
String
@@ -12705,7 +12859,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
Context
- Azure storage context
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -12761,11 +12915,11 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- -------------------------- Set a stored access policy in container with full permission --------------------------
+ -------------------------- Set a stored access policy in queue with full permission --------------------------
- PS C:\> Set-AzureStorageContainerStoredAccessPolicy -Container test -Policy testPolicy -Permission audq
+ PS C:\> Set-AzureStorageQueueStoredAccessPolicy -Queue test -Policy testPolicy -Permission arup
@@ -12786,45 +12940,31 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- Set-AzureStorageFileContent
+ Remove-AzureStorageShare
- Upload the specified file to azure.
+ Remove an azure storage file share.
- Set
- AzureStorageFileContent
+ Remove
+ AzureStorageShare
- Upload the specified file to azure.
+ Remove an azure storage file share.
- Set-AzureStorageFileContent
+ Remove-AzureStorageShare
- ShareName
+ Name
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
@@ -12832,13 +12972,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
SwitchParameter
-
- Force
-
- If this parameter is set, it will overwrite the azure storage file when there is name conflict.
-
- SwitchParameter
-
Context
@@ -12870,20 +13003,20 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
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
- Set-AzureStorageFileContent
+ Remove-AzureStorageShare
Share
@@ -12891,93 +13024,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
CloudFileShare
-
- 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
-
-
- 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]
-
-
- WhatIf
-
-
-
- SwitchParameter
-
-
- Confirm
-
-
-
- SwitchParameter
-
-
-
- Set-AzureStorageFileContent
-
- Directory
-
- The destination directory object to upload the file
-
- CloudFileDirectory
-
-
- Source
-
- The source path of the file to upload
-
- String
-
-
- Path
-
- The destination file path to upload the local file
-
- String
-
PassThru
@@ -12985,13 +13031,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
SwitchParameter
-
- Force
-
- If this parameter is set, it will overwrite the azure storage file when there is name conflict.
-
- SwitchParameter
-
ServerTimeoutPerRequest
@@ -13016,34 +13055,20 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
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
- Set-AzureStorageFileContent
-
- Source
-
- The source path of the file to upload
-
- String
-
-
- Path
-
- The destination file path to upload the local file
-
- String
-
+ Remove-AzureStorageShare
PassThru
@@ -13051,13 +13076,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
SwitchParameter
-
- Force
-
- If this parameter is set, it will overwrite the azure storage file when there is name conflict.
-
- SwitchParameter
-
Context
@@ -13089,34 +13107,20 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
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
- Set-AzureStorageFileContent
-
- Source
-
- The source path of the file to upload
-
- String
-
-
- Path
-
- The destination file path to upload the local file
-
- String
-
+ Remove-AzureStorageShare
PassThru
@@ -13124,13 +13128,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
SwitchParameter
-
- Force
-
- If this parameter is set, it will overwrite the azure storage file when there is name conflict.
-
- SwitchParameter
-
Context
@@ -13162,14 +13159,14 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
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
@@ -13177,7 +13174,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- ShareName
+ Name
The file share name
@@ -13188,30 +13185,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- Source
-
- The source path of the file to upload
-
- String
-
- String
-
-
-
-
-
- Path
-
- The destination file path to upload the local file
-
- String
-
- String
-
-
-
-
PassThru
@@ -13224,18 +13197,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- Force
-
- If this parameter is set, it will overwrite the azure storage file when there is name conflict.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
Context
@@ -13287,7 +13248,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
WhatIf
-
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
SwitchParameter
@@ -13299,7 +13260,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
Confirm
-
+ Prompts you for confirmation before running the cmdlet.
SwitchParameter
@@ -13320,18 +13281,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- Directory
-
- The destination directory object to upload the file
-
- CloudFileDirectory
-
- CloudFileDirectory
-
-
-
-
ClientRequestId
@@ -13395,9 +13344,9 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- PS C:\> Set-AzureStorageFileContent –ShareName sample –Source samplefile –FilePath sampledir/samplefile
+ PS C:\> Remove-AzureStorageShare -Name sample
- This example uploads the samplefile file to the path sampledir/samplefile in the sample file share.
+ This example removes a file share named sample.
@@ -13408,598 +13357,6106 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- Remove-AzureStorageFileDirectory
+ New-AzureStorageShare
- New-AzureStorageFileDirectory
-
-
-
- Get-AzureStorageFileContent
-
-
-
- Set-AzureStorageFileContent
+ Get-AzureStorageShare
-
+
- Set-AzureStorageServiceLoggingProperty
+ Remove-AzureStorageShareStoredAccessPolicy
- Set azure storage service logging properties。
+ Remove a Stored Access Policy from an azure storage share.
- Set
- AzureStorageServiceLoggingProperty
+ Remove
+ AzureStorageShareStoredAccessPolicy
-
- Set azure storage service logging properties。
+ Remove a Stored Access Policy from an azure storage share.
- Set-AzureStorageServiceLoggingProperty
-
- ServiceType
+ Remove-AzureStorageShareStoredAccessPolicy
+
+ ShareName
+
+ Azure storage share name.
+
+ String
+
+
+ Policy
+
+ Name of the Azure storage Shared Access Policy to delete.
+
+ String
+
+
+ Force
+
+ Force to remove the policy without confirmation
+
+ SwitchParameter
+
+
+ PassThru
+
+ Output a bool value in order to indicate whether the specified policy is removed successfully.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+
+
+ ShareName
+
+ Azure storage share name.
+
+ String
+
+ String
+
+
+
+
+
+ Policy
+
+ Name of the Azure storage Shared Access Policy to delete.
+
+ String
+
+ String
+
+
+
+
+
+ Force
+
+ Force to remove the policy without confirmation
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ PassThru
+
+ Output a bool value in order to indicate whether the specified policy is removed successfully.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ Profile
+
+
+
+ AzureProfile
+
+ AzureProfile
+
+
+
+
+
+ CloudBlob
+
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+
+ CloudBlob
+
+ CloudBlob
+
+
+
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Remove a stored access policy from an azure storage share --------------------------
+
+ PS C:\>
+
+ PS C:\> Remove-AzureStorageShareStoredAccessPolicy -ShareName test -Policy testPolicy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-AzureStorageTable
+
+ Remove azure storage table
+
+
+
+
+ Remove
+ AzureStorageTable
+
+
+
+
+ Remove azure storage table
+
+
+
+ Remove-AzureStorageTable
+
+ Name
+
+ The name of the table to be removed.
+
+ String
+
+
+ Force
+
+ Force to remove the table without confirmation
+
+ SwitchParameter
+
+
+ PassThru
+
+ Output a bool value in order to indicate whether the specified table is remove successfully.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+
+
+ Name
+
+ The name of the table to be removed.
+
+ String
+
+ String
+
+
+
+
+
+ Force
+
+ Force to remove the table without confirmation
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ PassThru
+
+ Output a bool value in order to indicate whether the specified table is remove successfully.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ int32
+
+ int32
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ int32
+
+ int32
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Remove azure storage table by table name --------------------------
+
+
+
+ PS C:\> Remove-AzureStorageTable tableabc
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Remove azure storage tables using GetAzureStorageTable --------------------------
+
+
+
+ PS C:\> Get-AzureStorageTable table* | Remove-AzureStorageTable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-AzureStorageTableStoredAccessPolicy
+
+ Remove Stored Access Policy from azure storage table.
+
+
+
+
+ Remove
+ AzureStorageTableStoredAccessPolicy
+
+
+
+
+ Remove Stored Access Policy from azure storage table.
+
+
+
+ Remove-AzureStorageTableStoredAccessPolicy
+
+ Table
+
+ Azure storage table name.
+
+ String
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+
+ Force
+
+ Force to remove the policy without confirmation
+
+ SwitchParameter
+
+
+ PassThru
+
+ Output a bool value in order to indicate whether the specified policy is remove successfully.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+
+
+ Table
+
+ Azure storage table name.
+
+ String
+
+ String
+
+
+
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+ String
+
+
+
+
+
+ Force
+
+ Force to remove the policy without confirmation
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ PassThru
+
+ Output a bool value in order to indicate whether the specified policy is remove successfully.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Remove a stored access policy from table --------------------------
+
+
+
+ PS C:\> Remove-AzureStorageTableStoredAccessPolicy -Table test -Policy testPolicy
+
+
+
+
+
+
+
+
+
+
+
+
+ http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
+
+
+
+
+
+
+
+ Set-AzureStorageBlobContent
+
+ Upload local file to azure storage blob.
+
+
+
+
+ Set
+ AzureStorageBlobContent
+
+
+
+
+ Upload local file to azure storage blob.
+
+
+
+ Set-AzureStorageBlobContent
+
+ File
+
+ Local file path.
+
+ String
+
+
+ Container
+
+ Container name
+
+ String
+
+
+ Blob
+
+ Blob name.
+
+ String
+
+
+ BlobType
+
+ Destination Blob Type (Block/Page/Append).
+
+ String
+
+
+ Properties
+
+ Blob properties.
+
+ Hashtable
+
+
+ Metadata
+
+ Blob metadata.
+
+ Hashtable
+
+
+ Force
+
+ Force to overwrite the existing blob.
+
+ 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]
+
+
+
+ Set-AzureStorageBlobContent
+
+ File
+
+ Local file path.
+
+ String
+
+
+ Blob
+
+ Blob name.
+
+ String
+
+
+ CloudBlobContainer
+
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+
+ CloudBlobContainer
+
+
+ BlobType
+
+ Destination Blob Type (Block/Page/Append).
+
+ String
+
+
+ Properties
+
+ Blob properties.
+
+ Hashtable
+
+
+ Metadata
+
+ Blob metadata.
+
+ Hashtable
+
+
+ Force
+
+ Force to overwrite the existing blob.
+
+ 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]
+
+
+
+ Set-AzureStorageBlobContent
+
+ File
+
+ Local file path.
+
+ String
+
+
+ ICloudBlob
+
+ ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+
+ ICloudBlob
+
+
+ BlobType
+
+ Destination Blob Type (Block/Page/Append).
+
+ String
+
+
+ Properties
+
+ Blob properties.
+
+ Hashtable
+
+
+ Metadata
+
+ Blob metadata.
+
+ Hashtable
+
+
+ Force
+
+ Force to overwrite the existing blob.
+
+ 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]
+
+
+
+
+
+ File
+
+ Local file path.
+
+ String
+
+ String
+
+
+
+
+
+ Container
+
+ Container name
+
+ String
+
+ String
+
+
+
+
+
+ Blob
+
+ Blob name.
+
+ String
+
+ String
+
+
+
+
+
+ BlobType
+
+ Destination Blob Type (Block/Page/Append).
+
+ String
+
+ String
+
+
+
+
+
+ Properties
+
+ Blob properties.
+
+ Hashtable
+
+ Hashtable
+
+
+
+
+
+ Metadata
+
+ Blob metadata.
+
+ Hashtable
+
+ Hashtable
+
+
+
+
+
+ Force
+
+ Force to overwrite the existing blob.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+ The total amount of concurrent async tasks.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+ ProcessorCount * 8
+
+
+ CloudBlobContainer
+
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+
+ CloudBlobContainer
+
+ CloudBlobContainer
+
+
+
+
+
+ ICloudBlob
+
+ ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+
+ ICloudBlob
+
+ ICloudBlob
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Upload file by name. --------------------------
+
+
+
+ PS C:\> Set-AzureStorageBlobContent -Container upload -File .\filename -Blob blobname
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Upload file using ls command. --------------------------
+
+
+
+ PS C:\> ls -File -Recurse | Set-AzureStorageBlobContent -Container upload
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Upload file using pipeline from GetAzureStorageBlob --------------------------
+
+
+
+ PS C:\> Get-AzureStorageBlob -Container containername -Blob blobname | Set-AzureStorageBlobContent -File filename
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Upload file using pipeline from GetAzureStorageContainer --------------------------
+
+
+
+ PS C:\> Get-AzureStorageContainer -Container container* | Set-AzureStorageBlobContent -File filename -Blob blobname
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Upload file and set metadata --------------------------
+
+
+
+ PS C:\> $meta = @{"key" = "value"; "name" = "test"}
+Set-AzureStorageBlobContent -File filename -Container containername -Metadata $meta
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-AzureStorageBlobContent
+
+
+
+ Get-AzureStorageBlob
+
+
+
+ Remove-AzureStorageBlob
+
+
+
+
+
+
+
+ Set-AzureStorageContainerAcl
+
+ Set the public access permission to the specified azure storage container.
+
+
+
+
+ Set
+ AzureStorageContainerAcl
+
+
+
+
+ Set the public access permission to the specified azure storage container.
+
+
+
+ Set-AzureStorageContainerAcl
+
+ Name
+
+ Container name.
+
+ String
+
+
+ Permission
+
+ Container public access permission (Off/Blob/Container).
+
+ BlobContainerPublicAccessType
+
+
+ PassThru
+
+ Output the sepcified container.
+
+ 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
+
+
+
+ Nullable`1[Int32]
+
+
+
+
+
+ Name
+
+ Container name.
+
+ String
+
+ String
+
+
+
+
+
+ Permission
+
+ Container public access permission (Off/Blob/Container).
+
+ BlobContainerPublicAccessType
+
+ BlobContainerPublicAccessType
+
+
+
+
+
+ PassThru
+
+ Output the sepcified container.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Set azure storage container acl by name. --------------------------
+
+
+
+ PS C:\> Set-AzureStorageContainerAcl -Container container1 -Permission off -PassThru
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Set azure storage container acl using pipeline by GetAzureStorageContainer --------------------------
+
+
+
+ PS C:\> Get-AzureStorageContainer container* | Set-AzureStorageContainerAcl -Permission blob -PassThru
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-AzureStorageContainerAcl
+
+
+
+ Get-AzureStorageContainer
+
+
+
+ New-AzureStorageContainer
+
+
+
+ Remove-AzureStorageContainer
+
+
+
+
+
+
+
+ Set-AzureStorageContainerStoredAccessPolicy
+
+ Set Stored Access Policy for azure storage container.
+
+
+
+
+ Set
+ AzureStorageContainerStoredAccessPolicy
+
+
+
+
+ Set Stored Access Policy for azure storage container.
+
+
+
+ Set-AzureStorageContainerStoredAccessPolicy
+
+ Container
+
+ Azure storage container name.
+
+ String
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+
+ Permission
+
+ Permissions for a storage container.
+
+ String
+
+
+ StartTime
+
+ The time at which the stored access policy becomes valid.
+
+ Nullable`1[DateTime]
+
+
+ ExpiryTime
+
+ The time at which the stored access policy becomes invalid.
+
+ Nullable`1[DateTime]
+
+
+ NoStartTime
+
+ Set the StartTime to be Null.
+
+ SwitchParameter
+
+
+ NoExpiryTime
+
+ Set the ExpiryTime to be Null.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+
+
+ Container
+
+ Azure storage container name.
+
+ String
+
+ String
+
+
+
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+ String
+
+
+
+
+
+ Permission
+
+ Permissions for a storage container.
+
+ String
+
+ String
+
+
+
+
+
+ StartTime
+
+ The time at which the stored access policy becomes valid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ ExpiryTime
+
+ The time at which the stored access policy becomes invalid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ NoStartTime
+
+ Set the StartTime to be Null.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ NoExpiryTime
+
+ Set the ExpiryTime to be Null.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Set a stored access policy in container with full permission --------------------------
+
+
+
+ PS C:\> Set-AzureStorageContainerStoredAccessPolicy -Container test -Policy testPolicy -Permission rwdl
+
+
+
+
+
+
+
+
+
+
+
+
+ http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
+
+
+
+
+
+
+
+ Set-AzureStorageCORSRule
+
+ Set azure storage service CORS rules.
+
+
+
+
+ Set
+ AzureStorageCORSRule
+
+
+
+ This cmdlet will set the CORS rules for a specified type of storage service (blob, table, queue). Note that it will overwrite the existing rules with the input CORS rules array. It is recommended to get the existing rules first before you set if you just want to add one rule as shown in example.
+
+
+
+ Set-AzureStorageCORSRule
+
+ ServiceType
+
+ Azure storage service type, such as Blob, Table, Queue.
+
+ StorageServiceType
+
+
+ CorsRules
+
+ An array of PSCORSRule instances each to represent a CORS rule. You can retrieve the existing rules using Get-AzureStorageCORSRule
+
+ PSCorsRule[]
+
+
+ PassThru
+
+
+
+ SwitchParameter
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ServiceType
+
+ Azure storage service type, such as Blob, Table, Queue.
+
+ StorageServiceType
+
+ StorageServiceType
+
+
+
+
+
+ CorsRules
+
+ An array of PSCORSRule instances each to represent a CORS rule.
+
+ PSCorsRule[]
+
+ PSCorsRule[]
+
+
+
+
+
+ PassThru
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Set two CORS rules to blob service. --------------------------
+
+ PS C:\>
+
+ PS C:\> $CorsRules = (@{
+ AllowedHeaders=@("x-ms-blob-content-type","x-ms-blob-content-disposition");
+ AllowedOrigins=@("*");
+ MaxAgeInSeconds=30;
+ AllowedMethods=@("Get","Connect")},
+ @{
+ AllowedOrigins=@("http://www.fabrikam.com","http://www.contoso.com");
+ ExposedHeaders=@("x-ms-meta-data*","x-ms-meta-customheader");
+ AllowedHeaders=@("x-ms-meta-target*","x-ms-meta-customheader");
+ MaxAgeInSeconds=30;
+ AllowedMethods=@("Put")})
+PS C:\> Set-AzureStorageCORSRule -ServiceType Blob -CorsRules $CorsRules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Change a CORS rule's properties of blob service. --------------------------
+
+ PS C:\>
+
+ PS C:\> $corsRules = Get-AzureStorageCORSRule -ServiceType Blob
+PS C:\> $corsRules[0].AllowedHeaders = @("x-ms-blob-content-type", "x-ms-blob-content-disposition")
+PS C:\> $corsRules[0].AllowedMethods = @("Get", "Connect", "Merge")
+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]
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Set-AzureStorageFileContent
+
+ Share
+
+ The file share object
+
+ CloudFileShare
+
+
+ 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
+
+
+ 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]
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Set-AzureStorageFileContent
+
+ Directory
+
+ The destination directory object to upload the file
+
+ CloudFileDirectory
+
+
+ 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
+
+
+ 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]
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ 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]
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ 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]
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+
+
+ ShareName
+
+ The file share name
+
+ String
+
+ String
+
+
+
+
+
+ Source
+
+ The source path of the file to upload
+
+ String
+
+ String
+
+
+
+
+
+ Path
+
+ The destination file path to upload the local file
+
+ String
+
+ String
+
+
+
+
+
+ PassThru
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Force
+
+ If this parameter is set, it will overwrite the azure storage file when there is name conflict.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+ Server side timeout value for the request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side timeout value for the request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Share
+
+ The file share object
+
+ CloudFileShare
+
+ CloudFileShare
+
+
+
+
+
+ Directory
+
+ The destination directory object to upload the file
+
+ CloudFileDirectory
+
+ CloudFileDirectory
+
+
+
+
+
+ ClientRequestId
+
+
+
+ string
+
+ string
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Example 1 --------------------------
+
+
+
+ PS C:\> Set-AzureStorageFileContent –ShareName sample –Source samplefile –FilePath sampledir/samplefile
+
+ This example uploads the samplefile file to the path sampledir/samplefile in the sample file share.
+
+
+
+
+
+
+
+
+
+
+ Remove-AzureStorageFileDirectory
+
+
+
+ New-AzureStorageFileDirectory
+
+
+
+ Get-AzureStorageFileContent
+
+
+
+ Set-AzureStorageFileContent
+
+
+
+
+
+
+
+ Set-AzureStorageServiceLoggingProperty
+
+ Set azure storage service logging properties。
+
+
+
+
+ Set
+ AzureStorageServiceLoggingProperty
+
+
+
+
+ Set azure storage service logging properties。
+
+
+
+ Set-AzureStorageServiceLoggingProperty
+
+ ServiceType
+
+ Azure storage service type.
+
+ StorageServiceType
+
+
+ Version
+
+ Azure storage service logging version.
+
+ Nullable`1[Double]
+
+
+ RetentionDays
+
+ Azure storage logging retention days.
+
+ Nullable`1[Int32]
+
+
+ LoggingOperations
+
+ Azure storage service logging operations.
+
+ LoggingOperations[]
+
+
+ PassThru
+
+ Ouput the updated azure storage service logging properties.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+
+
+ ServiceType
+
+ Azure storage service type.
+
+ StorageServiceType
+
+ StorageServiceType
+
+
+
+
+
+ Version
+
+ Azure storage service logging version.
+
+ Nullable`1[Double]
+
+ Nullable`1[Double]
+
+
+
+
+
+ RetentionDays
+
+ Azure storage logging retention days.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ LoggingOperations
+
+ Azure storage service logging operations.
+
+ LoggingOperations[]
+
+ LoggingOperations[]
+
+
+
+
+
+ PassThru
+
+ Ouput the updated azure storage service logging properties.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ int32
+
+ int32
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ int32
+
+ int32
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Set logging properties for azure storage blob service. --------------------------
+
+
+
+ PS C:\> Set-AzureStorageServiceLoggingProperty -ServiceType Blob -LoggingOperations Read,Write -RetentionDays 10 -Version 1.0 -PassThru
+
+
+
+
+
+
+
+
+
+
+
+
+ http://msdn.microsoft.com/en-us/library/dn806397.aspx
+
+
+
+
+
+
+ Set-AzureStorageServiceMetricsProperty
+
+ Set azure storage service metrics properties.
+
+
+
+
+ Set
+ AzureStorageServiceMetricsProperty
+
+
+
+
+ Set azure storage service metrics properties.
+
+
+
+ Set-AzureStorageServiceMetricsProperty
+
+ ServiceType
+
+ Azure storage service type.
+
+ StorageServiceType
+
+
+ MetricsType
+
+ Azure Storage service metrics type.
+
+ ServiceMetricsType
+
+
+ Version
+
+ Azure storage service metrics version.
+
+ Nullable`1[Double]
+
+
+ RetentionDays
+
+ Azure storage service metrics retention days.
+
+ Nullable`1[Int32]
+
+
+ MetricsLevel
+
+ Azure storage service metrics level.
+
+ Nullable`1[MetricsLevel]
+
+
+ PassThru
+
+ Output the updated azure storage service metrics properties.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+
+
+ ServiceType
+
+ Azure storage service type.
+
+ StorageServiceType
+
+ StorageServiceType
+
+
+
+
+
+ MetricsType
+
+ Azure Storage service metrics type.
+
+ ServiceMetricsType
+
+ ServiceMetricsType
+
+
+
+
+
+ Version
+
+ Azure storage service metrics version.
+
+ Nullable`1[Double]
+
+ Nullable`1[Double]
+
+
+
+
+
+ RetentionDays
+
+ Azure storage service metrics retention days.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ MetricsLevel
+
+ Azure storage service metrics level.
+
+ Nullable`1[MetricsLevel]
+
+ Nullable`1[MetricsLevel]
+
+
+
+
+
+ PassThru
+
+ Output the updated azure storage service metrics properties.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ int32
+
+ int32
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ int32
+
+ int32
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Set metrics properties for azure storage blob service. --------------------------
+
+
+
+ PS C:\> Set-AzureStorageServiceMetricsProperty -ServiceType Blob -MetricsType Hour -MetricsLevel Service -RetentionDays 10 -Version 1.0 -PassThru
+
+
+
+
+
+
+
+
+
+
+
+
+ http://msdn.microsoft.com/en-us/library/dn806391.aspx
+
+
+
+
+
+
+ Set-AzureStorageShareQuota
+
+ Set capacity quota for a specific share.
+
+
+
+
+ Set
+ AzureStorageShareQuota
+
+
+
+ Set capacity quota for a specific share.
+
+
+
+ Set-AzureStorageShareQuota
+
+ ShareName
+
+ Name of the share whose quota to be set.
+
+ String
+
+
+ Quota
+
+ Quota value in GB.
+
+ Int32
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+
+
+ AzureProfile
+
+
+
+ Set-AzureStorageShareQuota
+
+ Share
+
+ Instance of CloudFileShare to represent a share whose quota to be set. You can retrieve a share using Get-AzureStorageShare cmdlet.
+
+ CloudFileShare
+
+
+ Quota
+
+ Quota value in GB.
+
+ Int32
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+
+
+ AzureProfile
+
+
+
+
+
+ ShareName
+
+ Name of the share whose quota to be set.
+
+ String
+
+ String
+
+
+
+
+
+ Quota
+
+ Quota value in GB.
+
+ Int32
+
+ Int32
+
+
+
+
+
+ Context
+
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ Profile
+
+
+
+ AzureProfile
+
+ AzureProfile
+
+
+
+
+
+ Share
+
+ Instance of CloudFileShare to represent a share whose quota to be set. You can retrieve a share using Get-AzureStorageShare cmdlet.
+
+ CloudFileShare
+
+ CloudFileShare
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Set quota of a share --------------------------
+
+ PS C:\>
+
+ PS C:\> Set-AzureStorageShareQuota -ShareName "myshare" -Quota 1024
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set-AzureStorageShareStoredAccessPolicy
+
+ Update a Stored Access Policy for an azure storage share.
+
+
+
+
+ Set
+ AzureStorageShareStoredAccessPolicy
+
+
+
+ Update a Stored Access Policy for an azure storage share.
+
+
+
+ Set-AzureStorageShareStoredAccessPolicy
+
+ ShareName
+
+ Azure storage share name.
+
+ String
+
+
+ Policy
+
+ Name of Azure storage Stored Access Policy to be set.
+
+ String
+
+
+ Permission
+
+ New permissions in the Stored Access Policy to access the share or files under it.
+
+ String
+
+
+ StartTime
+
+ The time at which the stored access policy becomes valid.
+
+ Nullable`1[DateTime]
+
+
+ ExpiryTime
+
+ The time at which the stored access policy becomes invalid.
+
+ Nullable`1[DateTime]
+
+
+ NoStartTime
+
+ Clear the StartTime property in the Stored Access Policy.
+
+ SwitchParameter
+
+
+ NoExpiryTime
+
+ Clear the ExpiryTime property in the Stored Access Policy.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+
+ Profile
+
+
+
+ AzureProfile
+
+
+
+
+
+ ShareName
+
+ Azure storage share name.
+
+ String
+
+ String
+
+
+
+
+
+ Policy
+
+ Name of Azure storage Stored Access Policy to be set.
+
+ String
+
+ String
+
+
+
+
+
+ Permission
+
+ New permissions in the Stored Access Policy to access the share or files under it.
+
+ String
+
+ String
+
+
+
+
+
+ StartTime
+
+ The time at which the stored access policy becomes valid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ ExpiryTime
+
+ The time at which the stored access policy becomes invalid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ NoStartTime
+
+ Clear the StartTime property in the Stored Access Policy.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ NoExpiryTime
+
+ Clear the ExpiryTime property in the Stored Access Policy.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ Profile
+
+
+
+ AzureProfile
+
+ AzureProfile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Update a stored access policy in an azure storage share with full permission --------------------------
+
+ PS C:\>
+
+ PS C:\> Set-AzureStorageShareStoredAccessPolicy -ShareName test -Policy testPolicy -Permission rwdl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set-AzureStorageTableStoredAccessPolicy
+
+ Set Stored Access Policy for azure storage table.
+
+
+
+
+ Set
+ AzureStorageTableStoredAccessPolicy
+
+
+
+
+ Set Stored Access Policy for azure storage table.
+
+
+
+ Set-AzureStorageTableStoredAccessPolicy
+
+ Table
+
+ Azure storage table name.
+
+ String
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+
+ Permission
+
+ Permissions for a storage table.
+
+ String
+
+
+ StartTime
+
+ The time at which the stored access policy becomes valid.
+
+ Nullable`1[DateTime]
+
+
+ ExpiryTime
+
+ The time at which the stored access policy becomes invalid.
+
+ Nullable`1[DateTime]
+
+
+ NoStartTime
+
+ Set the StartTime to be Null.
+
+ SwitchParameter
+
+
+ NoExpiryTime
+
+ Set the ExpiryTime to be Null.
+
+ SwitchParameter
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+
+
+
+ Table
+
+ Azure storage table name.
+
+ String
+
+ String
+
+
+
+
+
+ Policy
+
+ Azure Stored Access Policy.
+
+ String
+
+ String
+
+
+
+
+
+ Permission
+
+ Permissions for a storage table.
+
+ String
+
+ String
+
+
+
+
+
+ StartTime
+
+ The time at which the stored access policy becomes valid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ ExpiryTime
+
+ The time at which the stored access policy becomes invalid.
+
+ Nullable`1[DateTime]
+
+ Nullable`1[DateTime]
+
+
+
+
+
+ NoStartTime
+
+ Set the StartTime to be Null.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ NoExpiryTime
+
+ Set the ExpiryTime to be Null.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Context
+
+ Azure storage context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Set a stored access policy in table with full permission --------------------------
+
+
+
+ PS C:\> Set-AzureStorageTableStoredAccessPolicy -Table test -Policy testPolicy -Permission raud
+
+
+
+
+
+
+
+
+
+
+
+
+ http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
+
+
+
+
+
+
+
+ Start-AzureStorageBlobCopy
+
+ Start a copy operation to the specified destination blob.
+
+
+
+
+ Start
+ AzureStorageBlobCopy
+
+
+
+
+ Start a copy operation to the specified destination blob.
+
+
+
+ Start-AzureStorageBlobCopy
+
+ SrcBlob
+
+ Source blob name.
+
+ String
+
+
+ SrcContainer
+
+ Source container name.
+
+ String
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ CloudBlob
+
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+
+ CloudBlob
+
+
+ DestCloudBlob
+
+ Destination CloudBlob object
+
+ CloudBlob
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ CloudBlob
+
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+
+ CloudBlob
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ CloudBlobContainer
+
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+
+ CloudBlobContainer
+
+
+ SrcBlob
+
+ Source blob name.
+
+ String
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ SrcShareName
+
+ Source share name.
+
+ String
+
+
+ SrcFilePath
+
+ Source file relative path to source directory or source share.
+
+ String
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ SrcShare
+
+ CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet.
+
+ CloudFileShare
+
+
+ SrcFilePath
+
+ Source file relative path to source directory or source share.
+
+ String
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ SrcDir
+
+ CloudFileDirectory object from Azure Storage Client library.
+
+ CloudFileDirectory
+
+
+ SrcFilePath
+
+ Source file relative path to source directory or source share.
+
+ String
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ SrcFile
+
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
+
+ CloudFile
+
+
+ DestCloudBlob
+
+ Destination CloudBlob object
+
+ CloudBlob
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ SrcFile
+
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
+
+ CloudFile
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+ Start-AzureStorageBlobCopy
+
+ AbsoluteUri
+
+ Absolute Uri to the source. Be noted that the credential should be provided in the Uri, if the source requires any.
+
+ String
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ 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]
+
+
+
+
+
+ SrcBlob
+
+ Source blob name.
+
+ String
+
+ String
+
+
+
+
+
+ SrcContainer
+
+ Source container name.
+
+ String
+
+ String
+
+
+
+
+
+ DestContainer
+
+ Destination container name.
+
+ String
+
+ String
+
+
+
+
+
+ DestBlob
+
+ Destination blob name.
+
+ String
+
+ String
+
+
+
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+ AzureStorageContext
+
+
+
+
+
+ Force
+
+ Force to overwrite the destination blob without confirmation.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ ServerTimeoutPerRequest
+
+ Server side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ClientTimeoutPerRequest
+
+ Client side time out for each request.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+ The total amount of concurrent async tasks.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
+
+
+
+
+
+ CloudBlob
+
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+
+ CloudBlob
+
+ CloudBlob
+
+
+
+
+
+ DestCloudBlob
+
+ Destination CloudBlob object
+
+ CloudBlob
+
+ CloudBlob
+
+
+
+
+
+ CloudBlobContainer
+
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+
+ CloudBlobContainer
+
+ CloudBlobContainer
+
+
+
+
+
+ SrcShareName
+
+ Source share name.
+
+ String
+
+ String
+
+
+
+
+
+ SrcFilePath
+
+ Source file relative path to source directory or source share.
+
+ String
+
+ String
+
+
+
+
+
+ SrcShare
+
+ CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet.
+
+ CloudFileShare
+
+ CloudFileShare
+
+
+
+
+
+ SrcDir
+
+ CloudFileDirectory object from Azure Storage Client library.
+
+ CloudFileDirectory
+
+ CloudFileDirectory
+
+
+
+
+
+ SrcFile
+
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
+
+ CloudFile
+
+ CloudFile
+
+
+
+
+
+ AbsoluteUri
+
+ Absolute Uri to the source. Be noted that the credential should be provided in the Uri, if the source requires any.
+
+ String
+
+ String
+
+
+
+
+
+ PipelineVariable
+
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Start copy operation by name. --------------------------
+
+
+
+ PS C:\> Start-CopyAzureStorageContainer -SrcContainer container1 -SrcBlob blob1 -DestContainer container2
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Start copy operation using container pipeline from GetAzureStorageContainer. --------------------------
+
+
+
+ PS C:\> Get-AzureStorageContainer -Container container1 | Start-AzureStorageBlobCopy -SrcBlob blob -DestContainer container2
+
+
+
+
+
+
+
+
+
+
+ -------------------------- StartCopy to specified blob using pipeline from GetAzureStorageBlob --------------------------
+
+
+
+ PS C:\> Get-AzureStorageBlob -Container container1 | Start-AzureStorageBlobCopy -DestContainer container2
+
+
+
+
+
+
+
+
+
+
+ -------------------------- start copy operation to CloudBlob object --------------------------
+
+
+
+ PS C:\> $srcBlob = Get-AzureStorageBlob -Container container1 -Blob srcBlob
+$destBlob = Get-AzureStorageBlob -Container container2 -Blob destBlob
+
+Start-AzureStorageBlobCopy -CloudBlob $srcBlob.ICloudBlob -DestCloudBlob $destBlob.ICloudBlob
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Start copy operation using source uri --------------------------
+
+
+
+ PS C:\> $context = New-AzureStorageContainer -StorageAccountName accountname -StorageAccountKey accountkey
+
+Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContainer container -DestBlob blob -DestContext $context
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Start copy from a secondary location --------------------------
+
+
+
+ PS C:\> $SrcContext = New-AzureStorageContext -ConnectionString "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=***;BlobEndpoint=http://myaccount-secondary.blob.core.windows.net;FileEndpoint=http://myaccount-secondary.file.core.windows.net;QueueEndpoint=http://myaccount-secondary.queue.core.windows.net; TableEndpoint=http://myaccount-secondary.table.core.windows.net;"
+
+Start-AzureStorageBlobCopy –Container sourcecontainer -Blob BlobName -Context $SrcContext –DestContainer destcontainer -DestBlob DestBlobName
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-AzureStorageBlobCopyState
+
+
+
+ Stop-AzureStorageBlobCopy
+
+
+
+
+
+
+
+ Start-AzureStorageFileCopy
+
+ Start a copy operation to the specified destination file.
+
+
+
+
+ Start
+ AzureStorageFileCopy
+
+
+
+ Start a copy operation to the specified destination file.
+
+
+
+ Start-AzureStorageFileCopy
+
+ SrcBlobName
+
+ Source blob name.
+
+ String
+
+
+ SrcContainerName
+
+ Source container name.
+
+ String
+
+
+ DestShareName
+
+ Destination share name.
+
+ String
+
+
+ DestFilePath
+
+ Destination file relative path to destination share.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination file without confirmation.
+
+ 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]
+
+
+ Profile
+
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Start-AzureStorageFileCopy
+
+ SrcBlobName
+
+ Source blob name.
+
+ String
+
+
+ SrcContainer
+
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+
+ CloudBlobContainer
+
+
+ DestShareName
+
+ Destination share name.
+
+ 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
+
+ Force to overwrite the destination file without confirmation.
+
+ 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]
+
+
+ Profile
+
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Start-AzureStorageFileCopy
+
+ SrcBlob
+
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+
+ CloudBlob
+
+
+ DestFile
+
+ CloudFile object from Azure Storage Client library.
+
+ CloudFile
+
+
+ Force
+
+ Force to overwrite the destination file without confirmation.
+
+ 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]
+
+
+ Profile
+
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Start-AzureStorageFileCopy
+
+ SrcBlob
+
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+
+ CloudBlob
+
+
+ DestShareName
+
+ Destination share name.
+
+ 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
+
+ Force to overwrite the destination file without confirmation.
+
+ 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]
+
+
+ Profile
+
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Start-AzureStorageFileCopy
+
+ SrcFilePath
+
+ Source file relative path to source directory or source share.
+
+ String
+
+
+ SrcShareName
+
+ Source share name.
+
+ String
+
+
+ DestShareName
+
+ Destination share name.
+
+ String
+
+
+ DestFilePath
+
+ Destination file relative path to destination share.
+
+ String
+
+
+ Context
+
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination file without confirmation.
+
+ 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]
+
+
+ Profile
+
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Start-AzureStorageFileCopy
+
+ SrcFilePath
+
+ Source file relative path to source directory or source share.
+
+ String
+
+
+ SrcShare
+
+ CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet.
+
+ CloudFileShare
+
+
+ DestShareName
+
+ Destination share name.
+
+ 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
+
+ Force to overwrite the destination file without confirmation.
+
+ 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]
+
+
+ Profile
+
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Start-AzureStorageFileCopy
+
+ SrcFile
+
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
+
+ CloudFile
+
+
+ DestShareName
+
+ Destination share name.
+
+ 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
+
+ Force to overwrite the destination file without confirmation.
+
+ 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]
+
+
+ Profile
+
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Start-AzureStorageFileCopy
+
+ SrcFile
+
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
+
+ CloudFile
+
+
+ DestFile
+
+ CloudFile object from Azure Storage Client library.
+
+ CloudFile
+
+
+ Force
+
+ Force to overwrite the destination file without confirmation.
+
+ 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]
+
+
+ Profile
+
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
+
+ SwitchParameter
+
+
+ Confirm
+
+
+
+ SwitchParameter
+
+
+
+ Start-AzureStorageFileCopy
+
+ AbsoluteUri
+
+ Absolute Uri to the source. Be noted that the credential should be provided in the Uri, if the source requires any.
+
+ String
+
+
+ DestShareName
+
+ Destination share name.
+
+ String
+
+
+ DestFilePath
- Azure storage service type.
+ Destination file relative path to destination share.
- StorageServiceType
+ String
+
+
+ DestContext
+
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+
+ AzureStorageContext
+
+
+ Force
+
+ Force to overwrite the destination file without confirmation.
+
+ SwitchParameter
- Version
+ ServerTimeoutPerRequest
- Azure storage service logging version.
+ Server side time out for each request.
- Nullable`1[Double]
+ Nullable`1[Int32]
- RetentionDays
+ ClientTimeoutPerRequest
- Azure storage logging retention days.
+ Client side time out for each request.
Nullable`1[Int32]
- LoggingOperations
+ ConcurrentTaskCount
- Azure storage service logging operations.
+ The total amount of concurrent async tasks.
- LoggingOperations[]
+ Nullable`1[Int32]
- PassThru
+ Profile
- Ouput the updated azure storage service logging properties.
+ AzureProfile
+
+ AzureProfile
+
+
+ WhatIf
+
+
SwitchParameter
-
- Context
+
+ Confirm
- Azure storage context.
+
- AzureStorageContext
+ SwitchParameter
-
-
-
- ServiceType
-
- Azure storage service type.
-
- StorageServiceType
-
- StorageServiceType
-
-
-
-
-
- Version
-
- Azure storage service logging version.
-
- Nullable`1[Double]
-
- Nullable`1[Double]
-
-
-
-
-
- RetentionDays
-
- Azure storage logging retention days.
-
- Nullable`1[Int32]
-
- Nullable`1[Int32]
-
-
-
-
-
- LoggingOperations
-
- Azure storage service logging operations.
-
- LoggingOperations[]
-
- LoggingOperations[]
-
-
-
-
-
- PassThru
-
- Ouput the updated azure storage service logging properties.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- Context
-
- Azure storage context.
-
- AzureStorageContext
-
- AzureStorageContext
-
-
-
-
-
- ServerTimeoutPerRequest
-
- Server side time out for each request.
-
- int32
-
- int32
-
-
-
-
-
- ClientTimeoutPerRequest
-
- Client side time out for each request.
-
- int32
-
- int32
-
-
-
-
-
- PipelineVariable
-
-
-
- string
-
- string
-
-
-
-
-
-
-
-
-
-
+
+ Start-AzureStorageFileCopy
+
+ AbsoluteUri
-
+ Absolute Uri to the source. Be noted that the credential should be provided in the Uri, if the source requires any.
-
-
-
-
-
-
-
-
-
+ String
+
+
+ DestFile
-
+ CloudFile object from Azure Storage Client library.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- Set logging properties for azure storage blob service. --------------------------
-
-
-
- PS C:\> Set-AzureStorageServiceLoggingProperty -ServiceType Blob -LoggingOperations Read,Write -RetentionDays 10 -Version 1.0 -PassThru
-
-
-
-
-
-
-
-
-
-
-
-
- http://msdn.microsoft.com/en-us/library/dn806397.aspx
-
-
-
-
-
-
- Set-AzureStorageServiceMetricsProperty
-
- Set azure storage service metrics properties.
-
-
-
-
- Set
- AzureStorageServiceMetricsProperty
-
-
-
-
- Set azure storage service metrics properties.
-
-
-
- Set-AzureStorageServiceMetricsProperty
-
- ServiceType
+ CloudFile
+
+
+ Force
- Azure storage service type.
+ Force to overwrite the destination file without confirmation.
- StorageServiceType
+ SwitchParameter
-
- MetricsType
+
+ ServerTimeoutPerRequest
- Azure Storage service metrics type.
+ Server side time out for each request.
- ServiceMetricsType
+ Nullable`1[Int32]
- Version
+ ClientTimeoutPerRequest
- Azure storage service metrics version.
+ Client side time out for each request.
- Nullable`1[Double]
+ Nullable`1[Int32]
- RetentionDays
+ ConcurrentTaskCount
- Azure storage service metrics retention days.
+ The total amount of concurrent async tasks.
Nullable`1[Int32]
-
- MetricsLevel
+
+ Profile
- Azure storage service metrics level.
+ AzureProfile
- Nullable`1[MetricsLevel]
+ AzureProfile
- PassThru
+ WhatIf
- Output the updated azure storage service metrics properties.
+
SwitchParameter
-
- Context
+
+ Confirm
- Azure storage context.
+
- AzureStorageContext
+ SwitchParameter
-
- ServiceType
+
+ SrcBlobName
- Azure storage service type.
+ Source blob name.
- StorageServiceType
+ String
- StorageServiceType
+ String
-
- MetricsType
+
+ SrcContainerName
- Azure Storage service metrics type.
+ Source container name.
- ServiceMetricsType
+ String
- ServiceMetricsType
+ String
-
- Version
+
+ DestShareName
- Azure storage service metrics version.
+ Destination share name.
- Nullable`1[Double]
+ String
- Nullable`1[Double]
+ String
-
- RetentionDays
+
+ DestFilePath
- Azure storage service metrics retention days.
+ Destination file relative path to destination share.
- Nullable`1[Int32]
+ String
- Nullable`1[Int32]
+ String
-
- MetricsLevel
+
+ Context
- Azure storage service metrics level.
+ Source Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- Nullable`1[MetricsLevel]
+ AzureStorageContext
- Nullable`1[MetricsLevel]
+ AzureStorageContext
- PassThru
+ DestContext
- Output the updated azure storage service metrics properties.
+ Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- SwitchParameter
+ AzureStorageContext
- SwitchParameter
+ AzureStorageContext
-
- Context
+
+ Force
- Azure storage context.
+ Force to overwrite the destination file without confirmation.
- AzureStorageContext
+ SwitchParameter
- AzureStorageContext
+ SwitchParameter
-
+
ServerTimeoutPerRequest
Server side time out for each request.
- int32
+ Nullable`1[Int32]
- int32
+ Nullable`1[Int32]
-
+
ClientTimeoutPerRequest
Client side time out for each request.
- int32
+ Nullable`1[Int32]
- int32
+ Nullable`1[Int32]
+
+
+
+
+
+ ConcurrentTaskCount
+
+ The total amount of concurrent async tasks.
+
+ Nullable`1[Int32]
+
+ Nullable`1[Int32]
- PipelineVariable
+ Profile
-
+ AzureProfile
- string
+ AzureProfile
- string
+ AzureProfile
-
-
-
+
+ WhatIf
+
+
+
+ SwitchParameter
-
+ SwitchParameter
-
-
-
-
-
-
-
-
+
+
+
+ Confirm
+
+
+
+ SwitchParameter
-
+ SwitchParameter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- Set metrics properties for azure storage blob service. --------------------------
-
-
-
- PS C:\> Set-AzureStorageServiceMetricsProperty -ServiceType Blob -MetricsType Hour -MetricsLevel Service -RetentionDays 10 -Version 1.0 -PassThru
-
-
-
-
-
-
-
-
-
-
-
-
- http://msdn.microsoft.com/en-us/library/dn806391.aspx
-
-
-
-
-
-
- Set-AzureStorageTableStoredAccessPolicy
-
- Set Stored Access Policy for azure storage table.
-
-
-
-
- Set
- AzureStorageTableStoredAccessPolicy
-
-
-
-
- Set Stored Access Policy for azure storage table.
-
-
-
- Set-AzureStorageTableStoredAccessPolicy
-
- Table
-
- Azure storage table name.
-
- String
-
-
- Policy
-
- Azure Stored Access Policy.
-
- String
-
-
- Permission
-
- Permissions for a storage table.
-
- String
-
-
- StartTime
-
- The time at which the stored access policy becomes valid.
-
- Nullable`1[DateTime]
-
-
- ExpiryTime
-
- The time at which the stored access policy becomes invalid.
-
- Nullable`1[DateTime]
-
-
- NoStartTime
-
- Set the StartTime to be Null.
-
- SwitchParameter
-
-
- NoExpiryTime
-
- Set the ExpiryTime to be Null.
-
- SwitchParameter
-
-
- Context
-
- Azure storage context
-
- AzureStorageContext
-
-
-
-
-
- Table
+
+
+
+ SrcContainer
+
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+
+ CloudBlobContainer
+
+ CloudBlobContainer
+
+
+
+
+
+ SrcBlob
- Azure storage table name.
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- String
+ CloudBlob
- String
+ CloudBlob
-
- Policy
+
+ DestFile
- Azure Stored Access Policy.
+ CloudFile object from Azure Storage Client library.
+
+ CloudFile
+
+ CloudFile
+
+
+
+
+
+ SrcFilePath
+
+ Source file relative path to source directory or source share.
String
@@ -14008,10 +19465,10 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- Permission
+
+ SrcShareName
- Permissions for a storage table.
+ Source share name.
String
@@ -14020,74 +19477,50 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- StartTime
+
+ SrcShare
- The time at which the stored access policy becomes valid.
+ CloudFileShare object from Azure Storage Client library. You can create it or use Get-AzureStorageShare cmdlet.
- Nullable`1[DateTime]
+ CloudFileShare
- Nullable`1[DateTime]
+ CloudFileShare
-
- ExpiryTime
+
+ SrcFile
- The time at which the stored access policy becomes invalid.
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
- Nullable`1[DateTime]
+ CloudFile
- Nullable`1[DateTime]
+ CloudFile
-
- NoStartTime
-
- Set the StartTime to be Null.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- NoExpiryTime
-
- Set the ExpiryTime to be Null.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
-
- Context
+
+ AbsoluteUri
- Azure storage context
+ Absolute Uri to the source. Be noted that the credential should be provided in the Uri, if the source requires any.
- AzureStorageContext
+ String
- AzureStorageContext
+ String
-
- PipelineVariable
+
+ SrcDir
-
+ CloudFileDirectory object from Azure Storage Client library.
- string
+ cloudfiledirectory
- string
+ cloudfiledirectory
@@ -14097,253 +19530,137 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
-
-
-
+
+
-
+
+
+
+
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
-
+
- -------------------------- Set a stored access policy in table with full permission --------------------------
+ -------------------------- Start copy operation from file to file with share name and file name --------------------------
+ PS C:\>
+
+ PS C:\> Start-AzureStorageFileCopy -SrcShareName share -SrcFilePath filepath -DestShareName share2 -DestFilePath filepath2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Start copy operation from blob to file with container name and blob name --------------------------
+
+ PS C:\>
- PS C:\> Set-AzureStorageTableStoredAccessPolicy -Table test -Policy testPolicy -Permission raud
+ PS C:\> Start-AzureStorageFileCopy -SrcContainerName container -SrcBlobName blobname -DestShareName share -DestFilePath filepath
+
+
+
-
+
+
+
-
- http://msdn.microsoft.com/en-us/library/azure/dn140257.aspx
-
-
- Start-AzureStorageBlobCopy
+ Stop-AzureStorageBlobCopy
- Start a copy operation to the specified destination blob.
+ Stop a copy operation to the specified destination blob.
- Start
- AzureStorageBlobCopy
-
-
-
-
- Start a copy operation to the specified destination blob.
-
-
-
- Start-AzureStorageBlobCopy
-
- SrcBlob
-
- Source blob name.
-
- String
-
-
- SrcContainer
-
- Source container name.
-
- String
-
-
- DestContainer
-
- Destination container name.
-
- String
-
-
- DestBlob
-
- Destination blob name.
-
- String
-
-
- Context
-
-
-
- AzureStorageContext
-
-
- DestContext
-
- Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
-
- Force
-
- Force to overwrite the destination blob without confirmation.
-
- SwitchParameter
-
-
- ServerTimeoutPerRequest
-
- Server side time out for each request.
-
- Nullable`1[Int32]
-
-
- ClientTimeoutPerRequest
-
- Client side time out for each request.
-
- Nullable`1[Int32]
-
-
- ConcurrentTaskCount
-
-
-
- Nullable`1[Int32]
-
-
-
- Start-AzureStorageBlobCopy
-
- ICloudBlob
-
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
-
- ICloudBlob
-
-
- DestICloudBlob
-
- Destination ICloudBlob object
-
- ICloudBlob
-
-
- Context
-
-
-
- AzureStorageContext
-
-
- DestContext
-
- Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
-
- AzureStorageContext
-
-
- Force
-
- Force to overwrite the destination blob without confirmation.
-
- SwitchParameter
-
-
- ServerTimeoutPerRequest
-
- Server side time out for each request.
-
- Nullable`1[Int32]
-
-
- ClientTimeoutPerRequest
-
- Client side time out for each request.
-
- Nullable`1[Int32]
-
-
- ConcurrentTaskCount
+ Stop
+ AzureStorageBlobCopy
+
+
+
+
+ Stop a copy operation to the specified destination blob.
+
+
+
+ Stop-AzureStorageBlobCopy
+
+ Blob
-
+ Blob name.
- Nullable`1[Int32]
+ String
-
-
- Start-AzureStorageBlobCopy
-
- ICloudBlob
+
+ Container
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+ Container name.
- ICloudBlob
+ String
-
- DestContainer
+
+ Force
- Destination container name.
+ Force to stop the current copy task on the specified blob
- String
+ SwitchParameter
- DestBlob
+ CopyId
- Destination blob name.
+ Copy Id
String
Context
-
-
- AzureStorageContext
-
-
- DestContext
-
- Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
-
- Force
-
- Force to overwrite the destination blob without confirmation.
-
- SwitchParameter
-
ServerTimeoutPerRequest
@@ -14367,56 +19684,35 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- Start-AzureStorageBlobCopy
+ Stop-AzureStorageBlobCopy
- CloudBlobContainer
-
- CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
-
- CloudBlobContainer
-
-
- SrcBlob
+ CloudBlob
- Source blob name.
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- String
+ CloudBlob
-
- DestContainer
+
+ Force
- Destination container name.
+ Force to stop the current copy task on the specified blob
- String
+ SwitchParameter
- DestBlob
+ CopyId
- Destination blob name.
+ Copy Id
String
Context
-
-
- AzureStorageContext
-
-
- DestContext
-
- Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
-
- Force
-
- Force to overwrite the destination blob without confirmation.
-
- SwitchParameter
-
ServerTimeoutPerRequest
@@ -14440,48 +19736,41 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- Start-AzureStorageBlobCopy
+ Stop-AzureStorageBlobCopy
- AbsoluteUri
+ CloudBlobContainer
-
+ CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
- String
+ CloudBlobContainer
-
- DestContainer
+
+ Blob
- Destination container name.
+ Blob name.
String
- DestBlob
-
- Destination blob name.
-
- String
-
-
- Context
+ Force
-
+ Force to stop the current copy task on the specified blob
- AzureStorageContext
+ SwitchParameter
- DestContext
+ CopyId
- Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Copy Id
- AzureStorageContext
+ String
-
- Force
+
+ Context
- Force to overwrite the destination blob without confirmation.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
- SwitchParameter
+ AzureStorageContext
ServerTimeoutPerRequest
@@ -14508,9 +19797,9 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- SrcBlob
+ Blob
- Source blob name.
+ Blob name.
String
@@ -14519,10 +19808,10 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- SrcContainer
+
+ Container
- Source container name.
+ Container name.
String
@@ -14531,22 +19820,22 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- DestContainer
+
+ Force
- Destination container name.
+ Force to stop the current copy task on the specified blob
- String
+ SwitchParameter
- String
+ SwitchParameter
- DestBlob
+ CopyId
- Destination blob name.
+ Copy Id
String
@@ -14558,19 +19847,7 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
Context
-
-
- AzureStorageContext
-
- AzureStorageContext
-
-
-
-
-
- DestContext
-
- Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
+ Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
AzureStorageContext
@@ -14579,18 +19856,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- Force
-
- Force to overwrite the destination blob without confirmation.
-
- SwitchParameter
-
- SwitchParameter
-
-
-
-
ServerTimeoutPerRequest
@@ -14628,25 +19893,13 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- ICloudBlob
-
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
-
- ICloudBlob
-
- ICloudBlob
-
-
-
-
-
- DestICloudBlob
+ CloudBlob
- Destination ICloudBlob object
+ CloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
- ICloudBlob
+ CloudBlob
- ICloudBlob
+ CloudBlob
@@ -14663,18 +19916,6 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
- AbsoluteUri
-
-
-
- String
-
- String
-
-
-
-
PipelineVariable
@@ -14707,56 +19948,26 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- Start copy operation by name. --------------------------
-
-
-
- PS C:\> Start-CopyAzureStorageContainer -SrcContainer container1 -SrcBlob blob1 -DestContainer container2
-
-
-
-
-
-
-
-
-
-
- -------------------------- Start copy operation using container pipeline from GetAzureStorageContainer. --------------------------
-
-
-
- PS C:\> Get-AzureStorageContainer -Container container1 | Start-AzureStorageBlobCopy -SrcBlob blob -DestContainer container2
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- -------------------------- StartCopy to specified blob using pipeline from GetAzureStorageBlob --------------------------
+ -------------------------- Stop copy operation by name --------------------------
- PS C:\> Get-AzureStorageBlob -Container container1 | Start-AzureStorageBlobCopy -DestContainer container2
+ PS C:\> Stop-AzureStorageBlobCopy -Container containername -Blob blobname -CopyId copyid
@@ -14767,14 +19978,11 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
- -------------------------- start copy operation to ICloudBlob object --------------------------
+ -------------------------- Stop copy operation using container pipeline from GetAzureStorageContainer. --------------------------
- PS C:\> $srcBlob = Get-AzureStorageBlob -Container container1 -Blob srcBlob
-$destBlob = Get-AzureStorageBlob -Container container2 -Blob destBlob
-
-Start-AzureStorageBlobCopy -ICloudBlob $srcBlob.ICloudBlob -DestICloudBlob $destBlob.ICloudBlob
+ PS C:\> Get-AzureStorageContainer container* | Stop-AzureStorageBlobCopy -Blob blobname
@@ -14785,13 +19993,11 @@ Start-AzureStorageBlobCopy -ICloudBlob $srcBlob.ICloudBlob -DestICloudBlob $dest
- -------------------------- Start copy operation using source uri --------------------------
+ -------------------------- Stop copy operation using container pipeline from GetAzureStorageBlob. --------------------------
- PS C:\> $context = New-AzureStorageContainer -StorageAccountName accountname -StorageAccountKey accountkey
-
-Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContainer container -DestBlob blob -DestContext $context
+ PS C:\> Get-AzureStorageBlob -Container containername | Stop-AzureStorageBlobCopy -Force
@@ -14804,65 +20010,64 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
- Get-AzureStorageBlobCopyState
+ Start-AzureStorageBlobCopyCopyState
- Stop-AzureStorageBlobCopy
+ Get-AzureStorageBlobCopyState
-
+
- Stop-AzureStorageBlobCopy
+ Stop-AzureStorageFileCopy
- Stop a copy operation to the specified destination blob.
+ Stop a copy operation to the specified destination file.
Stop
- AzureStorageBlobCopy
+ AzureStorageFileCopy
-
- Stop a copy operation to the specified destination blob.
+ Stop a copy operation to the specified destination file.
- Stop-AzureStorageBlobCopy
+ Stop-AzureStorageFileCopy
- Blob
+ ShareName
- Blob name.
+ Share name.
String
- Container
+ FilePath
- Container name.
+ File path in share.
String
- Force
+ CopyId
- Force to stop the current copy task on the specified blob
+ Copy Id.
- SwitchParameter
+ String
- CopyId
+ Force
- Copy Id
+ Force to stop the current copy task on the specified file.
- String
+ SwitchParameter
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -14886,35 +20091,87 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
ConcurrentTaskCount
-
+ The total amount of concurrent async tasks.
Nullable`1[Int32]
+
+ Profile
+
+ AzureProfile instance.
+
+ AzureProfile
+
- Stop-AzureStorageBlobCopy
-
- ICloudBlob
+ Stop-AzureStorageFileCopy
+
+ File
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
- ICloudBlob
+ CloudFile
+
+
+ CopyId
+
+ Copy Id.
+
+ String
Force
- Force to stop the current copy task on the specified blob
+ Force to stop the current copy task on the specified file.
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]
+
+
+ Profile
+
+ AzureProfile instance.
+
+ AzureProfile
+
+
+
+ Stop-AzureStorageFileCopy
CopyId
- Copy Id
+ 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.
@@ -14938,42 +20195,35 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
ConcurrentTaskCount
-
+ The total amount of concurrent async tasks.
Nullable`1[Int32]
-
-
- Stop-AzureStorageBlobCopy
-
- CloudBlobContainer
+
+ Profile
- CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+ AzureProfile instance.
- CloudBlobContainer
+ AzureProfile
-
- Blob
+
+
+ Stop-AzureStorageFileCopy
+
+ CopyId
- Blob name.
+ Copy Id.
String
Force
- Force to stop the current copy task on the specified blob
+ Force to stop the current copy task on the specified file.
SwitchParameter
-
- CopyId
-
- Copy Id
-
- String
-
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -14997,17 +20247,24 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
ConcurrentTaskCount
-
+ The total amount of concurrent async tasks.
Nullable`1[Int32]
+
+ Profile
+
+ AzureProfile instance.
+
+ AzureProfile
+
- Blob
+ ShareName
- Blob name.
+ Share name.
String
@@ -15017,9 +20274,9 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
- Container
+ FilePath
- Container name.
+ File path in share.
String
@@ -15029,30 +20286,30 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
- Force
+ CopyId
- Force to stop the current copy task on the specified blob
+ Copy Id.
- SwitchParameter
+ String
- SwitchParameter
+ String
- CopyId
+ Force
- Copy Id
+ Force to stop the current copy task on the specified file.
- String
+ SwitchParameter
- String
+ SwitchParameter
-
+
Context
Azure Storage Context. You can create it by New-AzureStorageContext cmdlet.
@@ -15091,7 +20348,7 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
ConcurrentTaskCount
-
+ The total amount of concurrent async tasks.
Nullable`1[Int32]
@@ -15100,38 +20357,26 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
-
- ICloudBlob
-
- ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet.
-
- ICloudBlob
-
- ICloudBlob
-
-
-
-
-
- CloudBlobContainer
+
+ Profile
- CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet.
+ AzureProfile instance.
- CloudBlobContainer
+ AzureProfile
- CloudBlobContainer
+ AzureProfile
-
- PipelineVariable
+
+ File
-
+ CloudFile object from Azure Storage Client library. You can create it or use Get-AzureStorageFile cmdlet.
- string
+ CloudFile
- string
+ CloudFile
@@ -15141,90 +20386,59 @@ Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContain
-
-
-
-
+
+
-
+
+
+
+
-
-
-
-
+
+
-
-
-
+
+
+
+
+
+
-
+
-------------------------- Stop copy operation by name --------------------------
-
-
- PS C:\> Stop-AzureStorageBlobCopy -Container containername -Blob blobname -CopyId copyid
-
-
-
-
-
-
-
-
-
-
- -------------------------- Stop copy operation using container pipeline from GetAzureStorageContainer. --------------------------
-
-
-
- PS C:\> Get-AzureStorageContainer container* | Stop-AzureStorageBlobCopy -Blob blobname
-
-
-
-
-
-
-
-
-
-
- -------------------------- Stop copy operation using container pipeline from GetAzureStorageBlob. --------------------------
-
-
+ PS C:\>
- PS C:\> Get-AzureStorageBlob -Container containername | Stop-AzureStorageBlobCopy -Force
+ PS C:\> Stop-AzureStorageFileCopy -ShareName share -FilePath filePath -CopyId copyid
+
+
+
-
+
+
+
-
- Start-AzureStorageBlobCopyCopyState
-
-
-
- Get-AzureStorageBlobCopyState
-
-
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs
index fc6faea183a9..37e0b4abad13 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs
@@ -12,17 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Blob;
-using Microsoft.WindowsAzure.Storage.Shared.Protocol;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using System;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+
///
/// Blob management interface
///
@@ -83,8 +83,8 @@ public interface IStorageBlobManagement : IStorageManagement
/// Access condition
/// Blob request options
/// Operation context
- /// Return an ICloudBlob if the specific blob exists on azure, otherwise return null
- ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
+ /// Return an CloudBlob if the specific blob exists on azure, otherwise return null
+ CloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
///
/// Whether the container is exists or not
@@ -98,11 +98,11 @@ public interface IStorageBlobManagement : IStorageManagement
///
/// Whether the blob is exists or not
///
- /// A icloudblob object
+ /// A CloudBlob object
/// Blob request option
/// Operation context
/// True if the specific blob exists, otherwise return false
- bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, OperationContext OperationContext);
+ bool DoesBlobExist(CloudBlob blob, BlobRequestOptions options, OperationContext OperationContext);
///
/// Create the container if not exists
@@ -131,18 +131,18 @@ public interface IStorageBlobManagement : IStorageManagement
/// Blob listing details
/// Blob request option
/// Operation context
- /// An enumerable collection of icloudblob
+ /// An enumerable collection of CloudBlob
IEnumerable ListBlobs(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, BlobRequestOptions options, OperationContext operationContext);
///
/// Delete azure blob
///
- /// ICloudblob object
+ /// Cloudblob object
/// Delete snapshots option
/// Access condition
/// Operation context
- /// An enumerable collection of icloudblob
- void DeleteICloudBlob(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
+ /// An enumerable collection of CloudBlob
+ void DeleteCloudBlob(CloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
///
/// Fetch container attributes
@@ -159,7 +159,7 @@ public interface IStorageBlobManagement : IStorageManagement
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- void FetchBlobAttributes(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
+ void FetchBlobAttributes(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
///
/// Set blob properties
@@ -168,7 +168,7 @@ public interface IStorageBlobManagement : IStorageManagement
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- void SetBlobProperties(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
+ void SetBlobProperties(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
///
/// Set blob meta data
@@ -177,17 +177,17 @@ public interface IStorageBlobManagement : IStorageManagement
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- void SetBlobMetadata(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
+ void SetBlobMetadata(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
///
/// Abort copy operation on specified blob
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Copy id
/// Access condition
/// Blob request options
/// Operation context
- void AbortCopy(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
+ void AbortCopy(CloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext);
///
/// Get the service properties
@@ -233,12 +233,12 @@ Task GetContainerPermissionsAsync(CloudBlobContainer c
///
/// Return a task that asynchronously check whether the specified blob exists.
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Blob request options
/// Operation context
/// Cancellation token
/// A task object that asynchronously check whether the specified blob exists.
- Task DoesBlobExistAsync(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
+ Task DoesBlobExistAsync(CloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
///
/// Return a task that asynchronously get the blob reference from server
@@ -250,7 +250,7 @@ Task GetContainerPermissionsAsync(CloudBlobContainer c
/// Operation context
/// Cancellation token
/// A task object that asynchronously get the blob reference from server
- Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
+ Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
///
/// Return a task that asynchronously fetch blob attributes
@@ -261,7 +261,7 @@ Task GetContainerPermissionsAsync(CloudBlobContainer c
/// Operation context
/// Cancellation token
/// Return a task that asynchronously fetch blob attributes
- Task FetchBlobAttributesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
+ Task FetchBlobAttributesAsync(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
///
/// Return a task that asynchronously create a container if it doesn't exist.
@@ -288,14 +288,14 @@ Task GetContainerPermissionsAsync(CloudBlobContainer c
///
/// Return a task that asynchronously abort the blob copy operation
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Copy id
/// Access condition
/// Blob request options
/// Operation context
/// Cancellation token
/// Return a task that asynchronously abort the blob copy operation
- Task AbortCopyAsync(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOption, OperationContext operationContext, CancellationToken cmdletCancellationToken);
+ Task AbortCopyAsync(CloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOption, OperationContext operationContext, CancellationToken cmdletCancellationToken);
///
/// Return a task that asynchronously set the container permission
@@ -312,14 +312,14 @@ Task GetContainerPermissionsAsync(CloudBlobContainer c
///
/// Return a task that asynchronously delete the specified blob
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Snapshot delete option
/// Access condition
/// Blob request option
/// Operation context
/// Cancellation token
/// Return a task that asynchronously delete the specified blob
- Task DeleteICloudBlobAsync(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken);
+ Task DeleteCloudBlobAsync(CloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken);
///
/// Return a task that asynchronously set blob properties
@@ -328,16 +328,16 @@ Task GetContainerPermissionsAsync(CloudBlobContainer c
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- Task SetBlobPropertiesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
+ Task SetBlobPropertiesAsync(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
///
/// Return a task that asynchronously set blob meta data
///
- /// ICloud blob object
+ /// CloudBlob object
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- Task SetBlobMetadataAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
+ Task SetBlobMetadataAsync(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken);
///
/// List the blobs segmented in specified containers
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs
index 62ad0440bc29..acb23a748b2c 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs
@@ -12,14 +12,14 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using System;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.File;
+
///
/// File management interface
///
@@ -33,17 +33,73 @@ public interface IStorageFileManagement : IStorageManagement
/// A reference to a share.
CloudFileShare GetShareReference(string shareName);
+ ///
+ /// Get share permissions.
+ ///
+ /// A CloudFileShare instance.
+ /// Access condition
+ /// File request option
+ /// Operation context
+ /// The share's permission
+ FileSharePermissions GetSharePermissions(CloudFileShare share, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null);
+
+ ///
+ /// Set share permissions.
+ ///
+ /// A CloudFileShare object.
+ /// The share's permission.
+ /// Access condition
+ /// File request option
+ /// Operation context
+ void SetSharePermissions(CloudFileShare share, FileSharePermissions permissions, AccessCondition accessCondition = null, FileRequestOptions options = null, OperationContext operationContext = null);
+
+ ///
+ /// Retrieve the share's attributes.
+ ///
+ /// Indicating the share.
+ ///
+ /// A Microsoft.WindowsAzure.Storage.AccessCondition object that represents
+ /// the access conditions for the share. If null, no condition is used.
+ ///
+ ///
+ /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies
+ /// additional options for the request.
+ ///
+ ///
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// the context for the current operation.
+ ///
+ void FetchShareAttributes(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext);
+
+ ///
+ /// Set share attributes.
+ ///
+ /// Indicating the share.
+ ///
+ /// A Microsoft.WindowsAzure.Storage.AccessCondition object that represents
+ /// the access conditions for the share. If null, no condition is used.
+ ///
+ ///
+ /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies
+ /// additional options for the request.
+ ///
+ ///
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// the context for the current operation.
+ ///
+ void SetShareProperties(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext);
+
///
/// Enumerates the files and directories under a certain folder.
///
/// Indicating the directory to be listed.
/// Indicating the action for enumerated items.
///
- /// An Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies
+ /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
/// Indicating the cancellation token.
@@ -58,7 +114,7 @@ public interface IStorageFileManagement : IStorageManagement
///
/// Indicating the share.
///
- /// An Microsoft.WindowsAzure.Storage.AccessCondition object that represents
+ /// A Microsoft.WindowsAzure.Storage.AccessCondition object that represents
/// the access conditions for the share. If null, no condition is used.
///
///
@@ -66,7 +122,7 @@ public interface IStorageFileManagement : IStorageManagement
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
///
@@ -87,11 +143,11 @@ public interface IStorageFileManagement : IStorageManagement
///
/// Indicating the action for enumerated items.
///
- /// An Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies
+ /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
/// Indicating the cancellation token.
@@ -111,7 +167,7 @@ public interface IStorageFileManagement : IStorageManagement
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
///
@@ -135,7 +191,7 @@ public interface IStorageFileManagement : IStorageManagement
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
///
@@ -159,7 +215,7 @@ public interface IStorageFileManagement : IStorageManagement
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
///
@@ -182,7 +238,7 @@ public interface IStorageFileManagement : IStorageManagement
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
///
@@ -201,7 +257,7 @@ public interface IStorageFileManagement : IStorageManagement
/// Indicating the reference of the directory to be deleted.
///
///
- /// An Microsoft.WindowsAzure.Storage.AccessCondition object that represents
+ /// A Microsoft.WindowsAzure.Storage.AccessCondition object that represents
/// the access conditions for the share. If null, no condition is used.
///
///
@@ -209,7 +265,7 @@ public interface IStorageFileManagement : IStorageManagement
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
///
@@ -228,7 +284,7 @@ public interface IStorageFileManagement : IStorageManagement
/// Indicating the reference of the share to be deleted.
///
///
- /// An Microsoft.WindowsAzure.Storage.AccessCondition object that represents
+ /// A Microsoft.WindowsAzure.Storage.AccessCondition object that represents
/// the access conditions for the share. If null, no condition is used.
///
///
@@ -236,7 +292,7 @@ public interface IStorageFileManagement : IStorageManagement
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
///
@@ -255,7 +311,7 @@ public interface IStorageFileManagement : IStorageManagement
/// Indicating the reference of the file to be deleted.
///
///
- /// An Microsoft.WindowsAzure.Storage.AccessCondition object that represents
+ /// A Microsoft.WindowsAzure.Storage.AccessCondition object that represents
/// the access conditions for the share. If null, no condition is used.
///
///
@@ -263,7 +319,7 @@ public interface IStorageFileManagement : IStorageManagement
/// additional options for the request.
///
///
- /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
/// the context for the current operation.
///
///
@@ -274,5 +330,55 @@ public interface IStorageFileManagement : IStorageManagement
/// A System.Threading.Tasks.Task object that represents the current operation.
///
Task DeleteFileAsync(CloudFile file, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken);
+
+ ///
+ /// Async get share permissions.
+ ///
+ /// A CloudFileShare instance.
+ /// Access condition
+ /// File request option
+ /// Operation context
+ /// User cancellation token
+ /// A task object which retrieve the permission of the specified container
+ Task GetSharePermissionsAsync(CloudFileShare share, AccessCondition accessCondition,
+ FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken);
+
+ ///
+ /// Returns a task that performs an asynchronous operation to retrieve the file's
+ /// attributes.
+ ///
+ /// Indicating the file.
+ ///
+ /// A Microsoft.WindowsAzure.Storage.AccessCondition object that represents
+ /// the access conditions for the share. If null, no condition is used.
+ ///
+ ///
+ /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies
+ /// additional options for the request.
+ ///
+ ///
+ /// A Microsoft.WindowsAzure.Storage.OperationContext object that represents
+ /// the context for the current operation.
+ ///
+ ///
+ /// A System.Threading.CancellationToken to observe while waiting for a task
+ /// to complete.
+ ///
+ ///
+ /// A System.Threading.Tasks.Task object that represents the current operation.
+ ///
+ Task FetchFileAttributesAsync(CloudFile file, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken token);
+
+ ///
+ /// Return a task that asynchronously abort the file copy operation
+ ///
+ /// CloudFile object
+ /// Copy id
+ /// Access condition
+ /// File request options
+ /// Operation context
+ /// Cancellation token
+ /// Return a task that asynchronously abort the file copy operation
+ Task AbortCopyAsync(CloudFile file, string copyId, AccessCondition accessCondition, FileRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken);
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs
index 7a423402b9d6..7a2f5f6fd3c0 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs
@@ -12,10 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+
///
/// Storage management interface
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs
index 230edc52520b..98a52ae4ac30 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Queue;
-using Microsoft.WindowsAzure.Storage.Queue.Protocol;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using System;
+ using System.Collections.Generic;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Queue;
+ using Microsoft.WindowsAzure.Storage.Queue.Protocol;
+
///
/// Storage queue management interface
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs
index 03b1a2592fe7..80f8683944cd 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs
@@ -12,13 +12,13 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using System.Collections.Generic;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Table;
+
///
/// Storage table management interface
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs
index a324e3de3062..c61c86ccabbe 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs
@@ -12,20 +12,22 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Blob;
-using Microsoft.WindowsAzure.Storage.Queue;
-using Microsoft.WindowsAzure.Storage.Shared.Protocol;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using System;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Blob;
+ using Microsoft.WindowsAzure.Storage.File;
+ using Microsoft.WindowsAzure.Storage.File.Protocol;
+ using Microsoft.WindowsAzure.Storage.Queue;
+ using Microsoft.WindowsAzure.Storage.Shared.Protocol;
+ using Microsoft.WindowsAzure.Storage.Table;
+
///
/// Blob management
///
@@ -41,6 +43,26 @@ public class StorageBlobManagement : IStorageBlobManagement
///
private AzureStorageContext internalStorageContext;
+ private CloudBlobClient BlobClient
+ {
+ get
+ {
+ if (this.blobClient == null)
+ {
+ if (this.StorageContext.StorageAccount == null)
+ {
+ throw new ArgumentException(Resources.DefaultStorageCredentialsNotFound);
+ }
+ else
+ {
+ this.blobClient = this.StorageContext.StorageAccount.CreateCloudBlobClient();
+ }
+ }
+
+ return this.blobClient;
+ }
+ }
+
///
/// The azure storage context assoicated with this IStorageBlobManagement
///
@@ -59,7 +81,6 @@ public AzureStorageContext StorageContext
public StorageBlobManagement(AzureStorageContext context)
{
internalStorageContext = context;
- blobClient = internalStorageContext.StorageAccount.CreateCloudBlobClient();
}
///
@@ -72,7 +93,7 @@ public StorageBlobManagement(AzureStorageContext context)
/// An enumerable collection of cloudblobcontainer
public IEnumerable ListContainers(string prefix, ContainerListingDetails detailsIncluded, BlobRequestOptions options, OperationContext operationContext)
{
- return blobClient.ListContainers(prefix, detailsIncluded, options, operationContext);
+ return this.BlobClient.ListContainers(prefix, detailsIncluded, options, operationContext);
}
///
@@ -95,7 +116,7 @@ public BlobContainerPermissions GetContainerPermissions(CloudBlobContainer conta
/// A CloudBlobContainer in local memory
public CloudBlobContainer GetContainerReference(string name)
{
- return blobClient.GetContainerReference(name);
+ return this.BlobClient.GetContainerReference(name);
}
///
@@ -143,12 +164,12 @@ public void SetContainerPermissions(CloudBlobContainer container, BlobContainerP
/// Access condition
/// Blob request options
/// Operation context
- /// Return an ICloudBlob if the specific blob exists on azure, otherwise return null
- public ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ /// Return an CloudBlob if the specific blob exists on azure, otherwise return null
+ public CloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
try
{
- ICloudBlob blob = container.GetBlobReferenceFromServer(blobName, accessCondition, options, operationContext);
+ CloudBlob blob = Util.GetBlobReferenceFromServer(container, blobName, accessCondition, options, operationContext);
return blob;
}
catch(StorageException e)
@@ -173,7 +194,7 @@ public ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, strin
/// Blob listing details
/// Blob request option
/// Operation context
- /// An enumerable collection of icloudblob
+ /// An enumerable collection of CloudBlob
public IEnumerable ListBlobs(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, BlobRequestOptions options, OperationContext operationContext)
{
return container.ListBlobs(prefix, useFlatBlobListing, blobListingDetails, options, operationContext);
@@ -201,11 +222,11 @@ public bool DoesContainerExist(CloudBlobContainer container, BlobRequestOptions
///
/// Whether the blob is exists or not
///
- /// An ICloudBlob object
+ /// An CloudBlob object
/// Blob request option
/// Operation context
/// True if the specific blob exists, otherwise return false
- public bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext)
+ public bool DoesBlobExist(CloudBlob blob, BlobRequestOptions options, OperationContext operationContext)
{
if (null == blob)
{
@@ -220,12 +241,12 @@ public bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, Operation
///
/// Delete azure blob
///
- /// ICloudblob object
+ /// Cloudblob object
/// Delete snapshots option
/// Access condition
/// Operation context
- /// An enumerable collection of icloudblob
- public void DeleteICloudBlob(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ /// An enumerable collection of CloudBlob
+ public void DeleteCloudBlob(CloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
blob.Delete(deleteSnapshotsOption, accessCondition, options, operationContext);
}
@@ -248,7 +269,7 @@ public void FetchContainerAttributes(CloudBlobContainer container, AccessConditi
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- public void FetchBlobAttributes(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public void FetchBlobAttributes(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
blob.FetchAttributes(accessCondition, options, operationContext);
}
@@ -259,7 +280,7 @@ public void FetchBlobAttributes(ICloudBlob blob, AccessCondition accessCondition
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- public void SetBlobProperties(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public void SetBlobProperties(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
blob.SetProperties(accessCondition, options, operationContext);
}
@@ -271,7 +292,7 @@ public void SetBlobProperties(ICloudBlob blob, AccessCondition accessCondition,
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- public void SetBlobMetadata(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public void SetBlobMetadata(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
blob.SetMetadata(accessCondition, options, operationContext);
}
@@ -279,12 +300,12 @@ public void SetBlobMetadata(ICloudBlob blob, AccessCondition accessCondition, Bl
///
/// Abort copy operation on specified blob
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Copy id
/// Access condition
/// Blob request options
/// Operation context
- public void AbortCopy(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public void AbortCopy(CloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
try
{
@@ -323,6 +344,12 @@ public ServiceProperties GetStorageServiceProperties(StorageServiceType type, IR
return account.CreateCloudQueueClient().GetServiceProperties((QueueRequestOptions) options, operationContext);
case StorageServiceType.Table:
return account.CreateCloudTableClient().GetServiceProperties((TableRequestOptions) options, operationContext);
+ case StorageServiceType.File:
+ FileServiceProperties fileServiceProperties = account.CreateCloudFileClient().GetServiceProperties((FileRequestOptions)options, operationContext);
+ ServiceProperties sp = new ServiceProperties();
+ sp.Clean();
+ sp.Cors = fileServiceProperties.Cors;
+ return sp;
default:
throw new ArgumentException(Resources.InvalidStorageServiceType, "type");
}
@@ -350,6 +377,21 @@ public void SetStorageServiceProperties(StorageServiceType type, ServiceProperti
case StorageServiceType.Table:
account.CreateCloudTableClient().SetServiceProperties(properties, (TableRequestOptions)options, operationContext);
break;
+ case StorageServiceType.File:
+ if (null != properties.Logging)
+ {
+ throw new InvalidOperationException(Resources.FileNotSupportLogging);
+ }
+
+ if (null != properties.HourMetrics || null != properties.MinuteMetrics)
+ {
+ throw new InvalidOperationException(Resources.FileNotSupportMetrics);
+ }
+
+ FileServiceProperties fileServiceProperties = new FileServiceProperties();
+ fileServiceProperties.Cors = properties.Cors;
+ account.CreateCloudFileClient().SetServiceProperties(fileServiceProperties, (FileRequestOptions)options, operationContext);
+ break;
default:
throw new ArgumentException(Resources.InvalidStorageServiceType, "type");
}
@@ -394,12 +436,14 @@ public Task DoesContainerExistAsync(CloudBlobContainer container, BlobRequ
/// Operation context
/// Cancellation token
/// A task object that asynchronously get the blob reference from server
- public async Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public async Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
try
{
- ICloudBlob blob = await container.GetBlobReferenceFromServerAsync(blobName, accessCondition, options, operationContext, cancellationToken);
- return blob;
+ CloudBlob blob = container.GetBlobReference(blobName);
+ await blob.FetchAttributesAsync(accessCondition, options, operationContext, cancellationToken);
+
+ return Util.GetCorrespondingTypeBlobReference(blob);
}
catch (StorageException e)
{
@@ -423,7 +467,7 @@ public async Task GetBlobReferenceFromServerAsync(CloudBlobContainer
/// Operation context
/// Cancellation token
/// Return a task that asynchronously fetch blob attributes
- public Task FetchBlobAttributesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public Task FetchBlobAttributesAsync(CloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return blob.FetchAttributesAsync(accessCondition, options, operationContext, cancellationToken);
}
@@ -459,14 +503,14 @@ public Task DeleteContainerAsync(CloudBlobContainer container, AccessCondition a
///
/// Return a task that asynchronously abort the blob copy operation
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Copy id
/// Access condition
/// Blob request options
/// Operation context
/// Cancellation token
/// Return a task that asynchronously abort the blob copy operation
- public Task AbortCopyAsync(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
+ public Task AbortCopyAsync(CloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
{
return blob.AbortCopyAsync(copyId, accessCondition, requestOptions, operationContext, cancellationToken);
}
@@ -489,14 +533,14 @@ public Task SetContainerPermissionsAsync(CloudBlobContainer container, BlobConta
///
/// Return a task that asynchronously delete the specified blob
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Snapshot delete option
/// Access condition
/// Blob request option
/// Operation context
/// Cancellation token
/// Return a task that asynchronously delete the specified blob
- public Task DeleteICloudBlobAsync(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
+ public Task DeleteCloudBlobAsync(CloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
{
return blob.DeleteAsync(deleteSnapshotsOption, accessCondition, requestOptions, operationContext, cancellationToken);
}
@@ -504,12 +548,12 @@ public Task DeleteICloudBlobAsync(ICloudBlob blob, DeleteSnapshotsOption deleteS
///
/// Return a task that asynchronously check whether the specified blob exists.
///
- /// ICloudBlob object
+ /// CloudBlob object
/// Blob request options
/// Operation context
/// Cancellation token
/// A task object that asynchronously check whether the specified blob exists.
- public Task DoesBlobExistAsync(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
+ public Task DoesBlobExistAsync(CloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return blob.ExistsAsync(options, operationContext, cmdletCancellationToken);
}
@@ -521,7 +565,7 @@ public Task DoesBlobExistAsync(ICloudBlob blob, BlobRequestOptions options
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- public Task SetBlobPropertiesAsync(ICloudBlob blob, AccessCondition accessCondition,
+ public Task SetBlobPropertiesAsync(CloudBlob blob, AccessCondition accessCondition,
BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return blob.SetPropertiesAsync(accessCondition, options, operationContext, cmdletCancellationToken);
@@ -530,11 +574,11 @@ public Task SetBlobPropertiesAsync(ICloudBlob blob, AccessCondition accessCondit
///
/// Return a task that asynchronously set blob meta data
///
- /// ICloud blob object
+ /// CloudBlob object
/// Access condition
/// Blob request options
/// An object that represents the context for the current operation.
- public Task SetBlobMetadataAsync(ICloudBlob blob, AccessCondition accessCondition,
+ public Task SetBlobMetadataAsync(CloudBlob blob, AccessCondition accessCondition,
BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken)
{
return blob.SetMetadataAsync(accessCondition, options, operationContext, cmdletCancellationToken);
@@ -580,7 +624,7 @@ public BlobResultSegment ListBlobsSegmented(CloudBlobContainer container, string
/// An enumerable collection of cloudblobcontainer
public ContainerResultSegment ListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext)
{
- return blobClient.ListContainersSegmented(prefix, detailsIncluded, maxResults, currentToken, options, operationContext);
+ return this.BlobClient.ListContainersSegmented(prefix, detailsIncluded, maxResults, currentToken, options, operationContext);
}
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs
index 949aa962a386..6bdb9d0d511e 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.File;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using System;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.File;
+
///
/// File management
///
@@ -64,6 +64,16 @@ public CloudFileShare GetShareReference(string shareName)
return this.Client.GetShareReference(shareName);
}
+ public void FetchShareAttributes(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
+ {
+ share.FetchAttributes(accessCondition, options, operationContext);
+ }
+
+ public void SetShareProperties(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext)
+ {
+ share.SetProperties(accessCondition, options, operationContext);
+ }
+
public async Task EnumerateFilesAndDirectoriesAsync(CloudFileDirectory directory, Action enumerationAction, FileRequestOptions options, OperationContext operationContext, CancellationToken token)
{
FileContinuationToken continuationToken = null;
@@ -135,5 +145,34 @@ public Task DeleteFileAsync(CloudFile file, AccessCondition accessCondition, Fil
{
return file.DeleteAsync(accessCondition, options, operationContext, cancellationToken);
}
+
+ public Task GetSharePermissionsAsync(CloudFileShare share, AccessCondition accessCondition,
+ FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ {
+ return share.GetPermissionsAsync(accessCondition, options, operationContext, cancellationToken);
+ }
+
+ public FileSharePermissions GetSharePermissions(CloudFileShare share, AccessCondition accessCondition = null,
+ FileRequestOptions options = null, OperationContext operationContext = null)
+ {
+ return share.GetPermissions(accessCondition, options, operationContext);
+ }
+
+ public void SetSharePermissions(CloudFileShare share, FileSharePermissions permissions,
+ AccessCondition accessCondition = null,
+ FileRequestOptions options = null, OperationContext operationContext = null)
+ {
+ share.SetPermissions(permissions, accessCondition, options, operationContext);
+ }
+
+ public Task FetchFileAttributesAsync(CloudFile file, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken token)
+ {
+ return file.FetchAttributesAsync(accessCondition, options, operationContext, token);
+ }
+
+ public Task AbortCopyAsync(CloudFile file, string copyId, AccessCondition accessCondition, FileRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
+ {
+ return file.AbortCopyAsync(copyId, accessCondition, requestOptions, operationContext, cancellationToken);
+ }
}
}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs
index 9b5e0e1a03f0..de2b6964911f 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Queue;
-using Microsoft.WindowsAzure.Storage.Queue.Protocol;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using System.Collections.Generic;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Queue;
+ using Microsoft.WindowsAzure.Storage.Queue.Protocol;
+
///
/// Storage Queue management
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs
index c9acc63662fc..6a4880bec0cf 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs
@@ -12,14 +12,14 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-using Microsoft.WindowsAzure.Storage;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract
{
+ using System.Collections.Generic;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Table;
+
///
/// Storage table management
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs
index 0dbd86885daa..b680e3868b46 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs
@@ -12,11 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Commands.Common.Storage;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel
{
+ using System;
+ using Microsoft.WindowsAzure.Commands.Common.Storage;
+
///
/// Base class for all azure storage object
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs
index 00315260b766..9f543247e790 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs
@@ -12,20 +12,20 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel
{
+ using System;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
///
/// Azure storage blob object
///
public class AzureStorageBlob : AzureStorageBase
{
///
- /// ICloudBlob object
+ /// CloudBlob object
///
- public ICloudBlob ICloudBlob { get; private set; }
+ public CloudBlob ICloudBlob { get; private set; }
///
/// Azure storage blob type
@@ -61,7 +61,7 @@ public class AzureStorageBlob : AzureStorageBase
/// Azure storage blob constructor
///
/// ICloud blob object
- public AzureStorageBlob(ICloudBlob blob)
+ public AzureStorageBlob(CloudBlob blob)
{
Name = blob.Name;
ICloudBlob = blob;
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs
index d7467abb9a63..8fed95c6e57a 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs
@@ -12,11 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Storage.Blob;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel
{
+ using System;
+ using Microsoft.WindowsAzure.Storage.Blob;
+
///
/// azure storage container
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs
index 1bb47c2f56d9..55e9d9d0bfeb 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs
@@ -12,11 +12,11 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Storage.Queue;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel
{
+ using System;
+ using Microsoft.WindowsAzure.Storage.Queue;
+
///
/// Azure storage queue
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs
index a212cff479f7..e659989cbc6f 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs
@@ -12,11 +12,11 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using System;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel
{
+ using System;
+ using Microsoft.WindowsAzure.Storage.Table;
+
///
/// Azure storage table object
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/PSCorsRule.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/PSCorsRule.cs
new file mode 100644
index 000000000000..e4cc594a749b
--- /dev/null
+++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/PSCorsRule.cs
@@ -0,0 +1,29 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel
+{
+ public class PSCorsRule
+ {
+ public string[] AllowedOrigins { get; set; }
+
+ public string[] AllowedHeaders { get; set; }
+
+ public string[] ExposedHeaders { get; set; }
+
+ public string[] AllowedMethods { get; set; }
+
+ public int MaxAgeInSeconds { get; set; }
+ }
+}
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs
index ac075f05dc76..4a5fe3269f10 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs
@@ -12,18 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Management.Automation;
-using System.Security.Permissions;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Queue
{
+ using System;
+ using System.Collections.Generic;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ 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;
+
///
/// list azure queues
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs
index ca9d8f59f608..8a02b393c496 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs
@@ -12,16 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Queue
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ 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"),
OutputType(typeof(AzureStorageQueue))]
public class NewAzureStorageQueueCommand : StorageQueueBaseCmdlet
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs
index 5a96086051f3..c5f6f7252eb4 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Queue;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Queue;
+
[Cmdlet(VerbsCommon.New, StorageNouns.QueueSas), OutputType(typeof(String))]
public class NewAzureStorageQueueSasTokenCommand : StorageQueueBaseCmdlet
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs
index ab2470cbd2f8..242108cc8c36 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Queue;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Queue
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Queue;
+
[Cmdlet(VerbsCommon.Remove, "AzureStorageQueue", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High),
OutputType(typeof(Boolean))]
public class RemoveAzureStorageQueueCommand : StorageQueueBaseCmdlet
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/StorageQueueBaseCmdlet.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/StorageQueueBaseCmdlet.cs
index c3369622e442..4e26d5c2ab36 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Queue/StorageQueueBaseCmdlet.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/StorageQueueBaseCmdlet.cs
@@ -12,11 +12,11 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Queue;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Common
{
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Queue;
+
///
/// base class for azure queue cmdlet
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Resources.Designer.cs b/src/ServiceManagement/Storage/Commands.Storage/Resources.Designer.cs
index a25b40dc3033..f77c6fb3ecd0 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Resources.Designer.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Resources.Designer.cs
@@ -133,7 +133,7 @@ internal static string BlobNameShouldBeEmptyWhenUploading {
}
///
- /// Looks up a localized string similar to Can not find blob '{0}' in container '{1}'..
+ /// Looks up a localized string similar to Can not find blob '{0}' in container '{1}', or the blob type is unsupported..
///
internal static string BlobNotFound {
get {
@@ -150,6 +150,15 @@ internal static string BlobTypeMismatch {
}
}
+ ///
+ /// Looks up a localized string similar to Can not find blob '{0}', or the blob type is unsupported..
+ ///
+ internal static string BlobUriNotFound {
+ get {
+ return ResourceManager.GetString("BlobUriNotFound", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to The specified blob '{0}' is already a snapshot with snapshot time {1}. Can't use "DeleteSnapshot" option for it..
///
@@ -222,6 +231,15 @@ internal static string ConfirmAbortCopyOperation {
}
}
+ ///
+ /// Looks up a localized string similar to file '{0}' with CopyId {1}..
+ ///
+ internal static string ConfirmAbortFileCopyOperation {
+ get {
+ return ResourceManager.GetString("ConfirmAbortFileCopyOperation", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Confirm.
///
@@ -285,15 +303,6 @@ internal static string CopyBlobActivity {
}
}
- ///
- /// Looks up a localized string similar to Percent:{0}%. BytesCopied: {1}Bytes. TotalBytes: {2}Bytes..
- ///
- internal static string CopyBlobPendingStatus {
- get {
- return ResourceManager.GetString("CopyBlobPendingStatus", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to '{0}' copy to blob '{1}' in container '{2}' from '{3}'..
///
@@ -339,6 +348,24 @@ internal static string CopyDestinationBlobPending {
}
}
+ ///
+ /// Looks up a localized string similar to Copy File..
+ ///
+ internal static string CopyFileActivity {
+ get {
+ return ResourceManager.GetString("CopyFileActivity", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to '{0}' copy to file '{1}' in share '{2}' from '{3}'..
+ ///
+ internal static string CopyFileStatus {
+ get {
+ return ResourceManager.GetString("CopyFileStatus", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to CopyId can not be empty..
///
@@ -358,7 +385,16 @@ internal static string CopyIdMismatch {
}
///
- /// Looks up a localized string similar to Can not find copy task on specified blob '{0}' in container '{1}'..
+ /// Looks up a localized string similar to Percent:{0}%. BytesCopied: {1}Bytes. TotalBytes: {2}Bytes..
+ ///
+ internal static string CopyPendingStatus {
+ get {
+ return ResourceManager.GetString("CopyPendingStatus", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can not find copy task on the specified blob '{0}' in container '{1}'..
///
internal static string CopyTaskNotFound {
get {
@@ -375,6 +411,15 @@ internal static string CopyUriToBlobSuccessfully {
}
}
+ ///
+ /// Looks up a localized string similar to CORS rules setting is invalid. Please reference to "https://msdn.microsoft.com/en-us/library/azure/dn535601.aspx" to get detailed information..
+ ///
+ internal static string CORSRuleError {
+ get {
+ return ResourceManager.GetString("CORSRuleError", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Current Storage Account not found in subscription '{0}'. Please set it use "Set-AzureSubscription"..
///
@@ -393,6 +438,15 @@ internal static string CurrentStorageAccountNotFoundOnAzure {
}
}
+ ///
+ /// Looks up a localized string similar to core.windows.net.
+ ///
+ internal static string DefaultDomain {
+ get {
+ return ResourceManager.GetString("DefaultDomain", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Can not find your azure storage credential. Please set current storage account using "Set-AzureSubscription" or set the "AZURE_STORAGE_CONNECTION_STRING" environment variable..
///
@@ -510,6 +564,15 @@ internal static string FileAlreadyExists {
}
}
+ ///
+ /// Looks up a localized string similar to Can not find copy task on the specified file '{0}'..
+ ///
+ internal static string FileCopyTaskNotFound {
+ get {
+ return ResourceManager.GetString("FileCopyTaskNotFound", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to File name can not be empty..
///
@@ -546,6 +609,24 @@ internal static string FileNotFound {
}
}
+ ///
+ /// Looks up a localized string similar to It doesn't support logging in Microsoft Azure File service..
+ ///
+ internal static string FileNotSupportLogging {
+ get {
+ return ResourceManager.GetString("FileNotSupportLogging", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to It doesn't support metrics in Microsoft Azure File service..
+ ///
+ internal static string FileNotSupportMetrics {
+ get {
+ return ResourceManager.GetString("FileNotSupportMetrics", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Percent : {0}%. Average Speed : {1}/Second..
///
@@ -835,7 +916,7 @@ internal static string InvalidBlobProperties {
}
///
- /// Looks up a localized string similar to Blob type of "{0}" is invalid, only page blob or block blob are supported..
+ /// Looks up a localized string similar to Blob type '{0}' of blob '{1}' is not supported..
///
internal static string InvalidBlobType {
get {
@@ -844,7 +925,7 @@ internal static string InvalidBlobType {
}
///
- /// Looks up a localized string similar to ICloudBlob "{0}" should contain container properties..
+ /// Looks up a localized string similar to CloudBlob "{0}" should contain container properties..
///
internal static string InvalidBlobWithoutContainer {
get {
@@ -888,6 +969,15 @@ internal static string InvalidFileName {
}
}
+ ///
+ /// Looks up a localized string similar to '{0}' is an invalid HTTP method..
+ ///
+ internal static string InvalidHTTPMethod {
+ get {
+ return ResourceManager.GetString("InvalidHTTPMethod", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to The page blob size must be a multiple of 512 bytes. But the size of local file '{0}' is {1}..
///
@@ -1014,6 +1104,15 @@ internal static string ObjectCannotBeNull {
}
}
+ ///
+ /// Looks up a localized string similar to Only support to copy from azure file to a block blob..
+ ///
+ internal static string OnlyCopyFromBlockBlobToAzureFile {
+ get {
+ return ResourceManager.GetString("OnlyCopyFromBlockBlobToAzureFile", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to You must supply only one permission in Off/Blob/Container for container..
///
@@ -1267,7 +1366,7 @@ internal static string SendAzureFileActivity {
}
///
- /// Looks up a localized string similar to The given share name/prefix '{0}' is not a valid name for a file share of Microsoft Azure File Service..
+ /// Looks up a localized string similar to The given share name/prefix '{0}' is not a valid name for a file share of Microsoft Azure File Service; refer to https://msdn.microsoft.com/library/azure/dn167011.aspx for details..
///
internal static string ShareNameInvalid {
get {
@@ -1293,6 +1392,15 @@ internal static string SignedPermissionsMustBeOmitted {
}
}
+ ///
+ /// Looks up a localized string similar to This start time field must be omitted if it has been specified in an associated stored access policy..
+ ///
+ internal static string SignedStartTimeMustBeOmitted {
+ get {
+ return ResourceManager.GetString("SignedStartTimeMustBeOmitted", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Skip to download blob '{0}' with snapshot time '{0}'..
///
@@ -1374,6 +1482,15 @@ internal static string StopCopyBlobSuccessfully {
}
}
+ ///
+ /// Looks up a localized string similar to Stopped the copy task on file '{0}' successfully..
+ ///
+ internal static string StopCopyFileSuccessfully {
+ get {
+ return ResourceManager.GetString("StopCopyFileSuccessfully", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to The stop copy operation on blob '{0}' in container '{1}' is cancelled..
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Resources.resx b/src/ServiceManagement/Storage/Commands.Storage/Resources.resx
index 7ad2600af092..5033172fd6d0 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Resources.resx
+++ b/src/ServiceManagement/Storage/Commands.Storage/Resources.resx
@@ -124,7 +124,12 @@
Can not find blob name or container name.
- Can not find blob '{0}' in container '{1}'.
+ Can not find blob '{0}' in container '{1}', or the blob type is unsupported.
+ DRAFT
+
+
+ Can not find blob '{0}', or the blob type is unsupported.
+ DRAFT
Are you sure to remove container '{0}'?
@@ -166,9 +171,18 @@
Invalid expiry time '{0}'.
+
+ '{0}' is an invalid HTTP method.
+
Invalid start time '{0}'.
+
+ It doesn't support logging in Microsoft Azure File service.
+
+
+ It doesn't support metrics in Microsoft Azure File service.
+
You must supply only one permission in Off/Blob/Container for container.
@@ -258,7 +272,7 @@
Blob End Point: {0}.
- ICloudBlob "{0}" should contain container properties.
+ CloudBlob "{0}" should contain container properties.
Object '{0}' cannot be null.
@@ -349,8 +363,11 @@
{0} begin processing with ParameterSet '{1}'.
- Blob type of "{0}" is invalid, only page blob or block blob are supported.
- 0 for blob name
+ Blob type '{0}' of blob '{1}' is not supported.
+ 0 for blob type, 1 is the blob name. DRAFT
+
+
+ Only support to copy from azure file to a block blob.
The specified blob '{0}' is already a snapshot with snapshot time {1}. Can't use "DeleteSnapshot" option for it.
@@ -434,7 +451,11 @@
Stopped the copy task on blob '{0}' in container '{1}' successfully.
0 for blob name, 1 for container name
-
+
+ Stopped the copy task on file '{0}' successfully.
+ 0 for file uri
+
+
Percent:{0}%. BytesCopied: {1}Bytes. TotalBytes: {2}Bytes.
0 for copied percent, 1 for bytes copied, 2 for total bytes.
@@ -442,6 +463,10 @@
'{0}' copy to blob '{1}' in container '{2}' from '{3}'.
0 for copy status, 1 for destination blob name, 2 for destination container name, 3 for source uri.
+
+ '{0}' copy to file '{1}' in share '{2}' from '{3}'.
+ 0 for copy status, 1 for destination file path, 2 for destination share name, 3 for source uri.
+
Successfully start copy blob '{0}' in container '{1}' to blob '{2}' in container '{3}'.
0 for source blob name, 1 for source container name, 2 for destination blob name, 3 for destination container name.
@@ -453,6 +478,9 @@
Copy Blob.
+
+ Copy File.
+
Copy Blob Status Summary.
@@ -461,9 +489,16 @@
0,1,2,3 for related task count.
- Can not find copy task on specified blob '{0}' in container '{1}'.
+ Can not find copy task on the specified blob '{0}' in container '{1}'.
0 for blob name, 1 for container name.
+
+ Can not find copy task on the specified file '{0}'.
+ 0 for file uri.
+
+
+ CORS rules setting is invalid. Please reference to "https://msdn.microsoft.com/en-us/library/azure/dn535601.aspx" to get detailed information.
+
Transmit failed. Exception: {0}.
0 for error message.
@@ -479,6 +514,10 @@
blob '{0}' in container '{1}' with CopyId {2}.
0 for blob name, 1 for container name, 2 for copy id.
+
+ file '{0}' with CopyId {1}.
+ 0 for file uri, 1 for copy id.
+
CopyId mismatch on blob '{0}' in container '{1}'. Expected:{2}. User supplied: {3}.
0 for blob name, 1 for container name. 2 for copy id on blob, 3 for user supplied copy id.
@@ -587,6 +626,9 @@ Failed: {2}.
Can't read the blob properties.
+
+ This start time field must be omitted if it has been specified in an associated stored access policy.
+
This expiry time field must be omitted if it has been specified in an associated stored access policy.
@@ -600,6 +642,9 @@ Failed: {2}.
Confirm
+
+ core.windows.net
+
Total: {0}. Successful: {1}. Failed: {2}. Active: {3}.
0 for total task count, 1 for successful count, 2 for failed count, 3 for active count.
@@ -641,7 +686,7 @@ Failed: {2}.
The length of the given path/prefix '{0}' exceeded the max allowed length {1} for Microsoft Azure File Service REST API.
- The given share name/prefix '{0}' is not a valid name for a file share of Microsoft Azure File Service.
+ The given share name/prefix '{0}' is not a valid name for a file share of Microsoft Azure File Service; refer to https://msdn.microsoft.com/library/azure/dn167011.aspx for details.
The specified source file '{0}' was not found.
@@ -689,4 +734,4 @@ Failed: {2}.
Parameter -StartTime and -NoStartTime are mutually exclusive
-
\ No newline at end of file
+
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetAzureStorageTableStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetAzureStorageTableStoredAccessPolicy.cs
index 52daf2df4c6a..ab810719841d 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetAzureStorageTableStoredAccessPolicy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetAzureStorageTableStoredAccessPolicy.cs
@@ -12,20 +12,18 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Commands.Storage.Table;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using System.Threading.Tasks;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Commands.Storage.Table;
+ using Microsoft.WindowsAzure.Storage.Table;
+
[Cmdlet(VerbsCommon.Get, StorageNouns.TableStoredAccessPolicy), OutputType(typeof(SharedAccessTablePolicy))]
public class GetAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCmdletBase
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs
index d7dd7a0ee816..c8eddb7248b0 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs
@@ -12,17 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Management.Automation;
-using System.Security.Permissions;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
{
+ using System;
+ using System.Collections.Generic;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ 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;
+
///
/// list azure tables
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs
index b596aca8e642..71abc0e60537 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Table;
+
[Cmdlet(VerbsCommon.New, StorageNouns.TableSas), OutputType(typeof(String))]
public class NewAzureStorageTableSasTokenCommand : StorageCloudTableCmdletBase
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableStoredAccessPolicy.cs
index aebd700fde01..7cc36c374e97 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableStoredAccessPolicy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableStoredAccessPolicy.cs
@@ -12,18 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Globalization;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Commands.Storage.Table;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Commands.Storage.Table;
+ using Microsoft.WindowsAzure.Storage.Table;
+
[Cmdlet(VerbsCommon.New, StorageNouns.TableStoredAccessPolicy), OutputType(typeof(String))]
public class NewAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCmdletBase
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs
index be6b5a6148c9..996cb9f3b3d8 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs
@@ -12,16 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-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;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ 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;
+
///
/// create an new azure table
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveAzureStorageTableStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveAzureStorageTableStoredAccessPolicy.cs
index 28015a704842..cf097a07e104 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveAzureStorageTableStoredAccessPolicy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveAzureStorageTableStoredAccessPolicy.cs
@@ -12,18 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Globalization;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Commands.Storage.Table;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Commands.Storage.Table;
+ using Microsoft.WindowsAzure.Storage.Table;
+
[Cmdlet(VerbsCommon.Remove, StorageNouns.TableStoredAccessPolicy, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(Boolean))]
public class RemoveAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCmdletBase
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs
index aea6426b74f5..bd431b58f22c 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs
@@ -12,15 +12,15 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Management.Automation;
-using System.Security.Permissions;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
{
+ using System;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Table;
+
///
/// remove an azure table
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/SetAzureStorageTableStoredAccessPolicy.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/SetAzureStorageTableStoredAccessPolicy.cs
index 20b27db7efdd..c4fd761f122a 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/SetAzureStorageTableStoredAccessPolicy.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/SetAzureStorageTableStoredAccessPolicy.cs
@@ -12,18 +12,17 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System;
-using System.Globalization;
-using System.Management.Automation;
-using System.Security.Permissions;
-using System.Threading.Tasks;
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Commands.Storage.Table;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet
{
+ using System;
+ using System.Globalization;
+ using System.Management.Automation;
+ using System.Security.Permissions;
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Commands.Storage.Table;
+ using Microsoft.WindowsAzure.Storage.Table;
+
[Cmdlet(VerbsCommon.Set, StorageNouns.TableStoredAccessPolicy), OutputType(typeof(String))]
public class SetAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCmdletBase
{
diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/StorageCloudTableCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/StorageCloudTableCmdletBase.cs
index d56f4a6cfa21..c545c276f7e5 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/Table/StorageCloudTableCmdletBase.cs
+++ b/src/ServiceManagement/Storage/Commands.Storage/Table/StorageCloudTableCmdletBase.cs
@@ -12,12 +12,12 @@
// limitations under the License.
// ---------------------------------------------------------------------------------
-using Microsoft.WindowsAzure.Commands.Storage.Common;
-using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
-using Microsoft.WindowsAzure.Storage.Table;
-
namespace Microsoft.WindowsAzure.Commands.Storage.Table
{
+ using Microsoft.WindowsAzure.Commands.Storage.Common;
+ using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
+ using Microsoft.WindowsAzure.Storage.Table;
+
///
/// base class for table cmdlet
///
diff --git a/src/ServiceManagement/Storage/Commands.Storage/packages.config b/src/ServiceManagement/Storage/Commands.Storage/packages.config
index 7f19b16aa646..681ebf9f32ad 100644
--- a/src/ServiceManagement/Storage/Commands.Storage/packages.config
+++ b/src/ServiceManagement/Storage/Commands.Storage/packages.config
@@ -8,16 +8,16 @@
-
-
-
+
+
+
-
-
-
-
\ No newline at end of file
+
+
+
+
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj
index bd34c5b08742..0d13c3d5f5f2 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj
@@ -105,9 +105,9 @@
False
..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config
index 2400028f420e..e8fc866a43a8 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config
@@ -19,7 +19,7 @@
-
+
\ No newline at end of file
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj
index f92a2e08e26f..17598d8216fa 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj
@@ -110,9 +110,9 @@
False
..\..\..\packages\Microsoft.WindowsAzure.Management.TrafficManager.0.16.0-preview\lib\net40\Microsoft.WindowsAzure.Management.TrafficManager.dll
-
- ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
- True
+
+ False
+ ..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll
diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
index 1f91acc7a2aa..19268d2c1bea 100644
--- a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
+++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config
@@ -18,6 +18,6 @@
-
+
\ No newline at end of file
diff --git a/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll b/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll
index 468e304e2611..5b488cc4b67a 100644
Binary files a/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll and b/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll differ