Editar

Compartilhar via


New-AzContainerGroupPortObject

Create a in-memory object for Port

Syntax

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.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Protocol

The protocol associated with the port.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Port