AWS IAM documentation change
Summary
Added SAP ABAP SDK code example for AttachRolePolicy action including error handling for non-existent entities and policy limits
Security assessment
The change adds a programming example for SAP ABAP integration. It demonstrates proper error handling but doesn't address specific vulnerabilities or security weaknesses. No security incidents or vulnerabilities are referenced.
Diff
diff --git a/IAM/latest/UserGuide/iam_example_iam_AttachRolePolicy_section.md b/IAM/latest/UserGuide/iam_example_iam_AttachRolePolicy_section.md index 632c43a67..3795f4262 100644 --- a//IAM/latest/UserGuide/iam_example_iam_AttachRolePolicy_section.md +++ b//IAM/latest/UserGuide/iam_example_iam_AttachRolePolicy_section.md @@ -840,0 +841,29 @@ 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->attachrolepolicy( + iv_rolename = iv_role_name + iv_policyarn = iv_policy_arn ). + MESSAGE 'Policy attached to role successfully.' TYPE 'I'. + CATCH /aws1/cx_iamnosuchentityex. + MESSAGE 'Role or policy does not exist.' TYPE 'E'. + CATCH /aws1/cx_iamlimitexceededex. + MESSAGE 'Policy attachment limit exceeded.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [AttachRolePolicy](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +