diff --git a/javav2/example_code/glue/pom.xml b/javav2/example_code/glue/pom.xml
index e956594c6ff..716de62b7d5 100644
--- a/javav2/example_code/glue/pom.xml
+++ b/javav2/example_code/glue/pom.xml
@@ -38,7 +38,7 @@
software.amazon.awssdk
bom
- 2.21.20
+ 2.29.45
pom
@@ -59,7 +59,7 @@
software.amazon.awssdk
secretsmanager
- 2.20.45
+ 2.29.45
com.google.code.gson
@@ -80,7 +80,17 @@
software.amazon.awssdk
glue
- 2.20.26
+ 2.29.45
+
+
+ software.amazon.awssdk
+ sso
+ 2.29.45
+
+
+ software.amazon.awssdk
+ ssooidc
+ 2.29.45
\ No newline at end of file
diff --git a/javav2/example_code/guardduty/pom.xml b/javav2/example_code/guardduty/pom.xml
index 88f89d8a22b..1875696219a 100644
--- a/javav2/example_code/guardduty/pom.xml
+++ b/javav2/example_code/guardduty/pom.xml
@@ -38,7 +38,7 @@
software.amazon.awssdk
bom
- 2.21.20
+ 2.29.45
pom
import
@@ -81,5 +81,13 @@
1.9.2
test
+
+ software.amazon.awssdk
+ sso
+
+
+ software.amazon.awssdk
+ ssooidc
+
\ No newline at end of file
diff --git a/javav2/example_code/iam/pom.xml b/javav2/example_code/iam/pom.xml
index 768235e897a..c7aa59bba54 100644
--- a/javav2/example_code/iam/pom.xml
+++ b/javav2/example_code/iam/pom.xml
@@ -30,7 +30,7 @@
software.amazon.awssdk
bom
- 2.21.20
+ 2.29.45
pom
import
@@ -121,8 +121,6 @@
software.amazon.awssdk
accessanalyzer
-
-
diff --git a/javav2/example_code/iam/src/test/java/IAMServiceTest.java b/javav2/example_code/iam/src/test/java/IAMServiceTest.java
index eec835bd976..973dffeb918 100644
--- a/javav2/example_code/iam/src/test/java/IAMServiceTest.java
+++ b/javav2/example_code/iam/src/test/java/IAMServiceTest.java
@@ -14,6 +14,8 @@
import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueRequest;
import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueResponse;
+
+import java.util.UUID;
import java.util.concurrent.TimeUnit;
/**
@@ -50,14 +52,14 @@ public static void setUp() {
Gson gson = new Gson();
String json = getSecretValues();
SecretValues values = gson.fromJson(json, SecretValues.class);
- userName = values.getUserName();
- policyName = values.getPolicyName();
- roleName = values.getRoleName();
+ userName = values.getUserName()+ UUID.randomUUID();
+ policyName = values.getPolicyName() + UUID.randomUUID();;
+ roleName = values.getRoleName() + UUID.randomUUID();;
accountAlias = values.getAccountAlias();
usernameSc = values.getUsernameSc();
policyNameSc = values.getPolicyNameSc();
roleNameSc = values.getRoleNameSc();
- roleSessionName = values.getRoleName();
+ roleSessionName = values.getRoleName() + UUID.randomUUID();;
fileLocationSc = values.getFileLocationSc();
bucketNameSc = values.getBucketNameSc();
@@ -120,25 +122,13 @@ public void CreateAccessKey() {
System.out.println("Test 3 passed");
}
- @Test
- @Tag("IntegrationTest")
- @Order(4)
- public void AttachRolePolicy() {
- assertDoesNotThrow(() -> AttachRolePolicy.attachIAMRolePolicy(iam, roleName, policyARN));
- System.out.println("\n Test 4 passed");
- }
- @Test
- @Tag("IntegrationTest")
- @Order(5)
- public void DetachRolePolicy() {
- assertDoesNotThrow(() -> DetachRolePolicy.detachPolicy(iam, roleName, policyARN));
- System.out.println("Test 5 passed");
- }
+
+
@Test
@Tag("IntegrationTest")
- @Order(6)
+ @Order(4)
public void GetPolicy() {
assertDoesNotThrow(() -> GetPolicy.getIAMPolicy(iam, policyARN));
System.out.println("Test 6 passed");
@@ -146,7 +136,7 @@ public void GetPolicy() {
@Test
@Tag("IntegrationTest")
- @Order(7)
+ @Order(5)
public void ListAccessKeys() {
assertDoesNotThrow(() -> ListAccessKeys.listKeys(iam, userName));
System.out.println("Test 7 passed");
@@ -154,7 +144,7 @@ public void ListAccessKeys() {
@Test
@Tag("IntegrationTest")
- @Order(8)
+ @Order(6)
public void ListUsers() {
assertDoesNotThrow(() -> ListUsers.listAllUsers(iam));
System.out.println("Test 8 passed");
@@ -162,7 +152,7 @@ public void ListUsers() {
@Test
@Tag("IntegrationTest")
- @Order(9)
+ @Order(7)
public void CreateAccountAlias() {
assertDoesNotThrow(() -> CreateAccountAlias.createIAMAccountAlias(iam, accountAlias));
System.out.println("Test 9 passed");
@@ -170,7 +160,7 @@ public void CreateAccountAlias() {
@Test
@Tag("IntegrationTest")
- @Order(10)
+ @Order(8)
public void DeleteAccountAlias() {
assertDoesNotThrow(() -> DeleteAccountAlias.deleteIAMAccountAlias(iam, accountAlias));
System.out.println("Test 10 passed");
@@ -178,7 +168,7 @@ public void DeleteAccountAlias() {
@Test
@Tag("IntegrationTest")
- @Order(11)
+ @Order(9)
public void DeletePolicy() {
assertDoesNotThrow(() -> DeletePolicy.deleteIAMPolicy(iam, policyARN));
System.out.println("Test 12 passed");
@@ -186,7 +176,7 @@ public void DeletePolicy() {
@Test
@Tag("IntegrationTest")
- @Order(12)
+ @Order(10)
public void DeleteAccessKey() {
assertDoesNotThrow(() -> DeleteAccessKey.deleteKey(iam, userName, keyId));
System.out.println("Test 12 passed");
@@ -194,7 +184,7 @@ public void DeleteAccessKey() {
@Test
@Tag("IntegrationTest")
- @Order(13)
+ @Order(11)
public void DeleteUser() {
assertDoesNotThrow(() -> DeleteUser.deleteIAMUser(iam, userName));
System.out.println("Test 13 passed");
@@ -202,7 +192,7 @@ public void DeleteUser() {
@Test
@Tag("IntegrationTest")
- @Order(14)
+ @Order(12)
public void TestIAMScenario() throws Exception {
String DASHES = new String(new char[80]).replace("\0", "-");
System.out.println(DASHES);