Skip to content

Commit 232df04

Browse files
authored
Merge pull request #4 from Azure/preview
Sync from upstream.
2 parents bd3387d + 8c6d296 commit 232df04

File tree

979 files changed

+222739
-4421
lines changed

Some content is hidden

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

979 files changed

+222739
-4421
lines changed

build.proj

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -210,22 +210,22 @@
210210
<CallTarget Targets="BuildSetupTest"/>
211211
<!-- moved copy tasks -->
212212

213-
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) $(Scope) -Profile Latest &quot; " Condition="'$(Latest)' == 'true' "/>
214-
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) $(Scope) -Profile Stack &quot; " Condition="'$(Stack)' == 'true' "/>
213+
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) $(Scope) -Profile Latest &quot; " Condition="'$(Latest)' == 'true' and '$(CodeSign)' == 'false'"/>
214+
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) $(Scope) -Profile Stack &quot; " Condition="'$(Stack)' == 'true' and '$(CodeSign)' == 'false'"/>
215215
<!-- Copying shortcut to be signed -->
216216
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psd1"
217217
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Latest)' == 'true'"/>
218218
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psm1"
219-
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Latest)' == 'true'"/>
219+
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Latest)' == 'true' and '$(CodeSign)' == 'false'"/>
220220

221221
<Copy SourceFiles="$(LibrarySourceFolder)\StackAdmin\AzureRM\AzureRM.psd1"
222222
DestinationFolder="$(LibrarySourceFolder)\Stack\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' "/>
223223
<Copy SourceFiles="$(LibrarySourceFolder)\StackAdmin\AzureRM\AzureRM.psm1"
224-
DestinationFolder="$(LibrarySourceFolder)\Stack\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' "/>
224+
DestinationFolder="$(LibrarySourceFolder)\Stack\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' and '$(CodeSign)' == 'false'"/>
225225
<Copy SourceFiles="$(LibrarySourceFolder)\StackAdmin\AzureStack\AzureStack.psd1"
226226
DestinationFolder="$(LibrarySourceFolder)\Stack\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' "/>
227227
<Copy SourceFiles="$(LibrarySourceFolder)\StackAdmin\AzureStack\AzureStack.psm1"
228-
DestinationFolder="$(LibrarySourceFolder)\Stack\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' "/>
228+
DestinationFolder="$(LibrarySourceFolder)\Stack\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' and '$(CodeSign)' == 'false'"/>
229229

230230
<Copy SourceFiles="$(LibraryRoot)setup\Setup\RemoveGalleryModules.ps1"
231231
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)"
@@ -381,18 +381,6 @@
381381
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\Microsoft*Azure*Commands*.dll" Condition="'$(Stack)' == 'true' " />
382382
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\Microsoft.Azure.Common.Extensions.dll" Condition="'$(Stack)' == 'true' " />
383383
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\Microsoft.Azure.Management.Sql.Legacy.dll" Condition="'$(Stack)' == 'true' " />
384-
385-
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1" Condition="'$(Latest)' == 'true' " />
386-
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.psm1" Condition="'$(Latest)' == 'true' " />
387-
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1xml" Condition="'$(Latest)' == 'true' " />
388-
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.js" Condition="'$(Latest)' == 'true' " />
389-
<ScriptsToSign Include="$(LibraryRoot)setup\Setup\*.ps1" Condition="'$(Latest)' == 'true' "/>
390-
391-
<ScriptsToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\*.ps1" Condition="'$(Stack)' == 'true' "/>
392-
<ScriptsToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\*.psm1" Condition="'$(Stack)' == 'true' " />
393-
<ScriptsToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\*.ps1xml" Condition="'$(Stack)' == 'true' " />
394-
<ScriptsToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\*.js" Condition="'$(Stack)' == 'true' " />
395-
<!-- <ScriptsToSign Include="$(LibraryRoot)stacksetup\Setup\*.ps1" Condition="'$(Stack)' == 'true' " /> -->
396384
</ItemGroup>
397385

