Skip to content

Commit e9159b8

Browse files
committed
updated Java code to address comments
1 parent b274083 commit e9159b8

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

scenarios/basics/inspector/SPECIFICATION.md

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,19 @@ This Basics scenario does not require any additional AWS resources.
2424

2525
## Hello Amazon Inspector
2626

27-
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.
27+
The Hello Inspector example is designed to help new users quickly become familiar with the Amazon Inspector service and the AWS SDK. This introductory sample demonstrates how to:
28+
29+
1. Initialize the Amazon Inspector2 client
30+
Sets up the service client.
31+
32+
2. Check the current Inspector account status
33+
Retrieves and displays the resource scan status for supported scan types such as EC2, ECR, Lambda, and Lambda Code.
34+
35+
3. List recent Inspector findings
36+
Queries the most recent security findings and prints key details including title, severity, status, and timestamp.
37+
38+
4. Display Inspector usage totals
39+
Uses a paginator to retrieve and show usage metrics and estimated monthly costs for the past 30 days.
2840

2941
## Scenario
3042

@@ -34,35 +46,35 @@ This scenario demonstrates the basic usage of **Amazon Inspector** using a Java
3446

3547
### Setup
3648

37-
* Check Amazon Inspector account status
38-
* Enable Inspector for available resource types (if not already enabled)
39-
* Display account status summary
49+
Check Amazon Inspector account status
4050

41-
---
51+
Enable Inspector for all available resource types (if not already enabled)
4252

43-
### Coverage Assessment
53+
Display a summary of the current scan status
4454

45-
* List coverage details for scanned resources
46-
* Display overall coverage statistics
47-
* Review scan status for resources (general overview)
55+
### Findings & Filters
4856

49-
---
57+
List recent security findings across all supported resource types
5058

51-
### Findings Management
59+
Create a sample filter to suppress low-severity findings
5260

53-
* List security findings across all resource types
54-
* Create an example filter to suppress low-severity findings
55-
* List existing filters
61+
List all existing Inspector filters
5662

57-
---
63+
### Coverage Assessment
64+
65+
List scan coverage for EC2, ECR, Lambda, and Lambda Code
66+
67+
Display overall coverage statistics
5868

5969
### Usage and Costs
6070

61-
* Check usage totals and metrics for Inspector
62-
* Review coverage statistics
71+
Retrieve usage totals for the last 30 days using paginated results
6372

64-
---
73+
Display usage metrics and estimated monthly costs
74+
75+
### Cleanup
6576

77+
Delete the example filter created during the scenario
6678

6779
### Outcome
6880

@@ -74,10 +86,11 @@ By following this scenario, users learn how to:
7486
* Monitor scan coverage
7587
* Create and manage filters
7688
* Track usage and coverage statistics
89+
* Delete the AWS resources.
7790

7891
## Errors
7992

80-
The SDK examples include basic exception handling for each Inspector action. The table below describes the exceptions actually handled in the program for each action.
93+
The table below describes the exceptions handled in the program for each action.
8194

8295
| Action | Exception | Handling |
8396
|-------------------------------|---------------------------|--------------------------------------------------------------------------|
@@ -90,7 +103,8 @@ The SDK examples include basic exception handling for each Inspector action. The
90103
| `ListUsageTotals` | `ValidationException` | Prints validation error details. |
91104
| `CreateFilter` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
92105
| `ListFilters` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
93-
| `getAccountStatus` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception. |
106+
| `getAccountStatus` | `Inspector2Exception` | Prints AWS service error details and rethrows the exception.
107+
| `getAccountStatus` | `ResourceNotFoundException` | Prints AWS service error details and rethrows the exception. |
94108

95109
## Metadata
96110

0 commit comments

Comments
 (0)