ContainerPort Class

  • java.lang.Object
    • com.azure.resourcemanager.containerinstance.models.ContainerPort

public final class ContainerPort

The port exposed on the container instance.

Constructor Summary

Constructor Description
ContainerPort()

Creates an instance of ContainerPort class.

Method Summary

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.

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:

the port value.

protocol

public ContainerNetworkProtocol protocol()

Get the protocol property: The protocol associated with the port.

Returns:

the protocol value.

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:

port - the port value to set.

Returns:

the ContainerPort object itself.

withProtocol

public ContainerPort withProtocol(ContainerNetworkProtocol protocol)

Set the protocol property: The protocol associated with the port.

Parameters:

protocol - the protocol value to set.

Returns:

the ContainerPort object itself.

Applies to