Reference documentation and code samples for the Google Cloud Run V2 Client class Instance.
A Cloud Run Instance represents a single group of containers running in a region.
Generated from protobuf message google.cloud.run.v2.Instance
Namespace
Google \ Cloud \ Run \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
The fully qualified name of this Instance. In CreateInstanceRequest, this field is ignored, and instead composed from CreateInstanceRequest.parent and CreateInstanceRequest.instance_id. Format: projects/{project}/locations/{location}/instances/{instance_id}
↳ description
string
User-provided description of the Instance. This field currently has a 512-character limit.
↳ uid
string
Output only. Server assigned unique identifier for the trigger. 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. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string
instead of an integer
.
↳ labels
↳ annotations
↳ create_time
↳ update_time
↳ delete_time
↳ expire_time
Google\Protobuf\Timestamp
Output only. For a deleted resource, the time after which it will be permamently deleted.
↳ creator
string
Output only. Email address of the authenticated creator.
↳ last_modifier
string
Output only. Email address of the last authenticated modifier.
↳ client
string
Arbitrary identifier for the API client.
↳ client_version
string
Arbitrary version identifier for the API client.
↳ launch_stage
int
The launch stage as defined by Google Cloud Platform Launch Stages
. Cloud Run supports ALPHA
, BETA
, and GA
. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features.
For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output.
↳ binary_authorization
↳ vpc_access
VpcAccess
Optional. VPC Access configuration to use for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc .
↳ service_account
string
↳ containers
array< Container
>
Required. Holds the single container that defines the unit of execution for this Instance.
↳ volumes
↳ 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.
↳ node_selector
↳ gpu_zonal_redundancy_disabled
bool
Optional. True if GPU zonal redundancy is disabled on this instance.
↳ ingress
int
Optional. Provides the ingress settings for this Instance. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
↳ invoker_iam_disabled
bool
Optional. Disables IAM permission check for run.routes.invoke for callers of this Instance. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check .
↳ iap_enabled
bool
Optional. IAP settings on the Instance.
↳ observed_generation
int|string
Output only. The generation of this Instance currently serving traffic. See comments in reconciling
for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string
instead of an integer
.
↳ log_uri
string
Output only. The Google Console URI to obtain logs for the Instance.
↳ terminal_condition
Condition
Output only. The Condition of this Instance, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling
for additional information on reconciliation process in Cloud Run.
↳ conditions
array< Condition
>
Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Instance does not reach its Serving state. See comments in reconciling
for additional information on reconciliation process in Cloud Run.
↳ container_statuses
array< ContainerStatus
>
Output only. Status information for each of the specified containers. The status includes the resolved digest for specified images.
↳ satisfies_pzs
bool
Output only. Reserved for future use.
↳ urls
string[]
Output only. All URLs serving traffic for this Instance.
↳ reconciling
bool
Output only. Returns true if the Instance is currently being acted upon by the system to bring it into the desired state. When a new Instance is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Instance to the desired serving state. This process is called reconciliation. While reconciliation is in process, observed_generation
will have a transient value that might mismatch the intended state. Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Instance, or there was an error, and reconciliation failed. This state can be found in terminal_condition.state
.
↳ etag
string
Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
getName
The fully qualified name of this Instance. In CreateInstanceRequest, this field is ignored, and instead composed from CreateInstanceRequest.parent and CreateInstanceRequest.instance_id.
Format: projects/{project}/locations/{location}/instances/{instance_id}
string
setName
The fully qualified name of this Instance. In CreateInstanceRequest, this field is ignored, and instead composed from CreateInstanceRequest.parent and CreateInstanceRequest.instance_id.
Format: projects/{project}/locations/{location}/instances/{instance_id}
var
string
$this
getDescription
User-provided description of the Instance. This field currently has a 512-character limit.
string
setDescription
User-provided description of the Instance. This field currently has a 512-character limit.
var
string
$this
getUid
Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
string
setUid
Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
var
string
$this
getGeneration
Output only. A number that monotonically increases every time the user modifies the desired state.
Please note that unlike v1, this is an int64 value. As with most Google
APIs, its JSON representation will be a string
instead of an integer
.
int|string
setGeneration
Output only. A number that monotonically increases every time the user modifies the desired state.
Please note that unlike v1, this is an int64 value. As with most Google
APIs, its JSON representation will be a string
instead of an integer
.
var
int|string
$this
getLabels
Generated from protobuf field map<string, string> labels = 6;
setLabels
Generated from protobuf field map<string, string> labels = 6;
$this
getAnnotations
Generated from protobuf field map<string, string> annotations = 7;
setAnnotations
Generated from protobuf field map<string, string> annotations = 7;
$this
getCreateTime
Output only. The creation time.
hasCreateTime
clearCreateTime
setCreateTime
Output only. The creation time.
$this
getUpdateTime
Output only. The last-modified time.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The last-modified time.
$this
getDeleteTime
Output only. The deletion time.
hasDeleteTime
clearDeleteTime
setDeleteTime
Output only. The deletion time.
$this
getExpireTime
Output only. For a deleted resource, the time after which it will be permamently deleted.
hasExpireTime
clearExpireTime
setExpireTime
Output only. For a deleted resource, the time after which it will be permamently deleted.
$this
getCreator
Output only. Email address of the authenticated creator.
string
setCreator
Output only. Email address of the authenticated creator.
var
string
$this
getLastModifier
Output only. Email address of the last authenticated modifier.
string
setLastModifier
Output only. Email address of the last authenticated modifier.
var
string
$this
getClient
Arbitrary identifier for the API client.
string
setClient
Arbitrary identifier for the API client.
var
string
$this
getClientVersion
Arbitrary version identifier for the API client.
string
setClientVersion
Arbitrary version identifier for the API client.
var
string
$this
getLaunchStage
The launch stage as defined by Google Cloud Platform Launch Stages .
Cloud Run supports ALPHA
, BETA
, and GA
. If no value is specified, GA
is assumed.
Set the launch stage to a preview stage on input to allow use of preview
features in that stage. On read (or output), describes whether the
resource uses preview features.
For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output.
setLaunchStage
The launch stage as defined by Google Cloud Platform Launch Stages .
Cloud Run supports ALPHA
, BETA
, and GA
. If no value is specified, GA
is assumed.
Set the launch stage to a preview stage on input to allow use of preview
features in that stage. On read (or output), describes whether the
resource uses preview features.
For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output.
$this
getBinaryAuthorization
Settings for the Binary Authorization feature.
hasBinaryAuthorization
clearBinaryAuthorization
setBinaryAuthorization
Settings for the Binary Authorization feature.
$this
getVpcAccess
Optional. VPC Access configuration to use for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc .
hasVpcAccess
clearVpcAccess
setVpcAccess
Optional. VPC Access configuration to use for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc .
$this
getServiceAccount
Generated from protobuf field string service_account = 19;
string
setServiceAccount
Generated from protobuf field string service_account = 19;
var
string
$this
getContainers
Required. Holds the single container that defines the unit of execution for this Instance.
setContainers
Required. Holds the single container that defines the unit of execution for this Instance.
$this
getVolumes
A list of Volumes to make available to containers.
setVolumes
A list of Volumes to make available to containers.
$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
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
var
string
$this
getEncryptionKeyRevocationAction
The action to take if the encryption key is revoked.
setEncryptionKeyRevocationAction
The action to take if the encryption key is revoked.
$this
getEncryptionKeyShutdownDuration
If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.
hasEncryptionKeyShutdownDuration
clearEncryptionKeyShutdownDuration
setEncryptionKeyShutdownDuration
If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.
$this
getNodeSelector
Optional. The node selector for the instance.
hasNodeSelector
clearNodeSelector
setNodeSelector
Optional. The node selector for the instance.
$this
getGpuZonalRedundancyDisabled
Optional. True if GPU zonal redundancy is disabled on this instance.
bool
hasGpuZonalRedundancyDisabled
clearGpuZonalRedundancyDisabled
setGpuZonalRedundancyDisabled
Optional. True if GPU zonal redundancy is disabled on this instance.
var
bool
$this
getIngress
Optional. Provides the ingress settings for this Instance. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
setIngress
Optional. Provides the ingress settings for this Instance. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.
$this
getInvokerIamDisabled
Optional. Disables IAM permission check for run.routes.invoke for callers of this Instance. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check .
bool
setInvokerIamDisabled
Optional. Disables IAM permission check for run.routes.invoke for callers of this Instance. For more information, visit https://cloud.google.com/run/docs/securing/managing-access#invoker_check .
var
bool
$this
getIapEnabled
Optional. IAP settings on the Instance.
bool
setIapEnabled
Optional. IAP settings on the Instance.
var
bool
$this
getObservedGeneration
Output only. The generation of this Instance currently serving traffic. See
comments in reconciling
for additional information on reconciliation
process in Cloud Run. Please note that unlike v1, this is an int64 value.
As with most Google APIs, its JSON representation will be a string
instead of an integer
.
int|string
setObservedGeneration
Output only. The generation of this Instance currently serving traffic. See
comments in reconciling
for additional information on reconciliation
process in Cloud Run. Please note that unlike v1, this is an int64 value.
As with most Google APIs, its JSON representation will be a string
instead of an integer
.
var
int|string
$this
getLogUri
Output only. The Google Console URI to obtain logs for the Instance.
string
setLogUri
Output only. The Google Console URI to obtain logs for the Instance.
var
string
$this
getTerminalCondition
Output only. The Condition of this Instance, containing its readiness
status, and detailed error information in case it did not reach a serving
state. See comments in reconciling
for additional information on
reconciliation process in Cloud Run.
hasTerminalCondition
clearTerminalCondition
setTerminalCondition
Output only. The Condition of this Instance, containing its readiness
status, and detailed error information in case it did not reach a serving
state. See comments in reconciling
for additional information on
reconciliation process in Cloud Run.
$this
getConditions
Output only. The Conditions of all other associated sub-resources. They
contain additional diagnostics information in case the Instance does not
reach its Serving state. See comments in reconciling
for additional
information on reconciliation process in Cloud Run.
setConditions
Output only. The Conditions of all other associated sub-resources. They
contain additional diagnostics information in case the Instance does not
reach its Serving state. See comments in reconciling
for additional
information on reconciliation process in Cloud Run.
$this
getContainerStatuses
Output only. Status information for each of the specified containers. The status includes the resolved digest for specified images.
setContainerStatuses
Output only. Status information for each of the specified containers. The status includes the resolved digest for specified images.
$this
getSatisfiesPzs
Output only. Reserved for future use.
bool
setSatisfiesPzs
Output only. Reserved for future use.
var
bool
$this
getUrls
Output only. All URLs serving traffic for this Instance.
setUrls
Output only. All URLs serving traffic for this Instance.
var
string[]
$this
getReconciling
Output only. Returns true if the Instance is currently being acted upon by the system to bring it into the desired state.
When a new Instance is created, or an existing one is updated, Cloud Run
will asynchronously perform all necessary steps to bring the Instance to
the desired serving state. This process is called reconciliation. While
reconciliation is in process, observed_generation
will have a transient
value that might mismatch the intended state.
Once reconciliation is over (and this field is false), there are two
possible outcomes: reconciliation succeeded and the serving state matches
the Instance, or there was an error, and reconciliation failed. This state
can be found in terminal_condition.state
.
bool
setReconciling
Output only. Returns true if the Instance is currently being acted upon by the system to bring it into the desired state.
When a new Instance is created, or an existing one is updated, Cloud Run
will asynchronously perform all necessary steps to bring the Instance to
the desired serving state. This process is called reconciliation. While
reconciliation is in process, observed_generation
will have a transient
value that might mismatch the intended state.
Once reconciliation is over (and this field is false), there are two
possible outcomes: reconciliation succeeded and the serving state matches
the Instance, or there was an error, and reconciliation failed. This state
can be found in terminal_condition.state
.
var
bool
$this
getEtag
Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
string
setEtag
Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
var
string
$this

