/AWS1/IF_IOG=>ASSOCIATEENTITYTOTHING()¶
About AssociateEntityToThing¶
Associates a device with a concrete thing that is in the user's registry.
A thing can be associated with only one device at a time. If you associate a thing with a new device id, its previous association will be removed.
Method Signature¶
METHODS /AWS1/IF_IOG~ASSOCIATEENTITYTOTHING
IMPORTING
!IV_THINGNAME TYPE /AWS1/IOGTHINGNAME OPTIONAL
!IV_ENTITYID TYPE /AWS1/IOGURN OPTIONAL
!IV_NAMESPACEVERSION TYPE /AWS1/IOGVERSION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iogassocenttothingrsp
RAISING
/AWS1/CX_IOGINTERNALFAILUREEX
/AWS1/CX_IOGINVALIDREQUESTEX
/AWS1/CX_IOGRESOURCENOTFOUNDEX
/AWS1/CX_IOGTHROTTLINGEX
/AWS1/CX_IOGCLIENTEXC
/AWS1/CX_IOGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_thingname TYPE /AWS1/IOGTHINGNAME /AWS1/IOGTHINGNAME¶
The name of the thing to which the entity is to be associated.
iv_entityid TYPE /AWS1/IOGURN /AWS1/IOGURN¶
The ID of the device to be associated with the thing.
The ID should be in the following format.
urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME
Optional arguments:¶
iv_namespaceversion TYPE /AWS1/IOGVERSION /AWS1/IOGVERSION¶
The version of the user's namespace. Defaults to the latest version of the user's namespace.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iogassocenttothingrsp /AWS1/CL_IOGASSOCENTTOTHINGRSP¶
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->associateentitytothing(
iv_entityid = |string|
iv_namespaceversion = 123
iv_thingname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.