Skip to content

Commit a8d47fb

Browse files
author
Shefali
committed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
2 parents c1194e9 + f1176c5 commit a8d47fb

File tree

588 files changed

+155288
-56806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

588 files changed

+155288
-56806
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Contribute Code or Provide Feedback
22

3-
If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://windowsazure.github.com/guidelines.html).
3+
If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.io/guidelines/).
44

55
If you encounter any bugs with Microsoft Azure PowerShell please file an issue in the [Issues](https://github.com/Azure/azure-powershell/issues) section of the project.

ChangeLog.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
##2016.03.08 version 1.3.0
1+
##2016.03.03 version 1.2.2
2+
* Azure Compute (ARM):
3+
* Add -LicenseType parameter to New-AzureRmVM for bring your own license (BYOL)
4+
* Add -SecureExecution parameter to Set-AzureRmVMCustomScriptExtension
5+
* Add -DisableAutoUpgradeMinorVersion and -ForceRerun parameters to Set-AzureRmVMExtension
6+
* Add Set-AzureRmVMPlan cmdlet
7+
* Add -Redeploy parameter to Set-AzureRmVM
8+
* Add AutoUpgradeMinorVersion and ForceUpdateTag parameters for Get-AzureRmVMExtension
9+
* Update positions of parameters for New-AzureRmVM
10+
* Azure Compute (Service Management):
11+
* Add Set-AzureBootDiagnostics cmdlets
12+
* Enable boot diagnostics by default for New-AzureVM and New-AzureQuickVM
213
* Azure LogicApp: New cmdlets for managing LogicApps
314
* Get-AzureLogicAppAccessKey
415
* Get-AzureLogicApp
@@ -12,6 +23,21 @@
1223
* Set-AzureLogicAppAccessKey
1324
* Set-AzureLogicApp
1425
* Stop-AzureLogicAppRun
26+
* Azure Storage
27+
* Added cmdlet to generate SAS token against storage account
28+
- New-AzureStorageAccountSASToken
29+
* Added IPAddressOrRange/Protocol support in cmdlets to generate SAS token against blob, container, file, share, table, queue
30+
- New-AzureStorageBlobSASToken
31+
- New-AzureStorageContainerSASToken
32+
- New-AzureStorageFileSASToken
33+
- New-AzureStorageShareSASToken
34+
- New-AzureStorageQueueSASToken
35+
- New-AzureStorageTableSASToken
36+
* Azure SQL DB Backup/restore
37+
* Get-AzureRmSqlDatabaseGeoBackup
38+
* Get-AzureRmSqlDeletedDatabaseBackup
39+
* Restore-AzureRmSqlDatabase
40+
* This cmdlet accepts as pipelined input the result of one of the first two cmdlets (or Get-AzureRmSqlDatabase if restoring a live DB to a point-in-time)
1541

1642
## 2016.02.04 version 1.2.1
1743
* Fix installer issue - remove PSGallery modules on install

setup/azurecmd.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
33

4-
<?define productName="Microsoft Azure PowerShell - February 2016" ?>
4+
<?define productName="Microsoft Azure PowerShell - March 2016" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="1.2.1" ?>
8+
<?define version="1.2.2" ?>
99

1010
<Product Id="*"
1111
Name="$(var.productName)"

setup/azurecmdfiles.wxi

Lines changed: 184 additions & 188 deletions
Large diffs are not rendered by default.
Binary file not shown.

src/Common/Commands.Common.Authentication/Commands.Common.Authentication.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<OutputType>Library</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>Microsoft.Azure.Commands.Common.Authentication</RootNamespace>
11-
<AssemblyName>Commands.Common.Authentication</AssemblyName>
11+
<AssemblyName>Microsoft.Azure.Commands.Common.Authentication</AssemblyName>
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
14+
<TargetFrameworkProfile />
1515
<RestorePackages>true</RestorePackages>
1616
<CodeAnalysisAdditionalOptions>/assemblyCompareMode:StrongNameIgnoringVersion</CodeAnalysisAdditionalOptions>
1717
<NuGetPackageImportStamp>06e19c11</NuGetPackageImportStamp>
@@ -51,7 +51,8 @@
5151
</PropertyGroup>
5252
<ItemGroup>
5353
<Reference Include="Hyak.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
54-
<HintPath>..\..\packages\Hyak.Common.1.0.3\lib\net45\Hyak.Common.dll</HintPath>
54+
<SpecificVersion>False</SpecificVersion>
55+
<HintPath>..\..\packages\Hyak.Common.1.0.3\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
5556
<Private>True</Private>
5657
</Reference>
5758
<Reference Include="Microsoft.Azure.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -178,5 +179,4 @@
178179
<None Include="packages.config" />
179180
</ItemGroup>
180181
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
181-
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
182182
</Project>

src/Common/Commands.Common.Authentication/Factories/ClientFactory.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,19 @@ public virtual TClient CreateClient<TClient>(AzureSMProfile profile, AzureEnviro
119119
}
120120

121121
/// <summary>
122+
/// Creates the client.
122123
/// </summary>
123-
/// <typeparam name="TClient"></typeparam>
124-
/// <param name="subscription"></param>
125-
/// <param name="endpoint"></param>
124+
/// <typeparam name="TClient">The type of the client.</typeparam>
125+
/// <param name="profile">The profile.</param>
126+
/// <param name="subscription">The subscription.</param>
127+
/// <param name="endpoint">The endpoint.</param>
126128
/// <returns></returns>
129+
/// <exception cref="System.ApplicationException"></exception>
130+
/// <exception cref="System.ArgumentException">
131+
/// accountName
132+
/// or
133+
/// environment
134+
/// </exception>
127135
public virtual TClient CreateClient<TClient>(AzureSMProfile profile, AzureSubscription subscription, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient<TClient>
128136
{
129137
if (subscription == null)
@@ -287,7 +295,7 @@ public void AddUserAgent(string productName)
287295

288296
public HashSet<ProductInfoHeaderValue> UserAgents { get; set; }
289297

290-
private DelegatingHandler[] GetCustomHandlers()
298+
public DelegatingHandler[] GetCustomHandlers()
291299
{
292300
List<DelegatingHandler> newHandlers = new List<DelegatingHandler>();
293301
var enumerator = _handlers.GetEnumerator();

src/Common/Commands.Common.Authentication/Interfaces/IClientFactory.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public interface IClientFactory
5454
/// <param name="productName">Product name.</param>
5555
void AddUserAgent(string productName);
5656

57+
/// <summary>
58+
/// Gets the custom handlers.
59+
/// </summary>
60+
/// <returns>An array of custom handlers</returns>
61+
DelegatingHandler[] GetCustomHandlers();
62+
5763
/// <summary>
5864
/// Adds user agent to UserAgents collection.
5965
/// </summary>
Binary file not shown.

src/Common/Commands.Common.Authentication/Models/XmlProfileSerializer.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ public bool Deserialize(string contents, AzureSMProfile profile)
3838
DeserializeErrors = new List<string>();
3939

4040
DataContractSerializer serializer = new DataContractSerializer(typeof(ProfileData));
41+
42+
// For backward compatibility since namespace of ProfileData has been changed
43+
// we need to replace previous namespace with the current one
44+
if (!string.IsNullOrWhiteSpace(contents))
45+
{
46+
contents = contents.Replace(
47+
"http://schemas.datacontract.org/2004/07/Microsoft.Azure.Common.Authentication",
48+
"http://schemas.datacontract.org/2004/07/Microsoft.Azure.Commands.Common.Authentication");
49+
}
50+
4151
using (MemoryStream s = new MemoryStream(Encoding.UTF8.GetBytes(contents ?? "")))
4252
{
4353
data = (ProfileData)serializer.ReadObject(s);

src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
<HintPath>..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
5555
</Reference>
5656
<Reference Include="Microsoft.Azure.Test.Framework">
57-
<HintPath>..\..\packages\Microsoft.Azure.Test.Framework.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
57+
<HintPath>..\..\packages\Microsoft.Azure.Test.Framework.1.0.5896.19355-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
5858
</Reference>
5959
<Reference Include="Microsoft.Azure.Test.HttpRecorder">
60-
<HintPath>..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
60+
<HintPath>..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5896.19355-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
6161
</Reference>
6262
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory">
6363
<SpecificVersion>False</SpecificVersion>

src/Common/Commands.ScenarioTests.Common/Mocks/MockClientFactory.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ public void RemoveHandler(Type handlerType)
176176
// Do nothing
177177
}
178178

179+
public DelegatingHandler[] GetCustomHandlers()
180+
{
181+
// the equivalent of doing nothing
182+
return new DelegatingHandler[0];
183+
}
184+
179185
public void AddUserAgent(string productName, string productVersion)
180186
{
181187
this.UserAgents.Add(new ProductInfoHeaderValue(productName, productVersion));

src/Common/Commands.ScenarioTests.Common/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
55
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
66
<package id="Microsoft.Azure.Management.Resources" version="2.18.11-preview" targetFramework="net45" />
7-
<package id="Microsoft.Azure.Test.Framework" version="1.0.5886.28964-prerelease" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5886.28964-prerelease" targetFramework="net45" />
7+
<package id="Microsoft.Azure.Test.Framework" version="1.0.5896.19355-prerelease" targetFramework="net45" />
8+
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5896.19355-prerelease" targetFramework="net45" />
99
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1010
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1111
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />

src/Common/Storage/Azure.Storage.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@{
1010

1111
# Version number of this module.
12-
ModuleVersion = '1.0.4'
12+
ModuleVersion = '1.0.5'
1313

1414
# ID used to uniquely identify this module
1515
GUID = '00612bca-fa22-401d-a671-9cc48b010e3b'

src/Common/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<Private>True</Private>
5656
</Reference>
5757
<Reference Include="Microsoft.Azure.Test.HttpRecorder">
58-
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
58+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5896.19355-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
5959
<Private>True</Private>
6060
</Reference>
6161
<Reference Include="Microsoft.Data.Edm">

src/Common/Storage/Commands.Storage.ScenarioTest/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
44
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5886.28964-prerelease" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5896.19355-prerelease" targetFramework="net45" />
66
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
77
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
88
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />

src/Common/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.18.11-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
7070
</Reference>
7171
<Reference Include="Microsoft.Azure.Test.HttpRecorder">
72-
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5886.28964-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
72+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.0.5896.19355-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
7373
<Private>True</Private>
7474
</Reference>
7575
<Reference Include="Microsoft.CSharp" />

src/Common/Storage/Commands.Storage.Test/Service/MockStorageBlobManagement.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,16 @@ public Task<string> StartCopyAsync(CloudBlob blob, Uri source, AccessCondition s
685685
throw new NotImplementedException();
686686
}
687687

688+
/// <summary>
689+
/// Get the SAS token for an account.
690+
/// </summary>
691+
/// <param name="sharedAccessAccountPolicy">Shared access policy to generate the SAS token.</param>
692+
/// <returns>Account SAS token.</returns>
693+
public string GetStorageAccountSASToken(SharedAccessAccountPolicy sharedAccessAccountPolicy)
694+
{
695+
throw new NotImplementedException();
696+
}
697+
688698
/// <summary>
689699
/// The storage context
690700
/// </summary>

src/Common/Storage/Commands.Storage.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Resources" version="2.18.11-preview" targetFramework="net45" />
9-
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5886.28964-prerelease" targetFramework="net45" />
9+
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5896.19355-prerelease" targetFramework="net45" />
1010
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1111
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1212
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />

src/Common/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
2020
using Microsoft.WindowsAzure.Commands.Storage.Common;
2121
using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
2222
using Microsoft.WindowsAzure.Storage.Blob;
23+
using Microsoft.WindowsAzure.Storage;
2324

2425
[Cmdlet(VerbsCommon.New, StorageNouns.BlobSas, DefaultParameterSetName = BlobNamePipelineParmeterSetWithPermission), OutputType(typeof(String))]
2526
public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase
@@ -80,6 +81,12 @@ public string Policy
8081
ParameterSetName = BlobPipelineParameterSetWithPermision)]
8182
public string Permission { get; set; }
8283

84+
[Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")]
85+
public SharedAccessProtocol Protocol { get; set; }
86+
87+
[Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")]
88+
public string IPAddressOrRange { get; set; }
89+
8390
[Parameter(HelpMessage = "Start Time")]
8491
public DateTime? StartTime { get; set; }
8592

@@ -133,7 +140,7 @@ public override void ExecuteCmdlet()
133140
SharedAccessBlobPolicy accessPolicy = new SharedAccessBlobPolicy();
134141
bool shouldSetExpiryTime = SasTokenHelper.ValidateContainerAccessPolicy(Channel, blob.Container.Name, accessPolicy, accessPolicyIdentifier);
135142
SetupAccessPolicy(accessPolicy, shouldSetExpiryTime);
136-
string sasToken = GetBlobSharedAccessSignature(blob, accessPolicy, accessPolicyIdentifier);
143+
string sasToken = GetBlobSharedAccessSignature(blob, accessPolicy, accessPolicyIdentifier, Protocol, Util.SetupIPAddressOrRangeForSAS(IPAddressOrRange));
137144

138145
if (FullUri)
139146
{
@@ -154,10 +161,10 @@ public override void ExecuteCmdlet()
154161
/// <param name="accessPolicy">SharedAccessBlobPolicy object</param>
155162
/// <param name="policyIdentifier">The existing policy identifier.</param>
156163
/// <returns></returns>
157-
private string GetBlobSharedAccessSignature(CloudBlob blob, SharedAccessBlobPolicy accessPolicy, string policyIdentifier)
164+
private string GetBlobSharedAccessSignature(CloudBlob blob, SharedAccessBlobPolicy accessPolicy, string policyIdentifier, SharedAccessProtocol protocol, IPAddressOrRange iPAddressOrRange)
158165
{
159166
CloudBlobContainer container = blob.Container;
160-
return blob.GetSharedAccessSignature(accessPolicy, policyIdentifier);
167+
return blob.GetSharedAccessSignature(accessPolicy, null, policyIdentifier, protocol, iPAddressOrRange);
161168
}
162169

163170
/// <summary>

src/Common/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet
2020
using Microsoft.WindowsAzure.Commands.Storage.Common;
2121
using Microsoft.WindowsAzure.Commands.Storage.Model.Contract;
2222
using Microsoft.WindowsAzure.Storage.Blob;
23+
using Microsoft.WindowsAzure.Storage;
2324

2425
[Cmdlet(VerbsCommon.New, StorageNouns.ContainerSas), OutputType(typeof(String))]
2526
public class NewAzureStorageContainerSasTokenCommand : StorageCloudBlobCmdletBase
@@ -51,9 +52,15 @@ public string Policy
5152
private string accessPolicyIdentifier;
5253

5354
[Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"rwdl\".",
54-
ParameterSetName = SasPermissionParameterSet)]
55+
ParameterSetName = SasPermissionParameterSet)]
5556
public string Permission { get; set; }
5657

58+
[Parameter(Mandatory = false, HelpMessage = "Protocol can be used in the request with this SAS token.")]
59+
public SharedAccessProtocol Protocol { get; set; }
60+
61+
[Parameter(Mandatory = false, HelpMessage = "IP, or IP range ACL (access control list) that the request would be accepted from by Azure Storage.")]
62+
public string IPAddressOrRange { get; set; }
63+
5764
[Parameter(HelpMessage = "Start Time")]
5865
public DateTime? StartTime { get; set; }
5966

@@ -98,7 +105,7 @@ public override void ExecuteCmdlet()
98105
SharedAccessBlobPolicy accessPolicy = new SharedAccessBlobPolicy();
99106
bool shouldSetExpiryTime = SasTokenHelper.ValidateContainerAccessPolicy(Channel, container.Name, accessPolicy, accessPolicyIdentifier);
100107
SetupAccessPolicy(accessPolicy, shouldSetExpiryTime);
101-
string sasToken = container.GetSharedAccessSignature(accessPolicy, accessPolicyIdentifier);
108+
string sasToken = container.GetSharedAccessSignature(accessPolicy, accessPolicyIdentifier, Protocol, Util.SetupIPAddressOrRangeForSAS(IPAddressOrRange));
102109

103110
if (FullUri)
104111
{

src/Common/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,10 @@ private async Task StartCopyFromBlob(long taskId, IStorageBlobManagement destCha
489489
// Opened workitem 1487579 to track this.
490490
throw new InvalidOperationException(Resources.DestinationBlobTypeNotMatch);
491491
}
492+
else
493+
{
494+
throw;
495+
}
492496
}
493497
}
494498

src/Common/Storage/Commands.Storage/Commands.Storage.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
<Compile Include="Common\BlobToFileSystemNameResolver.cs" />
174174
<Compile Include="Blob\Cmdlet\StartAzureStorageBlobCopy.cs" />
175175
<Compile Include="Blob\Cmdlet\StopAzureStorageBlobCopy.cs" />
176+
<Compile Include="Common\Cmdlet\NewAzureStorageAccountSasToken.cs" />
176177
<Compile Include="Common\Cmdlet\SetAzureStorageCORSRule.cs" />
177178
<Compile Include="Common\Cmdlet\GetAzureStorageCORSRule.cs" />
178179
<Compile Include="Common\Cmdlet\GetAzureStorageServiceLogging.cs" />

0 commit comments

Comments
 (0)