# REST Resource: projects.locations.preferenceSets

- [Resource: PreferenceSet](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet)
  - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.SCHEMA_REPRESENTATION)
  - [DatabasePreferences](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.DatabasePreferences)
    - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.DatabasePreferences.SCHEMA_REPRESENTATION)
  - [SqlServer](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.SqlServer)
    - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.SqlServer.SCHEMA_REPRESENTATION)
  - [Common](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Common)
    - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Common.SCHEMA_REPRESENTATION)
  - [Backup](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Backup)
    - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Backup.SCHEMA_REPRESENTATION)
  - [BackupMode](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.BackupMode)
  - [Multithreading](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Multithreading)
  - [VersionType](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.VersionType)
  - [MySql](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.MySql)
    - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.MySql.SCHEMA_REPRESENTATION)
  - [PostgreSql](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.PostgreSql)
    - [JSON representation](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.PostgreSql.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#METHODS_SUMMARY)

## Resource: PreferenceSet

The preferences that apply to all assets in a given context.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "displayName": string, "description": string, "regionPreferences": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/RegionPreferences`) }, "virtualMachinePreferences": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/VirtualMachinePreferences`) }, "databasePreferences": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.DatabasePreferences`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Name of the PreferenceSet. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The timestamp when the preference set was created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The timestamp when the preference set was last updated. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `displayName` | `string` User-friendly display name. Maximum length is 63 characters. |
| `description` | `string` A description of the preference set. |
| `regionPreferences` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/RegionPreferences`)`` Optional. Region preferences for assets using this preference set. If you are unsure which value to set, the migration service API region is often a good value to start with. If unspecified, VirtualMachinePreferences.RegionPreferences is used. |
| `virtualMachinePreferences` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/VirtualMachinePreferences`)`` A set of preferences that applies to all virtual machines in the context. |
| `databasePreferences` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.DatabasePreferences`)`` Optional. A set of preferences that applies to all databases in the context. |

### DatabasePreferences

DatabasePreferences enables you to create sets of preferences for your migrated databases.

| JSON representation |
|---|
| ``` { "mssqlToCloudSqlForSqlServerPreferences": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.SqlServer`) }, "mysqlToCloudSqlForMysqlPreferences": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.MySql`) }, "postgresqlToCloudSqlForPostgresqlPreferences": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.PostgreSql`) } } ``` |

| Fields ||
|---|---|
| `mssqlToCloudSqlForSqlServerPreferences` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.SqlServer`)`` Optional. Preferences for target SQL Server on Cloud SQL when migrating from source Microsoft SQL server. |
| `mysqlToCloudSqlForMysqlPreferences` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.MySql`)`` Optional. Preferences for target MySQL on Cloud SQL when migrating from source MySQL. |
| `postgresqlToCloudSqlForPostgresqlPreferences` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.PostgreSql`)`` Optional. Preferences for target PostgreSQL on Cloud SQL when migrating from source PostgreSQL. |

### SqlServer

Preferences for SQL Server on Cloud SQL.

| JSON representation |
|---|
| ``` { "common": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Common`) }, "multithreading": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Multithreading`), "versionType": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.VersionType`) } ``` |

| Fields ||
|---|---|
| `common` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Common`)`` Optional. Preferences to Cloud SQL databases. |
| `multithreading` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Multithreading`)`` Optional. Preferences for multithreading support. |
| `versionType` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.VersionType`)`` Optional. Edition of Microsoft SQL version that is used on a Cloud SQL for SQL server instance. |

### Common

Preferences common to Cloud SQL databases.

| JSON representation |
|---|
| ``` { "backup": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Backup`) }, "commitmentPlan": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/CommitmentPlan`), "zoneAvailability": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/CloudSqlZoneAvailability`), "sizingOptimizationStrategy": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/SizingOptimizationStrategy`), "persistentDiskType": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/PersistentDiskType`), "edition": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/CloudSqlEdition`) } ``` |

