Skip to content

Instantly share code, notes, and snippets.

@jami-i
Created April 20, 2017 01:30
Show Gist options
  • Select an option

  • Save jami-i/c700f69a27915f302537f4acc6699524 to your computer and use it in GitHub Desktop.

Select an option

Save jami-i/c700f69a27915f302537f4acc6699524 to your computer and use it in GitHub Desktop.
#!/bin/bash
prefix=foovar
aws apigateway get-rest-apis | jq "(.items | map(select(.name | startswith(\"${prefix}-\"))))"
# extract ids only
aws apigateway get-rest-apis | jq "(.items | map(select(.name | startswith(\"${prefix}-\")))) | .[].id"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment