preference_sets
Creates, updates, deletes, gets or lists a preference_sets
resource.
Overview
Name | preference_sets |
Type | Resource |
Id | google.migrationcenter.preference_sets |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Name of the preference set. |
description | string | A description of the preference set. |
createTime | string | Output only. The timestamp when the preference set was created. |
displayName | string | User-friendly display name. Maximum length is 63 characters. |
updateTime | string | Output only. The timestamp when the preference set was last updated. |
virtualMachinePreferences | object | VirtualMachinePreferences enables you to create sets of assumptions, for example, a geographical location and pricing track, for your migrated virtual machines. The set of preferences influence recommendations for migrating virtual machine assets. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, preferenceSetsId, projectsId | Gets the details of a preference set. |
list | SELECT | locationsId, projectsId | Lists all the preference sets in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new preference set in a given project and location. |
delete | DELETE | locationsId, preferenceSetsId, projectsId | Deletes a preference set. |
patch | UPDATE | locationsId, preferenceSetsId, projectsId | Updates the parameters of a preference set. |
SELECT
examples
Lists all the preference sets in a given project and location.
SELECT
name,
description,
createTime,
displayName,
updateTime,
virtualMachinePreferences
FROM google.migrationcenter.preference_sets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new preference_sets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.migrationcenter.preference_sets (
locationsId,
projectsId,
displayName,
description,
virtualMachinePreferences
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ description }}',
'{{ virtualMachinePreferences }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: displayName
value: string
- name: description
value: string
- name: virtualMachinePreferences
value:
- name: targetProduct
value: string
- name: regionPreferences
value:
- name: preferredRegions
value:
- string
- name: commitmentPlan
value: string
- name: sizingOptimizationStrategy
value: string
- name: computeEnginePreferences
value:
- name: persistentDiskType
value: string
- name: machinePreferences
value:
- name: allowedMachineSeries
value:
- - name: code
value: string
- name: licenseType
value: string
- name: vmwareEnginePreferences
value:
- name: cpuOvercommitRatio
value: number
- name: memoryOvercommitRatio
value: number
- name: storageDeduplicationCompressionRatio
value: number
- name: commitmentPlan
value: string
- name: soleTenancyPreferences
value:
- name: cpuOvercommitRatio
value: number
- name: hostMaintenancePolicy
value: string
- name: commitmentPlan
value: string
- name: nodeTypes
value:
- - name: nodeName
value: string
UPDATE
example
Updates a preference_sets
resource.
/*+ update */
UPDATE google.migrationcenter.preference_sets
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
virtualMachinePreferences = '{{ virtualMachinePreferences }}'
WHERE
locationsId = '{{ locationsId }}'
AND preferenceSetsId = '{{ preferenceSetsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified preference_sets
resource.
/*+ delete */
DELETE FROM google.migrationcenter.preference_sets
WHERE locationsId = '{{ locationsId }}'
AND preferenceSetsId = '{{ preferenceSetsId }}'
AND projectsId = '{{ projectsId }}';