Skip to content

Java V2 Add the Neptune Basics Scenario #7456

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

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions .doc_gen/metadata/neptune_metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# zexi 0.4.0
neptune_Hello:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.hello.main
services:
neptune: {DescribeDBClustersPaginator}
neptune_DeleteDBSubnetGroup:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.delete.subnet.group.main
services:
neptune: {DeleteDBSubnetGroup}
neptune_DeleteDBCluster:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.delete.cluster.main
services:
neptune: {DeleteDBCluster}
neptune_DeleteDBInstance:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.delete.instance.main
services:
neptune: {DeleteDBInstance}
neptune_StartDBCluster:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.start.cluster.main
services:
neptune: {StartDBCluster}
neptune_StopDBCluster:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.stop.cluster.main
services:
neptune: {StopDBCluster}
neptune_DescribeDBClusters:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.describe.cluster.main
services:
neptune: {DescribeDBClusters}
neptune_DescribeDBInstances:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.describe.dbinstance.main
services:
neptune: {DescribeDBInstances}
neptune_CreateDBInstance:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.create.dbinstance.main
services:
neptune: {CreateDBInstance}
neptune_CreateDBCluster:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.create.cluster.main
services:
neptune: {CreateDBCluster}
neptune_CreateDBSubnetGroup:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.create.subnet.main
services:
neptune: {CreateDBSubnetGroup}
neptune_CreateDBSubnetGroup:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description:
snippet_tags:
- neptune.java2.create.subnet.main
services:
neptune: {CreateDBSubnetGroup}
neptune_Scenario:
synopsis_list:
- Create an &neptunelong; Subnet Group.
- Create an &neptune; Cluster.
- Create an &neptune; Instance.
- Check the status of the &neptune; Instance.
- Show &neptune; cluster details.
- Stop the &neptune; cluster.
- Start the &neptune; cluster.
- Delete the &neptune; Assets.
category: Basics
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/neptune
sdkguide:
excerpts:
- description: Run an interactive scenario demonstrating &neptune; features.
snippet_tags:
- neptune.java2.scenario.main
- description: A wrapper class for &neptune; SDK methods.
snippet_tags:
- neptune.java2.actions.main
services:
neptune: {}
2 changes: 1 addition & 1 deletion .github/workflows/validate-doc-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: checkout repo content
uses: actions/checkout@v4
- name: validate metadata
uses: awsdocs/aws-doc-sdk-examples-tools@2025.16.2
uses: awsdocs/aws-doc-sdk-examples-tools@2025.20.1
with:
doc_gen_only: "False"
strict_titles: "True"
38 changes: 38 additions & 0 deletions javav2/example_code/neptune/.gitignore
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
aws neptune delete-db-subnet-group --db-subnet-group-name my-neptune-subnet-group

aws neptune delete-db-cluster --db-cluster-identifier my-neptune-cluster --skip-final-snapshot

aws neptune describe-db-instances --query "DBInstances[?Engine=='neptune']"

aws neptune delete-db-instance --db-instance-identifier my-neptune-db --skip-final-snapshot


aws iam create-role --role-name NeptuneLoadFromS3Role --assume-role-policy-document file://trust-policy.json


144 changes: 144 additions & 0 deletions javav2/example_code/neptune/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?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>neptune</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<release>${java.version}</release>
<source>21</source>
<target>21</target>
<compilerArgs>--enable-preview</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.31.8</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>neptune</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>netty-nio-client</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>neptunedata</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>neptunegraph</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>apache-client</artifactId>
<version>2.25.38</version> <!-- Or the latest available version -->
</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>software.amazon.awssdk</groupId>
<artifactId>sns</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sqs</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ssooidc</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sso</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>iam-policy-builder</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sts</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>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
</dependencies>
</project>
Loading
Loading