# REST Resource: projects.locations.codeRepositoryIndexes

- [Resource: CodeRepositoryIndex](https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes#CodeRepositoryIndex)
  - [JSON representation](https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes#CodeRepositoryIndex.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes#State)
- [Methods](https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes#METHODS_SUMMARY)

## Resource: CodeRepositoryIndex

Message describing CodeRepositoryIndex object

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "state": enum (`https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes#State`), "labels": { string: string, ... }, "kmsKey": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Immutable. Identifier. name of resource |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Create time stamp 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 (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Update time stamp 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"`. |
| `state` | ``enum (`https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes#State`)`` Output only. Code Repository Index instance State |
| `labels` | `map (key: string, value: string)` Optional. Labels as key value pairs An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `kmsKey` | `string` Optional. Immutable. Customer-managed encryption key name, in the format projects/\*/locations/\*/keyRings/\*/cryptoKeys/\*. |

## State

Code Repository Index instance state.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Not set. |
| `CREATING` | Instance is being created. |
| `ACTIVE` | Instance is active. |
| `DELETING` | Instance is being deleted. |
| `SUSPENDED` | Instance is suspended. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes/create` | Creates a new CodeRepositoryIndex in a given project and location. |
| ### `https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes/delete` | Deletes a single CodeRepositoryIndex. |
| ### `https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes/get` | Gets details of a single CodeRepositoryIndex. |
| ### `https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes/list` | Lists CodeRepositoryIndexes in a given project and location. |
| ### `https://docs.cloud.google.com/gemini/docs/api/reference/rest/v1/projects.locations.codeRepositoryIndexes/patch` | Updates the parameters of a single CodeRepositoryIndex. |