New-AzContainerInstancePortObject
为 ContainerPort 创建内存中对象
语法
Default (默认值)
New-AzContainerInstancePortObject
-Port <Int32>
[-Protocol <String>]
[<CommonParameters>]
说明
为 ContainerPort 创建内存中对象
示例
示例 1:使用 TCP 协议指定在容器实例上公开的端口 8000
New-AzContainerInstancePortObject -Port 8000 -Protocol TCP
Port Protocol
----- --------
8000 TCP
此命令指定使用 TCP 协议在容器实例上公开的端口 8000。
参数
-Port
容器组中公开的端口号。
参数属性
| 类型: | Int32 |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Protocol
与端口关联的协议。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。