From edd2a32e256b84bb7975f17d5d39e1e408066935 Mon Sep 17 00:00:00 2001 From: chshou Date: Tue, 6 Mar 2018 16:40:13 -0800 Subject: [PATCH 1/3] remove parameter sets --- .../Commands/NewAzureContainerGroupCommand.cs | 19 ++--- .../ContainerGroupCreationParameters.cs | 23 +++++- .../help/AzureRM.ContainerInstance.md | 2 +- .../help/Get-AzureRmContainerGroup.md | 9 ++- .../help/Get-AzureRmContainerInstanceLog.md | 13 +-- .../help/New-AzureRmContainerGroup.md | 80 ++++++++----------- .../help/Remove-AzureRmContainerGroup.md | 11 +-- 7 files changed, 77 insertions(+), 80 deletions(-) diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs index 73b62d542281..9174bcf6c06b 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs @@ -27,14 +27,10 @@ namespace Microsoft.Azure.Commands.ContainerInstance /// /// New-AzureRmContainerGroup /// - [Cmdlet(VerbsCommon.New, ContainerGroupNoun, SupportsShouldProcess = true, DefaultParameterSetName = CreateContainerGroupBaseParamSet)] + [Cmdlet(VerbsCommon.New, ContainerGroupNoun, SupportsShouldProcess = true)] [OutputType(typeof(PSContainerGroup))] public class NewAzureContainerGroupCommand : ContainerInstanceCmdletBase { - protected const string CreateContainerGroupBaseParamSet = "CreateContainerGroupBaseParamSet"; - protected const string CreateContainerGroupWithRegistryParamSet = "CreateContainerGroupWithRegistryParamSet"; - protected const string CreateContainerGroupWithAzureFileVolumeParamSet = "CreateContainerGroupWithAzureFileMountParamSet"; - [Parameter( Mandatory = true, Position = 0, @@ -60,29 +56,25 @@ public class NewAzureContainerGroupCommand : ContainerInstanceCmdletBase public string Image { get; set; } [Parameter( - Mandatory = true, - ParameterSetName = CreateContainerGroupWithRegistryParamSet, + Mandatory = false, HelpMessage = "The custom container registry credential.")] [ValidateNotNullOrEmpty] public PSCredential RegistryCredential { get; set; } [Parameter( - Mandatory = true, - ParameterSetName = CreateContainerGroupWithAzureFileVolumeParamSet, + Mandatory = false, HelpMessage = "The name of the Azure File share to mount.")] [ValidateNotNullOrEmpty] public string AzureFileVolumeShareName { get; set; } [Parameter( - Mandatory = true, - ParameterSetName = CreateContainerGroupWithAzureFileVolumeParamSet, + Mandatory = false, HelpMessage = "The storage account credential of the Azure File share to mount where the username is the storage account name and the key is the storage account key.")] [ValidateNotNullOrEmpty] public PSCredential AzureFileVolumeAccountCredential { get; set; } [Parameter( - Mandatory = true, - ParameterSetName = CreateContainerGroupWithAzureFileVolumeParamSet, + Mandatory = false, HelpMessage = "The mount path for the Azure File volume.")] [ValidateNotNullOrEmpty] public string AzureFileVolumeMountPath { get; set; } @@ -165,7 +157,6 @@ public class NewAzureContainerGroupCommand : ContainerInstanceCmdletBase [Parameter( Mandatory = false, - ParameterSetName = CreateContainerGroupWithRegistryParamSet, HelpMessage = "The custom container registry login server.")] [ValidateNotNullOrEmpty] [Alias("RegistryServer")] diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Models/ContainerGroupCreationParameters.cs b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Models/ContainerGroupCreationParameters.cs index 07b964bfa31f..5d4298d79a9e 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Models/ContainerGroupCreationParameters.cs +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Models/ContainerGroupCreationParameters.cs @@ -166,6 +166,12 @@ public void Validate() throw new ArgumentException("Please specify Location"); } + ValidateRegistryParameters(); + ValidateAzureFileVolumeParameters(); + } + + private void ValidateRegistryParameters() + { if (!string.IsNullOrEmpty(this.RegistryServer)) { if (string.IsNullOrEmpty(this.RegistryUsername) || string.IsNullOrEmpty(this.RegistryPassword)) @@ -189,10 +195,23 @@ public void Validate() this.RegistryServer = acrServer; } + } - if (!string.IsNullOrWhiteSpace(this.AzureFileVolumeMountPath) && this.AzureFileVolumeMountPath.Contains(":")) + private void ValidateAzureFileVolumeParameters() + { + if (!string.IsNullOrWhiteSpace(this.AzureFileVolumeMountPath)) { - throw new ArgumentException("Azure File volume mount path must not contain ':'"); + if (this.AzureFileVolumeMountPath.Contains(":")) + { + throw new ArgumentException("Azure File volume mount path must not contain ':'"); + } + + if (string.IsNullOrWhiteSpace(this.AzureFileVolumeShareName) + || string.IsNullOrWhiteSpace(this.AzureFileVolumeAccountName) + || string.IsNullOrWhiteSpace(this.AzureFileVolumeAccountKey)) + { + throw new ArgumentException("Please specify 'AzureFileVolumeShareName', 'AzureFileVolumeAccountName' and 'AzureFileVolumeAccountKey' when using Azure File volume"); + } } } diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/AzureRM.ContainerInstance.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/AzureRM.ContainerInstance.md index f8b1e5fd7682..8ebe6a892129 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/AzureRM.ContainerInstance.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/AzureRM.ContainerInstance.md @@ -1,4 +1,4 @@ ---- +--- Module Name: AzureRM.ContainerInstance Module Guid: Download Help Link: diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerGroup.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerGroup.md index 2100cf5c6c61..2634e1df7d07 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerGroup.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerGroup.md @@ -129,7 +129,7 @@ The container group Name. ```yaml Type: String Parameter Sets: GetContainerGroupInResourceGroupParamSet -Aliases: +Aliases: Required: True Position: 1 @@ -144,7 +144,7 @@ The resource Group Name. ```yaml Type: String Parameter Sets: ListContainerGroupParamSet -Aliases: +Aliases: Required: False Position: 0 @@ -156,7 +156,7 @@ Accept wildcard characters: False ```yaml Type: String Parameter Sets: GetContainerGroupInResourceGroupParamSet -Aliases: +Aliases: Required: True Position: 0 @@ -171,7 +171,7 @@ The resource id. ```yaml Type: String Parameter Sets: GetContainerGroupByResourceIdParamSet -Aliases: +Aliases: Required: True Position: Named @@ -194,3 +194,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerInstanceLog.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerInstanceLog.md index 6d1140a7332a..8cf7eac4e71b 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerInstanceLog.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerInstanceLog.md @@ -89,7 +89,7 @@ The container group name. ```yaml Type: String Parameter Sets: GetContainerInstanceLogByNamesParamSet -Aliases: +Aliases: Required: True Position: Named @@ -119,7 +119,7 @@ The input container group object. ```yaml Type: PSContainerGroup Parameter Sets: GetContainerInstanceLogByPSContainerGroupParamSet -Aliases: +Aliases: Required: True Position: Named @@ -135,7 +135,7 @@ Default: the same as the container group name ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -150,7 +150,7 @@ The resource group name. ```yaml Type: String Parameter Sets: GetContainerInstanceLogByNamesParamSet -Aliases: +Aliases: Required: True Position: 0 @@ -165,7 +165,7 @@ The resource id. ```yaml Type: String Parameter Sets: GetContainerInstanceLogByResourceIdParamSet -Aliases: +Aliases: Required: True Position: Named @@ -181,7 +181,7 @@ If not specify, the cmdlet will return up to 4MB tailed log ```yaml Type: Int32 Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -204,3 +204,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md index bf1eedcfd56c..af4824df0be6 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md @@ -12,31 +12,14 @@ Creates a container group. ## SYNTAX -### CreateContainerGroupBaseParamSet (Default) ``` -New-AzureRmContainerGroup [-ResourceGroupName] [-Name] [-Image] [-Location ] +New-AzureRmContainerGroup [-ResourceGroupName] [-Name] [-Image] + [-RegistryCredential ] [-AzureFileVolumeShareName ] + [-AzureFileVolumeAccountCredential ] [-AzureFileVolumeMountPath ] [-Location ] [-OsType ] [-RestartPolicy ] [-Cpu ] [-MemoryInGB ] [-IpAddressType ] [-DnsNameLabel ] [-Port ] [-Command ] [-EnvironmentVariable ] - [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### CreateContainerGroupWithRegistryParamSet -``` -New-AzureRmContainerGroup [-ResourceGroupName] [-Name] [-Image] - -RegistryCredential [-Location ] [-OsType ] [-RestartPolicy ] - [-Cpu ] [-MemoryInGB ] [-IpAddressType ] [-DnsNameLabel ] [-Port ] - [-Command ] [-EnvironmentVariable ] [-RegistryServerDomain ] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### CreateContainerGroupWithAzureFileMountParamSet -``` -New-AzureRmContainerGroup [-ResourceGroupName] [-Name] [-Image] - -AzureFileVolumeShareName -AzureFileVolumeAccountCredential - -AzureFileVolumeMountPath [-Location ] [-OsType ] [-RestartPolicy ] - [-Cpu ] [-MemoryInGB ] [-IpAddressType ] [-DnsNameLabel ] [-Port ] - [-Command ] [-EnvironmentVariable ] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-RegistryServerDomain ] [-Tag ] [-DefaultProfile ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -201,10 +184,10 @@ The storage account credential of the Azure File share to mount where the userna ```yaml Type: PSCredential -Parameter Sets: CreateContainerGroupWithAzureFileMountParamSet -Aliases: +Parameter Sets: (All) +Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -216,10 +199,10 @@ The mount path for the Azure File volume. ```yaml Type: String -Parameter Sets: CreateContainerGroupWithAzureFileMountParamSet -Aliases: +Parameter Sets: (All) +Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -231,10 +214,10 @@ The name of the Azure File share to mount. ```yaml Type: String -Parameter Sets: CreateContainerGroupWithAzureFileMountParamSet -Aliases: +Parameter Sets: (All) +Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -247,7 +230,7 @@ The command to run in the container. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -263,7 +246,7 @@ Default: 1 ```yaml Type: Int32 Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -293,7 +276,7 @@ The DNS name label for the IP address. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -308,7 +291,7 @@ The container environment variables. ```yaml Type: Hashtable Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -323,7 +306,7 @@ The container image. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: 2 @@ -338,7 +321,7 @@ The IP address type. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Accepted values: Public Required: False @@ -355,7 +338,7 @@ Default to the location of the resource group. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -386,7 +369,7 @@ The container group name. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: 1 @@ -402,7 +385,7 @@ Default: Linux ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Accepted values: Linux, Windows Required: False @@ -418,7 +401,7 @@ The port(s) to open. Default: [80] ```yaml Type: Int32[] Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -432,10 +415,10 @@ The custom container registry credential. ```yaml Type: PSCredential -Parameter Sets: CreateContainerGroupWithRegistryParamSet -Aliases: +Parameter Sets: (All) +Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -447,7 +430,7 @@ The custom container registry login server. ```yaml Type: String -Parameter Sets: CreateContainerGroupWithRegistryParamSet +Parameter Sets: (All) Aliases: RegistryServer Required: False @@ -463,7 +446,7 @@ The resource group name. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: 0 @@ -478,7 +461,7 @@ The container restart policy. Default: Always ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Accepted values: Always, Never, OnFailure Required: False @@ -494,7 +477,7 @@ Accept wildcard characters: False ```yaml Type: Hashtable Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -549,3 +532,4 @@ System.Collections.Hashtable ## NOTES ## RELATED LINKS + diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Remove-AzureRmContainerGroup.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Remove-AzureRmContainerGroup.md index 5f9ed97daef5..4b724d1f33bf 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Remove-AzureRmContainerGroup.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Remove-AzureRmContainerGroup.md @@ -79,7 +79,7 @@ The container group to remove. ```yaml Type: PSContainerGroup Parameter Sets: RemoveContainerGroupByPSContainerGroupParamSet -Aliases: +Aliases: Required: True Position: Named @@ -94,7 +94,7 @@ The container group name. ```yaml Type: String Parameter Sets: RemoveContainerGroupByResourceGroupAndNameParamSet -Aliases: +Aliases: Required: True Position: 1 @@ -109,7 +109,7 @@ Accept wildcard characters: False ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -124,7 +124,7 @@ The resource group name. ```yaml Type: String Parameter Sets: RemoveContainerGroupByResourceGroupAndNameParamSet -Aliases: +Aliases: Required: True Position: 0 @@ -139,7 +139,7 @@ The resource id. ```yaml Type: String Parameter Sets: RemoveContainerGroupByResourceIdParamSet -Aliases: +Aliases: Required: True Position: Named @@ -194,3 +194,4 @@ Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup ## NOTES ## RELATED LINKS + From eadca31caeb7b8d3cf9ef576927ead3dabc1a540 Mon Sep 17 00:00:00 2001 From: chshou Date: Thu, 8 Mar 2018 16:18:21 -0800 Subject: [PATCH 2/3] add back azure file vol para set --- .../ContainerInstance/ChangeLog.md | 3 + .../Commands/NewAzureContainerGroupCommand.cs | 14 +++-- .../ContainerGroupCreationParameters.cs | 19 +----- .../help/Get-AzureRmContainerGroup.md | 9 ++- .../help/Get-AzureRmContainerInstanceLog.md | 13 ++-- .../help/New-AzureRmContainerGroup.md | 61 +++++++++++-------- .../help/Remove-AzureRmContainerGroup.md | 11 ++-- 7 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/ResourceManager/ContainerInstance/ChangeLog.md b/src/ResourceManager/ContainerInstance/ChangeLog.md index 9f5ef3be4748..cdb207c434e2 100644 --- a/src/ResourceManager/ContainerInstance/ChangeLog.md +++ b/src/ResourceManager/ContainerInstance/ChangeLog.md @@ -19,6 +19,9 @@ --> ## Current Release +## Version 0.2.4 +* Fix parameter sets issue for container registry and azure file volume mount + ## Version 0.2.3 * Apply Azure Container Instance SDK 2018-02-01 - Support DNS name label diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs index 9174bcf6c06b..b5d0abdff1c4 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs @@ -27,10 +27,13 @@ namespace Microsoft.Azure.Commands.ContainerInstance /// /// New-AzureRmContainerGroup /// - [Cmdlet(VerbsCommon.New, ContainerGroupNoun, SupportsShouldProcess = true)] + [Cmdlet(VerbsCommon.New, ContainerGroupNoun, SupportsShouldProcess = true, DefaultParameterSetName = CreateContainerGroupBaseParamSet)] [OutputType(typeof(PSContainerGroup))] public class NewAzureContainerGroupCommand : ContainerInstanceCmdletBase { + protected const string CreateContainerGroupBaseParamSet = "CreateContainerGroupBaseParamSet"; + protected const string CreateContainerGroupWithAzureFileVolumeParamSet = "CreateContainerGroupWithAzureFileMountParamSet"; + [Parameter( Mandatory = true, Position = 0, @@ -62,19 +65,22 @@ public class NewAzureContainerGroupCommand : ContainerInstanceCmdletBase public PSCredential RegistryCredential { get; set; } [Parameter( - Mandatory = false, + Mandatory = true, + ParameterSetName = CreateContainerGroupWithAzureFileVolumeParamSet, HelpMessage = "The name of the Azure File share to mount.")] [ValidateNotNullOrEmpty] public string AzureFileVolumeShareName { get; set; } [Parameter( - Mandatory = false, + Mandatory = true, + ParameterSetName = CreateContainerGroupWithAzureFileVolumeParamSet, HelpMessage = "The storage account credential of the Azure File share to mount where the username is the storage account name and the key is the storage account key.")] [ValidateNotNullOrEmpty] public PSCredential AzureFileVolumeAccountCredential { get; set; } [Parameter( - Mandatory = false, + Mandatory = true, + ParameterSetName = CreateContainerGroupWithAzureFileVolumeParamSet, HelpMessage = "The mount path for the Azure File volume.")] [ValidateNotNullOrEmpty] public string AzureFileVolumeMountPath { get; set; } diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Models/ContainerGroupCreationParameters.cs b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Models/ContainerGroupCreationParameters.cs index 5d4298d79a9e..d9db09f76e84 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Models/ContainerGroupCreationParameters.cs +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Models/ContainerGroupCreationParameters.cs @@ -161,11 +161,6 @@ public class ContainerGroupCreationParameters /// public void Validate() { - if (string.IsNullOrEmpty(this.Location)) - { - throw new ArgumentException("Please specify Location"); - } - ValidateRegistryParameters(); ValidateAzureFileVolumeParameters(); } @@ -199,19 +194,9 @@ private void ValidateRegistryParameters() private void ValidateAzureFileVolumeParameters() { - if (!string.IsNullOrWhiteSpace(this.AzureFileVolumeMountPath)) + if (!string.IsNullOrWhiteSpace(this.AzureFileVolumeMountPath) && this.AzureFileVolumeMountPath.Contains(":")) { - if (this.AzureFileVolumeMountPath.Contains(":")) - { - throw new ArgumentException("Azure File volume mount path must not contain ':'"); - } - - if (string.IsNullOrWhiteSpace(this.AzureFileVolumeShareName) - || string.IsNullOrWhiteSpace(this.AzureFileVolumeAccountName) - || string.IsNullOrWhiteSpace(this.AzureFileVolumeAccountKey)) - { - throw new ArgumentException("Please specify 'AzureFileVolumeShareName', 'AzureFileVolumeAccountName' and 'AzureFileVolumeAccountKey' when using Azure File volume"); - } + throw new ArgumentException("Azure File volume mount path must not contain ':'"); } } diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerGroup.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerGroup.md index 2634e1df7d07..2100cf5c6c61 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerGroup.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerGroup.md @@ -129,7 +129,7 @@ The container group Name. ```yaml Type: String Parameter Sets: GetContainerGroupInResourceGroupParamSet -Aliases: +Aliases: Required: True Position: 1 @@ -144,7 +144,7 @@ The resource Group Name. ```yaml Type: String Parameter Sets: ListContainerGroupParamSet -Aliases: +Aliases: Required: False Position: 0 @@ -156,7 +156,7 @@ Accept wildcard characters: False ```yaml Type: String Parameter Sets: GetContainerGroupInResourceGroupParamSet -Aliases: +Aliases: Required: True Position: 0 @@ -171,7 +171,7 @@ The resource id. ```yaml Type: String Parameter Sets: GetContainerGroupByResourceIdParamSet -Aliases: +Aliases: Required: True Position: Named @@ -194,4 +194,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS - diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerInstanceLog.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerInstanceLog.md index 8cf7eac4e71b..6d1140a7332a 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerInstanceLog.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Get-AzureRmContainerInstanceLog.md @@ -89,7 +89,7 @@ The container group name. ```yaml Type: String Parameter Sets: GetContainerInstanceLogByNamesParamSet -Aliases: +Aliases: Required: True Position: Named @@ -119,7 +119,7 @@ The input container group object. ```yaml Type: PSContainerGroup Parameter Sets: GetContainerInstanceLogByPSContainerGroupParamSet -Aliases: +Aliases: Required: True Position: Named @@ -135,7 +135,7 @@ Default: the same as the container group name ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -150,7 +150,7 @@ The resource group name. ```yaml Type: String Parameter Sets: GetContainerInstanceLogByNamesParamSet -Aliases: +Aliases: Required: True Position: 0 @@ -165,7 +165,7 @@ The resource id. ```yaml Type: String Parameter Sets: GetContainerInstanceLogByResourceIdParamSet -Aliases: +Aliases: Required: True Position: Named @@ -181,7 +181,7 @@ If not specify, the cmdlet will return up to 4MB tailed log ```yaml Type: Int32 Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -204,4 +204,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS - diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md index af4824df0be6..8d17e4cd825f 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md @@ -12,10 +12,20 @@ Creates a container group. ## SYNTAX +### CreateContainerGroupBaseParamSet (Default) ``` New-AzureRmContainerGroup [-ResourceGroupName] [-Name] [-Image] - [-RegistryCredential ] [-AzureFileVolumeShareName ] - [-AzureFileVolumeAccountCredential ] [-AzureFileVolumeMountPath ] [-Location ] + [-RegistryCredential ] [-Location ] [-OsType ] [-RestartPolicy ] + [-Cpu ] [-MemoryInGB ] [-IpAddressType ] [-DnsNameLabel ] [-Port ] + [-Command ] [-EnvironmentVariable ] [-RegistryServerDomain ] [-Tag ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +### CreateContainerGroupWithAzureFileMountParamSet +``` +New-AzureRmContainerGroup [-ResourceGroupName] [-Name] [-Image] + [-RegistryCredential ] -AzureFileVolumeShareName + -AzureFileVolumeAccountCredential -AzureFileVolumeMountPath [-Location ] [-OsType ] [-RestartPolicy ] [-Cpu ] [-MemoryInGB ] [-IpAddressType ] [-DnsNameLabel ] [-Port ] [-Command ] [-EnvironmentVariable ] [-RegistryServerDomain ] [-Tag ] [-DefaultProfile ] [-WhatIf] @@ -184,10 +194,10 @@ The storage account credential of the Azure File share to mount where the userna ```yaml Type: PSCredential -Parameter Sets: (All) -Aliases: +Parameter Sets: CreateContainerGroupWithAzureFileMountParamSet +Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -199,10 +209,10 @@ The mount path for the Azure File volume. ```yaml Type: String -Parameter Sets: (All) -Aliases: +Parameter Sets: CreateContainerGroupWithAzureFileMountParamSet +Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -214,10 +224,10 @@ The name of the Azure File share to mount. ```yaml Type: String -Parameter Sets: (All) -Aliases: +Parameter Sets: CreateContainerGroupWithAzureFileMountParamSet +Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -230,7 +240,7 @@ The command to run in the container. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -246,7 +256,7 @@ Default: 1 ```yaml Type: Int32 Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -276,7 +286,7 @@ The DNS name label for the IP address. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -291,7 +301,7 @@ The container environment variables. ```yaml Type: Hashtable Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -306,7 +316,7 @@ The container image. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: 2 @@ -321,7 +331,7 @@ The IP address type. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Accepted values: Public Required: False @@ -338,7 +348,7 @@ Default to the location of the resource group. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -369,7 +379,7 @@ The container group name. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: 1 @@ -385,7 +395,7 @@ Default: Linux ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Accepted values: Linux, Windows Required: False @@ -401,7 +411,7 @@ The port(s) to open. Default: [80] ```yaml Type: Int32[] Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -416,7 +426,7 @@ The custom container registry credential. ```yaml Type: PSCredential Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -446,7 +456,7 @@ The resource group name. ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Required: True Position: 0 @@ -461,7 +471,7 @@ The container restart policy. Default: Always ```yaml Type: String Parameter Sets: (All) -Aliases: +Aliases: Accepted values: Always, Never, OnFailure Required: False @@ -477,7 +487,7 @@ Accept wildcard characters: False ```yaml Type: Hashtable Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -532,4 +542,3 @@ System.Collections.Hashtable ## NOTES ## RELATED LINKS - diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Remove-AzureRmContainerGroup.md b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Remove-AzureRmContainerGroup.md index 4b724d1f33bf..5f9ed97daef5 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Remove-AzureRmContainerGroup.md +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/Remove-AzureRmContainerGroup.md @@ -79,7 +79,7 @@ The container group to remove. ```yaml Type: PSContainerGroup Parameter Sets: RemoveContainerGroupByPSContainerGroupParamSet -Aliases: +Aliases: Required: True Position: Named @@ -94,7 +94,7 @@ The container group name. ```yaml Type: String Parameter Sets: RemoveContainerGroupByResourceGroupAndNameParamSet -Aliases: +Aliases: Required: True Position: 1 @@ -109,7 +109,7 @@ Accept wildcard characters: False ```yaml Type: SwitchParameter Parameter Sets: (All) -Aliases: +Aliases: Required: False Position: Named @@ -124,7 +124,7 @@ The resource group name. ```yaml Type: String Parameter Sets: RemoveContainerGroupByResourceGroupAndNameParamSet -Aliases: +Aliases: Required: True Position: 0 @@ -139,7 +139,7 @@ The resource id. ```yaml Type: String Parameter Sets: RemoveContainerGroupByResourceIdParamSet -Aliases: +Aliases: Required: True Position: Named @@ -194,4 +194,3 @@ Microsoft.Azure.Commands.ContainerInstance.Models.PSContainerGroup ## NOTES ## RELATED LINKS - From 920e5ba684ccdbce1ae2221cd4c63c382fe795fd Mon Sep 17 00:00:00 2001 From: chshou Date: Mon, 12 Mar 2018 14:19:06 -0700 Subject: [PATCH 3/3] add test --- src/ResourceManager/ContainerInstance/ChangeLog.md | 2 -- .../ScenarioTests/ContainerInstanceTests.ps1 | 8 ++++++-- .../TestCreateContainerGroupWithVolume.json | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ResourceManager/ContainerInstance/ChangeLog.md b/src/ResourceManager/ContainerInstance/ChangeLog.md index cdb207c434e2..813d1874a3c6 100644 --- a/src/ResourceManager/ContainerInstance/ChangeLog.md +++ b/src/ResourceManager/ContainerInstance/ChangeLog.md @@ -18,8 +18,6 @@ - Additional information about change #1 --> ## Current Release - -## Version 0.2.4 * Fix parameter sets issue for container registry and azure file volume mount ## Version 0.2.3 diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/ScenarioTests/ContainerInstanceTests.ps1 b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/ScenarioTests/ContainerInstanceTests.ps1 index 126ef3e30a34..8b0f5f56b63b 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/ScenarioTests/ContainerInstanceTests.ps1 +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/ScenarioTests/ContainerInstanceTests.ps1 @@ -99,18 +99,22 @@ function Test-AzureRmContainerGroupWithVolumeMount $resourceGroupName = Get-RandomResourceGroupName $containerGroupName = Get-RandomContainerGroupName $location = Get-ProviderLocation "Microsoft.ContainerInstance/ContainerGroups" - $image = "alpine" + $image = "acc.azurecr.io/alpine" $shareName = "acipstestshare" $accountName = "acipstest" $accountKey = "password" $secureAccountKey = ConvertTo-SecureString $accountKey -AsPlainText -Force $accountCredential = New-Object System.Management.Automation.PSCredential ($accountName, $secureAccountKey) + $registryUsername = "acc" + $registryPassword = "password" + $secureRegistryPassword = ConvertTo-SecureString $registryPassword -AsPlainText -Force + $registryCredential = New-Object System.Management.Automation.PSCredential ($registryUsername, $secureRegistryPassword) $mountPath = "/mnt/azfile" try { New-AzureRmResourceGroup -Name $resourceGroupName -Location $location - $containerGroupCreated = New-AzureRmContainerGroup -ResourceGroupName $resourceGroupName -Name $containerGroupName -Image $image -RestartPolicy "Never" -Command "ls $mountPath" -AzureFileVolumeShareName $shareName -AzureFileVolumeAccountCredential $accountCredential -AzureFileVolumeMountPath $mountPath + $containerGroupCreated = New-AzureRmContainerGroup -ResourceGroupName $resourceGroupName -Name $containerGroupName -Image $image -RegistryCredential $registryCredential -RestartPolicy "Never" -Command "ls $mountPath" -AzureFileVolumeShareName $shareName -AzureFileVolumeAccountCredential $accountCredential -AzureFileVolumeMountPath $mountPath Assert-NotNull $containerGroupCreated.Volumes Assert-NotNull $containerGroupCreated.Volumes[0].AzureFile diff --git a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/SessionRecords/Microsoft.Azure.Commands.ContainerInstance.Test.ScenarioTests.ContainerInstanceTests/TestCreateContainerGroupWithVolume.json b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/SessionRecords/Microsoft.Azure.Commands.ContainerInstance.Test.ScenarioTests.ContainerInstanceTests/TestCreateContainerGroupWithVolume.json index 9b3e1c52880e..3d993b06f69c 100644 --- a/src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/SessionRecords/Microsoft.Azure.Commands.ContainerInstance.Test.ScenarioTests.ContainerInstanceTests/TestCreateContainerGroupWithVolume.json +++ b/src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/SessionRecords/Microsoft.Azure.Commands.ContainerInstance.Test.ScenarioTests.ContainerInstanceTests/TestCreateContainerGroupWithVolume.json @@ -352,7 +352,7 @@ "RequestUri": "/subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/resourceGroups/ps9107/providers/Microsoft.ContainerInstance/containerGroups/ps2492?api-version=2018-02-01-preview", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYWU0M2IxZTMtYzM1ZC00YzhjLWJjMGQtZjE0OGI0YzUyYjc4L3Jlc291cmNlR3JvdXBzL3BzOTEwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbnRhaW5lckluc3RhbmNlL2NvbnRhaW5lckdyb3Vwcy9wczI0OTI/YXBpLXZlcnNpb249MjAxOC0wMi0wMS1wcmV2aWV3", "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"containers\": [\r\n {\r\n \"name\": \"ps2492\",\r\n \"properties\": {\r\n \"image\": \"alpine\",\r\n \"command\": [\r\n \"ls\",\r\n \"/mnt/azfile\"\r\n ],\r\n \"environmentVariables\": [],\r\n \"resources\": {\r\n \"requests\": {\r\n \"memoryInGB\": 1.5,\r\n \"cpu\": 1.0\r\n }\r\n },\r\n \"volumeMounts\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"mountPath\": \"/mnt/azfile\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"restartPolicy\": \"Never\",\r\n \"osType\": \"Linux\",\r\n \"volumes\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"azureFile\": {\r\n \"shareName\": \"acipstestshare\",\r\n \"storageAccountName\": \"acipstest\",\r\n \"storageAccountKey\": \"ELFwG1AfwHJbr2kC0N/k8P+kz+t/UHoYMKtQnhr5B/M2sZ+65PqSyQP+aiY9A7j0VSa6e2ZId/3r2zOL+Cb8rw==\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"westus\"\r\n}", + "RequestBody": "{\r\n \"properties\": {\r\n \"containers\": [\r\n {\r\n \"name\": \"ps2492\",\r\n \"properties\": {\r\n \"image\": \"acc.azurecr.io/alpine\",\r\n \"command\": [\r\n \"ls\",\r\n \"/mnt/azfile\"\r\n ],\r\n \"environmentVariables\": [],\r\n \"resources\": {\r\n \"requests\": {\r\n \"memoryInGB\": 1.5,\r\n \"cpu\": 1.0\r\n }\r\n },\r\n \"volumeMounts\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"mountPath\": \"/mnt/azfile\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"restartPolicy\": \"Never\",\r\n \"osType\": \"Linux\",\r\n \"imageRegistryCredentials\": [\r\n {\r\n \"server\": \"acc.azurecr.io\",\r\n \"username\": \"acc\",\r\n \"password\": \"password\",\r\n }\r\n ],\r\n \"volumes\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"azureFile\": {\r\n \"shareName\": \"acipstestshare\",\r\n \"storageAccountName\": \"acipstest\",\r\n \"storageAccountKey\": \"ELFwG1AfwHJbr2kC0N/k8P+kz+t/UHoYMKtQnhr5B/M2sZ+65PqSyQP+aiY9A7j0VSa6e2ZId/3r2zOL+Cb8rw==\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"westus\"\r\n}", "RequestHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -373,7 +373,7 @@ "Microsoft.Azure.Management.ContainerInstance.ContainerInstanceManagementClient/0.0.0.0" ] }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"containers\": [\r\n {\r\n \"name\": \"ps2492\",\r\n \"properties\": {\r\n \"image\": \"alpine\",\r\n \"command\": [\r\n \"ls\",\r\n \"/mnt/azfile\"\r\n ],\r\n \"ports\": [],\r\n \"environmentVariables\": [],\r\n \"resources\": {\r\n \"requests\": {\r\n \"memoryInGB\": 1.5,\r\n \"cpu\": 1.0\r\n }\r\n },\r\n \"volumeMounts\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"mountPath\": \"/mnt/azfile\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"restartPolicy\": \"Never\",\r\n \"osType\": \"Linux\",\r\n \"volumes\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"azureFile\": {\r\n \"shareName\": \"acipstestshare\",\r\n \"storageAccountName\": \"acipstest\"\r\n }\r\n }\r\n ],\r\n \"instanceView\": {\r\n \"events\": [],\r\n \"state\": \"Pending\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/resourceGroups/ps9107/providers/Microsoft.ContainerInstance/containerGroups/ps2492\",\r\n \"name\": \"ps2492\",\r\n \"type\": \"Microsoft.ContainerInstance/containerGroups\",\r\n \"location\": \"westus\"\r\n}", + "ResponseBody": "{\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"containers\": [\r\n {\r\n \"name\": \"ps2492\",\r\n \"properties\": {\r\n \"image\": \"acc.azurecr.io/alpine\",\r\n \"command\": [\r\n \"ls\",\r\n \"/mnt/azfile\"\r\n ],\r\n \"ports\": [],\r\n \"environmentVariables\": [],\r\n \"resources\": {\r\n \"requests\": {\r\n \"memoryInGB\": 1.5,\r\n \"cpu\": 1.0\r\n }\r\n },\r\n \"volumeMounts\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"mountPath\": \"/mnt/azfile\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"restartPolicy\": \"Never\",\r\n \"osType\": \"Linux\",\r\n \"imageRegistryCredentials\": [\r\n {\r\n \"server\": \"acc.azurecr.io\",\r\n \"username\": \"acc\",\r\n \"password\": \"\",\r\n }\r\n ],\r\n \"volumes\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"azureFile\": {\r\n \"shareName\": \"acipstestshare\",\r\n \"storageAccountName\": \"acipstest\"\r\n }\r\n }\r\n ],\r\n \"instanceView\": {\r\n \"events\": [],\r\n \"state\": \"Pending\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/resourceGroups/ps9107/providers/Microsoft.ContainerInstance/containerGroups/ps2492\",\r\n \"name\": \"ps2492\",\r\n \"type\": \"Microsoft.ContainerInstance/containerGroups\",\r\n \"location\": \"westus\"\r\n}", "ResponseHeaders": { "Content-Length": [ "726" @@ -436,7 +436,7 @@ "Microsoft.Azure.Management.ContainerInstance.ContainerInstanceManagementClient/0.0.0.0" ] }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"containers\": [\r\n {\r\n \"name\": \"ps2492\",\r\n \"properties\": {\r\n \"image\": \"alpine\",\r\n \"command\": [\r\n \"ls\",\r\n \"/mnt/azfile\"\r\n ],\r\n \"ports\": [],\r\n \"environmentVariables\": [],\r\n \"resources\": {\r\n \"requests\": {\r\n \"memoryInGB\": 1.5,\r\n \"cpu\": 1.0\r\n }\r\n },\r\n \"volumeMounts\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"mountPath\": \"/mnt/azfile\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"restartPolicy\": \"Never\",\r\n \"osType\": \"Linux\",\r\n \"volumes\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"azureFile\": {\r\n \"shareName\": \"acipstestshare\",\r\n \"storageAccountName\": \"acipstest\"\r\n }\r\n }\r\n ],\r\n \"instanceView\": {\r\n \"events\": [],\r\n \"state\": \"Pending\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/resourceGroups/ps9107/providers/Microsoft.ContainerInstance/containerGroups/ps2492\",\r\n \"name\": \"ps2492\",\r\n \"type\": \"Microsoft.ContainerInstance/containerGroups\",\r\n \"location\": \"westus\"\r\n}", + "ResponseBody": "{\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"containers\": [\r\n {\r\n \"name\": \"ps2492\",\r\n \"properties\": {\r\n \"image\": \"acc.azurecr.io/alpine\",\r\n \"command\": [\r\n \"ls\",\r\n \"/mnt/azfile\"\r\n ],\r\n \"ports\": [],\r\n \"environmentVariables\": [],\r\n \"resources\": {\r\n \"requests\": {\r\n \"memoryInGB\": 1.5,\r\n \"cpu\": 1.0\r\n }\r\n },\r\n \"volumeMounts\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"mountPath\": \"/mnt/azfile\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"restartPolicy\": \"Never\",\r\n \"osType\": \"Linux\",\r\n \"imageRegistryCredentials\": [\r\n {\r\n \"server\": \"acc.azurecr.io\",\r\n \"username\": \"acc\",\r\n \"password\": \"\",\r\n }\r\n ],\r\n \"volumes\": [\r\n {\r\n \"name\": \"azurefile\",\r\n \"azureFile\": {\r\n \"shareName\": \"acipstestshare\",\r\n \"storageAccountName\": \"acipstest\"\r\n }\r\n }\r\n ],\r\n \"instanceView\": {\r\n \"events\": [],\r\n \"state\": \"Pending\"\r\n }\r\n },\r\n \"id\": \"/subscriptions/ae43b1e3-c35d-4c8c-bc0d-f148b4c52b78/resourceGroups/ps9107/providers/Microsoft.ContainerInstance/containerGroups/ps2492\",\r\n \"name\": \"ps2492\",\r\n \"type\": \"Microsoft.ContainerInstance/containerGroups\",\r\n \"location\": \"westus\"\r\n}", "ResponseHeaders": { "Content-Length": [ "726"