# REST Resource: projects.locations.discoveryClients

- [Resource: DiscoveryClient](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#DiscoveryClient)
  - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#DiscoveryClient.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#State)
- [DiscoveryClientRecommendedVersion](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#DiscoveryClientRecommendedVersion)
  - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#DiscoveryClientRecommendedVersion.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#METHODS_SUMMARY)

## Resource: DiscoveryClient

Represents an installed Migration Center Discovery Client instance.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "source": string, "serviceAccount": string, "signalsEndpoint": string, "displayName": string, "description": string, "labels": { string: string, ... }, "state": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#State`), "version": string, "errors": [ { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/Status`) } ], "heartbeatTime": string, "recommendedVersions": [ { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#DiscoveryClientRecommendedVersion`) } ], // Union field `expiration` can be only one of the following: "expireTime": string, "ttl": string // End of list of possible types for union field `expiration`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Identifier. Full name of this discovery client. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Time when the discovery client was first created. Uses RFC 3339, where generated output will always be Z-normalized and uses 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. Time when the discovery client was last updated. This value is not updated by heartbeats, to view the last heartbeat time please refer to the `heartbeatTime` field. Uses RFC 3339, where generated output will always be Z-normalized and uses 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"`. |
| `source` | `string` Required. Full name of the source object associated with this discovery client. |
| `serviceAccount` | `string` Required. Service account used by the discovery client for various operation. |
| `signalsEndpoint` | `string` Output only. This field is intended for internal use. |
| `displayName` | `string` Optional. Free text display name. Maximum length is 63 characters. |
| `description` | `string` Optional. Free text description. Maximum length is 1000 characters. |
| `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" }`. |
| `state` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#State`)`` Output only. Current state of the discovery client. |
| `version` | `string` Output only. Client version, as reported in recent heartbeat. |
| `errors[]` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/Status`)`` Output only. Errors affecting client functionality. |
| `heartbeatTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Last heartbeat time. Healthy clients are expected to send heartbeats regularly (normally every few minutes). Uses RFC 3339, where generated output will always be Z-normalized and uses 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"`. |
| `recommendedVersions[]` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients#DiscoveryClientRecommendedVersion`)`` Output only. The recommended versions of the discovery client. |
| Union field `expiration`. `expiration` can be only one of the following: ||
| `expireTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Client expiration time in UTC. If specified, the backend will not accept new frames after this time. Uses RFC 3339, where generated output will always be Z-normalized and uses 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"`. |
| `ttl` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Optional. Input only. Client time-to-live. If specified, the backend will not accept new frames after this time. This field is input only. The derived expiration time is provided as output through the `expireTime` field. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |

## State

Discovery client states.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Client state is unspecified. |
| `ACTIVE` | Client is active. |
| `OFFLINE` | Client is offline. |
| `DEGRADED` | Client is in a degraded state. See the `errors` field for details. |
| `EXPIRED` | Client has expired. See the expireTime field for the expire time. |

## DiscoveryClientRecommendedVersion

Discovery client recommended version.

| JSON representation |
|---|
| ``` { "version": string, "uri": string } ``` |

| Fields ||
|---|---|
| `version` | `string` Output only. The version of the discovery client. |
| `uri` | `string` Output only. The URI of the discovery client version. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients/create` | Creates a new discovery client. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients/delete` | Deletes a discovery client. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients/get` | Gets the details of a discovery client. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients/list` | Lists all the discovery clients in a given project and location. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients/patch` | Updates a discovery client. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.discoveryClients/sendHeartbeat` | Sends a discovery client heartbeat. |