sources
Creates, updates, deletes, gets or lists a sources resource.
Overview
| Name | sources |
| Type | Resource |
| Id | google.migrationcenter.sources |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The full name of the source. |
createTime | string (google-datetime) | Output only. The timestamp when the source was created. |
description | string | Free-text description. |
displayName | string | User-friendly display name. |
errorFrameCount | integer (int32) | Output only. The number of frames that were reported by the source and contained errors. |
managed | boolean | If true, the source is managed by other service(s). |
pendingFrameCount | integer (int32) | Output only. Number of frames that are still being processed. |
priority | integer (int32) | The information confidence of the source. The higher the value, the higher the confidence. |
state | string | Output only. The state of the source. |
type | string | Data source type. |
updateTime | string (google-datetime) | Output only. The timestamp when the source was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The full name of the source. |
createTime | string (google-datetime) | Output only. The timestamp when the source was created. |
description | string | Free-text description. |
displayName | string | User-friendly display name. |
errorFrameCount | integer (int32) | Output only. The number of frames that were reported by the source and contained errors. |
managed | boolean | If true, the source is managed by other service(s). |
pendingFrameCount | integer (int32) | Output only. Number of frames that are still being processed. |
priority | integer (int32) | The information confidence of the source. The higher the value, the higher the confidence. |
state | string | Output only. The state of the source. |
type | string | Data source type. |
updateTime | string (google-datetime) | Output only. The timestamp when the source was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, sourcesId | Gets the details of a source. | |
list | select | projectsId, locationsId | pageSize, pageToken, filter, orderBy | Lists all the sources in a given project and location. |
create | insert | projectsId, locationsId | sourceId, requestId | Creates a new source in a given project and location. |
patch | update | projectsId, locationsId, sourcesId | updateMask, requestId | Updates the parameters of a source. |
delete | delete | projectsId, locationsId, sourcesId | requestId | Deletes a source. |
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 |
|---|---|---|
locationsId | string | |
projectsId | string | |
sourcesId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
sourceId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets the details of a source.
SELECT
name,
createTime,
description,
displayName,
errorFrameCount,
managed,
pendingFrameCount,
priority,
state,
type,
updateTime
FROM google.migrationcenter.sources
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND sourcesId = '{{ sourcesId }}' -- required
;
Lists all the sources in a given project and location.
SELECT
name,
createTime,
description,
displayName,
errorFrameCount,
managed,
pendingFrameCount,
priority,
state,
type,
updateTime
FROM google.migrationcenter.sources
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- create
- Manifest
Creates a new source in a given project and location.
INSERT INTO google.migrationcenter.sources (
data__displayName,
data__description,
data__type,
data__priority,
data__managed,
projectsId,
locationsId,
sourceId,
requestId
)
SELECT
'{{ displayName }}',
'{{ description }}',
'{{ type }}',
{{ priority }},
{{ managed }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ sourceId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: sources
props:
- name: projectsId
value: string
description: Required parameter for the sources resource.
- name: locationsId
value: string
description: Required parameter for the sources resource.
- name: displayName
value: string
description: >
User-friendly display name.
- name: description
value: string
description: >
Free-text description.
- name: type
value: string
description: >
Data source type.
valid_values: ['SOURCE_TYPE_UNKNOWN', 'SOURCE_TYPE_UPLOAD', 'SOURCE_TYPE_GUEST_OS_SCAN', 'SOURCE_TYPE_INVENTORY_SCAN', 'SOURCE_TYPE_CUSTOM', 'SOURCE_TYPE_DISCOVERY_CLIENT']
- name: priority
value: integer
description: >
The information confidence of the source. The higher the value, the higher the confidence.
- name: managed
value: boolean
description: >
If `true`, the source is managed by other service(s).
- name: sourceId
value: string
- name: requestId
value: string
UPDATE examples
- patch
Updates the parameters of a source.
UPDATE google.migrationcenter.sources
SET
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__type = '{{ type }}',
data__priority = {{ priority }},
data__managed = {{ managed }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sourcesId = '{{ sourcesId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a source.
DELETE FROM google.migrationcenter.sources
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sourcesId = '{{ sourcesId }}' --required
AND requestId = '{{ requestId }}'
;