Skip to main content

preference_sets

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

Overview

Namepreference_sets
TypeResource
Idgoogle.migrationcenter.preference_sets

Fields

NameDatatypeDescription
namestringOutput only. Name of the preference set.
descriptionstringA description of the preference set.
createTimestringOutput only. The timestamp when the preference set was created.
displayNamestringUser-friendly display name. Maximum length is 63 characters.
updateTimestringOutput only. The timestamp when the preference set was last updated.
virtualMachinePreferencesobjectVirtualMachinePreferences 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

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, preferenceSetsId, projectsIdGets the details of a preference set.
listSELECTlocationsId, projectsIdLists all the preference sets in a given project and location.
createINSERTlocationsId, projectsIdCreates a new preference set in a given project and location.
deleteDELETElocationsId, preferenceSetsId, projectsIdDeletes a preference set.
patchUPDATElocationsId, preferenceSetsId, projectsIdUpdates 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.

/*+ create */
INSERT INTO google.migrationcenter.preference_sets (
locationsId,
projectsId,
displayName,
description,
virtualMachinePreferences
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ description }}',
'{{ virtualMachinePreferences }}'
;

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