File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
services-custom/iam-policy-builder/src/main/java/software/amazon/awssdk/policybuilder/iam Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 8080 * String policyVersion = getPolicyResponse.defaultVersionId();
8181 * GetPolicyVersionResponse getPolicyVersionResponse =
8282 * iam.getPolicyVersion(r -> r.policyArn(policyArn).versionId(policyVersion));
83- *
84- * IamPolicy policy = IamPolicy.fromJson(getPolicyVersionResponse.policyVersion().document());
83+ *
84+ * String decodedPolicy = URLDecoder.decode(getPolicyVersionResponse.policyVersion().document(), StandardCharsets.UTF_8);
85+ * IamPolicy policy = IamPolicy.fromJson(decodedPolicy);
8586 *
8687 * IamStatement newStatement = policy.statements().get(0).copy(s -> s.addAction("dynamodb:GetItem"));
8788 * IamPolicy newPolicy = policy.copy(p -> p.statements(Arrays.asList(newStatement)));
You can’t perform that action at this time.
0 commit comments