AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-01-25 · Documentation low

File: code-library/latest/ug/iam_example_iam_DetachRolePolicy_section.md

Summary

Added SAP ABAP SDK code example for DetachRolePolicy action

Security assessment

Documents how to securely detach policies from roles in SAP ABAP. While policy detachment is security-sensitive, this is standard SDK documentation without evidence of addressing a specific vulnerability.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_DetachRolePolicy_section.md b/code-library/latest/ug/iam_example_iam_DetachRolePolicy_section.md
index 02f5a10e3..9728c1f90 100644
--- a//code-library/latest/ug/iam_example_iam_DetachRolePolicy_section.md
+++ b//code-library/latest/ug/iam_example_iam_DetachRolePolicy_section.md
@@ -716,0 +717,27 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+SAP ABAP
+    
+
+**SDK for SAP ABAP**
+    
+
+###### Note
+
+There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/iam#code-examples). 
+    
+    
+        TRY.
+            lo_iam->detachrolepolicy(
+              iv_rolename = iv_role_name
+              iv_policyarn = iv_policy_arn ).
+            MESSAGE 'Policy detached from role successfully.' TYPE 'I'.
+          CATCH /aws1/cx_iamnosuchentityex.
+            MESSAGE 'Role or policy does not exist.' TYPE 'E'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [DetachRolePolicy](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+