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
| 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 | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. (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. (STATE_UNSPECIFIED, CREATING, SUCCEEDED, FAILED) |
stateTime | string (google-datetime) | Output only. The time the state was last set. |
timeFrame | string | Time frame of the report. (TIME_FRAME_UNSPECIFIED, WEEK, MONTH, YEAR) |
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. |
| 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 | The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. (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. (STATE_UNSPECIFIED, CREATING, SUCCEEDED, FAILED) |
stateTime | string (google-datetime) | Output only. The time the state was last set. |
timeFrame | string | Time frame of the report. (TIME_FRAME_UNSPECIFIED, WEEK, MONTH, YEAR) |
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 | pageSize, pageToken, view, orderBy, filter | 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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND view = '{{ view }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a new UtilizationReport.
INSERT INTO google.vmmigration.utilization_reports (
data__vms,
data__displayName,
data__timeFrame,
projectsId,
locationsId,
sourcesId,
utilizationReportId,
requestId
)
SELECT
'{{ vms }}',
'{{ displayName }}',
'{{ timeFrame }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ sourcesId }}',
'{{ utilizationReportId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: utilization_reports
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the utilization_reports resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the utilization_reports resource.
- name: sourcesId
value: "{{ sourcesId }}"
description: Required parameter for the utilization_reports resource.
- name: vms
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.
value:
- vmwareVmDetails:
memoryMb: {{ memoryMb }}
vmId: "{{ vmId }}"
powerState: "{{ powerState }}"
committedStorageMb: "{{ committedStorageMb }}"
datacenterDescription: "{{ datacenterDescription }}"
displayName: "{{ displayName }}"
bootOption: "{{ bootOption }}"
datacenterId: "{{ datacenterId }}"
cpuCount: {{ cpuCount }}
guestDescription: "{{ guestDescription }}"
uuid: "{{ uuid }}"
architecture: "{{ architecture }}"
diskCount: {{ diskCount }}
utilization:
cpuMaxPercent: {{ cpuMaxPercent }}
memoryMaxPercent: {{ memoryMaxPercent }}
memoryAveragePercent: {{ memoryAveragePercent }}
diskIoRateAverageKbps: "{{ diskIoRateAverageKbps }}"
networkThroughputAverageKbps: "{{ networkThroughputAverageKbps }}"
cpuAveragePercent: {{ cpuAveragePercent }}
diskIoRateMaxKbps: "{{ diskIoRateMaxKbps }}"
networkThroughputMaxKbps: "{{ networkThroughputMaxKbps }}"
vmId: "{{ vmId }}"
- name: displayName
value: "{{ displayName }}"
description: |
The report display name, as assigned by the user.
- name: timeFrame
value: "{{ timeFrame }}"
description: |
Time frame of the report.
valid_values: ['TIME_FRAME_UNSPECIFIED', 'WEEK', 'MONTH', 'YEAR']
- name: utilizationReportId
value: "{{ utilizationReportId }}"
- name: requestId
value: "{{ requestId }}"
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 }}'
;