collectors
Creates, updates, deletes, gets or lists a collectors resource.
Overview
| Name | collectors |
| Type | Resource |
| Id | google.rapidmigrationassessment.collectors |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | name of resource. |
bucket | string | Output only. Store cloud storage bucket name (which is a guid) created with this Collector. |
clientVersion | string | Output only. Client version. |
collectionDays | integer (int32) | How many days to collect data. |
createTime | string (google-datetime) | Output only. Create time stamp. |
description | string | User specified description of the Collector. |
displayName | string | User specified name of the Collector. |
eulaUri | string | Uri for EULA (End User License Agreement) from customer. |
expectedAssetCount | string (int64) | User specified expected asset count. |
guestOsScan | object | Output only. Reference to MC Source Guest Os Scan. (id: GuestOsScan) |
labels | object | Labels as key value pairs. |
serviceAccount | string | Service Account email used to ingest data to this Collector. |
state | string | Output only. State of the Collector. (STATE_UNSPECIFIED, STATE_INITIALIZING, STATE_READY_TO_USE, STATE_REGISTERED, STATE_ACTIVE, STATE_PAUSED, STATE_DELETING, STATE_DECOMMISSIONED, STATE_ERROR) |
updateTime | string (google-datetime) | Output only. Update time stamp. |
vsphereScan | object | Output only. Reference to MC Source vsphere_scan. (id: VSphereScan) |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, collectorsId | Gets details of a single Collector. | |
list | select | projectsId, locationsId | pageToken, orderBy, pageSize, filter | Lists Collectors in a given project and location. |
create | insert | projectsId, locationsId | collectorId, requestId | Create a Collector to manage the on-prem appliance which collects information about Customer assets. |
patch | update | projectsId, locationsId, collectorsId | updateMask, requestId | Updates the parameters of a single Collector. |
delete | delete | projectsId, locationsId, collectorsId | requestId | Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API. |
pause | exec | projectsId, locationsId, collectorsId | Pauses the given collector. | |
register | exec | projectsId, locationsId, collectorsId | Registers the given collector. | |
resume | exec | projectsId, locationsId, collectorsId | Resumes 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.
| Name | Datatype | Description |
|---|---|---|
collectorsId | string | |
locationsId | string | |
projectsId | string | |
collectorId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
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
;
Lists Collectors in a given project and location.
SELECT
*
FROM google.rapidmigrationassessment.collectors
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Create a Collector to manage the on-prem appliance which collects information about Customer assets.
INSERT INTO google.rapidmigrationassessment.collectors (
data__description,
data__expectedAssetCount,
data__serviceAccount,
data__eulaUri,
data__collectionDays,
data__name,
data__labels,
data__displayName,
projectsId,
locationsId,
collectorId,
requestId
)
SELECT
'{{ description }}',
'{{ expectedAssetCount }}',
'{{ serviceAccount }}',
'{{ eulaUri }}',
{{ collectionDays }},
'{{ name }}',
'{{ labels }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ collectorId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: collectors
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the collectors resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the collectors resource.
- name: description
value: "{{ description }}"
description: |
User specified description of the Collector.
- name: expectedAssetCount
value: "{{ expectedAssetCount }}"
description: |
User specified expected asset count.
- name: serviceAccount
value: "{{ serviceAccount }}"
description: |
Service Account email used to ingest data to this Collector.
- name: eulaUri
value: "{{ eulaUri }}"
description: |
Uri for EULA (End User License Agreement) from customer.
- name: collectionDays
value: {{ collectionDays }}
description: |
How many days to collect data.
- name: name
value: "{{ name }}"
description: |
name of resource.
- name: labels
value: "{{ labels }}"
description: |
Labels as key value pairs.
- name: displayName
value: "{{ displayName }}"
description: |
User specified name of the Collector.
- name: collectorId
value: "{{ collectorId }}"
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Updates the parameters of a single Collector.
UPDATE google.rapidmigrationassessment.collectors
SET
data__description = '{{ description }}',
data__expectedAssetCount = '{{ expectedAssetCount }}',
data__serviceAccount = '{{ serviceAccount }}',
data__eulaUri = '{{ eulaUri }}',
data__collectionDays = {{ collectionDays }},
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__displayName = '{{ displayName }}'
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
- delete
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
- pause
- register
- resume
Pauses the given collector.
EXEC google.rapidmigrationassessment.collectors.pause
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectorsId='{{ collectorsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}"
}'
;
Registers the given collector.
EXEC google.rapidmigrationassessment.collectors.register
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectorsId='{{ collectorsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}"
}'
;
Resumes the given collector.
EXEC google.rapidmigrationassessment.collectors.resume
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@collectorsId='{{ collectorsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}"
}'
;