Created
May 18, 2020 20:46
-
-
Save mattiarossi/a7e5ceff8de0da0a12393a27ffc5c6e8 to your computer and use it in GitHub Desktop.
Fetches an OCI Marketplace listing resource id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#FortiGate Next-Gen Firewall (BYOL) | |
export STERM="$1" | |
#6.4.0 | |
export SVERSION="$2" | |
export REGION="uk-london-1" | |
export LID=`oci raw-request --target-uri https://iaas.$REGION.oraclecloud.com/20160918/appCatalogListings --http-method GET | jq --arg STERM "$STERM" '.data[] | select ( .displayName | contains($STERM))' | jq -r '.listingId'` | |
oci raw-request --http-method GET --target-uri https://iaas.$REGION.oraclecloud.com/20160918/appCatalogListings/$LID/resourceVersions | jq --arg SVERSION "$SVERSION" '.data[] | select ( .listingResourceVersion | contains($SVERSION))' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, thanks for this!