sources
Creates, updates, deletes, gets or lists a sources
resource.
Overview
Name | sources |
Type | Resource |
Id | google.migrationcenter.sources |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The full name of the source. |
description | string | Free-text description. |
createTime | string | Output only. The timestamp when the source was created. |
displayName | string | User-friendly display name. |
errorFrameCount | integer | 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 | Output only. Number of frames that are still being processed. |
priority | integer | 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 | Output only. The timestamp when the source was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, sourcesId | Gets the details of a source. |
list | SELECT | locationsId, projectsId | Lists all the sources in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new source in a given project and location. |
delete | DELETE | locationsId, projectsId, sourcesId | Deletes a source. |
patch | UPDATE | locationsId, projectsId, sourcesId | Updates the parameters of a source. |
SELECT
examples
Lists all the sources in a given project and location.
SELECT
name,
description,
createTime,
displayName,
errorFrameCount,
managed,
pendingFrameCount,
priority,
state,
type,
updateTime
FROM google.migrationcenter.sources
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new sources
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.migrationcenter.sources (
locationsId,
projectsId,
displayName,
description,
type,
priority,
managed
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ description }}',
'{{ type }}',
'{{ priority }}',
{{ managed }}
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: displayName
value: string
- name: description
value: string
- name: type
value: string
- name: priority
value: integer
- name: managed
value: boolean
- name: pendingFrameCount
value: integer
- name: errorFrameCount
value: integer
- name: state
value: string
UPDATE
example
Updates a sources
resource.
/*+ update */
UPDATE google.migrationcenter.sources
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
type = '{{ type }}',
priority = '{{ priority }}',
managed = true|false
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sourcesId = '{{ sourcesId }}';
DELETE
example
Deletes the specified sources
resource.
/*+ delete */
DELETE FROM google.migrationcenter.sources
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sourcesId = '{{ sourcesId }}';