---
title: "POST /v1/{+parent}/preferenceSets"
method: POST
path: "/v1/{+parent}/preferenceSets"
tags: ["projects"]
---

# POST /v1/{+parent}/preferenceSets

`POST /v1/{+parent}/preferenceSets`

Creates a new preference set in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `preferenceSetId` string
- `requestId` string

## Request body

- PreferenceSet — The preferences that apply to all assets in a given context.
  - `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.
  - `virtualMachinePreferences` VirtualMachinePreferences — 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.
    - `computeEnginePreferences` ComputeEnginePreferences — The user preferences relating to Compute Engine target platform.
      - `licenseType` 'LICENSE_TYPE_UNSPECIFIED' | 'LICENSE_TYPE_DEFAULT' | 'LICENSE_TYPE_BRING_YOUR_OWN_LICENSE' — License type to consider when calculating costs for virtual machine insights and recommendations. If unspecified, costs are calculated based on the default licensing plan.
      - `persistentDiskType` 'PERSISTENT_DISK_TYPE_UNSPECIFIED' | 'PERSISTENT_DISK_TYPE_STANDARD' | 'PERSISTENT_DISK_TYPE_BALANCED' | 'PERSISTENT_DISK_TYPE_SSD' — Persistent disk type to use. If unspecified (default), all types are considered, based on available usage data.
      - `machinePreferences` MachinePreferences — The type of machines to consider when calculating virtual machine migration insights and recommendations. Not all machine types are available in all zones and regions.
        - `allowedMachineSeries` MachineSeries[] — Compute Engine machine series to consider for insights and recommendations. If empty, no restriction is applied on the machine series.
          - `code` string — Code to identify a machine series. Consult this for more details on the available series for Compute Engine: https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison Consult this for more details on the available series for Google Cloud VMware Engine: https://cloud.google.com/vmware-engine/pricing
    - `sizingOptimizationStrategy` 'SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED' | 'SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE' | 'SIZING_OPTIMIZATION_STRATEGY_MODERATE' | 'SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE' — Sizing optimization strategy specifies the preferred strategy used when extrapolating usage data to calculate insights and recommendations for a virtual machine. If you are unsure which value to set, a moderate sizing optimization strategy is often a good value to start with.
    - `soleTenancyPreferences` SoleTenancyPreferences — Preferences concerning Sole Tenancy nodes and VMs.
      - `cpuOvercommitRatio` number, double — CPU overcommit ratio. Acceptable values are between 1.0 and 2.0 inclusive.
      - `hostMaintenancePolicy` 'HOST_MAINTENANCE_POLICY_UNSPECIFIED' | 'HOST_MAINTENANCE_POLICY_DEFAULT' | 'HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE' | 'HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP' — Sole Tenancy nodes maintenance policy.
      - `commitmentPlan` 'COMMITMENT_PLAN_UNSPECIFIED' | 'ON_DEMAND' | 'COMMITMENT_1_YEAR' | 'COMMITMENT_3_YEAR' — Commitment plan to consider when calculating costs for virtual machine insights and recommendations. If you are unsure which value to set, a 3 year commitment plan is often a good value to start with.
      - `nodeTypes` SoleTenantNodeType[] — A list of sole tenant node types. An empty list means that all possible node types will be considered.
        - `nodeName` string — Name of the Sole Tenant node. Consult https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes
    - `vmwareEnginePreferences` VmwareEnginePreferences — The user preferences relating to Google Cloud VMware Engine target platform.
      - `cpuOvercommitRatio` number, double — CPU overcommit ratio. Acceptable values are between 1.0 and 8.0, with 0.1 increment.
      - `storageDeduplicationCompressionRatio` number, double — The Deduplication and Compression ratio is based on the logical (Used Before) space required to store data before applying deduplication and compression, in relation to the physical (Used After) space required after applying deduplication and compression. Specifically, the ratio is the Used Before space divided by the Used After space. For example, if the Used Before space is 3 GB, but the physical Used After space is 1 GB, the deduplication and compression ratio is 3x. Acceptable values are between 1.0 and 4.0.
      - `memoryOvercommitRatio` number, double — Memory overcommit ratio. Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0.
      - `commitmentPlan` 'COMMITMENT_PLAN_UNSPECIFIED' | 'ON_DEMAND' | 'COMMITMENT_1_YEAR_MONTHLY_PAYMENTS' | 'COMMITMENT_3_YEAR_MONTHLY_PAYMENTS' | 'COMMITMENT_1_YEAR_UPFRONT_PAYMENT' | 'COMMITMENT_3_YEAR_UPFRONT_PAYMENT' — Commitment plan to consider when calculating costs for virtual machine insights and recommendations. If you are unsure which value to set, a 3 year commitment plan is often a good value to start with.
    - `regionPreferences` RegionPreferences — The user preferences relating to target regions.
      - `preferredRegions` string[] — A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.
    - `targetProduct` 'COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED' | 'COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE' | 'COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE' | 'COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY' — Target product for assets using this preference set. Specify either target product or business goal, but not both.
    - `commitmentPlan` 'COMMITMENT_PLAN_UNSPECIFIED' | 'COMMITMENT_PLAN_NONE' | 'COMMITMENT_PLAN_ONE_YEAR' | 'COMMITMENT_PLAN_THREE_YEARS' — Commitment plan to consider when calculating costs for virtual machine insights and recommendations. If you are unsure which value to set, a 3 year commitment plan is often a good value to start with.
  - `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.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/migrationcenter.md) · [All operations](https://skmtc.dev/google/apis/migrationcenter/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/migrationcenter/revisions/2a8b4eea0432/schema)
