/AWS1/IF_GGS=>CREATESOFTWAREUPDATEJOB()¶
About CreateSoftwareUpdateJob¶
Creates a software update for a core or group of cores (specified as an IoT thing group.) Use this to update the OTA Agent as well as the Greengrass core software. It makes use of the IoT Jobs feature which provides additional commands to manage a Greengrass core software update job.
Method Signature¶
METHODS /AWS1/IF_GGS~CREATESOFTWAREUPDATEJOB
IMPORTING
!IV_AMZNCLIENTTOKEN TYPE /AWS1/GGS__STRING OPTIONAL
!IV_S3URLSIGNERROLE TYPE /AWS1/GGSS3URLSIGNERROLE OPTIONAL
!IV_SOFTWARETOUPDATE TYPE /AWS1/GGSSOFTWARETOUPDATE OPTIONAL
!IV_UPDATEAGENTLOGLEVEL TYPE /AWS1/GGSUPDATEAGENTLOGLEVEL OPTIONAL
!IT_UPDATETARGETS TYPE /AWS1/CL_GGSUPDATETARGETS_W=>TT_UPDATETARGETS OPTIONAL
!IV_UPDATETARGETSARCHITECTURE TYPE /AWS1/GGSUPDTGTSARCHITECTURE OPTIONAL
!IV_UPDTARGETSOPERATINGSYSTEM TYPE /AWS1/GGSUPTGTSOPERATINGSYSTEM OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ggscresoftwareupjob01
RAISING
/AWS1/CX_GGSBADREQUESTEX
/AWS1/CX_GGSINTERNALSERVERER00
/AWS1/CX_GGSCLIENTEXC
/AWS1/CX_GGSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_s3urlsignerrole TYPE /AWS1/GGSS3URLSIGNERROLE /AWS1/GGSS3URLSIGNERROLE¶
The IAM Role that Greengrass will use to create pre-signed URLs pointing towards the update artifact.
iv_softwaretoupdate TYPE /AWS1/GGSSOFTWARETOUPDATE /AWS1/GGSSOFTWARETOUPDATE¶
The piece of software on the Greengrass core that will be updated.
it_updatetargets TYPE /AWS1/CL_GGSUPDATETARGETS_W=>TT_UPDATETARGETS TT_UPDATETARGETS¶
The ARNs of the targets (IoT things or IoT thing groups) that this update will be applied to.
iv_updatetargetsarchitecture TYPE /AWS1/GGSUPDTGTSARCHITECTURE /AWS1/GGSUPDTGTSARCHITECTURE¶
The architecture of the cores which are the targets of an update.
iv_updtargetsoperatingsystem TYPE /AWS1/GGSUPTGTSOPERATINGSYSTEM /AWS1/GGSUPTGTSOPERATINGSYSTEM¶
The operating system of the cores which are the targets of an update.
Optional arguments:¶
iv_amznclienttoken TYPE /AWS1/GGS__STRING /AWS1/GGS__STRING¶
A client token used to correlate requests and responses.
iv_updateagentloglevel TYPE /AWS1/GGSUPDATEAGENTLOGLEVEL /AWS1/GGSUPDATEAGENTLOGLEVEL¶
The minimum level of log statements that should be logged by the OTA Agent during an update.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ggscresoftwareupjob01 /AWS1/CL_GGSCRESOFTWAREUPJOB01¶
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createsoftwareupdatejob(
it_updatetargets = VALUE /aws1/cl_ggsupdatetargets_w=>tt_updatetargets(
( new /aws1/cl_ggsupdatetargets_w( |string| ) )
)
iv_amznclienttoken = |string|
iv_s3urlsignerrole = |string|
iv_softwaretoupdate = |string|
iv_updateagentloglevel = |string|
iv_updatetargetsarchitecture = |string|
iv_updtargetsoperatingsystem = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv___string = lo_result->get_iotjobarn( ).
lv___string = lo_result->get_iotjobid( ).
lv___string = lo_result->get_platformsoftwareversion( ).
ENDIF.