Skip to content

Commit a3a7818

Browse files
committed
Merge remote-tracking branch 'refs/remotes/Azure/dev' into sasolank_updatepowershell
# Conflicts: # src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/packages.config # src/ResourceManager/ApiManagement/Commands.ApiManagement/packages.config
2 parents 6285407 + 09c1d0d commit a3a7818

File tree

785 files changed

+104770
-90340
lines changed

Some content is hidden

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

785 files changed

+104770
-90340
lines changed

ChangeLog.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
1-
##2016.03.30 version 1.3.0
1+
##2016.05.03 version 1.4.0
2+
* Azure Storage
3+
* Upgrade to Microsoft.Azure.Management.Storage nuget package v5.0 preview
4+
* Add Encryption and Hot/Cool features support to resource mode storage account cmdlets
5+
- New-AzureRmStorageAccount
6+
- Set-AzureRmStorageAccount
7+
* Add "Add" and "Create" permission to Blob SAS cmdlets
8+
- New-AzureStorageBlobSASToken
9+
- New-AzureStorageContainerSASToken
10+
- New-AzureStorageContainerStoredAccessPolicy
11+
- Set-AzureStorageContainerStoredAccessPolicy
12+
* Add "Create" permission to File SAS cmdlets
13+
- New-AzureStorageFileSASToken
14+
- New-AzureStorageShareSASToken
15+
- New-AzureStorageShareStoredAccessPolicy
16+
- Set-AzureStorageShareStoredAccessPolicy
17+
18+
##2016.04.19 version 1.3.2
19+
* Add support for specifying NIC/VMSS as application gateway backend address
20+
* Fix HDI ADL cluster creation and live test
21+
* Fix WAPack cmdlet Proxy issue for WAP
22+
* Fix Dynamic Memory Issue while setting VM
23+
* Update Azure Gov STS and Traffic Manager
24+
* Compute
25+
- Upgrade to Microsoft.Azure.Management.Compute nuget package v13.0
26+
* HDInsignt
27+
- Upgrade to Microsoft.Azure.Management.HDInsight nuget package v1.0.14
28+
* Resource Manager
29+
- Change api-version for Policy and Locks operations
30+
- Change api version for Deployments operations
31+
* Web Apps
32+
- Add backup and restore cmdlets
33+
- Restore-AzureWebApp
34+
- Edit-AzureRmWebAppBackupConfiguration
35+
- Get-AzureRmWebAppBackupConfiguration
36+
- Get-AzureRmWebAppBackup
37+
- New-AzureRmWebAppBackup
38+
- Remove-AzureRmWebAppBackup
39+
- Restore-AzureRmWebAppBackup
40+
- Get-AzureRmWebAppBackupList
41+
- New-AzureRmWebAppDatabaseBackupSetting
42+
- Upgrade to Microsoft.WindowsAzure.Management.WebSite nuget package v5.0
43+
44+
##2016.03.30 version 1.3.0
245
* AzureRM module
346
- Installation performance fix
447
* New Azure CDN cmdlets

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For detail descriptions and examples of the cmdlets, type
5959
* [Azure Stack](https://azure.microsoft.com/en-us/overview/azure-stack/)
6060
* [Windows Azure Pack](https://www.microsoft.com/en-us/server-cloud/windows-azure-pack.aspx)
6161
* [Microsoft Azure China](https://www.azure.cn/)
62-
* [USGovernment](https://azure.microsoft.com/en-us/features/gov/)
62+
* [Microsoft Azure US Government](https://azure.microsoft.com/en-us/features/gov/)
6363

6464
## Installation
6565

@@ -123,6 +123,15 @@ Add-AzureRmAccount -EnvironmentName AzureChinaCloud
123123
New-AzureRmResourceGroup -Name myresourceGroup -Location "China East"
124124
```
125125

126+
### Microsoft Azure US Government
127+
128+
```powershell
129+
Add-AzureRmAccount -EnvironmentName AzureUSGovernment
130+
131+
# use the cmdlets to manage your services/applications
132+
New-AzureRmResourceGroup -Name myresourceGroup -Location "US Gov Virginia"
133+
```
134+
126135
### Windows Azure Pack
127136

128137
```powershell

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

8-
<?define version="1.3.0" ?>
8+
<?define version="1.3.2" ?>
99

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

setup/azurecmdfiles.wxi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,9 @@
462462
<Component Id="cmpEC720F6E3871A33FE098F6CEB7617D8F" Guid="*">
463463
<File Id="filE5E777BDF09D8E3E09A887286A7FBFCB" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Batch\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll" />
464464
</Component>
465+
<Component Id="cmp7BE433E392CBC4CABE32256077124C6E" Guid="*">
466+
<File Id="fil027AB5F08FF4A7F59EE167422771AABE" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Batch\Microsoft.Rest.ClientRuntime.Azure.dll" />
467+
</Component>
465468
<Component Id="cmp5D544D73B729F9669498812ECF7BF3E1" Guid="*">
466469
<File Id="filBC5BF331E6C0917A1886357E3ED64497" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Batch\Microsoft.Rest.ClientRuntime.dll" />
467470
</Component>
@@ -2538,6 +2541,9 @@
25382541
<Component Id="cmpA2A4B67ACC8738C88A82A9576BD82026" Guid="*">
25392542
<File Id="fil2E6EA8F5997FA6DBE29FCE3A58F051DF" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Storage\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll" />
25402543
</Component>
2544+
<Component Id="cmp3AE4D7EAA86E455A89006A85332F6B3A" Guid="*">
2545+
<File Id="fil6C5492894C2F4DDD80E710891D53B6D2" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Storage\Microsoft.Rest.ClientRuntime.Azure.dll" />
2546+
</Component>
25412547
<Component Id="cmpE56C0006C325EFBAD7984DBBCF689FD2" Guid="*">
25422548
<File Id="filDAF92272D69F4A127139311912333F8B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Storage\Microsoft.Rest.ClientRuntime.dll" />
25432549
</Component>
@@ -5138,6 +5144,7 @@
51385144
<ComponentRef Id="cmpD762051962F7D3051FBC9CF971AE9325" />
51395145
<ComponentRef Id="cmpB11D8DF03DCC6DF2571C30776714A652" />
51405146
<ComponentRef Id="cmpEC720F6E3871A33FE098F6CEB7617D8F" />
5147+
<ComponentRef Id="cmp7BE433E392CBC4CABE32256077124C6E" />
51415148
<ComponentRef Id="cmp5D544D73B729F9669498812ECF7BF3E1" />
51425149
<ComponentRef Id="cmpB1E3E66F5FC40C4E26A9CC895B89DA63" />
51435150
<ComponentRef Id="cmp35BA09F11D618680F9850F73564F9F47" />
@@ -5816,6 +5823,7 @@
58165823
<ComponentRef Id="cmp4EA5A818E3BE7C67C27B69ADABCE5CBF" />
58175824
<ComponentRef Id="cmpBF600E80A7D04977AF21CAA07A79254C" />
58185825
<ComponentRef Id="cmpA2A4B67ACC8738C88A82A9576BD82026" />
5826+
<ComponentRef Id="cmp3AE4D7EAA86E455A89006A85332F6B3A" />
58195827
<ComponentRef Id="cmpE56C0006C325EFBAD7984DBBCF689FD2" />
58205828
<ComponentRef Id="cmpA94FD747C692B4A9A45D9DE5D869DE53" />
58215829
<ComponentRef Id="cmp7F0D9683DB4D431F6A1A42EBCAD0E4E3" />

src/Common/Commands.Common.Authentication.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828

2929
[assembly: ComVisible(false)]
3030
[assembly: CLSCompliant(false)]
31-
[assembly: AssemblyVersion("1.3.0")]
32-
[assembly: AssemblyFileVersion("1.3.0")]
31+
[assembly: AssemblyVersion("1.3.2")]
32+
[assembly: AssemblyFileVersion("1.3.2")]
3333
[assembly: CollectionBehavior(DisableTestParallelization = true)]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
<Compile Include="Interfaces\IClientFactory.cs" />
150150
<Compile Include="Interfaces\IDataStore.cs" />
151151
<Compile Include="Interfaces\IProfileSerializer.cs" />
152+
<Compile Include="LegacySupport.cs" />
152153
<Compile Include="Models\AzureAccount.cs" />
153154
<Compile Include="Models\AzureAccount.Methods.cs" />
154155
<Compile Include="Models\AzureContext.cs" />
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.Azure.Commands.Common.Authentication;
16+
17+
namespace Microsoft.Azure.Common.Authentication
18+
{
19+
/// <summary>
20+
/// Provide backward compatibility for setting User Agent values
21+
/// </summary>
22+
public static class AzureSession
23+
{
24+
/// <summary>
25+
/// The ClientFactory used to produce management clients in this session
26+
/// </summary>
27+
public static IClientFactory ClientFactory
28+
{
29+
get { return Commands.Common.Authentication.AzureSession.ClientFactory; }
30+
}
31+
}
32+
}

src/Common/Commands.Common.Authentication/Models/AzureEnvironment.Methods.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ private string StorageFileEndpointFormat()
146146
{ AzureEnvironment.Endpoint.Gallery, AzureEnvironmentConstants.USGovernmentGalleryEndpoint },
147147
{ AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, AzureEnvironmentConstants.USGovernmentSqlDatabaseDnsSuffix },
148148
{ AzureEnvironment.Endpoint.Graph, AzureEnvironmentConstants.USGovernmentGraphEndpoint },
149-
{ AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, null },
149+
{ AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, AzureEnvironmentConstants.USGovernmentTrafficManagerDnsSuffix },
150150
{ AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix, AzureEnvironmentConstants.USGovernmentKeyVaultDnsSuffix},
151151
{ AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId, AzureEnvironmentConstants.USGovernmentKeyVaultServiceEndpointResourceId},
152152
{ AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix, null},
153153
{ AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix, null},
154-
{AzureEnvironment.Endpoint.GraphEndpointResourceId, AzureEnvironmentConstants.USGovernmentGraphEndpoint}
154+
{ AzureEnvironment.Endpoint.GraphEndpointResourceId, AzureEnvironmentConstants.USGovernmentGraphEndpoint }
155155
}
156156
}
157157
}
@@ -391,7 +391,7 @@ public static class AzureEnvironmentConstants
391391

392392
public const string ChinaActiveDirectoryEndpoint = "https://login.chinacloudapi.cn/";
393393

394-
public const string USGovernmentActiveDirectoryEndpoint = "https://login.microsoftonline.com/";
394+
public const string USGovernmentActiveDirectoryEndpoint = "https://login-us.microsoftonline.com/";
395395

396396
public const string AzureGraphEndpoint = "https://graph.windows.net/";
397397

@@ -403,6 +403,8 @@ public static class AzureEnvironmentConstants
403403

404404
public const string ChinaTrafficManagerDnsSuffix = "trafficmanager.cn";
405405

406+
public const string USGovernmentTrafficManagerDnsSuffix = "usgovtrafficmanager.net";
407+
406408
public const string AzureKeyVaultDnsSuffix = "vault.azure.net";
407409

408410
public const string ChinaKeyVaultDnsSuffix = "vault.azure.cn";

src/Common/Commands.Common.Authentication/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@
4646
// You can specify all the values or you can default the Build and Revision Numbers
4747
// by using the '*' as shown below:
4848
// [assembly: AssemblyVersion("1.0.*")]
49-
[assembly: AssemblyVersion("1.3.0")]
50-
[assembly: AssemblyFileVersion("1.3.0")]
49+
[assembly: AssemblyVersion("1.3.2")]
50+
[assembly: AssemblyFileVersion("1.3.2")]

src/Common/Commands.Common.Authentication/stuff/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.3.0")]
36-
[assembly: AssemblyFileVersion("1.3.0")]
35+
[assembly: AssemblyVersion("1.3.2")]
36+
[assembly: AssemblyFileVersion("1.3.2")]
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Management.Automation;
16+
using Microsoft.Azure.Management.Storage;
17+
using Microsoft.WindowsAzure.Commands.Common.Storage;
18+
19+
namespace Microsoft.Azure.Commands.Management.Storage.Models
20+
{
21+
public class ARMStorageProvider : IStorageServiceProvider
22+
{
23+
IStorageManagementClient _client;
24+
25+
public ARMStorageProvider(IStorageManagementClient client)
26+
{
27+
_client = client;
28+
}
29+
public IStorageService GetStorageService(string name, string resourceGroupName)
30+
{
31+
var account = _client.StorageAccounts.GetProperties(resourceGroupName, name);
32+
var keys = _client.StorageAccounts.ListKeys(resourceGroupName, name);
33+
return new ARMStorageService(account, keys.Keys[0].Value,
34+
keys.Keys[1].Value);
35+
}
36+
}
37+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System;
16+
using System.Collections.Generic;
17+
using System.Linq;
18+
using System.Text;
19+
using System.Threading.Tasks;
20+
using Microsoft.WindowsAzure.Commands.Common.Storage;
21+
22+
namespace Microsoft.Azure.Commands.Management.Storage.Models
23+
{
24+
public class ARMStorageService : IStorageService
25+
{
26+
Azure.Management.Storage.Models.StorageAccount _account;
27+
List<string> _authenticationKeys = new List<string>();
28+
public ARMStorageService(Azure.Management.Storage.Models.StorageAccount account,
29+
params string[] authenticationKeys)
30+
{
31+
_account = account;
32+
foreach (var key in authenticationKeys)
33+
{
34+
_authenticationKeys.Add(key);
35+
}
36+
}
37+
38+
public Uri BlobEndpoint
39+
{
40+
get { return GetUri(_account.PrimaryEndpoints.Blob); }
41+
}
42+
43+
public Uri FileEndpoint
44+
{
45+
get { return GetUri(_account.PrimaryEndpoints.File); }
46+
}
47+
48+
public Uri QueueEndpoint
49+
{
50+
get { return GetUri(_account.PrimaryEndpoints.Queue); }
51+
}
52+
53+
public Uri TableEndpoint
54+
{
55+
get { return GetUri(_account.PrimaryEndpoints.Table); }
56+
}
57+
58+
public string Name
59+
{
60+
get { return _account.Name; }
61+
}
62+
63+
public List<string> AuthenticationKeys
64+
{
65+
get { return _authenticationKeys; }
66+
}
67+
68+
/// <summary>
69+
/// Get the resource group name from a storage account resource Id
70+
/// </summary>
71+
/// <param name="resourceId">The resource Id for the storage account</param>
72+
/// <returns>The resource group containing the storage account</returns>
73+
public static string ParseResourceGroupFromId(string resourceId)
74+
{
75+
if (!string.IsNullOrEmpty(resourceId))
76+
{
77+
string[] tokens = resourceId.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
78+
if (tokens == null || tokens.Length < 4)
79+
{
80+
throw new ArgumentOutOfRangeException("resourceId");
81+
}
82+
return tokens[3];
83+
}
84+
return null;
85+
}
86+
87+
public static Uri GetUri(string uriString)
88+
{
89+
return uriString == null ? null : new Uri(uriString);
90+
}
91+
}
92+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</Reference>
6666
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6767
<SpecificVersion>False</SpecificVersion>
68-
<HintPath>..\..\packages\Microsoft.Azure.Management.Resources.2.19.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
68+
<HintPath>..\..\packages\Microsoft.Azure.Management.Resources.2.20.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
6969
</Reference>
7070
<Reference Include="Microsoft.Data.Edm">
7171
<SpecificVersion>False</SpecificVersion>

src/Common/Commands.Common.Storage/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
[assembly: ComVisible(false)]
2525
[assembly: CLSCompliant(false)]
2626
[assembly: Guid("c565107e-98a9-4703-85cd-a7efc3d8da7b")]
27-
[assembly: AssemblyVersion("1.3.0")]
28-
[assembly: AssemblyFileVersion("1.3.0")]
27+
[assembly: AssemblyVersion("1.3.2")]
28+
[assembly: AssemblyFileVersion("1.3.2")]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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.KeyVault.Core" version="1.0.0" targetFramework="net45" />
7-
<package id="Microsoft.Azure.Management.Resources" version="2.19.0-preview" targetFramework="net45" />
7+
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Storage" version="3.0.0" 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" />

src/Common/Commands.Common/AzurePowerShell.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public class AzurePowerShell
2626

2727
public const string AssemblyCopyright = "Copyright © Microsoft";
2828

29-
public const string AssemblyVersion = "1.3.0";
29+
public const string AssemblyVersion = "1.3.2";
3030

31-
public const string AssemblyFileVersion = "1.3.0";
31+
public const string AssemblyFileVersion = "1.3.2";
3232

3333
public const string ProfileFile = "AzureProfile.json";
3434

0 commit comments

Comments
 (0)