Get persistent resource information

This page shows you how to get a list of persistent resources and how to getinformation about a specific persistent resource by Google Cloud console,Google Cloud CLI, Vertex AI SDK for Python, and the REST API.

Required roles

To get the permissions that you need to get persistent resource information, ask your administrator to grant you theVertex AI Viewer (roles/aiplatform.viewer) IAM role on your project. For more information about granting roles, seeManage access to projects, folders, and organizations.

This predefined role contains the permissions required to get persistent resource information. To see the exact permissions that are required, expand theRequired permissions section:

Required permissions

The following permissions are required to get persistent resource information:

  • aiplatform.persistentResources.get
  • aiplatform.persistentResources.list

You might also be able to get these permissions withcustom roles or otherpredefined roles.

Get a list of persistent resources

Select one of the following tabs for instructions on how to get a list ofexisting persistent resources.

Console

To view a list of persistent resources in the Google Cloud console, go to thePersistent resources page.

Go to Persistent resources

gcloud

Before using any of the command data below, make the following replacements:

  • PROJECT_ID: The Project ID of the Google Cloud project that you want to get a list persistent resources for.
  • LOCATION: The region where you want to create the persistent resource. For a list of supported regions, seeFeature availability.

Execute the following command:

Linux, macOS, or Cloud Shell

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudaipersistent-resourceslist\--project=PROJECT_ID\--region=LOCATION

Windows (PowerShell)

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudaipersistent-resourceslist`--project=PROJECT_ID`--region=LOCATION

Windows (cmd.exe)

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudaipersistent-resourceslist^--project=PROJECT_ID^--region=LOCATION

You should receive a response similar to the following:

Response

