-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Java V2 Add Inspector examples #7660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
scmacdon
wants to merge
14
commits into
awsdocs:main
Choose a base branch
from
scmacdon:inspector2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,271
−1
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ebd3e2e
Add inspector files
scmacdon 7fc6ba1
Add inspector spec
scmacdon 8b0e157
Add YAML file
scmacdon 0ef440b
updated YAML file
scmacdon 62a41d0
updated YAML file
scmacdon da4bf71
updated YAML file
scmacdon 3add2df
added tests
scmacdon 299fdb4
update spec
scmacdon 4aecfb0
add inspector examples
scmacdon 9f40d1b
add inspector examples
scmacdon cee7cea
fixed a conflict
scmacdon afdd103
fixed a issue
scmacdon 00db446
updated the Java example
scmacdon be404ef
updated the Java example
scmacdon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| # zexi 0.4.2 | ||
| inspector_Hello: | ||
| title: Hello &Inspector; | ||
| title_abbrev: Hello &Inspector; | ||
| synopsis: get started using &Inspector;. | ||
| category: Hello | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.hello.main | ||
| services: | ||
| inspector: {BatchGetAccountStatus, ListFindings, ListUsageTotals} | ||
| inspector_EnableInspector: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.enable.main | ||
| services: | ||
| inspector: {Enable} | ||
| inspector_CreateFilter: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.create.filter.main | ||
| services: | ||
| inspector: {CreateFilter} | ||
| inspector_GetAccountStatus: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.get_account_status.main | ||
| services: | ||
| inspector: {BatchGetAccountStatus} | ||
| inspector_ListFindings: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.list_findings.main | ||
| services: | ||
| inspector: {ListFindings} | ||
| inspector_BatchGetFindingDetails: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.get_account_status.main | ||
| services: | ||
| inspector: {BatchGetFindingDetails} | ||
| inspector_ListCoverageStatistics: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.list_coverage.stats.main | ||
| services: | ||
| inspector: {ListCoverageStatistics} | ||
| inspector_ListCoverage: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.list_coverage.main | ||
| services: | ||
| inspector: {ListCoverage} | ||
| inspector_ListUsageTotals: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.list_usage_totals.main | ||
| services: | ||
| inspector: {ListUsageTotals} | ||
| inspector_ListFilters: | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: | ||
| snippet_tags: | ||
| - inspector.java2.list_filters.main | ||
| services: | ||
| inspector: {inspector_ListFilters} | ||
| inspector_Scenario: | ||
| synopsis_list: | ||
| - Check Inspector account status. | ||
| - Ensure Inspector is enabled. | ||
| - Analyze security findings. | ||
| - Check scan coverage. | ||
| - Create a findings filter. | ||
| - List existing filters. | ||
| - Check usage and costs. | ||
| - Get coverage statistics. | ||
| category: Basics | ||
| languages: | ||
| Java: | ||
| versions: | ||
| - sdk_version: 2 | ||
| github: javav2/example_code/inspector | ||
| sdkguide: | ||
| excerpts: | ||
| - description: Run an interactive scenario demonstrating &Inspector; features. | ||
| snippet_tags: | ||
| - inspector.java2_scenario.main | ||
| - description: A wrapper class for &Inspector; SDK methods. | ||
| snippet_tags: | ||
| - inspector.java2_actions.main | ||
| services: | ||
| inspector: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| target/ | ||
| !.mvn/wrapper/maven-wrapper.jar | ||
| !**/src/main/**/target/ | ||
| !**/src/test/**/target/ | ||
|
|
||
| ### IntelliJ IDEA ### | ||
| .idea/modules.xml | ||
| .idea/jarRepositories.xml | ||
| .idea/compiler.xml | ||
| .idea/libraries/ | ||
| *.iws | ||
| *.iml | ||
| *.ipr | ||
|
|
||
| ### Eclipse ### | ||
| .apt_generated | ||
| .classpath | ||
| .factorypath | ||
| .project | ||
| .settings | ||
| .springBeans | ||
| .sts4-cache | ||
|
|
||
| ### NetBeans ### | ||
| /nbproject/private/ | ||
| /nbbuild/ | ||
| /dist/ | ||
| /nbdist/ | ||
| /.nb-gradle/ | ||
| build/ | ||
| !**/src/main/**/build/ | ||
| !**/src/test/**/build/ | ||
|
|
||
| ### VS Code ### | ||
| .vscode/ | ||
|
|
||
| ### Mac OS ### | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <groupId>org.example</groupId> | ||
| <artifactId>Inspector</artifactId> | ||
| <version>1.0-SNAPSHOT</version> | ||
|
|
||
| <properties> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <java.version>17</java.version> | ||
| <maven.compiler.target>17</maven.compiler.target> | ||
| <maven.compiler.source>17</maven.compiler.source> | ||
| </properties> | ||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <version>3.1</version> | ||
| <configuration> | ||
| <source>21</source> | ||
| <target>21</target> | ||
| <compilerArgs>--enable-preview</compilerArgs> | ||
| </configuration> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-surefire-plugin</artifactId> | ||
| <version>3.5.2</version> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>bom</artifactId> | ||
| <version>2.29.45</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.logging.log4j</groupId> | ||
| <artifactId>log4j-bom</artifactId> | ||
| <version>2.23.1</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.junit.jupiter</groupId> | ||
| <artifactId>junit-jupiter</artifactId> | ||
| <version>5.11.4</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>netty-nio-client</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>secretsmanager</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.code.gson</groupId> | ||
| <artifactId>gson</artifactId> | ||
| <version>2.10.1</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.core</groupId> | ||
| <artifactId>jackson-databind</artifactId> | ||
| <version>2.17.0</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>inspector2</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>sso</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>ssooidc</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.logging.log4j</groupId> | ||
| <artifactId>log4j-core</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.slf4j</groupId> | ||
| <artifactId>slf4j-api</artifactId> | ||
| <version>2.0.13</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.logging.log4j</groupId> | ||
| <artifactId>log4j-slf4j2-impl</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>acm</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.logging.log4j</groupId> | ||
| <artifactId>log4j-1.2-api</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>software.amazon.awssdk</groupId> | ||
| <artifactId>url-connection-client</artifactId> | ||
| <version>2.18.13</version> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh actually I don't think UrlConnection client is being used either. |
||
| </dependency> | ||
| </dependencies> | ||
| </project> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 'acm' needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove that one - nice pick up