---
title: "POST /v2/projects/{projectsId}/locations/{locationsId}/queuedResources"
method: POST
path: "/v2/projects/{projectsId}/locations/{locationsId}/queuedResources"
tags: ["projects"]
---

# POST /v2/projects/{projectsId}/locations/{locationsId}/queuedResources

`POST /v2/projects/{projectsId}/locations/{locationsId}/queuedResources`

## Request

- Base URL: `https://tpu.googleapis.com`
- URL: `https://tpu.googleapis.com/v2/projects/{projectsId}/locations/{locationsId}/queuedResources`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Creates a QueuedResource TPU instance.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `queuedResourceId` string
- `requestId` string

## Request body

- QueuedResource: A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.
  - `createTime` string, google-datetime: Output only. The time when the QueuedResource was created.
  - `guaranteed` Guaranteed: Guaranteed tier definition.
    - `minDuration` string, google-duration: Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.
  - `name` string: Output only. Immutable. The name of the QueuedResource.
  - `queueingPolicy` QueueingPolicy: Defines the policy of the QueuedRequest.
    - `validAfterDuration` string, google-duration: Optional. A relative time after which resources may be created.
    - `validAfterTime` string, google-datetime: Optional. An absolute time after which resources may be created.
    - `validInterval` Interval: Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
      - `endTime` string, google-datetime: Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
      - `startTime` string, google-datetime: Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
    - `validUntilDuration` string, google-duration: Optional. A relative time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.
    - `validUntilTime` string, google-datetime: Optional. An absolute time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.
  - `reservationName` string: Optional. Name of the reservation in which the resource should be provisioned. Format: projects/{project}/locations/{zone}/reservations/{reservation}
  - `spot` Spot: Spot tier definition.
  - `state` QueuedResourceState: QueuedResourceState defines the details of the QueuedResource request.
    - `acceptedData` AcceptedData: Further data for the accepted state.
    - `activeData` ActiveData: Further data for the active state.
    - `creatingData` CreatingData: Further data for the creating state.
    - `deletingData` DeletingData: Further data for the deleting state.
    - `failedData` FailedData: Further data for the failed state.
      - `error` Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
        - `code` integer: The status code, which should be an enum value of google.rpc.Code.
        - `details` object[]: A list of messages that carry the error details. There is a common set of message types for APIs to use.
        - `message` string: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
    - `provisioningData` ProvisioningData: Further data for the provisioning state.
    - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'ACCEPTED' | 'PROVISIONING' | 'FAILED' | 'DELETING' | 'ACTIVE' | 'SUSPENDING' | 'SUSPENDED' | 'WAITING_FOR_RESOURCES': Output only. State of the QueuedResource request.
    - `stateInitiator` 'STATE_INITIATOR_UNSPECIFIED' | 'USER' | 'SERVICE': Output only. The initiator of the QueuedResources's current state. Used to indicate whether the SUSPENDING/SUSPENDED state was initiated by the user or the service.
    - `suspendedData` SuspendedData: Further data for the suspended state.
    - `suspendingData` SuspendingData: Further data for the suspending state.
  - `tpu` Tpu: Details of the TPU resource(s) being requested.
    - `nodeSpec` NodeSpec[]: Optional. The TPU node(s) being requested.
      - `multisliceParams` MultisliceParams: Parameters to specify for multislice QueuedResource requests. This message must be populated in case of multislice requests instead of node_id.
        - `nodeCount` integer: Required. Number of nodes with this spec. The system will attempt to provision "node_count" nodes as part of the request. This needs to be > 1.
        - `nodeIdPrefix` string: Optional. Prefix of node_ids in case of multislice request. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. If node_count = 3 and node_id_prefix = "np", node ids of nodes created will be "np-0", "np-1", "np-2". If this field is not provided we use queued_resource_id as the node_id_prefix.
      - `node` Node: A TPU instance.
        - `acceleratorConfig` AcceleratorConfig: A TPU accelerator configuration.
          - `topology` string: Required. Topology of TPU in chips.
          - `type` 'TYPE_UNSPECIFIED' | 'V2' | 'V3' | 'V4' | 'V5LITE_POD' | 'V5P' | 'V6E': Required. Type of TPU.
        - `acceleratorType` string: Optional. The type of hardware accelerators associated with this node.
        - `apiVersion` 'API_VERSION_UNSPECIFIED' | 'V1_ALPHA1' | 'V1' | 'V2_ALPHA1' | 'V2': Output only. The API version that created this Node.
        - `bootDiskConfig` BootDiskConfig: Sets the boot disk configuration for the TPU node.
          - `customerEncryptionKey` CustomerEncryptionKey: Defines the customer encryption key for disk encryption.
            - `kmsKeyName` string: The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/KMS_PROJECT_ID/locations/REGION/keyRings/KEY_REGION/cryptoKeys/KEY The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/KMS_PROJECT_ID/locations/REGION/keyRings/KEY_REGION/cryptoKeys/KEY/cryptoKeyVersions/1
        - `cidrBlock` string: The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
        - `createTime` string, google-datetime: Output only. The time when the node was created.
        - `dataDisks` AttachedDisk[]: The additional data disks for the Node.
          - `mode` 'DISK_MODE_UNSPECIFIED' | 'READ_WRITE' | 'READ_ONLY': The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks.
          - `sourceDisk` string: Specifies the full path to an existing disk. For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
        - `description` string: The user-supplied description of the TPU. Maximum of 512 characters.
        - `health` 'HEALTH_UNSPECIFIED' | 'HEALTHY' | 'TIMEOUT' | 'UNHEALTHY_TENSORFLOW' | 'UNHEALTHY_MAINTENANCE': The health status of the TPU node.
        - `healthDescription` string: Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.
        - `id` string, int64: Output only. The unique identifier for the TPU Node.
        - `labels` object: Resource labels to represent user-provided metadata.
        - `metadata` object: Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script
        - `multisliceNode` boolean: Output only. Whether the Node belongs to a Multislice group.
        - `name` string: Output only. Immutable. The name of the TPU.
        - `networkConfig` NetworkConfig: Network related configurations.
          - `canIpForward` boolean: Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.
          - `enableExternalIps` boolean: Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.
          - `network` string: The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, "default" will be used.
          - `queueCount` integer: Optional. Specifies networking queue count for TPU VM instance's network interface.
          - `subnetwork` string: The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, "default" will be used.
        - `networkConfigs` NetworkConfig[]: Optional. Repeated network configurations for the TPU node. This field is used to specify multiple networks configs for the TPU node. network_config and network_configs are mutually exclusive, you can only specify one of them. If both are specified, an error will be returned.
          - `canIpForward` boolean: Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.
          - `enableExternalIps` boolean: Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.
          - `network` string: The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, "default" will be used.
          - `queueCount` integer: Optional. Specifies networking queue count for TPU VM instance's network interface.
          - `subnetwork` string: The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, "default" will be used.
        - `networkEndpoints` NetworkEndpoint[]: Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.
          - `accessConfig` AccessConfig: An access config attached to the TPU worker.
            - `externalIp` string: Output only. An external IP address associated with the TPU worker.
          - `ipAddress` string: The internal IP address of this network endpoint.
          - `port` integer: The port of this network endpoint.
        - `protectionTier` 'PROTECTION_TIER_UNSPECIFIED' | 'STANDARD' | 'CAPACITY_OPTIMIZED': Output only. Protection tier for the workload which specifies the workload expectations in the event of infrastructure failures at data center (e.g. power and/or cooling failures).
        - `queuedResource` string: Output only. The qualified name of the QueuedResource that requested this Node.
        - `runtimeVersion` string: Required. The runtime version running in the Node.
        - `schedulingConfig` SchedulingConfig: Sets the scheduling options for this node.
          - `preemptible` boolean: Defines whether the node is preemptible.
          - `reserved` boolean: Whether the node is created under a reservation.
          - `spot` boolean: Optional. Defines whether the node is Spot VM.
        - `serviceAccount` ServiceAccount: A service account.
          - `email` string: Email address of the service account. If empty, default Compute service account will be used.
          - `scope` string[]: The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed.
        - `shieldedInstanceConfig` ShieldedInstanceConfig: A set of Shielded Instance options.
          - `enableSecureBoot` boolean: Defines whether the instance has Secure Boot enabled.
        - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'READY' | 'RESTARTING' | 'REIMAGING' | 'DELETING' | 'REPAIRING' | 'STOPPED' | 'STOPPING' | 'STARTING' | 'PREEMPTED' | 'TERMINATED' | 'HIDING' | 'HIDDEN' | 'UNHIDING' | 'UNKNOWN': Output only. The current state for the TPU Node.
        - `symptoms` Symptom[]: Output only. The Symptoms that have occurred to the TPU Node.
          - `createTime` string, google-datetime: Timestamp when the Symptom is created.
          - `details` string: Detailed information of the current Symptom.
          - `symptomType` 'SYMPTOM_TYPE_UNSPECIFIED' | 'LOW_MEMORY' | 'OUT_OF_MEMORY' | 'EXECUTE_TIMED_OUT' | 'MESH_BUILD_FAIL' | 'HBM_OUT_OF_MEMORY' | 'PROJECT_ABUSE': Type of the Symptom.
          - `workerId` string: A string used to uniquely distinguish a worker within a TPU node.
        - `tags` string[]: Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.
        - `upcomingMaintenance` UpcomingMaintenance: Upcoming Maintenance notification information.
          - `canReschedule` boolean: Indicates if the maintenance can be customer triggered.
          - `latestWindowStartTime` string: The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format.
          - `maintenanceStatus` 'UNKNOWN' | 'PENDING' | 'ONGOING': The status of the maintenance.
          - `type` 'UNKNOWN_TYPE' | 'SCHEDULED' | 'UNSCHEDULED': Defines the type of maintenance.
          - `windowEndTime` string: The time by which the maintenance disruption will be completed. This timestamp value is in RFC3339 text format.
          - `windowStartTime` string: The current start time of the maintenance window. This timestamp value is in RFC3339 text format.
      - `nodeId` string: Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multislice requests, multislice_params must be populated instead.
      - `parent` string: Required. The parent resource name.

## Response `200`

Successful response

- Operation: This resource represents a long-running operation that is the result of a network API call.
  - `done` boolean: If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  - `error` Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer: The status code, which should be an enum value of google.rpc.Code.
    - `details` object[]: A list of messages that carry the error details. There is a common set of message types for APIs to use.
    - `message` string: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  - `metadata` object: Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
  - `name` string: The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  - `response` object: The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.

---

[API](https://skmtc.dev/google/apis/tpu.md) - [All operations](https://skmtc.dev/google/apis/tpu/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/tpu/revisions/ebe9b0673ab2?raw)
