AWS IAM documentation change
Summary
Added SAP ABAP SDK code example for AttachUserPolicy action with error handling for non-existent users and policy limits
Security assessment
This adds a language-specific implementation example. The error handling for 'no such entity' and 'limit exceeded' are standard API responses, not indicators of security fixes. No security advisories or vulnerabilities are mentioned.
Diff
diff --git a/IAM/latest/UserGuide/iam_example_iam_AttachUserPolicy_section.md b/IAM/latest/UserGuide/iam_example_iam_AttachUserPolicy_section.md index a9dc9523d..b96fbdb74 100644 --- a//IAM/latest/UserGuide/iam_example_iam_AttachUserPolicy_section.md +++ b//IAM/latest/UserGuide/iam_example_iam_AttachUserPolicy_section.md @@ -172,0 +173,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->attachuserpolicy( + iv_username = iv_user_name + iv_policyarn = iv_policy_arn ). + MESSAGE 'Policy attached to user successfully.' TYPE 'I'. + CATCH /aws1/cx_iamnosuchentityex. + MESSAGE 'User or policy does not exist.' TYPE 'E'. + CATCH /aws1/cx_iamlimitexceededex. + MESSAGE 'Policy attachment limit exceeded.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [AttachUserPolicy](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +