@@ -42,34 +42,33 @@ suspend fun main(args: Array<String>) {
42
42
val dbInstanceId = " neptuneDB200"
43
43
44
44
println (
45
- """
46
- Amazon Neptune is a fully managed AWS graph database optimized for complex, connected datasets.
47
- It supports property graphs (Gremlin, openCypher)
48
- and RDF graphs (SPARQL), making it ideal for knowledge
49
- graphs, fraud detection, social networks,
50
- recommendations, and network management.
51
-
52
- Neptune handles provisioning, patching, backups, a
53
- nd replication, offering high availability by default
54
- .
55
- Developers can build relationship-aware apps using the
56
- AWS SDK for Kotlin and automate infrastructure with
57
- NeptuneClient.
45
+ """
46
+ Amazon Neptune is a fully managed AWS graph database optimized for complex, connected datasets.
47
+ It supports property graphs (Gremlin, openCypher)
48
+ and RDF graphs (SPARQL), making it ideal for knowledge
49
+ graphs, fraud detection, social networks,
50
+ recommendations, and network management.
51
+
52
+ Neptune handles provisioning, patching, backups, a
53
+ nd replication, offering high availability by default.
54
+
55
+ Developers can build relationship-aware apps using the
56
+ AWS SDK for Kotlin and automate infrastructure with
57
+ NeptuneClient.
58
58
59
- Let's get started...
59
+ Let's get started...
60
60
61
- """
61
+ """ .trimIndent(),
62
62
)
63
63
waitForInputToContinue(scanner)
64
64
runScenario(subnetGroupName, dbInstanceId, clusterName)
65
65
println (
66
- """
66
+ """
67
67
Thank you for checking out the Amazon Neptune Service Use demo. We hope you
68
68
learned something new, or got some inspiration for your own apps today.
69
69
For more AWS code examples, have a look at:
70
70
https://docs.aws.amazon.com/code-library/latest/ug/what-is-code-library.html
71
-
72
- """
71
+ """ .trimIndent(),
73
72
)
74
73
}
75
74
@@ -91,69 +90,69 @@ suspend fun runScenario(subnetGroupName: String, dbInstanceId: String, clusterNa
91
90
println (DASHES )
92
91
93
92
println (DASHES )
94
- println (" 3. Create a Neptune DB Instance" );
95
- println (" In this step, we add a new database instance to the Neptune cluster" );
93
+ println (" 3. Create a Neptune DB Instance" )
94
+ println (" In this step, we add a new database instance to the Neptune cluster" )
96
95
waitForInputToContinue(scanner)
97
96
createDbInstance(dbInstanceId, dbClusterId)
98
97
waitForInputToContinue(scanner)
99
98
println (DASHES )
100
99
101
100
println (DASHES )
102
- println (" 4. Check the status of the Neptune DB Instance" );
101
+ println (" 4. Check the status of the Neptune DB Instance" )
103
102
println (
104
- """
105
- In this step, we will wait until the DB instance
106
- becomes available. This may take around 10 minutes.
107
- """
103
+ """
104
+ In this step, we will wait until the DB instance
105
+ becomes available. This may take around 10 minutes.
106
+ """ .trimIndent(),
108
107
)
109
108
waitForInputToContinue(scanner)
110
109
checkInstanceStatus(dbInstanceId, " available" )
111
110
waitForInputToContinue(scanner)
112
111
println (DASHES )
113
112
114
113
println (DASHES )
115
- println (" 5. Show Neptune Cluster details" );
114
+ println (" 5. Show Neptune Cluster details" )
116
115
waitForInputToContinue(scanner)
117
116
describeDBClusters(dbClusterId)
118
117
waitForInputToContinue(scanner)
119
118
println (DASHES )
120
119
121
120
println (DASHES )
122
- println (" 6. Stop the Amazon Neptune cluster" );
121
+ println (" 6. Stop the Amazon Neptune cluster" )
123
122
println (
124
- """
125
- Once stopped, this step polls the status
126
- until the cluster is in a stopped state.
127
- """
128
- );
123
+ """
124
+ Once stopped, this step polls the status
125
+ until the cluster is in a stopped state.
126
+ """ .trimIndent(),
127
+ )
129
128
waitForInputToContinue(scanner)
130
129
stopDBCluster(dbClusterId)
131
130
waitForClusterStatus(dbClusterId, " stopped" )
132
131
waitForInputToContinue(scanner)
133
132
println (DASHES )
134
133
135
134
println (DASHES )
136
- println (" 7. Start the Amazon Neptune cluster" );
135
+ println (" 7. Start the Amazon Neptune cluster" )
137
136
println (
138
- """
139
- Once started, this step polls the clusters
140
- status until it's in an available state.
141
- We will also poll the instance status.
142
- """
143
- );
137
+ """
138
+ Once started, this step polls the clusters
139
+ status until it's in an available state.
140
+ We will also poll the instance status.
141
+ """ .trimIndent(),
142
+ )
144
143
waitForInputToContinue(scanner)
145
144
startDBCluster(dbClusterId)
146
145
waitForClusterStatus(dbClusterId, " available" )
147
146
checkInstanceStatus(dbInstanceId, " available" )
148
147
waitForInputToContinue(scanner)
149
148
println (DASHES )
150
149
151
- println (DASHES );
152
- println (" 8. Delete the Neptune Assets" );
153
- println (" Would you like to delete the Neptune Assets? (y/n)" );
154
- val delAns = scanner.nextLine().trim();
150
+ println (DASHES )
151
+ println (" 8. Delete the Neptune Assets" )
152
+ println (" Would you like to delete the Neptune Assets? (y/n)" )
153
+ val delAns = scanner.nextLine().trim()
155
154
if (delAns.equals(" y" )) {
156
- println (" You selected to delete the Neptune assets." );
155
+ println (" You selected to delete the Neptune assets." )
157
156
deleteDbInstance(dbInstanceId)
158
157
waitUntilInstanceDeleted(dbInstanceId)
159
158
deleteDBCluster(dbClusterId)
0 commit comments