Skip to main content

discovery_clients

Creates, updates, deletes, gets or lists a discovery_clients resource.

Overview

Namediscovery_clients
TypeResource
Idgoogle.migrationcenter.discovery_clients

Fields

NameDatatypeDescription
namestringOutput only. Identifier. Full name of this discovery client.
descriptionstringOptional. Free text description. Maximum length is 1000 characters.
createTimestringOutput only. Time when the discovery client was first created.
displayNamestringOptional. Free text display name. Maximum length is 63 characters.
errorsarrayOutput only. Errors affecting client functionality.
expireTimestringOptional. Client expiration time in UTC. If specified, the backend will not accept new frames after this time.
heartbeatTimestringOutput only. Last heartbeat time. Healthy clients are expected to send heartbeats regularly (normally every few minutes).
labelsobjectOptional. Labels as key value pairs.
serviceAccountstringRequired. Service account used by the discovery client for various operation.
signalsEndpointstringOutput only. This field is intended for internal use.
sourcestringRequired. Immutable. Full name of the source object associated with this discovery client.
statestringOutput only. Current state of the discovery client.
ttlstringOptional. 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.
updateTimestringOutput 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.
versionstringOutput only. Client version, as reported in recent heartbeat.

Methods

NameAccessible byRequired ParamsDescription
getSELECTdiscoveryClientsId, locationsId, projectsIdGets the details of a discovery client.
listSELECTlocationsId, projectsIdLists all the discovery clients in a given project and location.
createINSERTlocationsId, projectsIdCreates a new discovery client.
deleteDELETEdiscoveryClientsId, locationsId, projectsIdDeletes a discovery client.
patchUPDATEdiscoveryClientsId, locationsId, projectsIdUpdates a discovery client.
send_heartbeatEXECdiscoveryClientsId, locationsId, projectsIdSends 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.

/*+ 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 }}'
;

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 }}';