utilization_reports
Creates, updates, deletes, gets or lists a utilization_reports
resource.
Overview
Name | utilization_reports |
Type | Resource |
Id | google.vmmigration.utilization_reports |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The report unique name. |
createTime | string (google-datetime) | Output only. The time the report was created (this refers to the time of the request, not the time the report creation completed). |
displayName | string | The report display name, as assigned by the user. |
error | object | Output only. Provides details on the state of the report in case of an error. (id: Status) |
frameEndTime | string (google-datetime) | Output only. The point in time when the time frame ends. Notice that the time frame is counted backwards. For instance if the "frame_end_time" value is 2021/01/20 and the time frame is WEEK then the report covers the week between 2021/01/20 and 2021/01/14. |
state | string | Output only. Current state of the report. |
stateTime | string (google-datetime) | Output only. The time the state was last set. |
timeFrame | string | Time frame of the report. |
vmCount | integer (int32) | Output only. Total number of VMs included in the report. |
vms | array | List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The report unique name. |
createTime | string (google-datetime) | Output only. The time the report was created (this refers to the time of the request, not the time the report creation completed). |
displayName | string | The report display name, as assigned by the user. |
error | object | Output only. Provides details on the state of the report in case of an error. (id: Status) |
frameEndTime | string (google-datetime) | Output only. The point in time when the time frame ends. Notice that the time frame is counted backwards. For instance if the "frame_end_time" value is 2021/01/20 and the time frame is WEEK then the report covers the week between 2021/01/20 and 2021/01/14. |
state | string | Output only. Current state of the report. |
stateTime | string (google-datetime) | Output only. The time the state was last set. |
timeFrame | string | Time frame of the report. |
vmCount | integer (int32) | Output only. Total number of VMs included in the report. |
vms | array | List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , sourcesId , utilizationReportsId | view | Gets a single Utilization Report. |
list | select | projectsId , locationsId , sourcesId | view , pageSize , pageToken , filter , orderBy | Lists Utilization Reports of the given Source. |
create | insert | projectsId , locationsId , sourcesId | utilizationReportId , requestId | Creates a new UtilizationReport. |
delete | delete | projectsId , locationsId , sourcesId , utilizationReportsId | requestId | Deletes a single Utilization 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 | |
sourcesId | string | |
utilizationReportsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
utilizationReportId | string | |
view | string |
SELECT
examples
- get
- list
Gets a single Utilization Report.
SELECT
name,
createTime,
displayName,
error,
frameEndTime,
state,
stateTime,
timeFrame,
vmCount,
vms
FROM google.vmmigration.utilization_reports
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND sourcesId = '{{ sourcesId }}' -- required
AND utilizationReportsId = '{{ utilizationReportsId }}' -- required
AND view = '{{ view }}';
Lists Utilization Reports of the given Source.
SELECT
name,
createTime,
displayName,
error,
frameEndTime,
state,
stateTime,
timeFrame,
vmCount,
vms
FROM google.vmmigration.utilization_reports
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND sourcesId = '{{ sourcesId }}' -- required
AND view = '{{ view }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new UtilizationReport.
INSERT INTO google.vmmigration.utilization_reports (
data__displayName,
data__timeFrame,
data__vms,
projectsId,
locationsId,
sourcesId,
utilizationReportId,
requestId
)
SELECT
'{{ displayName }}',
'{{ timeFrame }}',
'{{ vms }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ sourcesId }}',
'{{ utilizationReportId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: utilization_reports
props:
- name: projectsId
value: string
description: Required parameter for the utilization_reports resource.
- name: locationsId
value: string
description: Required parameter for the utilization_reports resource.
- name: sourcesId
value: string
description: Required parameter for the utilization_reports resource.
- name: displayName
value: string
description: >
The report display name, as assigned by the user.
- name: timeFrame
value: string
description: >
Time frame of the report.
valid_values: ['TIME_FRAME_UNSPECIFIED', 'WEEK', 'MONTH', 'YEAR']
- name: vms
value: array
description: >
List of utilization information per VM. When sent as part of the request, the "vm_id" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.
- name: utilizationReportId
value: string
- name: requestId
value: string
DELETE
examples
- delete
Deletes a single Utilization Report.
DELETE FROM google.vmmigration.utilization_reports
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sourcesId = '{{ sourcesId }}' --required
AND utilizationReportsId = '{{ utilizationReportsId }}' --required
AND requestId = '{{ requestId }}';