398386
<Message Importance="high" Text="$(LibrarySourceFolder)\Package\$(Configuration) does not contains any files to sign. Code sign will skip."
@@ -417,6 +405,39 @@
417405
ToolsPath="$(CIToolsPath)"
418406
Condition="!$(DelaySign) and '@(DelaySignedAssembliesToSign)' != ''"/>
419407

408+
<ValidateStrongNameSignatureTask
409+
WindowsSdkPath="$(WindowsSdkPath)"
410+
Assembly="%(DelaySignedAssembliesToSign.Identity)"
411+
ExpectedTokenSignature="$(StrongNameToken)"
412+
ExpectedDelaySigned="false"
413+
ContinueOnError="false"
414+
Condition="!$(DelaySign) and '@(DelaySignedAssembliesToSign)' != ''"/>
415+
416+
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) $(Scope) -Profile Latest &quot; " Condition="'$(Latest)' == 'true' "/>
417+
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) $(Scope) -Profile Stack &quot; " Condition="'$(Stack)' == 'true' "/>
418+
419+
<!-- Copying shortcut to be signed -->
420+
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psm1"
421+
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Latest)' == 'true' "/>
422+
<Copy SourceFiles="$(LibrarySourceFolder)\StackAdmin\AzureRM\AzureRM.psm1"
423+
DestinationFolder="$(LibrarySourceFolder)\Stack\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' "/>
424+
<Copy SourceFiles="$(LibrarySourceFolder)\StackAdmin\AzureStack\AzureStack.psm1"
425+
DestinationFolder="$(LibrarySourceFolder)\Stack\$(Configuration)" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' "/>
426+
427+
<ItemGroup>
428+
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1" Condition="'$(Latest)' == 'true' " />
429+
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.psm1" Condition="'$(Latest)' == 'true' " />
430+
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1xml" Condition="'$(Latest)' == 'true' " />
431+
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.js" Condition="'$(Latest)' == 'true' " />
432+
<ScriptsToSign Include="$(LibraryRoot)setup\Setup\*.ps1" Condition="'$(Latest)' == 'true' "/>
433+
434+
<ScriptsToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\*.ps1" Condition="'$(Stack)' == 'true' "/>
435+
<ScriptsToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\*.psm1" Condition="'$(Stack)' == 'true' " />
436+
<ScriptsToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\*.ps1xml" Condition="'$(Stack)' == 'true' " />
437+
<ScriptsToSign Include="$(LibrarySourceFolder)\Stack\$(Configuration)\**\*.js" Condition="'$(Stack)' == 'true' " />
438+
<!-- <ScriptsToSign Include="$(LibraryRoot)stacksetup\Setup\*.ps1" Condition="'$(Stack)' == 'true' " /> -->
439+
</ItemGroup>
440+
420441
<CodeSigningTask
421442
Description="Microsoft Azure PowerShell"
422443
Keywords="Microsoft Azure PowerShell"
@@ -428,14 +449,6 @@
428449
ToolsPath="$(CIToolsPath)"
429450
Condition="!$(DelaySign) and '@(ScriptsToSign)' != ''"/>
430451

431-
<ValidateStrongNameSignatureTask
432-
WindowsSdkPath="$(WindowsSdkPath)"
433-
Assembly="%(DelaySignedAssembliesToSign.Identity)"
434-
ExpectedTokenSignature="$(StrongNameToken)"
435-
ExpectedDelaySigned="false"
436-
ContinueOnError="false"
437-
Condition="!$(DelaySign) and '@(DelaySignedAssembliesToSign)' != ''"/>
438-
439452
<!-- We cannot verify .js files using Get-AuthenticodeSignature -->
440453
<VerifyAuthenticodeSignatureTask ProbingDirectory="$(PackageDirectory)\$(Configuration)"
441454
FileFilterPattern="microsoft.*.dll;system.*.dll;*.ps1;*.psm1;*.ps1xml;PowerShellSetup.Test.dll" Condition="'$(Latest)' == 'true'">

