Skip to content

Commit e3f3cbe

Browse files
scmacdonbrmur
authored andcommitted
fixed an example
1 parent 3edd50c commit e3f3cbe

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

javav2/example_code/acm/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
<groupId>software.amazon.awssdk</groupId>
6161
<artifactId>netty-nio-client</artifactId>
6262
</dependency>
63+
<dependency>
64+
<groupId>software.amazon.awssdk</groupId>
65+
<artifactId>acmpca</artifactId>
66+
</dependency>
6367
<dependency>
6468
<groupId>software.amazon.awssdk</groupId>
6569
<artifactId>secretsmanager</artifactId>

javav2/example_code/acm/src/main/java/com/example/acm/ImportCert.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ public static void main(String[] args) {
3939
privateKeyKey - The object key for the private key file in S3.
4040
""";
4141

42-
//if (args.length != 3) {
43-
// System.out.println(usage);
44-
// return;
45-
// }
42+
if (args.length != 3) {
43+
System.out.println(usage);
44+
return;
45+
}
4646

47-
String bucketName = "certbucket100" ; //args[0];
48-
String certificateKey = "certificate.pem" ; // args[1];
49-
String privateKeyKey = "private_key.pem" ; //args[2];
47+
String bucketName = args[0];
48+
String certificateKey = args[1];
49+
String privateKeyKey = args[2];
5050

5151
String certificateArn = importCertificate(bucketName, certificateKey, privateKeyKey);
5252
System.out.println("Certificate imported with ARN: " + certificateArn);

0 commit comments

Comments
 (0)