Google Cloud Run V2 Client - Class Revision (0.5.2)

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

A Revision is an immutable snapshot of code and configuration. A Revision references a container image. Revisions are only created by updates to its parent Service.

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

Namespace

Google \ Cloud \ Run \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The unique name of this Revision.

↳ uid string

Output only. Server assigned unique identifier for the Revision. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

↳ generation int|string

Output only. A number that monotonically increases every time the user modifies the desired state.

↳ labels array|Google\Protobuf\Internal\MapField

Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels.

↳ annotations array|Google\Protobuf\Internal\MapField

Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.

↳ create_time Google\Protobuf\Timestamp

Output only. The creation time.

↳ update_time Google\Protobuf\Timestamp

Output only. The last-modified time.

↳ delete_time Google\Protobuf\Timestamp

Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.

↳ expire_time Google\Protobuf\Timestamp

Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.

↳ launch_stage int

The least stable launch stage needed to create this resource, as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA.

Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are were, this field will be BETA.

↳ service string

Output only. The name of the parent service.

↳ scaling Google\Cloud\Run\V2\RevisionScaling

Scaling settings for this revision.

↳ vpc_access Google\Cloud\Run\V2\VpcAccess

VPC Access configuration for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.

↳ max_instance_request_concurrency int

Sets the maximum number of requests that each serving instance can receive.

↳ timeout Google\Protobuf\Duration

Max allowed time for an instance to respond to a request.

↳ service_account string

Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has.

↳ containers array<Google\Cloud\Run\V2\Container>

Holds the single container that defines the unit of execution for this Revision.

↳ volumes array<Google\Cloud\Run\V2\Volume>

A list of Volumes to make available to containers.

↳ execution_environment int

The execution environment being used to host this Revision.

↳ encryption_key string

A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek

↳ encryption_key_revocation_action int

The action to take if the encryption key is revoked.

↳ encryption_key_shutdown_duration Google\Protobuf\Duration

If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.

↳ reconciling bool

Output only. Indicates whether the resource's reconciliation is still in progress. See comments in Service.reconciling for additional information on reconciliation process in Cloud Run.

↳ conditions array<Google\Cloud\Run\V2\Condition>

Output only. The Condition of this Revision, containing its readiness status, and detailed error information in case it did not reach a serving state.

↳ observed_generation int|string

Output only. The generation of this Revision currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.

↳ log_uri string

Output only. The Google Console URI to obtain logs for the Revision.

↳ satisfies_pzs bool

Output only. Reserved for future use.

↳ session_affinity bool

Enable session affinity.

↳ etag string

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

getName

Output only. The unique name of this Revision.

Returns
TypeDescription
string

setName

Output only. The unique name of this Revision.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUid

Output only. Server assigned unique identifier for the Revision. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

Returns
TypeDescription
string

setUid

Output only. Server assigned unique identifier for the Revision. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getGeneration

Output only. A number that monotonically increases every time the user modifies the desired state.

Returns
TypeDescription
int|string

setGeneration

Output only. A number that monotonically increases every time the user modifies the desired state.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getLabels

Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getAnnotations

Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata.

They are not queryable and should be preserved when modifying objects.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setAnnotations

Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata.

They are not queryable and should be preserved when modifying objects.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getCreateTime

Output only. The creation time.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The creation time.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. The last-modified time.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last-modified time.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getDeleteTime

Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasDeleteTime

clearDeleteTime

setDeleteTime

Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getExpireTime

Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasExpireTime

clearExpireTime

setExpireTime

Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getLaunchStage

The least stable launch stage needed to create this resource, as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA.

Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are were, this field will be BETA.

Returns
TypeDescription
int

setLaunchStage

The least stable launch stage needed to create this resource, as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA.

Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are were, this field will be BETA.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getService

Output only. The name of the parent service.

Returns
TypeDescription
string

setService

Output only. The name of the parent service.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getScaling

Scaling settings for this revision.

Returns
TypeDescription
Google\Cloud\Run\V2\RevisionScaling|null

hasScaling

clearScaling

setScaling

Scaling settings for this revision.

Parameter
NameDescription
var Google\Cloud\Run\V2\RevisionScaling
Returns
TypeDescription
$this

getVpcAccess

VPC Access configuration for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.

Returns
TypeDescription
Google\Cloud\Run\V2\VpcAccess|null

hasVpcAccess

clearVpcAccess

setVpcAccess

VPC Access configuration for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.

Parameter
NameDescription
var Google\Cloud\Run\V2\VpcAccess
Returns
TypeDescription
$this

getMaxInstanceRequestConcurrency

Sets the maximum number of requests that each serving instance can receive.

Returns
TypeDescription
int

setMaxInstanceRequestConcurrency

Sets the maximum number of requests that each serving instance can receive.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getTimeout

Max allowed time for an instance to respond to a request.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasTimeout

clearTimeout

setTimeout

Max allowed time for an instance to respond to a request.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getServiceAccount

Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has.

Returns
TypeDescription
string

setServiceAccount

Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getContainers

Holds the single container that defines the unit of execution for this Revision.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setContainers

Holds the single container that defines the unit of execution for this Revision.

Parameter
NameDescription
var array<Google\Cloud\Run\V2\Container>
Returns
TypeDescription
$this

getVolumes

A list of Volumes to make available to containers.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setVolumes

A list of Volumes to make available to containers.

Parameter
NameDescription
var array<Google\Cloud\Run\V2\Volume>
Returns
TypeDescription
$this

getExecutionEnvironment

The execution environment being used to host this Revision.

Returns
TypeDescription
int

setExecutionEnvironment

The execution environment being used to host this Revision.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getEncryptionKey

A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek

Returns
TypeDescription
string

setEncryptionKey

A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEncryptionKeyRevocationAction

The action to take if the encryption key is revoked.

Returns
TypeDescription
int

setEncryptionKeyRevocationAction

The action to take if the encryption key is revoked.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getEncryptionKeyShutdownDuration

If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasEncryptionKeyShutdownDuration

clearEncryptionKeyShutdownDuration

setEncryptionKeyShutdownDuration

If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getReconciling

Output only. Indicates whether the resource's reconciliation is still in progress. See comments in Service.reconciling for additional information on reconciliation process in Cloud Run.

Returns
TypeDescription
bool

setReconciling

Output only. Indicates whether the resource's reconciliation is still in progress. See comments in Service.reconciling for additional information on reconciliation process in Cloud Run.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getConditions

Output only. The Condition of this Revision, containing its readiness status, and detailed error information in case it did not reach a serving state.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setConditions

Output only. The Condition of this Revision, containing its readiness status, and detailed error information in case it did not reach a serving state.

Parameter
NameDescription
var array<Google\Cloud\Run\V2\Condition>
Returns
TypeDescription
$this

getObservedGeneration

Output only. The generation of this Revision currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.

Returns
TypeDescription
int|string

setObservedGeneration

Output only. The generation of this Revision currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getLogUri

Output only. The Google Console URI to obtain logs for the Revision.

Returns
TypeDescription
string

setLogUri

Output only. The Google Console URI to obtain logs for the Revision.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSatisfiesPzs

Output only. Reserved for future use.

Returns
TypeDescription
bool

setSatisfiesPzs

Output only. Reserved for future use.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getSessionAffinity

Enable session affinity.

Returns
TypeDescription
bool

setSessionAffinity

Enable session affinity.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getEtag

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

Returns
TypeDescription
string

setEtag

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

Parameter
NameDescription
var string
Returns
TypeDescription
$this