AWS code-library documentation change
Summary
Added SAP ABAP SDK code example for DetachUserPolicy action
Security assessment
Extends documentation for securely detaching policies from users in SAP ABAP. No evidence of fixing a security issue; this is routine SDK documentation expansion.
Diff
diff --git a/code-library/latest/ug/iam_example_iam_DetachUserPolicy_section.md b/code-library/latest/ug/iam_example_iam_DetachUserPolicy_section.md index 5ad1e1fb1..67d66001a 100644 --- a//code-library/latest/ug/iam_example_iam_DetachUserPolicy_section.md +++ b//code-library/latest/ug/iam_example_iam_DetachUserPolicy_section.md @@ -192,0 +193,27 @@ 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->detachuserpolicy( + iv_username = iv_user_name + iv_policyarn = iv_policy_arn ). + MESSAGE 'Policy detached from user successfully.' TYPE 'I'. + CATCH /aws1/cx_iamnosuchentityex. + MESSAGE 'User or policy does not exist.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [DetachUserPolicy](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +