This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| virtualization:cloud:aws:jq [2023/04/18 16:02] – jotasandoku | virtualization:cloud:aws:jq [2023/11/02 14:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Excellent examples of jq filters : [[https:// | + | * Simple introduction [[https:// |
| + | * Medium introduction [[https:// | ||
| + | * Excellent/ | ||
| jq . # the dots means ' | jq . # the dots means ' | ||
| Line 5: | Line 7: | ||
| For __Docker__: | For __Docker__: | ||
| networks: | networks: | ||
| - | | + | |
| aws ec2 describe-regions | aws ec2 describe-regions | ||
| aws ec2 describe-vpcs | jq -r " | aws ec2 describe-vpcs | jq -r " | ||
| aws ec2 describe-vpcs | jq -r '.Vpcs | length' | aws ec2 describe-vpcs | jq -r '.Vpcs | length' | ||
| aws ec2 describe-vpcs --region eu-west-1 | jq -r '.Vpcs | length' | aws ec2 describe-vpcs --region eu-west-1 | jq -r '.Vpcs | length' | ||
| + | cat response.json | jq .data | jq -r ' | ||
| + | cat response.json| jq .data | jq -r ' | ||
| + | cat response.json| jq '.data | .[] | .attributes' | ||
| + | cat response.json| jq '.data | .[] | .attributes.subobject.dns_scoping' | ||
| PRETTY TABLE FORMAT:\\ | PRETTY TABLE FORMAT:\\ | ||