-
-
Save GoochD4/ba78d906a7b192fd9d4a7ba7bc57c231 to your computer and use it in GitHub Desktop.
Fetches an OCI Marketplace listing resource id
This file contains hidden or 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