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 80
80
* String policyVersion = getPolicyResponse.defaultVersionId();
81
81
* GetPolicyVersionResponse getPolicyVersionResponse =
82
82
* 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);
85
86
*
86
87
* IamStatement newStatement = policy.statements().get(0).copy(s -> s.addAction("dynamodb:GetItem"));
87
88
* IamPolicy newPolicy = policy.copy(p -> p.statements(Arrays.asList(newStatement)));
You can’t perform that action at this time.
0 commit comments