Created
October 9, 2017 16:00
-
-
Save bleach/b7c7bd9c6f73966c39a4f4000fbbf19c to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
set -euo pipefail | |
quota_url=$(cf curl '/v2/quota_definitions?q=name:default' \ | |
| jq '.resources[].metadata.url') | |
from_date=$(($(date '+%s') - 3600*24*90)) | |
cf curl /v2/organizations \ | |
| jq -r ".resources[] | select (.entity.quota_definition_url == ${quota_url}) | select ( .metadata.created_at | fromdateiso8601? < ${from_date}) | [.entity.name,.metadata.created_at] | @tsv" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment