Created
March 8, 2023 12:39
-
-
Save sasasin/cb25a5f421fb1931abf2eb73de31425f to your computer and use it in GitHub Desktop.
AWS CloudWatch Synthetics Canary の定期実行を一括で開始したり止めたりするやつ
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
| # 起動停止の状態を確認するやつ | |
| aws synthetics describe-canaries \ | |
| | jq -r '.Canaries[] | [.Name, .Status.State] | @csv' | |
| # ぜんぶ起動するやつ | |
| aws synthetics describe-canaries \ | |
| | jq -r '.Canaries[].Name' \ | |
| | sort \ | |
| | xargs -L1 aws synthetics start-canary --name | |
| # ぜんぶ止めるやつ | |
| aws synthetics describe-canaries \ | |
| | jq -r '.Canaries[].Name' \ | |
| | sort \ | |
| | xargs -L1 aws synthetics stop-canary --name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment