Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

With GCloud CLI -- how to list all instances associated with a particular schedule (i.e. resource-policy)? [migrated]

$
0
0

Here is a picture of the WebUI for GCP, showing an "instance schedule" that has 3 instances currently associated with it:

GCP Instance Schedule

How can I list those same 3 instances using the GCloud CLI?

I found commands to add a VM to a schedule:

gcloud compute instances add-resource-policies ...

I found commands to remove a VM from a schedule:

gcloud compute instances remove-resource-policies ...

I tried "viewing" the schedule:

gcloud compute resource-policies describe ...

Or even the metadata you get with JSON format:

gcloud compute resource-policies list --format=json ...


So that is my question -- how to get that list of associated VM's given a particular schedule, or resource-policy.

Thanks in advance :)


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>