Skip to main content

collectors

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

Overview

Namecollectors
TypeResource
Idgoogle.rapidmigrationassessment.collectors

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringname of resource.
bucketstringOutput only. Store cloud storage bucket name (which is a guid) created with this Collector.
clientVersionstringOutput only. Client version.
collectionDaysinteger (int32)How many days to collect data.
createTimestring (google-datetime)Output only. Create time stamp.
descriptionstringUser specified description of the Collector.
displayNamestringUser specified name of the Collector.
eulaUristringUri for EULA (End User License Agreement) from customer.
expectedAssetCountstring (int64)User specified expected asset count.
guestOsScanobjectOutput only. Reference to MC Source Guest Os Scan. (id: GuestOsScan)
labelsobjectLabels as key value pairs.
serviceAccountstringService Account email used to ingest data to this Collector.
statestringOutput only. State of the Collector.
updateTimestring (google-datetime)Output only. Update time stamp.
vsphereScanobjectOutput only. Reference to MC Source vsphere_scan. (id: VSphereScan)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, collectorsIdGets details of a single Collector.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists Collectors in a given project and location.
createinsertprojectsId, locationsIdcollectorId, requestIdCreate a Collector to manage the on-prem appliance which collects information about Customer assets.
patchupdateprojectsId, locationsId, collectorsIdupdateMask, requestIdUpdates the parameters of a single Collector.
deletedeleteprojectsId, locationsId, collectorsIdrequestIdDeletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API.
resumeexecprojectsId, locationsId, collectorsIdResumes the given collector.
registerexecprojectsId, locationsId, collectorsIdRegisters the given collector.
pauseexecprojectsId, locationsId, collectorsIdPauses the given collector.

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
collectorsIdstring
locationsIdstring
projectsIdstring
collectorIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single Collector.

SELECT
name,
bucket,
clientVersion,
collectionDays,
createTime,
description,
displayName,
eulaUri,
expectedAssetCount,
guestOsScan,
labels,
serviceAccount,
state,
updateTime,
vsphereScan
FROM google.rapidmigrationassessment.collectors
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND collectorsId = '{{ collectorsId }}' -- required;

INSERT examples

Create a Collector to manage the on-prem appliance which collects information about Customer assets.

INSERT INTO google.rapidmigrationassessment.collectors (
data__name,
data__labels,
data__displayName,
data__description,
data__serviceAccount,
data__expectedAssetCount,
data__collectionDays,
data__eulaUri,
projectsId,
locationsId,
collectorId,
requestId
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ displayName }}',
'{{ description }}',
'{{ serviceAccount }}',
'{{ expectedAssetCount }}',
{{ collectionDays }},
'{{ eulaUri }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ collectorId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single Collector.

UPDATE google.rapidmigrationassessment.collectors
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__serviceAccount = '{{ serviceAccount }}',
data__expectedAssetCount = '{{ expectedAssetCount }}',
data__collectionDays = {{ collectionDays }},
data__eulaUri = '{{ eulaUri }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectorsId = '{{ collectorsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API.

DELETE FROM google.rapidmigrationassessment.collectors
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND collectorsId = '{{ collectorsId }}' --required
AND requestId = '{{ requestId }}';

Lifecycle Methods

Resumes the given collector.

EXEC google.rapidmigrationassessment.collectors.resume 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectorsId='{{ collectorsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}"
}';