ContainerPort Class
- java.
lang. Object - com.
azure. resourcemanager. containerinstance. models. ContainerPort
- com.
public final class ContainerPort
The port exposed on the container instance.
Constructor Summary
Constructor | Description |
---|---|
ContainerPort() |
Creates an instance of Container |
Method Summary
Modifier and Type | Method and Description |
---|---|
int |
port()
Get the port property: The port number exposed within the container group. |
Container |
protocol()
Get the protocol property: The protocol associated with the port. |
void |
validate()
Validates the instance. |
Container |
withPort(int port)
Set the port property: The port number exposed within the container group. |
Container |
withProtocol(ContainerNetworkProtocol protocol)
Set the protocol property: The protocol associated with the port. |
Methods inherited from java.lang.Object
Constructor Details
ContainerPort
public ContainerPort()
Creates an instance of ContainerPort class.
Method Details
port
public int port()
Get the port property: The port number exposed within the container group.
Returns:
protocol
public ContainerNetworkProtocol protocol()
Get the protocol property: The protocol associated with the port.
Returns:
validate
public void validate()
Validates the instance.
withPort
public ContainerPort withPort(int port)
Set the port property: The port number exposed within the container group.
Parameters:
Returns:
withProtocol
public ContainerPort withProtocol(ContainerNetworkProtocol protocol)
Set the protocol property: The protocol associated with the port.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for