Google Cloud Run V2 Client - Class ContainerPort (1.1.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
Name Description
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
Type Description
string

setName

If specified, used to specify which protocol to use.

Allowed values are "http1" and "h2c".

Parameter
Name Description
var string
Returns
Type Description
$this

getContainerPort

Port number the container listens on.

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

Returns
Type Description
int

setContainerPort

Port number the container listens on.

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

Parameter
Name Description
var int
Returns
Type Description
$this