Skip to main content
This article explains how to view, create, edit, and delete pricing policies for preemptible virtual machines (VMs) in the web console, CLI, Go SDK, Python SDK, or JavaScript SDK. For information about spot pricing and how pricing policies affect preemptible resources, see Spot pricing and pricing policies.

Prerequisites

Pricing policies are project-level resources.
Make sure that you’re in a group that has one of the following roles within the project, depending on what you need to do:
  • To view pricing policies: at least the viewer role.
  • To create, edit or delete pricing policies: at least the editor role.
For more information about roles, see Roles.

How to view pricing policies

  1. In the web console, go to  Billing → Pricing.
  2. Switch to the Pricing policy tab and find the policy that you need. If the policy status is Blocked, its max price is lower than the current spot price. Resources that use this policy can’t start until the spot price decreases or until you increase the max price.

How to create a pricing policy

You can create a pricing policy before creating preemptible resources, or create it while configuring a new resource in the web console.
  1. In the web console, go to  Billing → Pricing.
  2. Switch to the Pricing policy tab and click  Create pricing policy.
  3. Enter a policy name. It can only contain Latin letters and numbers, with no special characters.
  4. Select the project where the policy will be available.
  5. Select the GPU platform for the policy.
  6. In Max price, enter the highest spot price per GPU hour at which preemptible resources can run on this platform. The web console shows the minimum price for the selected platform. The value must be higher than or equal to the minimum price. To let resources start while the current spot price stays unchanged, enter a value that is higher than or equal to the current spot price.
  7. Click Create pricing policy.
After the policy is created, you can select it when creating preemptible resources on the same platform.

How to edit a pricing policy

To update the max price in a pricing policy, first stop all running resources that use that policy.
  1. In the web console, go to  Billing → Pricing.
  2. Switch to the Pricing policy tab.
  3. Find the policy you want to edit and click → Edit.
  4. Rename the policy or adjust the max price. The policy name can only contain Latin letters and numbers, with no special characters.
  5. Click Save changes.

How to delete a pricing policy

Deleting a pricing policy can stop resources that use it. Stopped VMs keep their attached volumes, and the volumes continue to be charged until you delete them. For more information about stopping charges for unused resources, see How to stop being charged.
  1. In the web console, go to  Billing → Pricing.
  2. Switch to the Pricing policy tab.
  3. Check the number of running resources that use the policy.
  4. Find the policy you want to delete and click → Delete. If the web console shows affected resources, review them and continue only if they can be stopped.
  5. Enter the policy name and click Delete policy.
If a stopped resource was configured to use the deleted policy, select another pricing policy before starting it.