AWS Security ChangesHomeSearch

AWS code-library documentation change

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

File: code-library/latest/ug/secrets-manager_example_secrets-manager_GetSecretValue_section.md

Summary

Added SAP ABAP code example for GetSecretValue operation

Security assessment

Documents secure secret retrieval with explicit decryption error handling. Focuses on security feature usage but doesn't fix existing vulnerabilities.

Diff

diff --git a/code-library/latest/ug/secrets-manager_example_secrets-manager_GetSecretValue_section.md b/code-library/latest/ug/secrets-manager_example_secrets-manager_GetSecretValue_section.md
index 1dc1df0c5..35797e221 100644
--- a//code-library/latest/ug/secrets-manager_example_secrets-manager_GetSecretValue_section.md
+++ b//code-library/latest/ug/secrets-manager_example_secrets-manager_GetSecretValue_section.md
@@ -490,0 +491,33 @@ 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/smr#code-examples). 
+    
+    
+        TRY.
+            " iv_secret_name = 'MySecretName'
+            DATA(lo_result) = lo_smr->getsecretvalue( iv_secretid = iv_secret_name ).
+            ov_secret_value = lo_result->get_secretstring( ).
+            MESSAGE 'Secret value retrieved successfully.' TYPE 'I'.
+          CATCH /aws1/cx_smrresourcenotfoundex.
+            MESSAGE 'The requested secret was not found.' TYPE 'E'.
+          CATCH /aws1/cx_smrdecryptionfailure.
+            MESSAGE 'Failed to decrypt the secret.' TYPE 'E'.
+          CATCH /aws1/cx_smrinvalidparameterex.
+            MESSAGE 'Invalid parameter provided.' TYPE 'E'.
+          CATCH /aws1/cx_smrinvalidrequestex.
+            MESSAGE 'Invalid request.' TYPE 'E'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [GetSecretValue](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+