/AWS1/IF_IOT=>REGISTERCERTIFICATE()¶
About RegisterCertificate¶
Registers a device certificate with IoT in the same certificate mode as the signing CA. If you have more than one CA certificate that has the same subject field, you must specify the CA certificate that was used to sign the device certificate being registered.
Requires permission to access the RegisterCertificate action.
Method Signature¶
METHODS /AWS1/IF_IOT~REGISTERCERTIFICATE
IMPORTING
!IV_CERTIFICATEPEM TYPE /AWS1/IOTCERTIFICATEPEM OPTIONAL
!IV_CACERTIFICATEPEM TYPE /AWS1/IOTCERTIFICATEPEM OPTIONAL
!IV_SETASACTIVE TYPE /AWS1/IOTSETASACTIVEFLAG OPTIONAL
!IV_STATUS TYPE /AWS1/IOTCERTIFICATESTATUS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotregcertresponse
RAISING
/AWS1/CX_IOTCERTCONFLICTEX
/AWS1/CX_IOTCERTSTATEEXCEPTION
/AWS1/CX_IOTCERTVALIDATIONEX
/AWS1/CX_IOTINTERNALFAILUREEX
/AWS1/CX_IOTINVALIDREQUESTEX
/AWS1/CX_IOTRESRCALRDYEXISTSEX
/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_certificatepem TYPE /AWS1/IOTCERTIFICATEPEM /AWS1/IOTCERTIFICATEPEM¶
The certificate data, in PEM format.
Optional arguments:¶
iv_cacertificatepem TYPE /AWS1/IOTCERTIFICATEPEM /AWS1/IOTCERTIFICATEPEM¶
The CA certificate used to sign the device certificate being registered.
iv_setasactive TYPE /AWS1/IOTSETASACTIVEFLAG /AWS1/IOTSETASACTIVEFLAG¶
A boolean value that specifies if the certificate is set to active.
Valid values:
ACTIVE | INACTIVE
iv_status TYPE /AWS1/IOTCERTIFICATESTATUS /AWS1/IOTCERTIFICATESTATUS¶
The status of the register certificate request. Valid values that you can use include
ACTIVE,INACTIVE, andREVOKED.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iotregcertresponse /AWS1/CL_IOTREGCERTRESPONSE¶
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->registercertificate(
iv_cacertificatepem = |string|
iv_certificatepem = |string|
iv_setasactive = ABAP_TRUE
iv_status = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_certificatearn = lo_result->get_certificatearn( ).
lv_certificateid = lo_result->get_certificateid( ).
ENDIF.