/AWS1/IF_PAN=>PROVISIONDEVICE()¶
About ProvisionDevice¶
Creates a device and returns a configuration archive. The configuration archive is a ZIP file that contains a
provisioning certificate that is valid for 5 minutes. Name the configuration archive
certificates-omni_device-name.zip and transfer it to the device within 5
minutes. Use the included USB storage device and connect it to the USB 3.0 port next to the HDMI output.
Method Signature¶
METHODS /AWS1/IF_PAN~PROVISIONDEVICE
IMPORTING
!IV_NAME TYPE /AWS1/PANDEVICENAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/PANDESCRIPTION OPTIONAL
!IT_TAGS TYPE /AWS1/CL_PANTAGMAP_W=>TT_TAGMAP OPTIONAL
!IO_NETWORKINGCONFIGURATION TYPE REF TO /AWS1/CL_PANNETWORKPAYLOAD OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_panprovisiondevicersp
RAISING
/AWS1/CX_PANACCESSDENIEDEX
/AWS1/CX_PANCONFLICTEXCEPTION
/AWS1/CX_PANINTERNALSERVEREX
/AWS1/CX_PANSERVICEQUOTAEXCDEX
/AWS1/CX_PANVALIDATIONEX
/AWS1/CX_PANCLIENTEXC
/AWS1/CX_PANSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/PANDEVICENAME /AWS1/PANDEVICENAME¶
A name for the device.
Optional arguments:¶
iv_description TYPE /AWS1/PANDESCRIPTION /AWS1/PANDESCRIPTION¶
A description for the device.
it_tags TYPE /AWS1/CL_PANTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
Tags for the device.
io_networkingconfiguration TYPE REF TO /AWS1/CL_PANNETWORKPAYLOAD /AWS1/CL_PANNETWORKPAYLOAD¶
A networking configuration for the device.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_panprovisiondevicersp /AWS1/CL_PANPROVISIONDEVICERSP¶
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->provisiondevice(
io_networkingconfiguration = new /aws1/cl_pannetworkpayload(
io_ethernet0 = new /aws1/cl_panethernetpayload(
io_staticipconnectioninfo = new /aws1/cl_panstaticipconninfo(
it_dns = VALUE /aws1/cl_pandnslist_w=>tt_dnslist(
( new /aws1/cl_pandnslist_w( |string| ) )
)
iv_defaultgateway = |string|
iv_ipaddress = |string|
iv_mask = |string|
)
iv_connectiontype = |string|
)
io_ethernet1 = new /aws1/cl_panethernetpayload(
io_staticipconnectioninfo = new /aws1/cl_panstaticipconninfo(
it_dns = VALUE /aws1/cl_pandnslist_w=>tt_dnslist(
( new /aws1/cl_pandnslist_w( |string| ) )
)
iv_defaultgateway = |string|
iv_ipaddress = |string|
iv_mask = |string|
)
iv_connectiontype = |string|
)
io_ntp = new /aws1/cl_panntppayload(
it_ntpservers = VALUE /aws1/cl_panntpserverlist_w=>tt_ntpserverlist(
( new /aws1/cl_panntpserverlist_w( |string| ) )
)
)
)
it_tags = VALUE /aws1/cl_pantagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_pantagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_pantagmap_w( |string| )
)
)
)
iv_description = |string|
iv_name = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_deviceid = lo_result->get_deviceid( ).
lv_devicearn = lo_result->get_arn( ).
lv_devicestatus = lo_result->get_status( ).
lv_certificates = lo_result->get_certificates( ).
lv_iotthingname = lo_result->get_iotthingname( ).
ENDIF.