Skip to main content

persistent_resources

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

Overview

Namepersistent_resources
TypeResource
Idgoogle.aiplatform.persistent_resources

Fields

NameDatatypeDescription
namestringImmutable. Resource name of a PersistentResource.
createTimestringOutput only. Time when the PersistentResource was created.
displayNamestringOptional. The display name of the PersistentResource. The name can be up to 128 characters long and can consist of any UTF-8 characters.
encryptionSpecobjectRepresents a customer-managed encryption key spec that can be applied to a top-level resource.
errorobjectThe 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. 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.
labelsobjectOptional. The labels with user-defined metadata to organize PersistentResource. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
networkstringOptional. The full name of the Compute Engine network to peered with Vertex AI to host the persistent resources. For example, projects/12345/global/networks/myVPC. Format is of the form projects/{project}/global/networks/{network}. Where {project} is a project number, as in 12345, and {network} is a network name. To specify this field, you must have already configured VPC Network Peering for Vertex AI. If this field is left unspecified, the resources aren't peered with any network.
reservedIpRangesarrayOptional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource. If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network. Example: ['vertex-ai-ip-range'].
resourcePoolsarrayRequired. The spec of the pools of different resources.
resourceRuntimeobjectPersistent Cluster runtime information as output
resourceRuntimeSpecobjectConfiguration for the runtime on a PersistentResource instance, including but not limited to: Service accounts used to run the workloads. Whether to make it a dedicated Ray Cluster.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
startTimestringOutput only. Time when the PersistentResource for the first time entered the RUNNING state.
statestringOutput only. The detailed state of a Study.
updateTimestringOutput only. Time when the PersistentResource was most recently updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, persistentResourcesId, projectsIdGets a PersistentResource.
listSELECTlocationsId, projectsIdLists PersistentResources in a Location.
createINSERTlocationsId, projectsIdCreates a PersistentResource.
deleteDELETElocationsId, persistentResourcesId, projectsIdDeletes a PersistentResource.
patchUPDATElocationsId, persistentResourcesId, projectsIdUpdates a PersistentResource.
rebootEXEClocationsId, persistentResourcesId, projectsIdReboots a PersistentResource.

SELECT examples

Lists PersistentResources in a Location.

SELECT
name,
createTime,
displayName,
encryptionSpec,
error,
labels,
network,
reservedIpRanges,
resourcePools,
resourceRuntime,
resourceRuntimeSpec,
satisfiesPzi,
satisfiesPzs,
startTime,
state,
updateTime
FROM google.aiplatform.persistent_resources
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.aiplatform.persistent_resources (
locationsId,
projectsId,
resourcePools,
displayName,
network,
resourceRuntimeSpec,
labels,
reservedIpRanges,
name,
encryptionSpec
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ resourcePools }}',
'{{ displayName }}',
'{{ network }}',
'{{ resourceRuntimeSpec }}',
'{{ labels }}',
'{{ reservedIpRanges }}',
'{{ name }}',
'{{ encryptionSpec }}'
;

UPDATE example

Updates a persistent_resources resource.

/*+ update */
UPDATE google.aiplatform.persistent_resources
SET
resourcePools = '{{ resourcePools }}',
displayName = '{{ displayName }}',
network = '{{ network }}',
resourceRuntimeSpec = '{{ resourceRuntimeSpec }}',
labels = '{{ labels }}',
reservedIpRanges = '{{ reservedIpRanges }}',
name = '{{ name }}',
encryptionSpec = '{{ encryptionSpec }}'
WHERE
locationsId = '{{ locationsId }}'
AND persistentResourcesId = '{{ persistentResourcesId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified persistent_resources resource.

/*+ delete */
DELETE FROM google.aiplatform.persistent_resources
WHERE locationsId = '{{ locationsId }}'
AND persistentResourcesId = '{{ persistentResourcesId }}'
AND projectsId = '{{ projectsId }}';