/AWS1/IF_IOT=>CREATESECURITYPROFILE()¶
About CreateSecurityProfile¶
Creates a Device Defender security profile.
Requires permission to access the CreateSecurityProfile action.
Method Signature¶
METHODS /AWS1/IF_IOT~CREATESECURITYPROFILE
IMPORTING
!IV_SECURITYPROFILENAME TYPE /AWS1/IOTSECURITYPROFILENAME OPTIONAL
!IV_SECURITYPROFILEDESC TYPE /AWS1/IOTSECURITYPROFILEDESC OPTIONAL
!IT_BEHAVIORS TYPE /AWS1/CL_IOTBEHAVIOR=>TT_BEHAVIORS OPTIONAL
!IT_ALERTTARGETS TYPE /AWS1/CL_IOTALERTTARGET=>TT_ALERTTARGETS OPTIONAL
!IT_ADDITIONALMETRICSTORETAIN TYPE /AWS1/CL_IOTADDLMETTORTNLIST_W=>TT_ADDLMETRICSTORETAINLIST OPTIONAL
!IT_ADDLMETRICSTORETAINV2 TYPE /AWS1/CL_IOTMETRICTORETAIN=>TT_ADDLMETRICSTORETAINV2LIST OPTIONAL
!IT_TAGS TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST OPTIONAL
!IO_METRICSEXPORTCONFIG TYPE REF TO /AWS1/CL_IOTMETEXPORTCONFIG OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotcreatesecpflrsp
RAISING
/AWS1/CX_IOTINTERNALFAILUREEX
/AWS1/CX_IOTINVALIDREQUESTEX
/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_securityprofilename TYPE /AWS1/IOTSECURITYPROFILENAME /AWS1/IOTSECURITYPROFILENAME¶
The name you are giving to the security profile.
Optional arguments:¶
iv_securityprofiledesc TYPE /AWS1/IOTSECURITYPROFILEDESC /AWS1/IOTSECURITYPROFILEDESC¶
A description of the security profile.
it_behaviors TYPE /AWS1/CL_IOTBEHAVIOR=>TT_BEHAVIORS TT_BEHAVIORS¶
Specifies the behaviors that, when violated by a device (thing), cause an alert.
it_alerttargets TYPE /AWS1/CL_IOTALERTTARGET=>TT_ALERTTARGETS TT_ALERTTARGETS¶
Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are generated when a device (thing) violates a behavior.
it_additionalmetricstoretain TYPE /AWS1/CL_IOTADDLMETTORTNLIST_W=>TT_ADDLMETRICSTORETAINLIST TT_ADDLMETRICSTORETAINLIST¶
Please use CreateSecurityProfileRequest$additionalMetricsToRetainV2 instead.
A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's
behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
it_addlmetricstoretainv2 TYPE /AWS1/CL_IOTMETRICTORETAIN=>TT_ADDLMETRICSTORETAINV2LIST TT_ADDLMETRICSTORETAINV2LIST¶
A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's
behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
it_tags TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST TT_TAGLIST¶
Metadata that can be used to manage the security profile.
io_metricsexportconfig TYPE REF TO /AWS1/CL_IOTMETEXPORTCONFIG /AWS1/CL_IOTMETEXPORTCONFIG¶
Specifies the MQTT topic and role ARN required for metric export.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iotcreatesecpflrsp /AWS1/CL_IOTCREATESECPFLRSP¶
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->createsecurityprofile(
io_metricsexportconfig = new /aws1/cl_iotmetexportconfig(
iv_mqtttopic = |string|
iv_rolearn = |string|
)
it_additionalmetricstoretain = VALUE /aws1/cl_iotaddlmettortnlist_w=>tt_addlmetricstoretainlist(
( new /aws1/cl_iotaddlmettortnlist_w( |string| ) )
)
it_addlmetricstoretainv2 = VALUE /aws1/cl_iotmetrictoretain=>tt_addlmetricstoretainv2list(
(
new /aws1/cl_iotmetrictoretain(
io_metricdimension = new /aws1/cl_iotmetricdimension(
iv_dimensionname = |string|
iv_operator = |string|
)
iv_exportmetric = ABAP_TRUE
iv_metric = |string|
)
)
)
it_alerttargets = VALUE /aws1/cl_iotalerttarget=>tt_alerttargets(
(
VALUE /aws1/cl_iotalerttarget=>ts_alerttargets_maprow(
value = new /aws1/cl_iotalerttarget(
iv_alerttargetarn = |string|
iv_rolearn = |string|
)
key = |string|
)
)
)
it_behaviors = VALUE /aws1/cl_iotbehavior=>tt_behaviors(
(
new /aws1/cl_iotbehavior(
io_criteria = new /aws1/cl_iotbehaviorcriteria(
io_mldetectionconfig = new /aws1/cl_iotmldetectionconfig( |string| )
io_statisticalthreshold = new /aws1/cl_iotstatlthreshold( |string| )
io_value = new /aws1/cl_iotmetricvalue(
it_cidrs = VALUE /aws1/cl_iotcidrs_w=>tt_cidrs(
( new /aws1/cl_iotcidrs_w( |string| ) )
)
it_numbers = VALUE /aws1/cl_iotnumberlist_w=>tt_numberlist(
( new /aws1/cl_iotnumberlist_w( |0.1| ) )
)
it_ports = VALUE /aws1/cl_iotports_w=>tt_ports(
( new /aws1/cl_iotports_w( 123 ) )
)
it_strings = VALUE /aws1/cl_iotstringlist_w=>tt_stringlist(
( new /aws1/cl_iotstringlist_w( |string| ) )
)
iv_count = 123
iv_number = '0.1'
)
iv_comparisonoperator = |string|
iv_conseqdatapointstoalarm = 123
iv_conseqdatapointstoclear = 123
iv_durationseconds = 123
)
io_metricdimension = new /aws1/cl_iotmetricdimension(
iv_dimensionname = |string|
iv_operator = |string|
)
iv_exportmetric = ABAP_TRUE
iv_metric = |string|
iv_name = |string|
iv_suppressalerts = ABAP_TRUE
)
)
)
it_tags = VALUE /aws1/cl_iottag=>tt_taglist(
(
new /aws1/cl_iottag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_securityprofiledesc = |string|
iv_securityprofilename = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_securityprofilename = lo_result->get_securityprofilename( ).
lv_securityprofilearn = lo_result->get_securityprofilearn( ).
ENDIF.