AWS code-library documentation change
Summary
Added SAP ABAP SDK code example for GetImageSet API with error handling
Security assessment
Change adds example code implementation without addressing security vulnerabilities. Includes standard error handling for access denied/internal errors but no evidence of patching security issues.
Diff
diff --git a/code-library/latest/ug/medical-imaging_example_medical-imaging_GetImageSet_section.md b/code-library/latest/ug/medical-imaging_example_medical-imaging_GetImageSet_section.md index a1d89c9c9..702eeb111 100644 --- a//code-library/latest/ug/medical-imaging_example_medical-imaging_GetImageSet_section.md +++ b//code-library/latest/ug/medical-imaging_example_medical-imaging_GetImageSet_section.md @@ -212,0 +213,48 @@ There's more on GitHub. Find the complete example and learn how to set up and ru +SAP ABAP + + +**SDK for SAP ABAP** + + + + TRY. + " iv_datastore_id = '1234567890123456789012345678901234567890' + " iv_image_set_id = '1234567890123456789012345678901234567890' + " iv_version_id = '1' (optional) + IF iv_version_id IS NOT INITIAL. + oo_result = lo_mig->getimageset( + iv_datastoreid = iv_datastore_id + iv_imagesetid = iv_image_set_id + iv_versionid = iv_version_id ). + ELSE. + oo_result = lo_mig->getimageset( + iv_datastoreid = iv_datastore_id + iv_imagesetid = iv_image_set_id ). + ENDIF. + DATA(lv_state) = oo_result->get_imagesetstate( ). + MESSAGE |Image set retrieved with state: { lv_state }.| TYPE 'I'. + CATCH /aws1/cx_migaccessdeniedex. + MESSAGE 'Access denied.' TYPE 'I'. + CATCH /aws1/cx_migconflictexception. + MESSAGE 'Conflict error.' TYPE 'I'. + CATCH /aws1/cx_miginternalserverex. + MESSAGE 'Internal server error.' TYPE 'I'. + CATCH /aws1/cx_migresourcenotfoundex. + MESSAGE 'Image set not found.' TYPE 'I'. + CATCH /aws1/cx_migthrottlingex. + MESSAGE 'Request throttled.' TYPE 'I'. + CATCH /aws1/cx_migvalidationex. + MESSAGE 'Validation error.' TYPE 'I'. + ENDTRY. + + + + * For API details, see [GetImageSet](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + + +###### 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/mig#code-examples). +