AWS code-library documentation change
Summary
Added SAP ABAP SDK example for Encrypt operation
Security assessment
The change documents data encryption using KMS. While encryption is fundamental to security, this example addition doesn't address a specific vulnerability. It promotes secure practices but lacks evidence of fixing a security issue.
Diff
diff --git a/code-library/latest/ug/kms_example_kms_Encrypt_section.md b/code-library/latest/ug/kms_example_kms_Encrypt_section.md index 6a726be11..a410f70c5 100644 --- a//code-library/latest/ug/kms_example_kms_Encrypt_section.md +++ b//code-library/latest/ug/kms_example_kms_Encrypt_section.md @@ -358,0 +359,34 @@ 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_key_id = 'arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab' + " iv_plaintext contains the data to encrypt + oo_result = lo_kms->encrypt( + iv_keyid = iv_key_id + iv_plaintext = iv_plaintext + ). + MESSAGE 'Text encrypted successfully.' TYPE 'I'. + CATCH /aws1/cx_kmsdisabledexception. + MESSAGE 'The key is disabled.' TYPE 'E'. + CATCH /aws1/cx_kmsnotfoundexception. + MESSAGE 'Key not found.' TYPE 'E'. + CATCH /aws1/cx_kmskmsinternalex. + MESSAGE 'An internal error occurred.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [Encrypt](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +