scenarios/basics/inspector/SPECIFICATION.md
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.
This Basics scenario does not require any additional AWS resources.
The Hello example is designed for users who are new to Amazon Inspector. It demonstrates how to set up the Inspector service client and retrieve a list of all member accounts associated with the current Inspector administrator account.
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.
By following this scenario, users learn how to:
The table below describes the exceptions handled in the program for each action.
| Action | Exception | Handling |
|---|---|---|
Enable | ValidationException | Prints a message indicating Inspector may already be enabled. |
Disable | ValidationException | Prints a message indicating Inspector may already be disabled. |
listUsageTotals | ValidationException | Validation error listing usage totals. |
BatchGetAccountStatus | AccessDeniedException | Prints AWS service error details and rethrows the exception. |
ListFindings | ValidationException | Prints validation error details. |
ListCoverage | ValidationException | Prints validation error details. |
ListCoverageStatistics | ValidationException | Prints validation error details. |
createFilter | ValidationException | Prints validation error details. |
ListFilters | ValidationException | Prints AWS service error details and rethrows the exception. |
deleteFilter | ResourceNotFoundException | Prints AWS service error details and rethrows the exception. |
batchGetFindingDetails | ResourceNotFoundException | Prints AWS service error details and rethrows the exception. |
| Action / Scenario | Metadata File | Metadata Key |
|---|---|---|
Enable | inspector_metadata.yaml | inspector_Enable |
Disable | inspector_metadata.yaml | inspector_Disable |
BatchGetAccountStatus | inspector_metadata.yaml | inspector_GetAccountStatus |
ListFindings | inspector_metadata.yaml | inspector_ListFindings |
ListCoverage | inspector_metadata.yaml | inspector_ListCoverage |
ListCoverageStatistics | inspector_metadata.yaml | inspector_ListCoverageStatistics |
ListUsageTotals | inspector_metadata.yaml | inspector_ListUsageTotals |
CreateFilter | inspector_metadata.yaml | inspector_CreateFilter |
ListFilters | inspector_metadata.yaml | inspector_ListFilters |
DeleteFilter | inspector_metadata.yaml | inspector_DeleteFilter |
BatchGetFindingDetails | inspector_metadata.yaml | inspector_BatchGetFindingDetails |
Amazon Inspector Hello | inspector_metadata.yaml | inspector_Hello |
Amazon Inspector Basics Scenario | inspector_metadata.yaml | inspector_Scenario |