REST Resource: projects.locations.instances

Resource: Instance

A Cloud Run Instance represents a single group of containers running in a region.

JSON representation
{
  "name": string,
  "description": string,
  "uid": string,
  "generation": string,
  "labels": {
    string: string,
    ...
  },
  "annotations": {
    string: string,
    ...
  },
  "createTime": string,
  "updateTime": string,
  "deleteTime": string,
  "expireTime": string,
  "creator": string,
  "lastModifier": string,
  "client": string,
  "clientVersion": string,
  "launchStage": enum (LaunchStage),
  "binaryAuthorization": {
    object (BinaryAuthorization)
  },
  "vpcAccess": {
    object (VpcAccess)
  },
  "serviceAccount": string,
  "containers": [
    {
      object (Container)
    }
  ],
  "volumes": [
    {
      object (Volume)
    }
  ],
  "encryptionKey": string,
  "encryptionKeyRevocationAction": enum (EncryptionKeyRevocationAction),
  "encryptionKeyShutdownDuration": string,
  "nodeSelector": {
    object (NodeSelector)
  },
  "ingress": enum (IngressTraffic),
  "invokerIamDisabled": boolean,
  "defaultUriDisabled": boolean,
  "iapEnabled": boolean,
  "restartPolicy": enum (RestartPolicy),
  "observedGeneration": string,
  "logUri": string,
  "terminalCondition": {
    object (Condition)
  },
  "conditions": [
    {
      object (Condition)
    }
  ],
  "containerStatuses": [
    {
      object (ContainerStatus)
    }
  ],
  "satisfiesPzs": boolean,
  "urls": [
    string
  ],
  "reconciling": boolean,
  "etag": string,
  "gpuZonalRedundancyDisabled": boolean
}
Fields
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.

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

string (int64 format)

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

map (key: string, value: string)

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

annotations

map (key: string, value: string)

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

createTime

string (Timestamp format)

Output only. The creation time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The last-modified time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

deleteTime

string (Timestamp format)

Output only. The deletion time.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

expireTime

string (Timestamp format)

Output only. For a deleted resource, the time after which it will be permamently deleted.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

creator

string

Output only. Email address of the authenticated creator.

lastModifier

string

Output only. Email address of the last authenticated modifier.

client

string

Arbitrary identifier for the API client.

clientVersion

string

Arbitrary version identifier for the API client.

launchStage

enum (LaunchStage)

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.

binaryAuthorization

object (BinaryAuthorization)

Settings for the Binary Authorization feature.

vpcAccess

object (VpcAccess)

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

serviceAccount

string

containers[]

object (Container)

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

volumes[]

object (Volume)

A list of Volumes to make available to containers.

encryptionKey

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

encryptionKeyRevocationAction

enum (EncryptionKeyRevocationAction)

The action to take if the encryption key is revoked.

encryptionKeyShutdownDuration

string (Duration format)

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

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

nodeSelector

object (NodeSelector)

Optional. The node selector for the instance.

ingress

enum (IngressTraffic)

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.

invokerIamDisabled

boolean

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.

defaultUriDisabled

boolean

Optional. Disables public resolution of the default URI of this Instance.

iapEnabled

boolean

Optional. IAP settings on the Instance.

restartPolicy

enum (RestartPolicy)

Optional. Restart policy for the Instance.

observedGeneration

string (int64 format)

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.

logUri

string

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

terminalCondition

object (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[]

object (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.

containerStatuses[]

object (ContainerStatus)

Output only. Status information for each of the specified containers. The status includes the resolved digest for specified images.

satisfiesPzs

boolean

Output only. Reserved for future use.

urls[]

string

Output only. All URLs serving traffic for this Instance.

reconciling

boolean

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, observedGeneration 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 terminalCondition.state.

etag

string

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

gpuZonalRedundancyDisabled

boolean

Optional. True if GPU zonal redundancy is disabled on this instance.

RestartPolicy

Restart policy options for the instance. If not provided, the default is ON_FAILURE.

Enums
RESTART_POLICY_UNSPECIFIED Unspecified restart policy.
ALWAYS Always restart the instance.
ON_FAILURE Restart if the instance terminates with non-zero exit code.
NEVER Never restart the instance.

ContainerStatus

ContainerStatus holds the information of container name and image digest value.

JSON representation
{
  "name": string,
  "imageDigest": string
}
Fields
name

string

The name of the container, if specified.

imageDigest

string

ImageDigest holds the resolved digest for the image specified and resolved during the creation of Revision. This field holds the digest value regardless of whether a tag or digest was originally specified in the Container object.

Methods

create

Creates an Instance.

delete

Deletes an Instance

get

Gets an Instance

getIamPolicy

Gets the IAM Access Control policy currently in effect for the given Instance.

list

Lists Instances.

patch

Updates an Instance.

setIamPolicy

Sets the IAM Access control policy for the specified Instance.

start

Starts an Instance.

stop

Stops an Instance.

testIamPermissions

Returns permissions that a caller has on the specified Project.