utilization_reports
Creates, updates, deletes, gets or lists a utilization_reports
resource.
Overview
Name | utilization_reports |
Type | Resource |
Id | google.vmmigration.utilization_reports |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The report unique name. |
createTime | string | 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. |
frameEndTime | string | 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 | Output only. The time the state was last set. |
timeFrame | string | Time frame of the report. |
vmCount | integer | 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, sourcesId, utilizationReportsId | Gets a single Utilization Report. |
list | SELECT | locationsId, projectsId, sourcesId | Lists Utilization Reports of the given Source. |
create | INSERT | locationsId, projectsId, sourcesId | Creates a new UtilizationReport. |
delete | DELETE | locationsId, projectsId, sourcesId, utilizationReportsId | Deletes a single Utilization Report. |
SELECT
examples
Lists Utilization Reports of the given Source.
SELECT
name,
createTime,
displayName,
error,
frameEndTime,
state,
stateTime,
timeFrame,
vmCount,
vms
FROM google.vmmigration.utilization_reports
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sourcesId = '{{ sourcesId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new utilization_reports
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.vmmigration.utilization_reports (
locationsId,
projectsId,
sourcesId,
displayName,
timeFrame,
vms
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ sourcesId }}',
'{{ displayName }}',
'{{ timeFrame }}',
'{{ vms }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: state
value: string
- name: stateTime
value: string
- name: error
value:
- name: code
value: integer
- name: message
value: string
- name: details
value:
- object
- name: createTime
value: string
- name: timeFrame
value: string
- name: frameEndTime
value: string
- name: vmCount
value: integer
- name: vms
value:
- - name: vmwareVmDetails
value:
- name: vmId
value: string
- name: datacenterId
value: string
- name: datacenterDescription
value: string
- name: uuid
value: string
- name: displayName
value: string
- name: powerState
value: string
- name: cpuCount
value: integer
- name: memoryMb
value: integer
- name: diskCount
value: integer
- name: committedStorageMb
value: string
- name: guestDescription
value: string
- name: bootOption
value: string
- name: vmId
value: string
- name: utilization
value:
- name: cpuMaxPercent
value: integer
- name: cpuAveragePercent
value: integer
- name: memoryMaxPercent
value: integer
- name: memoryAveragePercent
value: integer
- name: diskIoRateMaxKbps
value: string
- name: diskIoRateAverageKbps
value: string
- name: networkThroughputMaxKbps
value: string
- name: networkThroughputAverageKbps
value: string
DELETE
example
Deletes the specified utilization_reports
resource.
/*+ delete */
DELETE FROM google.vmmigration.utilization_reports
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND sourcesId = '{{ sourcesId }}'
AND utilizationReportsId = '{{ utilizationReportsId }}';