/AWS1/IF_IOG=>CREATESYSTEMINSTANCE()¶
About CreateSystemInstance¶
Creates a system instance.
This action validates the system instance, prepares the deployment-related resources. For Greengrass deployments, it updates the Greengrass group that is
specified by the greengrassGroupName parameter. It also adds a file to the S3 bucket specified by the s3BucketName parameter. You need to
call DeploySystemInstance after running this action.
For Greengrass deployments, since this action modifies and adds resources to a Greengrass group and an S3 bucket on the caller's behalf, the calling identity must have write permissions to both the specified Greengrass group and S3 bucket. Otherwise, the call will fail with an authorization error.
For cloud deployments, this action requires a flowActionsRoleArn value. This is an IAM role
that has permissions to access AWS services, such as AWS Lambda and AWS IoT, that the flow uses when it executes.
If the definition document doesn't specify a version of the user's namespace, the latest version will be used by default.
Method Signature¶
METHODS /AWS1/IF_IOG~CREATESYSTEMINSTANCE
IMPORTING
!IT_TAGS TYPE /AWS1/CL_IOGTAG=>TT_TAGLIST OPTIONAL
!IO_DEFINITION TYPE REF TO /AWS1/CL_IOGDEFINITIONDOCUMENT OPTIONAL
!IV_TARGET TYPE /AWS1/IOGDEPLOYMENTTARGET OPTIONAL
!IV_GREENGRASSGROUPNAME TYPE /AWS1/IOGGROUPNAME OPTIONAL
!IV_S3BUCKETNAME TYPE /AWS1/IOGS3BUCKETNAME OPTIONAL
!IO_METRICSCONFIGURATION TYPE REF TO /AWS1/CL_IOGMETRICSCONF OPTIONAL
!IV_FLOWACTIONSROLEARN TYPE /AWS1/IOGROLEARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iogcresysteminstrsp
RAISING
/AWS1/CX_IOGINTERNALFAILUREEX
/AWS1/CX_IOGINVALIDREQUESTEX
/AWS1/CX_IOGLIMITEXCEEDEDEX
/AWS1/CX_IOGRESRCALRDYEXISTSEX
/AWS1/CX_IOGTHROTTLINGEX
/AWS1/CX_IOGCLIENTEXC
/AWS1/CX_IOGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_definition TYPE REF TO /AWS1/CL_IOGDEFINITIONDOCUMENT /AWS1/CL_IOGDEFINITIONDOCUMENT¶
definition
iv_target TYPE /AWS1/IOGDEPLOYMENTTARGET /AWS1/IOGDEPLOYMENTTARGET¶
The target type of the deployment. Valid values are
GREENGRASSandCLOUD.
Optional arguments:¶
it_tags TYPE /AWS1/CL_IOGTAG=>TT_TAGLIST TT_TAGLIST¶
Metadata, consisting of key-value pairs, that can be used to categorize your system instances.
iv_greengrassgroupname TYPE /AWS1/IOGGROUPNAME /AWS1/IOGGROUPNAME¶
The name of the Greengrass group where the system instance will be deployed. This value is required if the value of the
targetparameter isGREENGRASS.
iv_s3bucketname TYPE /AWS1/IOGS3BUCKETNAME /AWS1/IOGS3BUCKETNAME¶
The name of the Amazon Simple Storage Service bucket that will be used to store and deploy the system instance's resource file. This value is required if the value of the
targetparameter isGREENGRASS.
io_metricsconfiguration TYPE REF TO /AWS1/CL_IOGMETRICSCONF /AWS1/CL_IOGMETRICSCONF¶
metricsConfiguration
iv_flowactionsrolearn TYPE /AWS1/IOGROLEARN /AWS1/IOGROLEARN¶
The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This value is required if the value of the
targetparameter isCLOUD.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iogcresysteminstrsp /AWS1/CL_IOGCRESYSTEMINSTRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->createsysteminstance(
io_definition = new /aws1/cl_iogdefinitiondocument(
iv_language = |string|
iv_text = |string|
)
io_metricsconfiguration = new /aws1/cl_iogmetricsconf(
iv_cloudmetricenabled = ABAP_TRUE
iv_metricrulerolearn = |string|
)
it_tags = VALUE /aws1/cl_iogtag=>tt_taglist(
(
new /aws1/cl_iogtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_flowactionsrolearn = |string|
iv_greengrassgroupname = |string|
iv_s3bucketname = |string|
iv_target = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_systeminstancesummary = lo_result->get_summary( ).
IF lo_systeminstancesummary IS NOT INITIAL.
lv_urn = lo_systeminstancesummary->get_id( ).
lv_arn = lo_systeminstancesummary->get_arn( ).
lv_systeminstancedeploymen = lo_systeminstancesummary->get_status( ).
lv_deploymenttarget = lo_systeminstancesummary->get_target( ).
lv_groupname = lo_systeminstancesummary->get_greengrassgroupname( ).
lv_timestamp = lo_systeminstancesummary->get_createdat( ).
lv_timestamp = lo_systeminstancesummary->get_updatedat( ).
lv_greengrassgroupid = lo_systeminstancesummary->get_greengrassgroupid( ).
lv_greengrassgroupversioni = lo_systeminstancesummary->get_greengrassgroupversionid( ).
ENDIF.
ENDIF.