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

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Identifier. Full name of this discovery client.
createTimestring (google-datetime)Output only. Time when the discovery client was first created.
descriptionstringOptional. Free text description. Maximum length is 1000 characters.
displayNamestringOptional. Free text display name. Maximum length is 63 characters.
errorsarrayOutput only. Errors affecting client functionality.
expireTimestring (google-datetime)Optional. Client expiration time in UTC. If specified, the backend will not accept new frames after this time.
heartbeatTimestring (google-datetime)Output 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.
ttlstring (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.
updateTimestring (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.
versionstringOutput only. Client version, as reported in recent heartbeat.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, discoveryClientsIdGets the details of a discovery client.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists all the discovery clients in a given project and location.
createinsertprojectsId, locationsIddiscoveryClientId, requestIdCreates a new discovery client.
patchupdateprojectsId, locationsId, discoveryClientsIdupdateMask, requestIdUpdates a discovery client.
deletedeleteprojectsId, locationsId, discoveryClientsIdrequestIdDeletes a discovery client.
send_heartbeatexecprojectsId, locationsId, discoveryClientsIdSends 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.

NameDatatypeDescription
discoveryClientsIdstring
locationsIdstring
projectsIdstring
discoveryClientIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

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

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