discovery_clients
Creates, updates, deletes, gets or lists a discovery_clients
resource.
Overview
Name | discovery_clients |
Type | Resource |
Id | google.migrationcenter.discovery_clients |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. Full name of this discovery client. |
createTime | string (google-datetime) | Output only. Time when the discovery client was first created. |
description | string | Optional. Free text description. Maximum length is 1000 characters. |
displayName | string | Optional. Free text display name. Maximum length is 63 characters. |
errors | array | Output only. Errors affecting client functionality. |
expireTime | string (google-datetime) | Optional. Client expiration time in UTC. If specified, the backend will not accept new frames after this time. |
heartbeatTime | string (google-datetime) | Output only. Last heartbeat time. Healthy clients are expected to send heartbeats regularly (normally every few minutes). |
labels | object | Optional. Labels as key value pairs. |
serviceAccount | string | Required. Service account used by the discovery client for various operation. |
signalsEndpoint | string | Output only. This field is intended for internal use. |
source | string | Required. Immutable. Full name of the source object associated with this discovery client. |
state | string | Output only. Current state of the discovery client. |
ttl | string (google-duration) | 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 expire_time field. |
updateTime | string (google-datetime) | 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 heartbeat_time field. |
version | string | Output only. Client version, as reported in recent heartbeat. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. Full name of this discovery client. |
createTime | string (google-datetime) | Output only. Time when the discovery client was first created. |
description | string | Optional. Free text description. Maximum length is 1000 characters. |
displayName | string | Optional. Free text display name. Maximum length is 63 characters. |
errors | array | Output only. Errors affecting client functionality. |
expireTime | string (google-datetime) | Optional. Client expiration time in UTC. If specified, the backend will not accept new frames after this time. |
heartbeatTime | string (google-datetime) | Output only. Last heartbeat time. Healthy clients are expected to send heartbeats regularly (normally every few minutes). |
labels | object | Optional. Labels as key value pairs. |
serviceAccount | string | Required. Service account used by the discovery client for various operation. |
signalsEndpoint | string | Output only. This field is intended for internal use. |
source | string | Required. Immutable. Full name of the source object associated with this discovery client. |
state | string | Output only. Current state of the discovery client. |
ttl | string (google-duration) | 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 expire_time field. |
updateTime | string (google-datetime) | 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 heartbeat_time field. |
version | string | Output only. Client version, as reported in recent heartbeat. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , discoveryClientsId | Gets the details of a discovery client. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists all the discovery clients in a given project and location. |
create | insert | projectsId , locationsId | discoveryClientId , requestId | Creates a new discovery client. |
patch | update | projectsId , locationsId , discoveryClientsId | updateMask , requestId | Updates a discovery client. |
delete | delete | projectsId , locationsId , discoveryClientsId | requestId | Deletes a discovery client. |
send_heartbeat | exec | projectsId , locationsId , discoveryClientsId | Sends a discovery client heartbeat. Healthy clients are expected to send heartbeats regularly (normally every few minutes). |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
discoveryClientsId | string | |
locationsId | string | |
projectsId | string | |
discoveryClientId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets the details of a discovery client.
SELECT
name,
createTime,
description,
displayName,
errors,
expireTime,
heartbeatTime,
labels,
serviceAccount,
signalsEndpoint,
source,
state,
ttl,
updateTime,
version
FROM google.migrationcenter.discovery_clients
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND discoveryClientsId = '{{ discoveryClientsId }}' -- required;
Lists all the discovery clients in a given project and location.
SELECT
name,
createTime,
description,
displayName,
errors,
expireTime,
heartbeatTime,
labels,
serviceAccount,
signalsEndpoint,
source,
state,
ttl,
updateTime,
version
FROM google.migrationcenter.discovery_clients
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new discovery client.
INSERT INTO google.migrationcenter.discovery_clients (
data__source,
data__serviceAccount,
data__displayName,
data__description,
data__labels,
data__expireTime,
data__ttl,
projectsId,
locationsId,
discoveryClientId,
requestId
)
SELECT
'{{ source }}',
'{{ serviceAccount }}',
'{{ displayName }}',
'{{ description }}',
'{{ labels }}',
'{{ expireTime }}',
'{{ ttl }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ discoveryClientId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: discovery_clients
props:
- name: projectsId
value: string
description: Required parameter for the discovery_clients resource.
- name: locationsId
value: string
description: Required parameter for the discovery_clients resource.
- name: source
value: string
description: >
Required. Immutable. Full name of the source object associated with this discovery client.
- name: serviceAccount
value: string
description: >
Required. Service account used by the discovery client for various operation.
- name: displayName
value: string
description: >
Optional. Free text display name. Maximum length is 63 characters.
- name: description
value: string
description: >
Optional. Free text description. Maximum length is 1000 characters.
- name: labels
value: object
description: >
Optional. Labels as key value pairs.
- name: expireTime
value: string
description: >
Optional. Client expiration time in UTC. If specified, the backend will not accept new frames after this time.
- name: ttl
value: string
description: >
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 `expire_time` field.
- name: discoveryClientId
value: string
- name: requestId
value: string
UPDATE
examples
- patch
Updates a discovery client.
UPDATE google.migrationcenter.discovery_clients
SET
data__source = '{{ source }}',
data__serviceAccount = '{{ serviceAccount }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__expireTime = '{{ expireTime }}',
data__ttl = '{{ ttl }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND discoveryClientsId = '{{ discoveryClientsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a discovery client.
DELETE FROM google.migrationcenter.discovery_clients
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND discoveryClientsId = '{{ discoveryClientsId }}' --required
AND requestId = '{{ requestId }}';
Lifecycle Methods
- send_heartbeat
Sends a discovery client heartbeat. Healthy clients are expected to send heartbeats regularly (normally every few minutes).
EXEC google.migrationcenter.discovery_clients.send_heartbeat
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@discoveryClientsId='{{ discoveryClientsId }}' --required
@@json=
'{
"version": "{{ version }}",
"errors": "{{ errors }}"
}';