documentation/Using-Azure-TestFramework.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Instructions to manually download it are available on NuGet. However TestFramewo
3535

3636
## Setup prior to Record or Playback of tests
3737

38-
In order to Record/Playback a test, you need to setup a connection string that consists of various key/value pairs that provides information to the test environment. You have three options to set up the connection string: run the [New-AzureCredential cmdlet](#new-azurecredential) (recommended), run the [Set-TestEnvironment cmdlet](#set-testenvironment), or [manually set the environment variables](#manually-set-environment-variables).
38+
In order to Record/Playback a test, you need to setup a connection string that consists of various key/value pairs that provides information to the test environment. You have three options to set up the connection string: run the [New-TestCredential cmdlet](#new-testcredential) (recommended), run the [Set-TestEnvironment cmdlet](#set-testenvironment), or [manually set the environment variables](#manually-set-environment-variables).
3939

4040
### New-TestCredential
4141

src/ResourceManager/AnalysisServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Remove validate set of location into dynamic lookup so that all clouds are supported.
2122

2223
## Version 0.5.0
2324
* Fixed Synchronize-AzureAsInstance command to work with new AsAzure REST API for sync

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/GetAzureRmAnalysisServicesServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using System.Collections.Generic;
1818
using System.Management.Automation;
1919
using Microsoft.Azure.Management.Analysis.Models;
20+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2021

2122
namespace Microsoft.Azure.Commands.AnalysisServices
2223
{
@@ -28,6 +29,7 @@ public class GetAzureAnalysisServicesServer : AnalysisServicesCmdletBase
2829
[Parameter(Position = 0,
2930
ValueFromPipelineByPropertyName = true, Mandatory = false,
3031
HelpMessage = "Name of resource group under which the user want to retrieve the server.")]
32+
[ResourceGroupCompleter()]
3133
[ValidateNotNullOrEmpty]
3234
public string ResourceGroupName { get; set; }
3335

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/NewAzureRmAnalysisServicesServer.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using Microsoft.Azure.Commands.AnalysisServices.Models;
2020
using Microsoft.Azure.Commands.AnalysisServices.Properties;
2121
using Microsoft.Rest.Azure;
22+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2223

2324
namespace Microsoft.Azure.Commands.AnalysisServices
2425
{
@@ -28,6 +29,7 @@ public class NewAnalysisServicesServer : AnalysisServicesCmdletBase
2829
{
2930
[Parameter(ValueFromPipelineByPropertyName = true, Position = 0, Mandatory = true,
3031
HelpMessage = "Name of resource group under which you want to create the server.")]
32+
[ResourceGroupCompleter()]
3133
[ValidateNotNullOrEmpty]
3234
public string ResourceGroupName { get; set; }
3335

@@ -39,10 +41,7 @@ public class NewAnalysisServicesServer : AnalysisServicesCmdletBase
3941
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = true,
4042
HelpMessage = "Azure region where the server should be created.")]
4143
[ValidateNotNullOrEmpty]
42-
[ValidateSet("North Central US", "South Central US", "Central US", "West Europe", "North Europe", "West US",
43-
"East US",
44-
"East US 2", "Japan East", "Japan West", "Brazil South", "Southeast Asia", "East Asia", "Australia East",
45-
"Australia Southeast", IgnoreCase = true)]
44+
[LocationCompleter("Microsoft.AnalysisServices/servers")]
4645
public string Location { get; set; }
4746

4847
[Parameter(ValueFromPipelineByPropertyName = true, Position = 3, Mandatory = true,

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/RemoveAzureRmAnalysisServicesServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using Microsoft.Azure.Commands.AnalysisServices.Properties;
2020
using Microsoft.Azure.Management.Analysis.Models;
2121
using Microsoft.Rest.Azure;
22+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2223

2324
namespace Microsoft.Azure.Commands.AnalysisServices
2425
{
@@ -34,6 +35,7 @@ public class RemoveAnalysisServicesServer : AnalysisServicesCmdletBase
3435

3536
[Parameter(ValueFromPipelineByPropertyName = true, Position = 1, Mandatory = false,
3637
HelpMessage = "Name of resource group under which the server exists.")]
38+
[ResourceGroupCompleter()]
3739
[ValidateNotNullOrEmpty]
3840
public string ResourceGroupName { get; set; }
3941

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/ResumeAzureRmAnalysisServicesServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using System.Management.Automation;
2020
using Microsoft.Azure.Commands.AnalysisServices.Properties;
2121
using Microsoft.Azure.Management.Analysis.Models;
22+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2223

2324
namespace Microsoft.Azure.Commands.AnalysisServices
2425
{
@@ -30,6 +31,7 @@ public class ResumeAzureAnalysisServicesServer : AnalysisServicesCmdletBase
3031
{
3132
[Parameter(Position = 1, ValueFromPipelineByPropertyName = true,
3233
Mandatory = false, HelpMessage = "Name of resource group under which to retrieve the server.")]
34+
[ResourceGroupCompleter()]
3335
[ValidateNotNullOrEmpty]
3436
public string ResourceGroupName { get; set; }
3537

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/SetAzureRmAnalysisServicesServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
using Microsoft.Azure.Commands.AnalysisServices.Properties;
2121
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
2222
using Microsoft.Azure.Management.Analysis.Models;
23+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2324

2425
namespace Microsoft.Azure.Commands.AnalysisServices
2526
{
@@ -37,6 +38,7 @@ public class SetAzureAnalysisServicesServer : AnalysisServicesCmdletBase
3738

3839
[Parameter(ValueFromPipelineByPropertyName = true, Position = 1, Mandatory = false,
3940
HelpMessage = "Name of resource group under which you want to update the server.")]
41+
[ResourceGroupCompleter()]
4042
[ValidateNotNullOrEmpty]
4143
public string ResourceGroupName { get; set; }
4244

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/SuspendAzureRmAnalysisServicesServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using System.Management.Automation;
2020
using Microsoft.Azure.Commands.AnalysisServices.Properties;
2121
using Microsoft.Azure.Management.Analysis.Models;
22+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2223

2324
namespace Microsoft.Azure.Commands.AnalysisServices
2425
{
@@ -30,6 +31,7 @@ public class SuspendAzureAnalysisServicesServer : AnalysisServicesCmdletBase
3031
{
3132
[Parameter(Position = 1, ValueFromPipelineByPropertyName = true,
3233
Mandatory = false, HelpMessage = "Name of resource group under which to retrieve the server.")]
34+
[ResourceGroupCompleter()]
3335
[ValidateNotNullOrEmpty]
3436
public string ResourceGroupName { get; set; }
3537

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Commands/TestAzureRmAnalysisServicesServer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Azure.Management.Analysis;
1717
using System.Management.Automation;
1818
using Microsoft.Azure.Management.Analysis.Models;
19+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1920

2021
namespace Microsoft.Azure.Commands.AnalysisServices
2122
{
@@ -30,6 +31,7 @@ public class TestAzureAnalysisServicesServer : AnalysisServicesCmdletBase
3031

3132
[Parameter(ValueFromPipelineByPropertyName = true, Position = 1, Mandatory = false,
3233
HelpMessage = "Name of resource group under which want to test the server.")]
34+
[ResourceGroupCompleter()]
3335
[ValidateNotNullOrEmpty]
3436
public string ResourceGroupName { get; set; }
3537

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/NewAzureApiManagementContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands
1616
{
1717
using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models;
18+
using ResourceManager.Common.ArgumentCompleters;
1819
using System.Management.Automation;
1920

2021
[Cmdlet(VerbsCommon.New, "AzureRmApiManagementContext"), OutputType(typeof(PsApiManagementContext))]
@@ -24,6 +25,7 @@ public class NewAzureApiManagementContext : AzureApiManagementCmdletBase
2425
ValueFromPipelineByPropertyName = true,
2526
Mandatory = true,
2627
HelpMessage = "Name of resource group under which an API Management service is deployed.")]
28+
[ResourceGroupCompleter()]
2729
[ValidateNotNullOrEmpty]
2830
public string ResourceGroupName { get; set; }
2931

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/BackupAzureApiManagement.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
1919
using Microsoft.WindowsAzure.Commands.Storage.Adapters;
2020
using Microsoft.WindowsAzure.Commands.Common.Storage;
2121
using System.Management.Automation;
22-
22+
using ResourceManager.Common.ArgumentCompleters;
2323

2424
[Cmdlet(VerbsData.Backup, "AzureRmApiManagement"), OutputType(typeof(PsApiManagement))]
2525
public class BackupAzureApiManagement : AzureApiManagementCmdletBase
@@ -28,6 +28,7 @@ public class BackupAzureApiManagement : AzureApiManagementCmdletBase
2828
ValueFromPipelineByPropertyName = true,
2929
Mandatory = true,
3030
HelpMessage = "Name of resource group under which API Management exists.")]
31+
[ResourceGroupCompleter()]
3132
[ValidateNotNullOrEmpty]
3233
public string ResourceGroupName { get; set; }
3334

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagement.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1616
{
1717
using Microsoft.Azure.Commands.ApiManagement.Models;
18+
using ResourceManager.Common.ArgumentCompleters;
1819
using System.Collections.Generic;
1920
using System.Linq;
2021
using System.Management.Automation;
@@ -36,6 +37,7 @@ public class GetAzureApiManagement : AzureApiManagementCmdletBase
3637
ValueFromPipelineByPropertyName = true,
3738
Mandatory = true,
3839
HelpMessage = "Name of resource group under which want to create API Management service.")]
40+
[ResourceGroupCompleter()]
3941
public string ResourceGroupName { get; set; }
4042

4143
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/GetAzureApiManagementSsoToken.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1616
{
17+
using ResourceManager.Common.ArgumentCompleters;
1718
using System.Management.Automation;
1819

1920
[Cmdlet(VerbsCommon.Get, "AzureRmApiManagementSsoToken"), OutputType(typeof(string))]
@@ -23,6 +24,7 @@ public class GetAzureApiManagementSsoToken : AzureApiManagementCmdletBase
2324
ValueFromPipelineByPropertyName = true,
2425
Mandatory = true,
2526
HelpMessage = "Name of resource group under which API Management exists.")]
27+
[ResourceGroupCompleter()]
2628
[ValidateNotNullOrEmpty]
2729
public string ResourceGroupName { get; set; }
2830

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/ImportAzureApiManagementHostnameCertificate.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1717
{
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
19+
using ResourceManager.Common.ArgumentCompleters;
1920
using System.Management.Automation;
2021

2122
[Cmdlet(VerbsData.Import, "AzureRmApiManagementHostnameCertificate"), OutputType(typeof(PsApiManagementHostnameCertificate))]
@@ -25,6 +26,7 @@ public class ImportAzureApiManagementHostnameCertificate : AzureApiManagementCmd
2526
ValueFromPipelineByPropertyName = true,
2627
Mandatory = true,
2728
HelpMessage = "Name of resource group under which API Management exists.")]
29+
[ResourceGroupCompleter()]
2830
[ValidateNotNullOrEmpty]
2931
public string ResourceGroupName { get; set; }
3032

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/NewAzureApiManagement.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
namespace Microsoft.Azure.Commands.ApiManagement.Commands
1616
{
1717
using Microsoft.Azure.Commands.ApiManagement.Models;
18+
using ResourceManager.Common.ArgumentCompleters;
1819
using System.Collections.Generic;
1920
using System.Management.Automation;
2021

@@ -25,6 +26,7 @@ public class NewAzureApiManagement : AzureApiManagementCmdletBase
2526
ValueFromPipelineByPropertyName = true,
2627
Mandatory = true,
2728
HelpMessage = "Name of resource group under which you want to create API Management.")]
29+
[ResourceGroupCompleter()]
2830
[ValidateNotNullOrEmpty]
2931
public string ResourceGroupName { get; set; }
3032

0 commit comments

Comments
 (0)