REST Resource: namespaces.instances

Resource: Instance

An Instance represents the configuration of a single instance that references a container image and runs to completion.

JSON representation
{
  "apiVersion": string,
  "kind": string,
  "metadata": {
    object (ObjectMeta)
  },
  "spec": {
    object (InstanceSpec)
  },
  "status": {
    object (InstanceStatus)
  }
}
Fields
apiVersion

string

Optional. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

kind

string

Optional. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.

metadata

object (ObjectMeta)

Optional. Standard object's metadata.

spec

object (InstanceSpec)

Optional. Specification of the desired behavior of an Instance.

status

object (InstanceStatus)

Output only. Current status of an Instance.

InstanceSpec

InstanceSpec describes how the Instance will look.

JSON representation
{
  "volumes": [
    {
      object (Volume)
    }
  ],
  "containers": [
    {
      object (Container)
    }
  ],
  "serviceAccountName": string,
  "nodeSelector": {
    string: string,
    ...
  },
  "restartPolicy": string
}
Fields
volumes[]

object (Volume)

Optional. List of volumes that can be mounted by containers belonging to the Instance.

containers[]

object (Container)

Optional. List of containers belonging to the Instance. We disallow a number of fields on this Container.

serviceAccountName

string

Optional. Email address of the IAM service account associated with the Instance. The service account represents the identity of the running container, and determines what permissions the Instance has. If not provided, the Instance will use the project's default service account.

nodeSelector

map (key: string, value: string)

Optional. The Node Selector configuration. Map of selector key to a value which matches a node.

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

restartPolicy

string

Optional. Restart policy for the Instance. Allowable values are 'Always', 'OnFailure', or 'Never'.

InstanceStatus

InstanceStatus represents the current state of an Instance.

JSON representation
{
  "observedGeneration": integer,
  "conditions": [
    {
      object (Condition)
    }
  ],
  "logUri": string,
  "urls": [
    string
  ]
}
Fields
observedGeneration

integer

Output only. The 'generation' of the Instance that was last processed by the controller.

conditions[]

object (Condition)

Output only. Conditions communicate information about ongoing/complete reconciliation processes that bring the "spec" inline with the observed state of the world.

Instance-specific conditions include:

  • Ready: True when the Instance is ready to be executed.
logUri

string

Optional. URI where logs for this execution can be found in Cloud Console.

urls[]

string

Output only. All URLs serving traffic for this Instance.

Methods

create

Create an Instance.

delete

Delete an Instance.

get

Get an Instance.

list

List Instances.

replaceInstance

Replace an Instance.

start

Start an Instance which has been stopped.

stop

Stop an Instance that is running.