AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added SAP ABAP code example for SetRepositoryPolicy API with repository policy configuration

Security assessment

The change documents repository policy management which is a security feature, but shows standard implementation without evidence of patching a security issue.

Diff

diff --git a/code-library/latest/ug/ecr_example_ecr_SetRepositoryPolicy_section.md b/code-library/latest/ug/ecr_example_ecr_SetRepositoryPolicy_section.md
index 96502accb..f481cf944 100644
--- a//code-library/latest/ug/ecr_example_ecr_SetRepositoryPolicy_section.md
+++ b//code-library/latest/ug/ecr_example_ecr_SetRepositoryPolicy_section.md
@@ -280,0 +281,29 @@ Example that grants an IAM role download access.
+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/ecr#code-examples). 
+    
+    
+        TRY.
+            " iv_repository_name = 'my-repository'
+            " iv_policy_text = '{"Version":"2012-10-17",		 	 	 "Statement":[...]}'
+            lo_ecr->setrepositorypolicy(
+              iv_repositoryname = iv_repository_name
+              iv_policytext = iv_policy_text ).
+            MESSAGE |Policy set for repository { iv_repository_name }.| TYPE 'I'.
+          CATCH /aws1/cx_ecrrepositorynotfndex.
+            MESSAGE 'Repository not found.' TYPE 'I'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [SetRepositoryPolicy](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+