-
Notifications
You must be signed in to change notification settings - Fork 1
/
clean_up.sh
executable file
·27 lines (22 loc) · 958 Bytes
/
clean_up.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set -a
. ./config
set +a
## Delete the pubsub topic
gcloud pubsub topics delete $PREDICTION_TOPIC
## Delete all objects and buckets
gsutil rm -r gs://${INBOUND_BUCKET}
gsutil rm -r gs://${PREDICTION_BUCKET}
## Delete cloud functions
gcloud functions delete $PREDICT_CF_NAME --quiet
gcloud functions delete $MOVE_CF_NAME --quiet
## Undeploy autoML model
#curl -X POST \
#-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
#-H "Content-Type: application/json; charset=utf-8" \
#-d "" \
#https://automl.googleapis.com/v1beta1/projects/"$(gcloud config get-value project)"/locations/us-central1/models/"${MODEL_ID}":undeploy
#curl -X POST \
#-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
#-H "Content-Type: application/json; charset=utf-8" \
#-d "" \
#https://automl.googleapis.com/v1/projects/"$(gcloud config get-value project)"/locations/us-central1/models/"${MODEL_ID}":undeploy