/AWS1/IF_IOT=>GETTHINGCONNECTIVITYDATA()¶
About GetThingConnectivityData¶
Retrieves the live connectivity status per device. If a device has never connected to IoT Core or was disconnected for more than 1 hour before fleet indexing's thingConnectivityIndexingMode was enabled, the response will have the connected field set to false with no additional session details.
Method Signature¶
METHODS /AWS1/IF_IOT~GETTHINGCONNECTIVITYDATA
IMPORTING
!IV_THINGNAME TYPE /AWS1/IOTCNNCTVYAPITHINGNAME OPTIONAL
!IV_INCLUDESOCKETINFORMATION TYPE /AWS1/IOTBOOLEAN OPTIONAL
PREFERRED PARAMETER iv_thingname
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotgetthingcvydatarsp
RAISING
/AWS1/CX_IOTINDEXNOTREADYEX
/AWS1/CX_IOTINTERNALFAILUREEX
/AWS1/CX_IOTINVALIDREQUESTEX
/AWS1/CX_IOTRESOURCENOTFOUNDEX
/AWS1/CX_IOTSERVICEUNAVAILEX
/AWS1/CX_IOTTHROTTLINGEX
/AWS1/CX_IOTUNAUTHORIZEDEX
/AWS1/CX_IOTCLIENTEXC
/AWS1/CX_IOTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_thingname TYPE /AWS1/IOTCNNCTVYAPITHINGNAME /AWS1/IOTCNNCTVYAPITHINGNAME¶
The name of your IoT thing.
Optional arguments:¶
iv_includesocketinformation TYPE /AWS1/IOTBOOLEAN /AWS1/IOTBOOLEAN¶
Specifies if socket information (sourcePort, targetPort, sourceIp, targetIp, vpcEndpointId) should be included in the GetThingConnectivityData response. Set to
trueto include socket information. Set tofalseto omit socket information. By default, this is set tofalse.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iotgetthingcvydatarsp /AWS1/CL_IOTGETTHINGCVYDATARSP¶
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->getthingconnectivitydata(
iv_includesocketinformation = ABAP_TRUE
iv_thingname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_connectivityapithingnam = lo_result->get_thingname( ).
lv_boolean = lo_result->get_connected( ).
lv_timestamp = lo_result->get_timestamp( ).
lv_disconnectreasonvalue = lo_result->get_disconnectreason( ).
lv_sourceip = lo_result->get_sourceip( ).
lv_sourceport = lo_result->get_sourceport( ).
lv_targetip = lo_result->get_targetip( ).
lv_targetport = lo_result->get_targetport( ).
lv_vpcendpointid = lo_result->get_vpcendpointid( ).
lv_keepaliveduration = lo_result->get_keepaliveduration( ).
lv_boolean = lo_result->get_cleansession( ).
lv_sessionexpiry = lo_result->get_sessionexpiry( ).
lv_clientid = lo_result->get_clientid( ).
ENDIF.