Skip to main content

reports

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

Overview​

Namereports
TypeResource
Idgoogle.migrationcenter.reports

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. Name of resource.
createTimestring (google-datetime)Output only. Creation timestamp.
descriptionstringFree-text description.
displayNamestringUser-friendly display name. Maximum length is 63 characters.
statestringReport creation state. (STATE_UNSPECIFIED, PENDING, SUCCEEDED, FAILED)
summaryobjectOutput only. Summary view of the Report. (id: ReportSummary)
typestringReport type. (TYPE_UNSPECIFIED, TOTAL_COST_OF_OWNERSHIP)
updateTimestring (google-datetime)Output only. Last update timestamp.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, reportConfigsId, reportsIdviewGets details of a single Report.
listselectprojectsId, locationsId, reportConfigsIdfilter, orderBy, pageSize, pageToken, viewLists Reports in a given ReportConfig.
createinsertprojectsId, locationsId, reportConfigsIdreportId, requestIdCreates a report.
deletedeleteprojectsId, locationsId, reportConfigsId, reportsIdrequestIdDeletes 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
reportConfigsIdstring
reportsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
reportIdstring
requestIdstring
viewstring

SELECT examples​

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 }}'
;

INSERT examples​

Creates a report.

INSERT INTO google.migrationcenter.reports (
data__description,
data__displayName,
data__state,
data__type,
projectsId,
locationsId,
reportConfigsId,
reportId,
requestId
)
SELECT
'{{ description }}',
'{{ displayName }}',
'{{ state }}',
'{{ type }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ reportConfigsId }}',
'{{ reportId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples​

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 }}'
;