| Fields ||
|---|---|
| `backup` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Backup`)`` Optional. Preferences for database backups. |
| `commitmentPlan` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/CommitmentPlan`)`` Optional. Commitment plan to consider when calculating costs. Only regular CUDs (not flexible) are currently available. |
| `zoneAvailability` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/CloudSqlZoneAvailability`)`` Optional. Preferred zone availability. |
| `sizingOptimizationStrategy` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/SizingOptimizationStrategy`)`` Optional. Sizing optimization strategy of the database. Currently supported for Cloud SQL are just two values: SIZING_OPTIMIZATION_STRATEGY_MODERATE and SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE. SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED will behave like SIZING_OPTIMIZATION_STRATEGY_MODERATE. |
| `persistentDiskType` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/PersistentDiskType`)`` Optional. Persistent disk type to use. If unspecified, a disk type is recommended based on available usage data. For SQL Server, only SSD is available. For MySQL and PostgreSQL, only STANDARD (HDD) and SSD types are available. |
| `edition` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/CloudSqlEdition`)`` Optional. Preferred Cloud SQL edition. |

### Backup

Preferences for database backups.

| JSON representation |
|---|
| ``` { "backupMode": enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.BackupMode`) } ``` |

| Fields ||
|---|---|
| `backupMode` | ``enum (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.BackupMode`)`` Optional. Automated backup mode. |

### BackupMode

Automated backup mode.

| Enums ||
|---|---|
| `BACKUP_MODE_UNSPECIFIED` | An unspecified database backup mode. |
| `BACKUP_MODE_DISABLED` | Automatic backups disabled, no additional charges for storage. |
| `BACKUP_MODE_ENABLED` | Automatic backups enabled, there will be additional charges for storage. |

### Multithreading

Preferences for multithreading support. See <https://cloud.google.com/sql/docs/sqlserver/create-instance#smt-create-instance> for more details.

| Enums ||
|---|---|
| `MULTITHREADING_UNSPECIFIED` | Same as MULTITHREADING_AUTO. |
| `MULTITHREADING_DISABLED` | Disable simultaneous multithreading. |
| `MULTITHREADING_ENABLED` | Enable simultaneous multithreading. |
| `MULTITHREADING_DISABLED_WITH_COMPENSATION` | Disable simultaneous multithreading and increase number of VCPUs to compensate. |

### VersionType

Edition of Microsoft SQL Server version that is used on a Cloud SQL for SQL server instance.

| Enums ||
|---|---|
| `VERSION_TYPE_UNSPECIFIED` | Unspecified SQL Server version type. |
| `VERSION_TYPE_AUTO` | Version will be deduced from the source asset. |
| `VERSION_TYPE_EXPRESS` | Version will be one of "Express" versions. |
| `VERSION_TYPE_WEB` | Version will be one of "Web" versions. |
| `VERSION_TYPE_STANDARD` | Version will be one of "Standard" versions. |
| `VERSION_TYPE_ENTERPRISE` | Version will be one of "Enterprise" versions. |

### MySql

Preferences for MySQL on Cloud SQL.

| JSON representation |
|---|
| ``` { "common": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Common`) } } ``` |

| Fields ||
|---|---|
| `common` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Common`)`` Optional. Preferences to Cloud SQL databases. |

### PostgreSql

Preferences for PostgreSQL on Cloud SQL.

| JSON representation |
|---|
| ``` { "common": { object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Common`) } } ``` |

| Fields ||
|---|---|
| `common` | ``object (`https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets#PreferenceSet.Common`)`` Optional. Preferences to Cloud SQL databases. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets/create` | Creates a new preference set in a given project and location. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets/delete` | Deletes a preference set. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets/get` | Gets the details of a preference set. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets/list` | Lists all the preference sets in a given project and location. |
| ### `https://docs.cloud.google.com/migration-center/docs/reference/rest/v1alpha1/projects.locations.preferenceSets/patch` | Updates the parameters of a preference set. |