AWS code-library documentation change
Summary
Added SAP ABAP SDK code example for DeletePolicyVersion action, including error handling scenarios
Security assessment
The change adds documentation for securely handling IAM policy version deletion in SAP ABAP, including specific error cases like deletion conflicts and non-existent resources. While it documents security-sensitive operations, there's no evidence of addressing a specific vulnerability.
Diff
diff --git a/code-library/latest/ug/iam_example_iam_DeletePolicyVersion_section.md b/code-library/latest/ug/iam_example_iam_DeletePolicyVersion_section.md index c346da375..61c3fb475 100644 --- a//code-library/latest/ug/iam_example_iam_DeletePolicyVersion_section.md +++ b//code-library/latest/ug/iam_example_iam_DeletePolicyVersion_section.md @@ -7 +7 @@ There are more AWS SDK examples available in the [AWS Doc SDK Examples](https:// -# Use `DeletePolicyVersion` with a CLI +# Use `DeletePolicyVersion` with an AWS SDK or CLI @@ -91,0 +92,31 @@ PowerShell +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->deletepolicyversion( + iv_policyarn = iv_policy_arn + iv_versionid = iv_version_id ). + MESSAGE 'Policy version deleted successfully.' TYPE 'I'. + CATCH /aws1/cx_iamnosuchentityex. + MESSAGE 'Policy or version does not exist.' TYPE 'E'. + CATCH /aws1/cx_iamdeleteconflictex. + MESSAGE 'Cannot delete default policy version.' TYPE 'E'. + CATCH /aws1/cx_iamlimitexceededex. + MESSAGE 'Limit exceeded.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [DeletePolicyVersion](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +