AWS code-library documentation change
Summary
Updated section title and added SAP ABAP SDK implementation example
Security assessment
Adds code examples for IoT device-principal attachment (security feature) but doesn't address vulnerabilities. The SAP ABAP implementation demonstrates secure device authorization without indicating security fixes.
Diff
diff --git a/code-library/latest/ug/iot_example_iot_AttachThingPrincipal_section.md b/code-library/latest/ug/iot_example_iot_AttachThingPrincipal_section.md index 1b2d1981b..204824f13 100644 --- a//code-library/latest/ug/iot_example_iot_AttachThingPrincipal_section.md +++ b//code-library/latest/ug/iot_example_iot_AttachThingPrincipal_section.md @@ -17 +17 @@ Action examples are code excerpts from larger programs and must be run in contex - * [Getting started with IoT Core](./iot_example_iot_GettingStarted_063_section.html) + * [Getting started with internet of things messaging](./iot_example_iot_GettingStarted_063_section.html) @@ -291,0 +292,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/iot#code-examples). + + + CONSTANTS cv_pfl TYPE /aws1/rt_profile_id VALUE 'ZCODE_DEMO'. + DATA(lo_session) = /aws1/cl_rt_session_aws=>create( cv_pfl ). + DATA(lo_iot) = /aws1/cl_iot_factory=>create( lo_session ). + TRY. + lo_iot->attachthingprincipal( + iv_thingname = iv_thing_name + iv_principal = iv_principal ). + MESSAGE |Principal attached to IoT thing '{ iv_thing_name }'.| TYPE 'I'. + CATCH /aws1/cx_iotresourcenotfoundex INTO DATA(lo_ex). + MESSAGE |Resource not found when attaching principal to '{ iv_thing_name }'.| TYPE 'I'. + RAISE EXCEPTION lo_ex. + CATCH /aws1/cx_rt_service_generic INTO DATA(lo_svc_ex). + MESSAGE lo_svc_ex->get_text( ) TYPE 'I'. + RAISE EXCEPTION lo_svc_ex. + ENDTRY. + + + + * For API details, see [AttachThingPrincipal](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +