Skip to content

Commit 57773dc

Browse files
committed
add Spec agter building branch
1 parent 763807b commit 57773dc

File tree

1 file changed

+133
-0
lines changed

1 file changed

+133
-0
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Amazon Inspector Specification
2+
3+
## Overview
4+
This SDK Basics scenario demonstrates how to interact with Amazon Inspector, a basics scenario that showcases AWS services and SDKs. It is primarily intended for the AWS code examples team to use while developing this example in additional languages.
5+
6+
## Resources
7+
This Basics scenario does not require any additional AWS resources.
8+
9+
### Relevant documentation
10+
11+
* [Getting started with Amazon Inspector](https://docs.aws.amazon.com/inspector/latest/user/getting_started.html)
12+
* [What is Amazon Inspector?](https://docs.aws.amazon.com/inspector/latest/user/what-is-inspector.html)
13+
* [Amazon Inspector API Reference](https://docs.aws.amazon.com/inspector/v2/APIReference/Welcome.html)
14+
* [Amazon Inspector Pricing](https://aws.amazon.com/inspector/pricing/)
15+
16+
### API Actions Used
17+
18+
* [CreateFilter](https://docs.aws.amazon.com/inspector/v2/APIReference/API_CreateFilter.html)
19+
20+
* [Enable](https://docs.aws.amazon.com/inspector/v2/APIReference/API_Enable.html)
21+
22+
* [ListCoverageStatistics](https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListCoverageStatistics.html)
23+
24+
25+
* [ListUsageTotals](https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListUsageTotals.html)
26+
27+
* [BatchGetAccountStatus](https://docs.aws.amazon.com/inspector/v2/APIReference/API_BatchGetAccountStatus.html)
28+
29+
* [ListFilters](https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListFilters.html)
30+
31+
* [ListFindings](https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListFindings.html)
32+
33+
* [BatchGetFindingDetails](https://docs.aws.amazon.com/inspector/v2/APIReference/API_BatchGetFindingDetails.html)
34+
35+
* [ListCoverage](https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListCoverage.html)
36+
37+
* [DeleteFilter](https://docs.aws.amazon.com/inspector/v2/APIReference/API_DeleteFilter.html)
38+
39+
40+
## Hello Amazon Inspector
41+
42+
The Hello example is intended for users not familiar with this service to easily get up and running. It sets up the Inspector service client, checks the current account status for Inspector and displays available scan types.
43+
44+
## Scenario
45+
46+
This scenario demonstrates the basic usage of **Amazon Inspector** using a Java program. It focuses on checking account status, enabling Inspector, listing findings, reviewing coverage, and managing filters.
47+
48+
---
49+
50+
### Setup
51+
52+
* Check Amazon Inspector account status
53+
* Enable Inspector for available resource types (if not already enabled)
54+
* Display account status summary
55+
56+
---
57+
58+
### Coverage Assessment
59+
60+
* List coverage details for scanned resources
61+
* Display overall coverage statistics
62+
* Review scan status for resources (general overview)
63+
64+
---
65+
66+
### Findings Management
67+
68+
* List security findings across all resource types
69+
* Create an example filter to suppress low-severity findings
70+
* List existing filters
71+
72+
---
73+
74+
### Usage and Costs
75+
76+
* Check usage totals and metrics for Inspector
77+
* Review coverage statistics
78+
79+
---
80+
81+
### Notes
82+
83+
* The program **does not retrieve detailed vulnerability (CVE) information**.
84+
* Resource-specific filtering (e.g., EC2, ECR, Lambda) is **not implemented**.
85+
* Cleanup (disabling Inspector) is **not performed**.
86+
87+
---
88+
89+
### Outcome
90+
91+
By following this scenario, users learn how to:
92+
93+
* Check Inspector account status and configuration
94+
* Enable Inspector for different resource types
95+
* List and analyze security findings
96+
* Monitor scan coverage
97+
* Create and manage filters
98+
* Track usage and coverage statistics
99+
100+
## Errors
101+
102+
The table below describes the exceptions handled in the program for each action.
103+
104+
| Action | Exception | Handling |
105+
|-------------------------------|---------------------------|--------------------------------------------------------------------------|
106+
| `Enable` | `ValidationException` | Prints a message indicating Inspector may already be enabled. |
107+
| `listUsageTotals` | `ValidationException` | Validation error listing usage totals.
108+
| `BatchGetAccountStatus` | `AccessDeniedException` | Prints AWS service error details and rethrows the exception. |
109+
| `ListFindings` | `ValidationException` | Prints validation error details. |
110+
| `ListCoverage` | `ValidationException` | Prints validation error details. |
111+
| `ListCoverageStatistics` | `ValidationException` | Prints validation error details. |
112+
| `createFilter` | `ValidationException` | Prints validation error details. |
113+
| `ListFilters` | `ValidationException` | Prints AWS service error details and rethrows the exception. |
114+
| `deleteFilter` | `ResourceNotFoundException` | Prints AWS service error details and rethrows the exception. |
115+
| `batchGetFindingDetails` | `ResourceNotFoundException` | Prints AWS service error details and rethrows the exception. |
116+
117+
118+
## Metadata
119+
120+
| Action / Scenario | Metadata File | Metadata Key |
121+
|-----------------------------------------|------------------------|-------------------------------|
122+
| `Enable` | inspector_metadata.yaml | inspector_EnableInspector |
123+
| `BatchGetAccountStatus` | inspector_metadata.yaml | inspector_GetAccountStatus |
124+
| `ListFindings` | inspector_metadata.yaml | inspector_ListFindings |
125+
| `ListCoverage` | inspector_metadata.yaml | inspector_ListCoverage |
126+
| `ListCoverageStatistics` | inspector_metadata.yaml | inspector_ListCoverageStatistics |
127+
| `ListUsageTotals` | inspector_metadata.yaml | inspector_ListUsageTotals |
128+
| `CreateFilter` | inspector_metadata.yaml | inspector_CreateFilter |
129+
| `ListFilters` | inspector_metadata.yaml | inspector_ListFilters |
130+
| `DeleteFilter` | inspector_metadata.yaml | inspector_DeleteFilter` |
131+
| `batchGetFindingDetails` | inspector_metadata.yaml | inspector_BatchGetFindingDetails |
132+
| `Amazon Inspector Hello` | inspector_metadata.yaml | inspector_Hello |
133+
| `Amazon Inspector Basics Scenario` | inspector_metadata.yaml | inspector_Scenario

0 commit comments

Comments
 (0)