reports
Creates, updates, deletes, gets or lists a reports resource.
Overview
| Name | reports |
| Type | Resource |
| Id | google.migrationcenter.reports |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Name of resource. |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | Free-text description. |
displayName | string | User-friendly display name. Maximum length is 63 characters. |
state | string | Report creation state. |
summary | object | Output only. Summary view of the Report. (id: ReportSummary) |
type | string | Report type. |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Name of resource. |
createTime | string (google-datetime) | Output only. Creation timestamp. |
description | string | Free-text description. |
displayName | string | User-friendly display name. Maximum length is 63 characters. |
state | string | Report creation state. |
summary | object | Output only. Summary view of the Report. (id: ReportSummary) |
type | string | Report type. |
updateTime | string (google-datetime) | Output only. Last update timestamp. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, reportConfigsId, reportsId | view | Gets details of a single Report. |
list | select | projectsId, locationsId, reportConfigsId | pageSize, pageToken, filter, orderBy, view | Lists Reports in a given ReportConfig. |
create | insert | projectsId, locationsId, reportConfigsId | reportId, requestId | Creates a report. |
delete | delete | projectsId, locationsId, reportConfigsId, reportsId | requestId | Deletes a Report. |
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 | |
reportConfigsId | string | |
reportsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
reportId | string | |
requestId | string | |
view | string |
SELECT examples
- get
- list
Gets details of a single Report.
SELECT
name,
createTime,
description,
displayName,
state,
summary,
type,
updateTime
FROM google.migrationcenter.reports
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND reportConfigsId = '{{ reportConfigsId }}' -- required
AND reportsId = '{{ reportsId }}' -- required
AND view = '{{ view }}'
;
Lists Reports in a given ReportConfig.
SELECT
name,
createTime,
description,
displayName,
state,
summary,
type,
updateTime
FROM google.migrationcenter.reports
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND reportConfigsId = '{{ reportConfigsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}'
;
INSERT examples
- create
- Manifest
Creates a report.
INSERT INTO google.migrationcenter.reports (
data__displayName,
data__description,
data__type,
data__state,
projectsId,
locationsId,
reportConfigsId,
reportId,
requestId
)
SELECT
'{{ displayName }}',
'{{ description }}',
'{{ type }}',
'{{ state }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ reportConfigsId }}',
'{{ reportId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: reports
props:
- name: projectsId
value: string
description: Required parameter for the reports resource.
- name: locationsId
value: string
description: Required parameter for the reports resource.
- name: reportConfigsId
value: string
description: Required parameter for the reports resource.
- name: displayName
value: string
description: >
User-friendly display name. Maximum length is 63 characters.
- name: description
value: string
description: >
Free-text description.
- name: type
value: string
description: >
Report type.
valid_values: ['TYPE_UNSPECIFIED', 'TOTAL_COST_OF_OWNERSHIP']
- name: state
value: string
description: >
Report creation state.
valid_values: ['STATE_UNSPECIFIED', 'PENDING', 'SUCCEEDED', 'FAILED']
- name: reportId
value: string
- name: requestId
value: string
DELETE examples
- delete
Deletes a Report.
DELETE FROM google.migrationcenter.reports
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND reportConfigsId = '{{ reportConfigsId }}' --required
AND reportsId = '{{ reportsId }}' --required
AND requestId = '{{ requestId }}'
;