# REST Resource: projects.locations.applications.instances

- [Resource: Instance](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#Instance)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#Instance.SCHEMA_REPRESENTATION)
- [InputResource](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#InputResource)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#InputResource.SCHEMA_REPRESENTATION)
- [ResourceAnnotations](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#ResourceAnnotations)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#ResourceAnnotations.SCHEMA_REPRESENTATION)
- [ApplicationNodeAnnotation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#ApplicationNodeAnnotation)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#ApplicationNodeAnnotation.SCHEMA_REPRESENTATION)
- [OutputResource](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#OutputResource)
  - [JSON representation](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#OutputResource.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#State)
- [Methods](https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#METHODS_SUMMARY)

## Resource: Instance

Message describing Instance object

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "displayName": string, "description": string, "inputResources": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#InputResource`) } ], "outputResources": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#OutputResource`) } ], "state": enum (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#State`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. name of resource |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. \[Output only\] Create timestamp A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `updateTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. \[Output only\] Update timestamp A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `labels` | `map (key: string, value: string)` Labels as key value pairs An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `displayName` | `string` Required. A user friendly display name for the solution. |
| `description` | `string` A description for this instance. |
| `inputResources[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#InputResource`)`` The input resources for the current application instance. For example: inputResources: visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a |
| `outputResources[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#OutputResource`)`` All the output resources associated to one application instance. |
| `state` | ``enum (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#State`)`` State of the instance. |

## InputResource

Message of input resource used in one application instance.

| JSON representation |
|---|
| ``` { "consumerNode": string, "inputResourceBinding": string, "annotations": { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#ResourceAnnotations`) }, // Union field `input_resource_information` can be only one of the following: "inputResource": string, "annotatedStream": { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/StreamWithAnnotation`) } // End of list of possible types for union field `input_resource_information`. } ``` |

| Fields ||
|---|---|
| `consumerNode` | `string` The name of graph node who receives the input resource. For example: inputResource: visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a consumerNode: stream-input |
| `inputResourceBinding` | `string` The specific input resource binding which will consume the current Input Resource, can be ignored is there is only 1 input binding. |
| `annotations` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#ResourceAnnotations`)`` Contains resource annotations. |
| Union field `input_resource_information`. Required. Specify the input to the application instance. `input_resource_information` can be only one of the following: ||
| `inputResource` | `string` The direct input resource name. If the instance type is STREAMING_PREDICTION, the input resource is in format of "projects/123/locations/us-central1/clusters/456/streams/stream-a". If the instance type is BATCH_PREDICTION from Cloud Storage input container, the input resource is in format of "gs://bucket-a". |
| `annotatedStream (deprecated)` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/StreamWithAnnotation`)`` > [!WARNING] > This item is deprecated! If the input resource is VisionAI Stream, the associated annotations can be specified using annotatedStream instead. |

## ResourceAnnotations

Message describing general annotation for resources.

| JSON representation |
|---|
| ``` { "applicationAnnotations": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/StreamAnnotation`) } ], "nodeAnnotations": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#ApplicationNodeAnnotation`) } ] } ``` |

| Fields ||
|---|---|
| `applicationAnnotations[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/StreamAnnotation`)`` Annotations that will be applied to the whole application. |
| `nodeAnnotations[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances#ApplicationNodeAnnotation`)`` Annotations that will be applied to the specific node of the application. If the same type of the annotations is applied to both application and node, the node annotation will be added in addition to the global application one. For example, if there is one active zone annotation for the whole application and one active zone annotation for the Occupancy Analytic processor, then the Occupancy Analytic processor will have two active zones defined. |

## ApplicationNodeAnnotation

Message describing annotations specific to application node. This message is a duplication of StreamWithAnnotation.NodeAnnotation.

| JSON representation |
|---|
| ``` { "node": string, "annotations": [ { object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/StreamAnnotation`) } ] } ``` |

| Fields ||
|---|---|
| `node` | `string` The node name of the application graph. |
| `annotations[]` | ``object (`https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/StreamAnnotation`)`` The node specific stream annotations. |

## OutputResource

Message of output resource used in one application instance.

| JSON representation |
|---|
| ``` { "outputResource": string, "producerNode": string, "outputResourceBinding": string, "isTemporary": boolean, "autogen": boolean } ``` |

| Fields ||
|---|---|
| `outputResource` | `string` The output resource name for the current application instance. |
| `producerNode` | `string` The name of graph node who produces the output resource name. For example: outputResource: /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting producerNode: occupancy-counting |
| `outputResourceBinding` | `string` The specific output resource binding which produces the current OutputResource. |
| `isTemporary` | `boolean` Output only. Whether the output resource is temporary which means the resource is generated during the deployment of the application. Temporary resource will be deleted during the undeployment of the application. |
| `autogen` | `boolean` Output only. Whether the output resource is created automatically by the Vision AI App Platform. |

## State

State of the Instance

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The default value. This value is used if the state is omitted. |
| `CREATING` | State CREATING. |
| `CREATED` | State CREATED. |
| `DEPLOYING` | State DEPLOYING. |
| `DEPLOYED` | State DEPLOYED. |
| `UNDEPLOYING` | State UNDEPLOYING. |
| `DELETED` | State DELETED. |
| `ERROR` | State ERROR. |
| `UPDATING` | State Updating |
| `DELETING` | State Deleting. |
| `FIXING` | State Fixing. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances/get` | Gets details of a single Instance. |
| ### `https://docs.cloud.google.com/vision-ai/docs/reference/rest/v1/projects.locations.applications.instances/list` | Lists Instances in a given project and location. |