Google Cloud Run V2 Client - Class ContainerPort (0.8.0)

Reference documentation and code samples for the Google Cloud Run V2 Client class ContainerPort.

ContainerPort represents a network port in a single container.

Generated from protobuf message google.cloud.run.v2.ContainerPort

Namespace

Google \ Cloud \ Run \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c".

↳ container_port int

Port number the container listens on. This must be a valid TCP port number, 0 < container_port < 65536.

getName

If specified, used to specify which protocol to use.

Allowed values are "http1" and "h2c".

Returns
TypeDescription
string

setName

If specified, used to specify which protocol to use.

Allowed values are "http1" and "h2c".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getContainerPort

Port number the container listens on.

This must be a valid TCP port number, 0 < container_port < 65536.

Returns
TypeDescription
int

setContainerPort

Port number the container listens on.

This must be a valid TCP port number, 0 < container_port < 65536.

Parameter
NameDescription
var int
Returns
TypeDescription
$this