AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Updated title and added SAP ABAP code example for SetDefaultPolicyVersion

Security assessment

Title expanded to include AWS SDK references. Added SAP ABAP implementation with error handling. While policy versioning relates to security, this is routine documentation expansion without addressing specific vulnerabilities.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_SetDefaultPolicyVersion_section.md b/code-library/latest/ug/iam_example_iam_SetDefaultPolicyVersion_section.md
index 06d591355..3c2f22ba2 100644
--- a//code-library/latest/ug/iam_example_iam_SetDefaultPolicyVersion_section.md
+++ b//code-library/latest/ug/iam_example_iam_SetDefaultPolicyVersion_section.md
@@ -7 +7 @@ There are more AWS SDK examples available in the [AWS Doc SDK Examples](https://
-# Use `SetDefaultPolicyVersion` with a CLI
+# Use `SetDefaultPolicyVersion` with an AWS SDK or CLI
@@ -73,0 +74,31 @@ PowerShell
+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->setdefaultpolicyversion(
+              iv_policyarn = iv_policy_arn
+              iv_versionid = iv_version_id ).
+            MESSAGE 'Default policy version set successfully.' TYPE 'I'.
+          CATCH /aws1/cx_iamnosuchentityex.
+            MESSAGE 'Policy or version does not exist.' TYPE 'E'.
+          CATCH /aws1/cx_iaminvalidinputex.
+            MESSAGE 'Invalid input provided.' TYPE 'E'.
+          CATCH /aws1/cx_iamlimitexceededex.
+            MESSAGE 'Limit exceeded.' TYPE 'E'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [SetDefaultPolicyVersion](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+