public final class ContainerPort extends Object
| Constructor and Description |
|---|
ContainerPort() |
| Modifier and Type | Method and Description |
|---|---|
int |
port()
Get the port property: The port number exposed within the container group.
|
ContainerNetworkProtocol |
protocol()
Get the protocol property: The protocol associated with the port.
|
void |
validate()
Validates the instance.
|
ContainerPort |
withPort(int port)
Set the port property: The port number exposed within the container group.
|
ContainerPort |
withProtocol(ContainerNetworkProtocol protocol)
Set the protocol property: The protocol associated with the port.
|
public ContainerNetworkProtocol protocol()
public ContainerPort withProtocol(ContainerNetworkProtocol protocol)
protocol - the protocol value to set.public int port()
public ContainerPort withPort(int port)
port - the port value to set.public void validate()
IllegalArgumentException - thrown if the instance is not valid.Copyright © 2021 Microsoft Corporation. All rights reserved.