AWS kms documentation change
Summary
Added SAP ABAP SDK code example for CreateAlias operation
Security assessment
Added example code showing proper error handling for KMS alias operations. While KMS is security-related, this change doesn't address a specific vulnerability but improves documentation of security features.
Diff
diff --git a/kms/latest/developerguide/example_kms_CreateAlias_section.md b/kms/latest/developerguide/example_kms_CreateAlias_section.md index 54d99c688..8193c360d 100644 --- a//kms/latest/developerguide/example_kms_CreateAlias_section.md +++ b//kms/latest/developerguide/example_kms_CreateAlias_section.md @@ -281,0 +282,36 @@ 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/kms#code-examples). + + + TRY. + " iv_alias_name = 'alias/my-key-alias' + " iv_key_id = 'arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab' + lo_kms->createalias( + iv_aliasname = iv_alias_name + iv_targetkeyid = iv_key_id + ). + MESSAGE 'Alias created successfully.' TYPE 'I'. + CATCH /aws1/cx_kmsalreadyexistsex. + MESSAGE 'Alias already exists.' TYPE 'E'. + CATCH /aws1/cx_kmsnotfoundexception. + MESSAGE 'Key not found.' TYPE 'E'. + CATCH /aws1/cx_kmsinvalidaliasnameex. + MESSAGE 'Invalid alias name.' TYPE 'E'. + CATCH /aws1/cx_kmskmsinternalex. + MESSAGE 'An internal error occurred.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [CreateAlias](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +