Undeploy a model and delete the endpoint

Use one of the following methods to undeploy a model and delete the endpoint.

Google Cloud console

  1. Undeploy the model as follows:

    1. In the Google Cloud console, in the Vertex AI section, go to the Endpoints page.

      Go to the Endpoints page

    2. Click the name and version ID of the model you want to undeploy to open its details page.

    3. On the row for your model, click Actions, and then click Undeploy model from endpoint.

    4. In the Undeploy model from endpoint dialog, click Undeploy.

    5. To delete additional models, repeat the preceding steps.

  2. Optional: Delete the online prediction endpoint as follows:

    1. In the Google Cloud console, in the Vertex AI section, go to the Online prediction page.

      Go to Online prediction

    2. Select the endpoint.

    3. To delete the endpoint, click Actions, and then click Delete endpoint.

gcloud

  1. List the endpoint IDs for all endpoints in your project:

    gcloud ai endpoints list \
        --project=PROJECT_ID \
        --region=LOCATION_ID
    

    Replace PROJECT_ID with your project name and LOCATION_ID with the region where you are using Vertex AI.

  2. List the model IDs for the models that are deployed to an endpoint:

    gcloud ai endpoints describe ENDPOINT_ID \
        --project=PROJECT_ID \
        --region=LOCATION_ID
    

    Replace ENDPOINT_ID with the endpoint ID.

  3. Undeploy a model from the endpoint:

    gcloud ai endpoints undeploy-model ENDPOINT_ID \
        --project=PROJECT_ID \
        --region=LOCATION_ID \
        --deployed-model-id=DEPLOYED_MODEL_ID
    

    Replace DEPLOYED_MODEL_ID with the model ID.

  4. Optional: Delete the online prediction endpoint:

    gcloud ai endpoints delete ENDPOINT_ID \
        --project=PROJECT_ID \
        --region=LOCATION_ID