Skip to content

Commit 026c016

Browse files
committed
use singular for port
1 parent e8ef048 commit 026c016

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/ScenarioTests/ContainerInstanceTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Test-AzureRmContainerGroup
3030
try
3131
{
3232
New-AzureRmResourceGroup -Name $resourceGroupName -Location $location
33-
$containerGroupCreated = New-AzureRmContainerGroup -ResourceGroupName $resourceGroupName -Name $containerGroupName -Image $image -OsType $osType -RestartPolicy $restartPolicy -IpAddressType "public" -Ports @($port1, $port2) -Cpu 1 -Memory 1.5
33+
$containerGroupCreated = New-AzureRmContainerGroup -ResourceGroupName $resourceGroupName -Name $containerGroupName -Image $image -OsType $osType -RestartPolicy $restartPolicy -IpAddressType "public" -Port @($port1, $port2) -Cpu 1 -Memory 1.5
3434

3535
Assert-AreEqual $containerGroupCreated.ResourceGroupName $resourceGroupName
3636
Assert-AreEqual $containerGroupCreated.Name $containerGroupName

src/ResourceManager/ContainerInstance/Commands.ContainerInstance/Commands/NewAzureContainerGroupCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ public class NewAzureContainerGroupCommand : ContainerInstanceCmdletBase
146146

147147
[Parameter(
148148
Mandatory = false,
149-
HelpMessage = "The ports to open. Default: [80]")]
149+
HelpMessage = "The port(s) to open. Default: [80]")]
150150
[ValidateNotNullOrEmpty]
151-
public int[] Ports { get; set; }
151+
public int[] Port { get; set; }
152152

153153
[Parameter(
154154
Mandatory = false,
@@ -223,7 +223,7 @@ public override void ExecuteCmdlet()
223223
OsType = this.OsType ?? ContainerGroupCreationParameters.DefaultOsType,
224224
RestartPolicy = this.RestartPolicy ?? ContainerGroupRestartPolicy.Always,
225225
IpAddressType = this.IpAddressType,
226-
Ports = this.Ports ?? ContainerGroupCreationParameters.DefaultPorts,
226+
Ports = this.Port ?? ContainerGroupCreationParameters.DefaultPorts,
227227
ContainerImage = this.Image,
228228
EnvironmentVariables = this.ConvertHashtableToDictionary(this.EnvironmentVariable),
229229
Cpu = this.Cpu ?? ContainerGroupCreationParameters.DefaultCpu,

src/ResourceManager/ContainerInstance/Commands.ContainerInstance/help/New-AzureRmContainerGroup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Creates a container group.
1616
```
1717
New-AzureRmContainerGroup [-ResourceGroupName] <String> [-Name] <String> -Image <String> [-Location <String>]
1818
[-OsType <String>] [-RestartPolicy <String>] [-Cpu <Int32>] [-MemoryInGB <Double>] [-IpAddressType <String>]
19-
[-Ports <Int32[]>] [-Command <String>] [-EnvironmentVariable <Hashtable>] [-Tag <Hashtable>]
19+
[-Port <Int32[]>] [-Command <String>] [-EnvironmentVariable <Hashtable>] [-Tag <Hashtable>]
2020
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2121
```
2222

2323
### CreateContainerGroupWithRegistryParamSet
2424
```
2525
New-AzureRmContainerGroup [-ResourceGroupName] <String> [-Name] <String> -Image <String> [-Location <String>]
2626
[-OsType <String>] [-RestartPolicy <String>] [-Cpu <Int32>] [-MemoryInGB <Double>] [-IpAddressType <String>]
27-
[-Ports <Int32[]>] [-Command <String>] [-EnvironmentVariable <Hashtable>] [-RegistryServerDomain <String>]
27+
[-Port <Int32[]>] [-Command <String>] [-EnvironmentVariable <Hashtable>] [-RegistryServerDomain <String>]
2828
-RegistryCredential <PSCredential> [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
2929
[-Confirm] [<CommonParameters>]
3030
```
@@ -33,7 +33,7 @@ New-AzureRmContainerGroup [-ResourceGroupName] <String> [-Name] <String> -Image
3333
```
3434
New-AzureRmContainerGroup [-ResourceGroupName] <String> [-Name] <String> -Image <String> [-Location <String>]
3535
[-OsType <String>] [-RestartPolicy <String>] [-Cpu <Int32>] [-MemoryInGB <Double>] [-IpAddressType <String>]
36-
[-Ports <Int32[]>] [-Command <String>] [-EnvironmentVariable <Hashtable>] -AzureFileVolumeShareName <String>
36+
[-Port <Int32[]>] [-Command <String>] [-EnvironmentVariable <Hashtable>] -AzureFileVolumeShareName <String>
3737
-AzureFileVolumeAccountName <String> -AzureFileVolumeAccountKey <PSCredential>
3838
-AzureFileVolumeMountPath <String> [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
3939
[-Confirm] [<CommonParameters>]
@@ -412,8 +412,8 @@ Accept pipeline input: False
412412
Accept wildcard characters: False
413413
```
414414
415-
### -Ports
416-
The ports to open. Default: [80]
415+
### -Port
416+
The port(s) to open. Default: [80]
417417
418418
```yaml
419419
Type: Int32[]

0 commit comments

Comments
 (0)