Using endpoint [https://us-central1-aiplatform.googleapis.com/]---createTime: '2023-09-12T20:45:33.220989Z'displayName: testname: projects/123456789012/locations/us-central1/persistentResources/test-persistent-resourceresourcePools:- autoscalingSpec:    maxReplicaCount: '4'    minReplicaCount: '1'  diskSpec:    bootDiskSizeGb: 100    bootDiskType: pd-standard  id: n1-highmem-2-nvidia-tesla-t4-1  machineSpec:    acceleratorCount: 1    acceleratorType: NVIDIA_TESLA_T4    machineType: n1-highmem-2  replicaCount: '1'startTime: '2023-09-12T20:50:36.992739253Z'state: RUNNINGupdateTime: '2023-09-12T20:50:42.813723Z'---createTime: '2023-09-12T20:37:21.691977Z'displayName: my-persistent-resourcename: projects/123456789012/locations/us-central1/persistentResources/my-persistent-resourceresourcePools:- autoscalingSpec:    maxReplicaCount: '12'    minReplicaCount: '4'  diskSpec:    bootDiskSizeGb: 200    bootDiskType: pd-standard  id: n1-highmem-2-nvidia-tesla-t4-1  machineSpec:    acceleratorCount: 1    acceleratorType: NVIDIA_TESLA_T4    machineType: n1-highmem-2  replicaCount: '4'- diskSpec:    bootDiskSizeGb: 100    bootDiskType: pd-ssd  id: n1-standard-4  machineSpec:    machineType: n1-standard-4  replicaCount: '4'startTime: '2023-09-12T20:42:46.495575169Z'state: RUNNINGupdateTime: '2023-09-12T20:42:51.519271Z'

Python

Before trying this sample, follow thePython setup instructions in theVertex AI quickstart using client libraries. For more information, see theVertex AIPython API reference documentation.

To authenticate to Vertex AI, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.

The status of each persistent resource in the list is represented by a numerical value. For more information, see thestate definitions in the Vertex AI SDK.

fromgoogle.cloud.aiplatform.previewimportpersistent_resource# Optional arguments:# filter (str): An expression for filtering the results of the request. For#   field names both snake_case and camelCase are supported.# order_by (str): A comma-separated list of fields to order by, sorted in#   ascending order. Use "desc" after a field name for descending. Supported#   fields: `display_name`, `create_time`, `update_time`# List the persistent resource on the project.resource_list=persistent_resource.PersistentResource.list()foriinrange(len(resource_list)):print(resource_list[i].name)print(resource_list[i].state)

REST

Before using any of the request data, make the following replacements:

  • PROJECT_ID: The Project ID of the Google Cloud project that you want to get a list persistent resources for.
  • LOCATION: The region where you want to create the persistent resource. For a list of supported regions, seeFeature availability.

HTTP method and URL:

GET https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/persistentResources

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/persistentResources"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/persistentResources" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response

{  "persistentResources": [    {      "name": "projects/123456789012/locations/us-central1/persistentResources/test-persistent-resource",      "displayName": "test",      "resourcePools": [        {          "id": "n1-highmem-2-nvidia-tesla-t4-1",          "machineSpec": {            "machineType": "n1-highmem-2",            "acceleratorType": "NVIDIA_TESLA_T4",            "acceleratorCount": 1          },          "replicaCount": "1",          "diskSpec": {            "bootDiskType": "pd-standard",            "bootDiskSizeGb": 100          },          "autoscalingSpec": {            "minReplicaCount": "1",            "maxReplicaCount": "4"          }        }      ],      "state": "RUNNING",      "createTime": "2023-09-12T20:45:33.220989Z",      "startTime": "2023-09-12T20:50:36.992739253Z",      "updateTime": "2023-09-12T20:50:42.813723Z"    },    {      "name": "projects/123456789012/locations/us-central1/persistentResources/my-persistent-resource",      "displayName": "my-persistent-resource",      "resourcePools": [        {          "id": "n1-highmem-2-nvidia-tesla-t4-1",          "machineSpec": {            "machineType": "n1-highmem-2",            "acceleratorType": "NVIDIA_TESLA_T4",            "acceleratorCount": 1          },          "replicaCount": "4",          "diskSpec": {            "bootDiskType": "pd-standard",            "bootDiskSizeGb": 200          },          "autoscalingSpec": {            "minReplicaCount": "4",            "maxReplicaCount": "12"          }        },        {          "id": "n1-standard-4",          "machineSpec": {            "machineType": "n1-standard-4"          },          "replicaCount": "4",          "diskSpec": {            "bootDiskType": "pd-ssd",            "bootDiskSizeGb": 100          }        }      ],      "state": "RUNNING",      "createTime": "2023-09-12T20:37:21.691977Z",      "startTime": "2023-09-12T20:42:46.495575169Z",      "updateTime": "2023-09-12T20:42:51.519271Z"    },  ]}

Get information about a persistent resource

Select one of the following tabs for instructions on how to get informationabout a persistent resource, including its status, hardware configuration, andavailable replicas.

Console

To view information about a persistent resource in the Google Cloud console, do thefollowing:

  1. In the Google Cloud console, go to thePersistent resources page.

    Go to Persistent resources

  2. Click the name of the persistent resource that you want to view.

gcloud

Before using any of the command data below, make the following replacements:

  • PROJECT_ID: The Project ID of the persistent resource that you want to get information about.
  • LOCATION: The region of the persistent resource that you want to get information about.
  • PERSISTENT_RESOURCE_ID: The ID of the persistent resource that you want to get information about.

Execute the following command:

Linux, macOS, or Cloud Shell

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudaipersistent-resourcesdescribePERSISTENT_RESOURCE_ID\--project=PROJECT_ID\--region=LOCATION

Windows (PowerShell)

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudaipersistent-resourcesdescribePERSISTENT_RESOURCE_ID`--project=PROJECT_ID`--region=LOCATION

Windows (cmd.exe)

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudaipersistent-resourcesdescribePERSISTENT_RESOURCE_ID^--project=PROJECT_ID^--region=LOCATION

You should receive a response similar to the following:

Response

Using endpoint [https://us-central1-aiplatform.googleapis.com/]createTime: '2023-07-06T18:47:42.098296Z'displayName: Test-Persistent-Resourcename: projects/123456789012/locations/us-central1/persistentResources/my-persistent-resourceresourcePools:- diskSpec:    bootDiskSizeGb: 100    bootDiskType: pd-ssd  machineSpec:    machineType: n1-highmem-4  replicaCount: '4'- diskSpec:    bootDiskSizeGb: 100    bootDiskType: pd-ssd  machineSpec:    acceleratorCount: 1    acceleratorType: NVIDIA_TESLA_P4    machineType: n1-standard-4  replicaCount: '4'  usedReplicaCOunt: '2'startTime: '2023-07-06T18:51:53.209127117Z'state: RUNNINGupdateTime: '2023-07-06T18:52:01.545109Z'

Python

Before trying this sample, follow thePython setup instructions in theVertex AI quickstart using client libraries. For more information, see theVertex AIPython API reference documentation.

To authenticate to Vertex AI, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.

fromgoogle.cloud.aiplatform.previewimportpersistent_resourceresource_to_get=persistent_resource.PersistentResource(PERSISTENT_RESOURCE_ID)print(resource_to_get.display_name)print(resource_to_get.state)print(resource_to_get.start_time)

REST

Before using any of the request data, make the following replacements:

  • PROJECT_ID: The Project ID of the persistent resource that you want to get information about.
  • LOCATION: The region of the persistent resource that you want to get information about.
  • PERSISTENT_RESOURCE_ID: The ID of the persistent resource that you want to get information about.

HTTP method and URL:

GET https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/persistentResources/PERSISTENT_RESOURCE_ID

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/persistentResources/PERSISTENT_RESOURCE_ID"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/persistentResources/PERSISTENT_RESOURCE_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{  "name": "projects/123456789012/locations/us-central1/persistentResources/test-persistent-resource",  "displayName": "test",  "resourcePools": [    {      "id": "n1-highmem-2-nvidia-tesla-t4-1",      "machineSpec": {        "machineType": "n1-highmem-2",        "acceleratorType": "NVIDIA_TESLA_T4",        "acceleratorCount": 1      },      "replicaCount": "1",      "diskSpec": {        "bootDiskType": "pd-standard",        "bootDiskSizeGb": 100      },      "autoscalingSpec": {        "minReplicaCount": "1",        "maxReplicaCount": "4"      }    }  ],  "state": "RUNNING",  "createTime": "2023-09-12T20:45:33.220989Z",  "startTime": "2023-09-12T20:50:36.992739253Z",  "updateTime": "2023-09-12T20:50:42.813723Z"}

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.