/AWS1/IF_IOT=>REGISTERCACERTIFICATE()¶
About RegisterCACertificate¶
Registers a CA certificate with Amazon Web Services IoT Core. There is no limit to the number of CA
certificates you can register in your Amazon Web Services account. You can register up to 10 CA
certificates with the same CA subject field per Amazon Web Services account.
Requires permission to access the RegisterCACertificate action.
Method Signature¶
METHODS /AWS1/IF_IOT~REGISTERCACERTIFICATE
IMPORTING
!IV_CACERTIFICATE TYPE /AWS1/IOTCERTIFICATEPEM OPTIONAL
!IV_VERIFICATIONCERTIFICATE TYPE /AWS1/IOTCERTIFICATEPEM OPTIONAL
!IV_SETASACTIVE TYPE /AWS1/IOTSETASACTIVE OPTIONAL
!IV_ALLOWAUTOREGISTRATION TYPE /AWS1/IOTALLOWAUTOREGISTRATION OPTIONAL
!IO_REGISTRATIONCONFIG TYPE REF TO /AWS1/CL_IOTREGISTRATIONCONFIG OPTIONAL
!IT_TAGS TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST OPTIONAL
!IV_CERTIFICATEMODE TYPE /AWS1/IOTCERTIFICATEMODE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotregcacertresponse
RAISING
/AWS1/CX_IOTCERTVALIDATIONEX
/AWS1/CX_IOTINTERNALFAILUREEX
/AWS1/CX_IOTINVALIDREQUESTEX
/AWS1/CX_IOTLIMITEXCEEDEDEX
/AWS1/CX_IOTREGCODEVALIDATIO00
/AWS1/CX_IOTRESRCALRDYEXISTSEX
/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_cacertificate TYPE /AWS1/IOTCERTIFICATEPEM /AWS1/IOTCERTIFICATEPEM¶
The CA certificate.
Optional arguments:¶
iv_verificationcertificate TYPE /AWS1/IOTCERTIFICATEPEM /AWS1/IOTCERTIFICATEPEM¶
The private key verification certificate. If
certificateModeisSNI_ONLY, theverificationCertificatefield must be empty. IfcertificateModeisDEFAULTor not provided, theverificationCertificatefield must not be empty.
iv_setasactive TYPE /AWS1/IOTSETASACTIVE /AWS1/IOTSETASACTIVE¶
A boolean value that specifies if the CA certificate is set to active.
Valid values:
ACTIVE | INACTIVE
iv_allowautoregistration TYPE /AWS1/IOTALLOWAUTOREGISTRATION /AWS1/IOTALLOWAUTOREGISTRATION¶
Allows this CA certificate to be used for auto registration of device certificates.
io_registrationconfig TYPE REF TO /AWS1/CL_IOTREGISTRATIONCONFIG /AWS1/CL_IOTREGISTRATIONCONFIG¶
Information about the registration configuration.
it_tags TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST TT_TAGLIST¶
Metadata which can be used to manage the CA certificate.
For URI Request parameters use format: ...key1=value1&key2=value2...
For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..."
For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
iv_certificatemode TYPE /AWS1/IOTCERTIFICATEMODE /AWS1/IOTCERTIFICATEMODE¶
Describes the certificate mode in which the Certificate Authority (CA) will be registered. If the
verificationCertificatefield is not provided, setcertificateModeto beSNI_ONLY. If theverificationCertificatefield is provided, setcertificateModeto beDEFAULT. WhencertificateModeis not provided, it defaults toDEFAULT. All the device certificates that are registered using this CA will be registered in the same certificate mode as the CA. For more information about certificate mode for device certificates, see certificate mode.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iotregcacertresponse /AWS1/CL_IOTREGCACERTRESPONSE¶
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->registercacertificate(
io_registrationconfig = new /aws1/cl_iotregistrationconfig(
iv_rolearn = |string|
iv_templatebody = |string|
iv_templatename = |string|
)
it_tags = VALUE /aws1/cl_iottag=>tt_taglist(
(
new /aws1/cl_iottag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_allowautoregistration = ABAP_TRUE
iv_cacertificate = |string|
iv_certificatemode = |string|
iv_setasactive = ABAP_TRUE
iv_verificationcertificate = |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.