Skip to main content

Retrieving the Data Source

This data source can be retrieved by one of ID or name.
Retrieve by ID
To retrieve by ID, fill in only the id field:
Retrieve by Name
To retrieve by name, fill in only the name and parent_id fields:
How preemptible VMs are priced: a standing per-GPU bid for one (region, platform). One policy backs any number of VMs, referenced by id from the preemptible spec. A VM without a policy is a price-taker and pays the market price.

Schema

Optional

  • id (String) Identifier for the resource, unique for its resource type.
  • name (String) Human readable name for the resource.
  • parent_id (String) Identifier of the parent resource to which the resource belongs.

Read-Only

  • compute_instance_spec (Attributes) : Preemptible compute instances the policy prices.

    Inner value description

    Preemptible compute instances a pricing policy applies to. (see below for nested schema)
  • created_at (String) : Timestamp indicating when the resource was created. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM
  • labels (Map of String) Labels associated with the resource.
  • metadata (Attributes) : Parent is a project, immutable. Only VMs in that scope may reference the policy. Name is unique within the parent, renamable any time.

    Inner value description

    Common resource metadata. (see below for nested schema)
  • pricing (Attributes) : How the price is set.

    Inner value description

    How the price of a pricing policy is set. (see below for nested schema)
  • resource_version (Number) : Version of the resource for safe concurrent modifications and consistent reads. Positive and monotonically increases on each resource spec change (but not on each change of the resource’s container(s) or status). Service allows zero value or current.
  • status (Attributes) :

    Inner value description

    Observed state of a pricing policy. (see below for nested schema)
  • updated_at (String) : Timestamp indicating when the resource was last updated. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM

Nested Schema for compute_instance_spec

Read-Only:

Nested Schema for compute_instance_spec.v1

Read-Only:
  • platform (String) Compute platform. Example: “gpu-h100-sxm”.

Nested Schema for metadata

Nested Schema for pricing

Read-Only:
  • max_price_v1 (Attributes) : Auction bid: the per-GPU max_price ranks the policy’s VMs for scheduling and preemption.

    Inner value description

    Auction-bid pricing. (see below for nested schema)

Nested Schema for pricing.max_price_v1

Read-Only:
  • max_price (String) : Per-GPU hourly limit in USD, decimal string 3 digits precision. Example: “3.515”. Must be within the allowed price range (OUT_OF_RANGE otherwise); a value below the current market price is accepted but blocks scheduling. Mutable only while status.running_vm_count is 0 (FAILED_PRECONDITION otherwise); the policy reports STATE_UPDATING and blocks scheduling while the change is applied.

Nested Schema for status

Read-Only:
  • currency (String) ISO 4217 currency code of max_price, e.g. “USD”.
  • running_vm_count (Number) : Number of VMs currently running under this policy. Nonzero blocks resource changes and deletion.
  • scheduling_state (String) : Whether new VMs may currently start under this policy.

    Supported values

    Possible values:
    • SCHEDULING_STATE_UNSPECIFIED
    • SCHEDULING_STATE_ALLOWED - New VMs may start.
    • SCHEDULING_STATE_BLOCKED: The max_price limit is below the current market price; VM creation succeeds once the price falls to it.
  • sku_id (String) SKU resolved from the spec.
  • state (String) :

    Supported values

    Possible values:
    • STATE_UNSPECIFIED
    • STATE_CREATING - Not ready yet; a VM referencing the policy gets a retryable error.
    • STATE_ACTIVE - Ready; whether VMs may start is scheduling_state.
    • STATE_DELETING - Being deleted; does not accept new VMs.
    • STATE_UPDATING - The bid is being changed; scheduling is blocked until the change lands.