Skip to main content

queued_resources

Creates, updates, deletes, gets or lists a queued_resources resource.

Overview

Namequeued_resources
TypeResource
Idgoogle.tpu.queued_resources

Fields

NameDatatypeDescription
namestringOutput only. Immutable. The name of the QueuedResource.
createTimestringOutput only. The time when the QueuedResource was created.
guaranteedobjectGuaranteed tier definition.
queueingPolicyobjectDefines the policy of the QueuedRequest.
reservationNamestringOptional. Name of the reservation in which the resource should be provisioned. Format: projects/{project}/locations/{zone}/reservations/{reservation}
spotobjectSpot tier definition.
stateobjectQueuedResourceState defines the details of the QueuedResource request.
tpuobjectDetails of the TPU resource(s) being requested.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, queuedResourcesIdGets details of a queued resource.
listSELECTlocationsId, projectsIdLists queued resources.
createINSERTlocationsId, projectsIdCreates a QueuedResource TPU instance.
deleteDELETElocationsId, projectsId, queuedResourcesIdDeletes a QueuedResource TPU instance.
resetEXEClocationsId, projectsId, queuedResourcesIdResets a QueuedResource TPU instance

SELECT examples

Lists queued resources.

SELECT
name,
createTime,
guaranteed,
queueingPolicy,
reservationName,
spot,
state,
tpu
FROM google.tpu.queued_resources
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new queued_resources resource.

/*+ create */
INSERT INTO google.tpu.queued_resources (
locationsId,
projectsId,
tpu,
spot,
guaranteed,
queueingPolicy,
reservationName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ tpu }}',
'{{ spot }}',
'{{ guaranteed }}',
'{{ queueingPolicy }}',
'{{ reservationName }}'
;

DELETE example

Deletes the specified queued_resources resource.

/*+ delete */
DELETE FROM google.tpu.queued_resources
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND queuedResourcesId = '{{ queuedResourcesId }}';