Skip to content

Commit

Permalink
docs: adds note to delete endpoint sample (#2060)
Browse files Browse the repository at this point in the history
* docs: adds note to delete endpoint sample

* linter
  • Loading branch information
telpirion authored Apr 4, 2023
1 parent 3e1b206 commit 9922eb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/snippets/endpoint_service/delete_endpoint_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def delete_endpoint_sample(
name = client.endpoint_path(
project=project, location=location, endpoint=endpoint_id
)
# NOTE: Be sure to undeploy any models served from the endpoint before
# attempting to delete it.
response = client.delete_endpoint(name=name)
print("Long running operation:", response.operation.name)
delete_endpoint_response = response.result(timeout=timeout)
Expand Down

0 comments on commit 9922eb2

Please sign in to comment.