Skip to content

Instantly share code, notes, and snippets.

@EscVector
Last active June 27, 2023 18:04
Show Gist options
  • Save EscVector/eeea7b35007be86c7d698af0ab5703bd to your computer and use it in GitHub Desktop.
Save EscVector/eeea7b35007be86c7d698af0ab5703bd to your computer and use it in GitHub Desktop.
OCI List Specific Images for All Regions
# Region ID is embeded in Image ID format: ocid1.image.oc1.REGION.ImageID
set CID=compartmentid
for /F %i IN (AvailableRegions.txt) DO (oci compute image list --compartment-id=%CID% --all --display-name Canonical-Ubuntu-20.04-2023.04.18-0 --region %i --query "data[].[\"id\"]")
# Save File with regions
af-johannesburg-1
ap-chuncheon-1
ap-hyderabad-1
ap-melbourne-1
ap-mumbai-1
ap-osaka-1
ap-seoul-1
ap-singapore-1
ap-sydney-1
ap-tokyo-1
ca-montreal-1
ca-toronto-1
eu-amsterdam-1
eu-frankfurt-1
eu-madrid-1
eu-marseille-1
eu-milan-1
eu-paris-1
eu-stockholm-1
eu-zurich-1
il-jerusalem-1
me-abudhabi-1
me-dubai-1
me-jeddah-1
mx-queretaro-1
sa-santiago-1
sa-saopaulo-1
sa-vinhedo-1
uk-cardiff-1
uk-london-1
us-ashburn-1
us-chicago-1
us-phoenix-1
us-sanjose-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment