/AWS1/IF_LSA=>CREATECERTIFICATE()
¶
About CreateCertificate¶
Creates an SSL/TLS certificate for an Amazon Lightsail content delivery network (CDN) distribution and a container service.
After the certificate is valid, use the AttachCertificateToDistribution
action to use the certificate and its domains with your distribution. Or use the
UpdateContainerService
action to use the certificate and its domains with your
container service.
Only certificates created in the us-east-1
Amazon Web Services Region can be attached to Lightsail distributions. Lightsail
distributions are global resources that can reference an origin in any Amazon Web Services
Region, and distribute its content globally. However, all distributions are located in the
us-east-1
Region.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_certificatename
TYPE /AWS1/LSACERTIFICATENAME
/AWS1/LSACERTIFICATENAME
¶
The name for the certificate.
iv_domainname
TYPE /AWS1/LSADOMAINNAME
/AWS1/LSADOMAINNAME
¶
The domain name (
example.com
) for the certificate.
Optional arguments:¶
it_subjectalternativenames
TYPE /AWS1/CL_LSASUBJECTALTERNATI00=>TT_SUBJECTALTERNATIVENAMELIST
TT_SUBJECTALTERNATIVENAMELIST
¶
An array of strings that specify the alternate domains (
example2.com
) and subdomains (blog.example.com
) for the certificate.You can specify a maximum of nine alternate domains (in addition to the primary domain name).
Wildcard domain entries (
*.example.com
) are not supported.
it_tags
TYPE /AWS1/CL_LSATAG=>TT_TAGLIST
TT_TAGLIST
¶
The tag keys and optional values to add to the certificate during create.
Use the
TagResource
action to tag a resource after it's created.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_lsacreatecertresult
/AWS1/CL_LSACREATECERTRESULT
¶
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->/aws1/if_lsa~createcertificate(
it_subjectalternativenames = VALUE /aws1/cl_lsasubjectalternati00=>tt_subjectalternativenamelist(
( new /aws1/cl_lsasubjectalternati00( |string| ) )
)
it_tags = VALUE /aws1/cl_lsatag=>tt_taglist(
(
new /aws1/cl_lsatag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_certificatename = |string|
iv_domainname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_certificatesummary = lo_result->get_certificate( ).
IF lo_certificatesummary IS NOT INITIAL.
lv_nonemptystring = lo_certificatesummary->get_certificatearn( ).
lv_certificatename = lo_certificatesummary->get_certificatename( ).
lv_domainname = lo_certificatesummary->get_domainname( ).
lo_certificate = lo_certificatesummary->get_certificatedetail( ).
IF lo_certificate IS NOT INITIAL.
lv_nonemptystring = lo_certificate->get_arn( ).
lv_certificatename = lo_certificate->get_name( ).
lv_domainname = lo_certificate->get_domainname( ).
lv_certificatestatus = lo_certificate->get_status( ).
lv_serialnumber = lo_certificate->get_serialnumber( ).
LOOP AT lo_certificate->get_subjectalternativenames( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_domainname = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_certificate->get_domainvalidationrecords( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_domainname = lo_row_3->get_domainname( ).
lo_resourcerecord = lo_row_3->get_resourcerecord( ).
IF lo_resourcerecord IS NOT INITIAL.
lv_string = lo_resourcerecord->get_name( ).
lv_string = lo_resourcerecord->get_type( ).
lv_string = lo_resourcerecord->get_value( ).
ENDIF.
lo_dnsrecordcreationstate = lo_row_3->get_dnsrecordcreationstate( ).
IF lo_dnsrecordcreationstate IS NOT INITIAL.
lv_dnsrecordcreationstatec = lo_dnsrecordcreationstate->get_code( ).
lv_string = lo_dnsrecordcreationstate->get_message( ).
ENDIF.
lv_certificatedomainvalida = lo_row_3->get_validationstatus( ).
ENDIF.
ENDLOOP.
lv_requestfailurereason = lo_certificate->get_requestfailurereason( ).
lv_inuseresourcecount = lo_certificate->get_inuseresourcecount( ).
lv_keyalgorithm = lo_certificate->get_keyalgorithm( ).
lv_isodate = lo_certificate->get_createdat( ).
lv_isodate = lo_certificate->get_issuedat( ).
lv_issuerca = lo_certificate->get_issuerca( ).
lv_isodate = lo_certificate->get_notbefore( ).
lv_isodate = lo_certificate->get_notafter( ).
lv_eligibletorenew = lo_certificate->get_eligibletorenew( ).
lo_renewalsummary = lo_certificate->get_renewalsummary( ).
IF lo_renewalsummary IS NOT INITIAL.
LOOP AT lo_renewalsummary->get_domainvalidationrecords( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_domainname = lo_row_3->get_domainname( ).
lo_resourcerecord = lo_row_3->get_resourcerecord( ).
IF lo_resourcerecord IS NOT INITIAL.
lv_string = lo_resourcerecord->get_name( ).
lv_string = lo_resourcerecord->get_type( ).
lv_string = lo_resourcerecord->get_value( ).
ENDIF.
lo_dnsrecordcreationstate = lo_row_3->get_dnsrecordcreationstate( ).
IF lo_dnsrecordcreationstate IS NOT INITIAL.
lv_dnsrecordcreationstatec = lo_dnsrecordcreationstate->get_code( ).
lv_string = lo_dnsrecordcreationstate->get_message( ).
ENDIF.
lv_certificatedomainvalida = lo_row_3->get_validationstatus( ).
ENDIF.
ENDLOOP.
lv_renewalstatus = lo_renewalsummary->get_renewalstatus( ).
lv_renewalstatusreason = lo_renewalsummary->get_renewalstatusreason( ).
lv_isodate = lo_renewalsummary->get_updatedat( ).
ENDIF.
lv_isodate = lo_certificate->get_revokedat( ).
lv_revocationreason = lo_certificate->get_revocationreason( ).
LOOP AT lo_certificate->get_tags( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_tagkey = lo_row_5->get_key( ).
lv_tagvalue = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_certificate->get_supportcode( ).
ENDIF.
LOOP AT lo_certificatesummary->get_tags( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_tagkey = lo_row_5->get_key( ).
lv_tagvalue = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT lo_result->get_operations( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_nonemptystring = lo_row_7->get_id( ).
lv_resourcename = lo_row_7->get_resourcename( ).
lv_resourcetype = lo_row_7->get_resourcetype( ).
lv_isodate = lo_row_7->get_createdat( ).
lo_resourcelocation = lo_row_7->get_location( ).
IF lo_resourcelocation IS NOT INITIAL.
lv_string = lo_resourcelocation->get_availabilityzone( ).
lv_regionname = lo_resourcelocation->get_regionname( ).
ENDIF.
lv_boolean = lo_row_7->get_isterminal( ).
lv_string = lo_row_7->get_operationdetails( ).
lv_operationtype = lo_row_7->get_operationtype( ).
lv_operationstatus = lo_row_7->get_status( ).
lv_isodate = lo_row_7->get_statuschangedat( ).
lv_string = lo_row_7->get_errorcode( ).
lv_string = lo_row_7->get_errordetails( ).
ENDIF.
ENDLOOP.
ENDIF.