discovery_clients
Creates, updates, deletes, gets or lists a discovery_clients
resource.
Overview
Name | discovery_clients |
Type | Resource |
Id | google.migrationcenter.discovery_clients |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. Full name of this discovery client. |
description | string | Optional. Free text description. Maximum length is 1000 characters. |
createTime | string | Output only. Time when the discovery client was first created. |
displayName | string | Optional. Free text display name. Maximum length is 63 characters. |
errors | array | Output only. Errors affecting client functionality. |
expireTime | string | Optional. Client expiration time in UTC. If specified, the backend will not accept new frames after this time. |
heartbeatTime | string | 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 | 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 | 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | discoveryClientsId, locationsId, projectsId | Gets the details of a discovery client. |
list | SELECT | locationsId, projectsId | Lists all the discovery clients in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new discovery client. |
delete | DELETE | discoveryClientsId, locationsId, projectsId | Deletes a discovery client. |
patch | UPDATE | discoveryClientsId, locationsId, projectsId | Updates a discovery client. |
send_heartbeat | EXEC | discoveryClientsId, locationsId, projectsId | Sends a discovery client heartbeat. Healthy clients are expected to send heartbeats regularly (normally every few minutes). |
SELECT
examples
Lists all the discovery clients in a given project and location.
SELECT
name,
description,
createTime,
displayName,
errors,
expireTime,
heartbeatTime,
labels,
serviceAccount,
signalsEndpoint,
source,
state,
ttl,
updateTime,
version
FROM google.migrationcenter.discovery_clients
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new discovery_clients
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.migrationcenter.discovery_clients (
locationsId,
projectsId,
source,
serviceAccount,
displayName,
description,
labels,
expireTime,
ttl
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ source }}',
'{{ serviceAccount }}',
'{{ displayName }}',
'{{ description }}',
'{{ labels }}',
'{{ expireTime }}',
'{{ ttl }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: source
value: string
- name: serviceAccount
value: string
- name: signalsEndpoint
value: string
- name: displayName
value: string
- name: description
value: string
- name: labels
value: object
- name: state
value: string
- name: version
value: string
- name: errors
value:
- - name: code
value: integer
- name: message
value: string
- name: details
value:
- object
- name: heartbeatTime
value: string
- name: expireTime
value: string
- name: ttl
value: string
UPDATE
example
Updates a discovery_clients
resource.
/*+ update */
UPDATE google.migrationcenter.discovery_clients
SET
source = '{{ source }}',
serviceAccount = '{{ serviceAccount }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
labels = '{{ labels }}',
expireTime = '{{ expireTime }}',
ttl = '{{ ttl }}'
WHERE
discoveryClientsId = '{{ discoveryClientsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified discovery_clients
resource.
/*+ delete */
DELETE FROM google.migrationcenter.discovery_clients
WHERE discoveryClientsId = '{{ discoveryClientsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';