Edit

Share via


New-AzContainerGroupPortObject

Create a in-memory object for Port

Syntax

Default (Default)

New-AzContainerGroupPortObject
    -Port <Int32>
    [-Protocol <String>]
    [<CommonParameters>]

Description

Create a in-memory object for Port

Examples

Example 1: Specify port 8000 exposed on a container group with TCP protocol

New-AzContainerGroupPortObject -Port 8000 -Protocol TCP
Port1 Protocol
----- --------
8000  TCP

This command specifies port 8000 exposed on a container group with TCP protocol.

Parameters

-Port

The port number.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Protocol

The protocol associated with the port.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

Port