Skip to content

Commit

Permalink
Merge pull request #2 from beckandros/master
Browse files Browse the repository at this point in the history
RDS edits
  • Loading branch information
scmacdon authored Jul 18, 2020
2 parents a5d3e73 + 818fd3e commit 82e4022
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[CreateDBInstance.java demonstrates how to create a RDS instance and wait for it to be in an available state.]
//snippet-sourcedescription:[CreateDBInstance.java demonstrates how to create an Amazon RDS instance and wait for it to be in an available state.]
//snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Relational Database Service]
Expand Down Expand Up @@ -40,10 +40,10 @@ public static void main(String[] args) {
"Usage:\n" +
" CreateDBInstance <dbInstanceIdentifier><dbName><masterUsername><masterUserPassword> \n\n" +
"Where:\n" +
" dbInstanceIdentifier - the database instance identifier \n" +
" dbName - the database name \n" +
" masterUsername - the master user name \n" +
" masterUserPassword - the password that corresponds to the master user name \n";
" dbInstanceIdentifier - The database instance identifier \n" +
" dbName - The database name \n" +
" masterUsername - The master user name \n" +
" masterUserPassword - The password that corresponds to the master user name \n";

if (args.length < 4) {
System.out.println(USAGE);
Expand Down Expand Up @@ -132,4 +132,3 @@ public static void waitForInstanceReady(RdsClient rdsClient, String dbInstanceId
}
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[CreateDBSnapshot.java demonstrates how to create a RDS snapshot.]
//snippet-sourcedescription:[CreateDBSnapshot.java demonstrates how to create an Amazon RDS snapshot.]
//snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Relational Database Service]
Expand Down Expand Up @@ -35,8 +35,8 @@ public static void main(String[] args) {
"Usage:\n" +
" CreateDBSnapshot <dbInstanceIdentifier><dbSnapshotIdentifier> \n\n" +
"Where:\n" +
" dbInstanceIdentifier - the database instance identifier \n" +
" dbSnapshotIdentifier - the snapshot identifier \n";
" dbInstanceIdentifier - The database instance identifier \n" +
" dbSnapshotIdentifier - The snapshot identifier \n";

if (args.length < 3) {
System.out.println(USAGE);
Expand Down Expand Up @@ -64,7 +64,7 @@ public static void createSnapshot(RdsClient rdsClient, String dbInstanceIdentifi
.build();

CreateDbSnapshotResponse response = rdsClient.createDBSnapshot(snapshotRequest);
System.out.print("The Snapshot id is " + response.dbSnapshot().dbiResourceId());
System.out.print("The snapshot ID is " + response.dbSnapshot().dbiResourceId());

} catch (RdsException e) {
System.out.println(e.getLocalizedMessage());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[DeleteDBInstance.java demonstrates how to delete a RDS snapshot.]
//snippet-sourcedescription:[DeleteDBInstance.java demonstrates how to delete an Amazon RDS snapshot.]
//snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Relational Database Service]
Expand Down Expand Up @@ -36,7 +36,7 @@ public static void main(String[] args) {
"Usage:\n" +
" DeleteDBInstance <dbInstanceIdentifier> \n\n" +
"Where:\n" +
" dbInstanceIdentifier - the database instance identifier \n";
" dbInstanceIdentifier - The database instance identifier \n";

if (args.length < 1) {
System.out.println(USAGE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[DescribeAccountAttributes.java demonstrates how to retrieve attributes that belongs to an RDS account.]
//snippet-sourcedescription:[DescribeAccountAttributes.java demonstrates how to retrieve attributes that belong to an Amazon RDS account.]
////snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Relational Database Service]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[DescribeDBInstances.java demonstrates how to describe RDS instances.]
//snippet-sourcedescription:[DescribeDBInstances.java demonstrates how to describe Amazon RDS instances.]
//snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Relational Database Service]
Expand Down Expand Up @@ -50,8 +50,8 @@ public static void describeInstances(RdsClient rdsClient) {
List<DBInstance> instanceList = response.dbInstances();

for (DBInstance instance: instanceList) {
System.out.println("Instance Identifier is: "+instance.dbInstanceIdentifier());
System.out.println("The Engine is " +instance.engine());
System.out.println("Instance identifier is: "+instance.dbInstanceIdentifier());
System.out.println("The engine is " +instance.engine());
System.out.println("Connection endpoint is" +instance.endpoint().address());
}

Expand All @@ -62,4 +62,3 @@ public static void describeInstances(RdsClient rdsClient) {
// snippet-end:[rds.java2.describe_instances.main]
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[ModifyDBInstance.java demonstrates how to modify a RDS instance.]
//snippet-sourcedescription:[ModifyDBInstance.java demonstrates how to modify an Amazon RDS instance.]
//snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Relational Database Service]
Expand Down Expand Up @@ -36,8 +36,8 @@ public static void main(String[] args) {
"Usage:\n" +
" ModifyDBInstance <dbInstanceIdentifier><dbSnapshotIdentifier> \n\n" +
"Where:\n" +
" dbInstanceIdentifier - the database instance identifier \n" +
" masterUserPassword - the updated password that corresponds to the master user name \n";
" dbInstanceIdentifier - The database instance identifier \n" +
" masterUserPassword - The updated password that corresponds to the master user name \n";

if (args.length < 3) {
System.out.println(USAGE);
Expand Down Expand Up @@ -74,4 +74,3 @@ public static void updateIntance(RdsClient rdsClient, String dbInstanceIdentifie

}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[RebootDBInstance.java demonstrates how to reboot a RDS instance.]
//snippet-sourcedescription:[RebootDBInstance.java demonstrates how to reboot an Amazon RDS instance.]
//snippet-keyword:[SDK for Java 2.0]
//snippet-keyword:[Code Sample]
//snippet-service:[Amazon Relational Database Service]
Expand Down Expand Up @@ -36,7 +36,7 @@ public static void main(String[] args) {
"Usage:\n" +
" RebootDBInstance <dbInstanceIdentifier> \n\n" +
"Where:\n" +
" dbInstanceIdentifier - the database instance identifier \n" ;
" dbInstanceIdentifier - The database instance identifier \n" ;


String dbInstanceIdentifier = args[0];
Expand Down Expand Up @@ -69,4 +69,3 @@ public static void rebootInstance(RdsClient rdsClient, String dbInstanceIdentifi
// snippet-end:[rds.java2.reboot_instance.main]
}
}

0 comments on commit 82e4022

Please sign in to comment.