Delete a persistent resource

Persistent resources are available until they are deleted. Once deleted, thereis no guarantee that you can create the persistent resource of the same resourcetype again if there's a stockout. This page shows you how to delete apersistent resource by using the Google Cloud console, Google Cloud CLI,Vertex AI SDK for Python, and the REST API.

Required roles

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

This predefined role contains the aiplatform.persistentResources.delete permission, which is required to delete a persistent resource.

You might also be able to get this permission withcustom roles or otherpredefined roles.

Delete a persistent resource

For instructions on how to delete a persistent resource when you no longerneeded it, select one of the following tabs. Note that if there are custom jobsrunning on the persistent resource when you delete it, those custom jobs areautomatically cancelled before the persistent resource is deleted.

Console

To delete a persistent resource in the Google Cloud console, do the following:

  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 delete.

  3. ClickDelete.

  4. ClickConfirm.

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 delete.
  • LOCATION: The region of the persistent resource that you want to delete.
  • PERSISTENT_RESOURCE_ID: The ID of the persistent resource that you want to delete.

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-resourcesdeletePERSISTENT_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-resourcesdeletePERSISTENT_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-resourcesdeletePERSISTENT_RESOURCE_ID^--project=PROJECT_ID^--region=LOCATION

You should receive a response similar to the following:

Using endpoint [https://us-central1-aiplatform.googleapis.com/]Request to delete the PersistentResource [projects/sample-project/locations/us-central1/persistentResources/test-persistent-resource] has been sent.You may view the status of your persistent resource with the command  $ gcloud ai persistent-resources describe projects/sample-project/locations/us-central1/persistentResources/test-persistent-resource

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_delete=persistent_resource.PersistentResource(PERSISTENT_RESOURCE_ID)# Delete the persistent resource.resource_to_delete.delete(sync=True)

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 delete.
  • LOCATION: The region of the persistent resource that you want to delete.
  • PERSISTENT_RESOURCE_ID: The ID of the persistent resource that you want to delete.

HTTP method and URL:

DELETE 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 DELETE \
-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 DELETE `
-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/operations/1234567890123456789",  "metadata": {    "@type": "type.googleapis.com/google.cloud.aiplatform.v1.DeleteOperationMetadata",    "genericMetadata": {      "createTime": "2023-07-28T17:22:08.316883Z",      "updateTime": "2023-07-28T17:22:08.316883Z"    }  },  "done": true,  "response": {    "@type": "type.googleapis.com/google.protobuf.Empty"  }}

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.