|
| 1 | +**Example 1: To list coverage statistics by groups** |
| 2 | + |
| 3 | +The following ``list-coverage-statistics`` example lists the coverage statistics of your AWS environment by groups. :: |
| 4 | + |
| 5 | + aws inspector2 list-coverage-statistics \ |
| 6 | + --group-by RESOURCE_TYPE |
| 7 | + |
| 8 | +Output:: |
| 9 | + |
| 10 | + { |
| 11 | + "countsByGroup": [ |
| 12 | + { |
| 13 | + "count": 56, |
| 14 | + "groupKey": "AWS_LAMBDA_FUNCTION" |
| 15 | + }, |
| 16 | + { |
| 17 | + "count": 27, |
| 18 | + "groupKey": "AWS_ECR_REPOSITORY" |
| 19 | + }, |
| 20 | + { |
| 21 | + "count": 18, |
| 22 | + "groupKey": "AWS_EC2_INSTANCE" |
| 23 | + }, |
| 24 | + { |
| 25 | + "count": 3, |
| 26 | + "groupKey": "AWS_ECR_CONTAINER_IMAGE" |
| 27 | + }, |
| 28 | + { |
| 29 | + "count": 1, |
| 30 | + "groupKey": "AWS_ACCOUNT" |
| 31 | + } |
| 32 | + ], |
| 33 | + "totalCounts": 105 |
| 34 | + } |
| 35 | + |
| 36 | +For more information, see `Assessing Amazon Inspector coverage of your AWS environment <https://docs.aws.amazon.com/inspector/latest/user/assessing-coverage.html>`__ in the *Amazon Inspector User Guide*. |
| 37 | + |
| 38 | +**Example 2: To list coverage statistics by resource type** |
| 39 | + |
| 40 | +The following ``list-coverage-statistics`` example lists the coverage statistics of your AWS environment by resource type. :: |
| 41 | + |
| 42 | + aws inspector2 list-coverage-statistics |
| 43 | + --filter-criteria '{"resourceType":[{"comparison":"EQUALS","value":"AWS_ECR_REPOSITORY"}]}' |
| 44 | + --group-by SCAN_STATUS_REASON |
| 45 | + |
| 46 | +Output:: |
| 47 | + |
| 48 | + { |
| 49 | + "countsByGroup": [ |
| 50 | + { |
| 51 | + "count": 27, |
| 52 | + "groupKey": "SUCCESSFUL" |
| 53 | + } |
| 54 | + ], |
| 55 | + "totalCounts": 27 |
| 56 | + } |
| 57 | + |
| 58 | +For more information, see `Assessing Amazon Inspector coverage of your AWS environment <https://docs.aws.amazon.com/inspector/latest/user/assessing-coverage.html>`__ in the *Amazon Inspector User Guide*. |
| 59 | + |
| 60 | +**Example 3: To list coverage statistics by ECR repository name** |
| 61 | + |
| 62 | +The following ``list-coverage-statistics`` example lists the coverage statistics of your AWS environment by ECR repository name. :: |
| 63 | + |
| 64 | + aws inspector2 list-coverage-statistics |
| 65 | + --filter-criteria '{"ecrRepositoryName":[{"comparison":"EQUALS","value":"debian"}]}' |
| 66 | + --group-by SCAN_STATUS_REASON |
| 67 | + |
| 68 | +Output:: |
| 69 | + |
| 70 | + { |
| 71 | + "countsByGroup": [ |
| 72 | + { |
| 73 | + "count": 3, |
| 74 | + "groupKey": "SUCCESSFUL" |
| 75 | + } |
| 76 | + ], |
| 77 | + "totalCounts": 3 |
| 78 | + } |
| 79 | + |
| 80 | +For more information, see `Assessing Amazon Inspector coverage of your AWS environment <https://docs.aws.amazon.com/inspector/latest/user/assessing-coverage.html>`__ in the *Amazon Inspector User Guide*. |
0 commit comments