/AWS1/IF_IOT=>CREATEMITIGATIONACTION()¶
About CreateMitigationAction¶
Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. Only certain types of mitigation actions can be applied to specific check names. For more information, see Mitigation actions. Each mitigation action can apply only one type of change.
Requires permission to access the CreateMitigationAction action.
Method Signature¶
METHODS /AWS1/IF_IOT~CREATEMITIGATIONACTION
IMPORTING
!IV_ACTIONNAME TYPE /AWS1/IOTMITIGATIONACTIONNAME OPTIONAL
!IV_ROLEARN TYPE /AWS1/IOTROLEARN OPTIONAL
!IO_ACTIONPARAMS TYPE REF TO /AWS1/CL_IOTMIGACTIONPARAMS OPTIONAL
!IT_TAGS TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotcreatemigactionrsp
RAISING
/AWS1/CX_IOTINTERNALFAILUREEX
/AWS1/CX_IOTINVALIDREQUESTEX
/AWS1/CX_IOTLIMITEXCEEDEDEX
/AWS1/CX_IOTRESRCALRDYEXISTSEX
/AWS1/CX_IOTTHROTTLINGEX
/AWS1/CX_IOTCLIENTEXC
/AWS1/CX_IOTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_actionname TYPE /AWS1/IOTMITIGATIONACTIONNAME /AWS1/IOTMITIGATIONACTIONNAME¶
A friendly name for the action. Choose a friendly name that accurately describes the action (for example,
EnableLoggingAction).
iv_rolearn TYPE /AWS1/IOTROLEARN /AWS1/IOTROLEARN¶
The ARN of the IAM role that is used to apply the mitigation action.
io_actionparams TYPE REF TO /AWS1/CL_IOTMIGACTIONPARAMS /AWS1/CL_IOTMIGACTIONPARAMS¶
Defines the type of action and the parameters for that action.
Optional arguments:¶
it_tags TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST TT_TAGLIST¶
Metadata that can be used to manage the mitigation action.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iotcreatemigactionrsp /AWS1/CL_IOTCREATEMIGACTIONRSP¶
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->createmitigationaction(
io_actionparams = new /aws1/cl_iotmigactionparams(
io_addthgstothinggroupparams = new /aws1/cl_iotaddthgstothggrprms(
it_thinggroupnames = VALUE /aws1/cl_iotthinggroupnames_w=>tt_thinggroupnames(
( new /aws1/cl_iotthinggroupnames_w( |string| ) )
)
iv_overridedynamicgroups = ABAP_TRUE
)
io_enableiotloggingparams = new /aws1/cl_iotenableiotlogparams(
iv_loglevel = |string|
iv_rolearnforlogging = |string|
)
io_publishfindingtosnsparams = new /aws1/cl_iotpubfndgtosnsparams( |string| )
io_replacedefpolicyvrsparams = new /aws1/cl_iotrpldefplyvrsparams( |string| )
io_updatecacertificateparams = new /aws1/cl_iotupdatecacertparams( |string| )
io_updatedevicecertparams = new /aws1/cl_iotupddevcertparams( |string| )
)
it_tags = VALUE /aws1/cl_iottag=>tt_taglist(
(
new /aws1/cl_iottag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_actionname = |string|
iv_rolearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_mitigationactionarn = lo_result->get_actionarn( ).
lv_mitigationactionid = lo_result->get_actionid( ).
ENDIF.