preference_sets
Creates, updates, deletes, gets or lists a preference_sets
resource.
Overview
Name | preference_sets |
Type | Resource |
Id | google.migrationcenter.preference_sets |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Name of the preference set. |
createTime | string (google-datetime) | Output only. The timestamp when the preference set was created. |
description | string | A description of the preference set. |
displayName | string | User-friendly display name. Maximum length is 63 characters. |
updateTime | string (google-datetime) | Output only. The timestamp when the preference set was last updated. |
virtualMachinePreferences | object | Optional. A set of preferences that applies to all virtual machines in the context. (id: VirtualMachinePreferences) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Name of the preference set. |
createTime | string (google-datetime) | Output only. The timestamp when the preference set was created. |
description | string | A description of the preference set. |
displayName | string | User-friendly display name. Maximum length is 63 characters. |
updateTime | string (google-datetime) | Output only. The timestamp when the preference set was last updated. |
virtualMachinePreferences | object | Optional. A set of preferences that applies to all virtual machines in the context. (id: VirtualMachinePreferences) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , preferenceSetsId | Gets the details of a preference set. | |
list | select | projectsId , locationsId | pageSize , pageToken , orderBy | Lists all the preference sets in a given project and location. |
create | insert | projectsId , locationsId | preferenceSetId , requestId | Creates a new preference set in a given project and location. |
patch | update | projectsId , locationsId , preferenceSetsId | updateMask , requestId | Updates the parameters of a preference set. |
delete | delete | projectsId , locationsId , preferenceSetsId | requestId | Deletes a preference set. |
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 | |
preferenceSetsId | string | |
projectsId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
preferenceSetId | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets the details of a preference set.
SELECT
name,
createTime,
description,
displayName,
updateTime,
virtualMachinePreferences
FROM google.migrationcenter.preference_sets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND preferenceSetsId = '{{ preferenceSetsId }}' -- required;
Lists all the preference sets in a given project and location.
SELECT
name,
createTime,
description,
displayName,
updateTime,
virtualMachinePreferences
FROM google.migrationcenter.preference_sets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new preference set in a given project and location.
INSERT INTO google.migrationcenter.preference_sets (
data__displayName,
data__description,
data__virtualMachinePreferences,
projectsId,
locationsId,
preferenceSetId,
requestId
)
SELECT
'{{ displayName }}',
'{{ description }}',
'{{ virtualMachinePreferences }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ preferenceSetId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: preference_sets
props:
- name: projectsId
value: string
description: Required parameter for the preference_sets resource.
- name: locationsId
value: string
description: Required parameter for the preference_sets resource.
- name: displayName
value: string
description: >
User-friendly display name. Maximum length is 63 characters.
- name: description
value: string
description: >
A description of the preference set.
- name: virtualMachinePreferences
value: object
description: >
Optional. A set of preferences that applies to all virtual machines in the context.
- name: preferenceSetId
value: string
- name: requestId
value: string
UPDATE
examples
- patch
Updates the parameters of a preference set.
UPDATE google.migrationcenter.preference_sets
SET
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__virtualMachinePreferences = '{{ virtualMachinePreferences }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND preferenceSetsId = '{{ preferenceSetsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a preference set.
DELETE FROM google.migrationcenter.preference_sets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND preferenceSetsId = '{{ preferenceSetsId }}' --required
AND requestId = '{{ requestId }}';