/AWS1/IF_ACM=>SEARCHCERTIFICATES()¶
About SearchCertificates¶
Retrieves a list of certificates matching search criteria. You can filter certificates by X.509 attributes and ACM specific properties like certificate status, type and renewal eligibility. This operation provides more flexible filtering than ListCertificates by supporting complex filter statements.
Method Signature¶
METHODS /AWS1/IF_ACM~SEARCHCERTIFICATES
IMPORTING
!IO_FILTERSTATEMENT TYPE REF TO /AWS1/CL_ACMCERTFILTERSTMT OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/ACMSEARCHMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/ACMNEXTTOKEN OPTIONAL
!IV_SORTBY TYPE /AWS1/ACMSEARCHCERTSSORTBY OPTIONAL
!IV_SORTORDER TYPE /AWS1/ACMSEARCHCERTSSORTORDER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_acmsearchcertsrsp
RAISING
/AWS1/CX_ACMACCESSDENIEDEX
/AWS1/CX_ACMTHROTTLINGEX
/AWS1/CX_ACMVALIDATIONEX
/AWS1/CX_ACMCLIENTEXC
/AWS1/CX_ACMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
io_filterstatement TYPE REF TO /AWS1/CL_ACMCERTFILTERSTMT /AWS1/CL_ACMCERTFILTERSTMT¶
A filter statement that defines the search criteria. You can combine multiple filters using AND, OR, and NOT logical operators to create complex queries.
iv_maxresults TYPE /AWS1/ACMSEARCHMAXRESULTS /AWS1/ACMSEARCHMAXRESULTS¶
The maximum number of results to return in the response. Default is 100.
iv_nexttoken TYPE /AWS1/ACMNEXTTOKEN /AWS1/ACMNEXTTOKEN¶
Use this parameter only when paginating results and only in a subsequent request after you receive a response with truncated results. Set it to the value of
NextTokenfrom the response you just received.
iv_sortby TYPE /AWS1/ACMSEARCHCERTSSORTBY /AWS1/ACMSEARCHCERTSSORTBY¶
Specifies the field to sort results by. Valid values are CREATED_AT, NOT_AFTER, STATUS, RENEWAL_STATUS, EXPORTED, IN_USE, NOT_BEFORE, KEY_ALGORITHM, TYPE, CERTIFICATE_ARN, COMMON_NAME, REVOKED_AT, RENEWAL_ELIGIBILITY, ISSUED_AT, MANAGED_BY, EXPORT_OPTION, VALIDATION_METHOD, and IMPORTED_AT.
iv_sortorder TYPE /AWS1/ACMSEARCHCERTSSORTORDER /AWS1/ACMSEARCHCERTSSORTORDER¶
Specifies the order of sorted results. Valid values are ASCENDING or DESCENDING.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_acmsearchcertsrsp /AWS1/CL_ACMSEARCHCERTSRSP¶
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->searchcertificates(
io_filterstatement = new /aws1/cl_acmcertfilterstmt(
io_filter = new /aws1/cl_acmcertificatefilter(
io_acmcertmetadatafilter = new /aws1/cl_acmacmcertmetfilter(
iv_exported = ABAP_TRUE
iv_exportoption = |string|
iv_inuse = ABAP_TRUE
iv_managedby = |string|
iv_renewalstatus = |string|
iv_status = |string|
iv_type = |string|
iv_validationmethod = |string|
)
io_x509attributefilter = new /aws1/cl_acmx509attrfilter(
io_notafter = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_notbefore = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_subject = new /aws1/cl_acmsubjectfilter(
io_commonname = new /aws1/cl_acmcommonnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
io_subjectalternativename = new /aws1/cl_acmsubjectalternati00(
io_dnsname = new /aws1/cl_acmdnsnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
iv_extendedkeyusage = |string|
iv_keyalgorithm = |string|
iv_keyusage = |string|
iv_serialnumber = |string|
)
iv_certificatearn = |string|
)
io_not = new /aws1/cl_acmcertfilterstmt(
io_filter = new /aws1/cl_acmcertificatefilter(
io_acmcertmetadatafilter = new /aws1/cl_acmacmcertmetfilter(
iv_exported = ABAP_TRUE
iv_exportoption = |string|
iv_inuse = ABAP_TRUE
iv_managedby = |string|
iv_renewalstatus = |string|
iv_status = |string|
iv_type = |string|
iv_validationmethod = |string|
)
io_x509attributefilter = new /aws1/cl_acmx509attrfilter(
io_notafter = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_notbefore = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_subject = new /aws1/cl_acmsubjectfilter(
io_commonname = new /aws1/cl_acmcommonnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
io_subjectalternativename = new /aws1/cl_acmsubjectalternati00(
io_dnsname = new /aws1/cl_acmdnsnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
iv_extendedkeyusage = |string|
iv_keyalgorithm = |string|
iv_keyusage = |string|
iv_serialnumber = |string|
)
iv_certificatearn = |string|
)
it_and = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
(
new /aws1/cl_acmcertfilterstmt(
io_filter = new /aws1/cl_acmcertificatefilter(
io_acmcertmetadatafilter = new /aws1/cl_acmacmcertmetfilter(
iv_exported = ABAP_TRUE
iv_exportoption = |string|
iv_inuse = ABAP_TRUE
iv_managedby = |string|
iv_renewalstatus = |string|
iv_status = |string|
iv_type = |string|
iv_validationmethod = |string|
)
io_x509attributefilter = new /aws1/cl_acmx509attrfilter(
io_notafter = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_notbefore = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_subject = new /aws1/cl_acmsubjectfilter(
io_commonname = new /aws1/cl_acmcommonnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
io_subjectalternativename = new /aws1/cl_acmsubjectalternati00(
io_dnsname = new /aws1/cl_acmdnsnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
iv_extendedkeyusage = |string|
iv_keyalgorithm = |string|
iv_keyusage = |string|
iv_serialnumber = |string|
)
iv_certificatearn = |string|
)
it_or = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
)
)
)
)
it_or = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
(
new /aws1/cl_acmcertfilterstmt(
io_filter = new /aws1/cl_acmcertificatefilter(
io_acmcertmetadatafilter = new /aws1/cl_acmacmcertmetfilter(
iv_exported = ABAP_TRUE
iv_exportoption = |string|
iv_inuse = ABAP_TRUE
iv_managedby = |string|
iv_renewalstatus = |string|
iv_status = |string|
iv_type = |string|
iv_validationmethod = |string|
)
io_x509attributefilter = new /aws1/cl_acmx509attrfilter(
io_notafter = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_notbefore = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_subject = new /aws1/cl_acmsubjectfilter(
io_commonname = new /aws1/cl_acmcommonnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
io_subjectalternativename = new /aws1/cl_acmsubjectalternati00(
io_dnsname = new /aws1/cl_acmdnsnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
iv_extendedkeyusage = |string|
iv_keyalgorithm = |string|
iv_keyusage = |string|
iv_serialnumber = |string|
)
iv_certificatearn = |string|
)
it_and = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
)
)
)
)
)
it_and = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
(
new /aws1/cl_acmcertfilterstmt(
io_filter = new /aws1/cl_acmcertificatefilter(
io_acmcertmetadatafilter = new /aws1/cl_acmacmcertmetfilter(
iv_exported = ABAP_TRUE
iv_exportoption = |string|
iv_inuse = ABAP_TRUE
iv_managedby = |string|
iv_renewalstatus = |string|
iv_status = |string|
iv_type = |string|
iv_validationmethod = |string|
)
io_x509attributefilter = new /aws1/cl_acmx509attrfilter(
io_notafter = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_notbefore = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_subject = new /aws1/cl_acmsubjectfilter(
io_commonname = new /aws1/cl_acmcommonnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
io_subjectalternativename = new /aws1/cl_acmsubjectalternati00(
io_dnsname = new /aws1/cl_acmdnsnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
iv_extendedkeyusage = |string|
iv_keyalgorithm = |string|
iv_keyusage = |string|
iv_serialnumber = |string|
)
iv_certificatearn = |string|
)
io_not = new /aws1/cl_acmcertfilterstmt(
io_filter = new /aws1/cl_acmcertificatefilter(
io_acmcertmetadatafilter = new /aws1/cl_acmacmcertmetfilter(
iv_exported = ABAP_TRUE
iv_exportoption = |string|
iv_inuse = ABAP_TRUE
iv_managedby = |string|
iv_renewalstatus = |string|
iv_status = |string|
iv_type = |string|
iv_validationmethod = |string|
)
io_x509attributefilter = new /aws1/cl_acmx509attrfilter(
io_notafter = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_notbefore = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_subject = new /aws1/cl_acmsubjectfilter(
io_commonname = new /aws1/cl_acmcommonnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
io_subjectalternativename = new /aws1/cl_acmsubjectalternati00(
io_dnsname = new /aws1/cl_acmdnsnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
iv_extendedkeyusage = |string|
iv_keyalgorithm = |string|
iv_keyusage = |string|
iv_serialnumber = |string|
)
iv_certificatearn = |string|
)
it_or = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
)
)
it_or = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
)
)
)
)
it_or = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
(
new /aws1/cl_acmcertfilterstmt(
io_filter = new /aws1/cl_acmcertificatefilter(
io_acmcertmetadatafilter = new /aws1/cl_acmacmcertmetfilter(
iv_exported = ABAP_TRUE
iv_exportoption = |string|
iv_inuse = ABAP_TRUE
iv_managedby = |string|
iv_renewalstatus = |string|
iv_status = |string|
iv_type = |string|
iv_validationmethod = |string|
)
io_x509attributefilter = new /aws1/cl_acmx509attrfilter(
io_notafter = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_notbefore = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_subject = new /aws1/cl_acmsubjectfilter(
io_commonname = new /aws1/cl_acmcommonnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
io_subjectalternativename = new /aws1/cl_acmsubjectalternati00(
io_dnsname = new /aws1/cl_acmdnsnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
iv_extendedkeyusage = |string|
iv_keyalgorithm = |string|
iv_keyusage = |string|
iv_serialnumber = |string|
)
iv_certificatearn = |string|
)
io_not = new /aws1/cl_acmcertfilterstmt(
io_filter = new /aws1/cl_acmcertificatefilter(
io_acmcertmetadatafilter = new /aws1/cl_acmacmcertmetfilter(
iv_exported = ABAP_TRUE
iv_exportoption = |string|
iv_inuse = ABAP_TRUE
iv_managedby = |string|
iv_renewalstatus = |string|
iv_status = |string|
iv_type = |string|
iv_validationmethod = |string|
)
io_x509attributefilter = new /aws1/cl_acmx509attrfilter(
io_notafter = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_notbefore = new /aws1/cl_acmtimestamprange(
iv_end = '20150101000000.0000000'
iv_start = '20150101000000.0000000'
)
io_subject = new /aws1/cl_acmsubjectfilter(
io_commonname = new /aws1/cl_acmcommonnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
io_subjectalternativename = new /aws1/cl_acmsubjectalternati00(
io_dnsname = new /aws1/cl_acmdnsnamefilter(
iv_comparisonoperator = |string|
iv_value = |string|
)
)
iv_extendedkeyusage = |string|
iv_keyalgorithm = |string|
iv_keyusage = |string|
iv_serialnumber = |string|
)
iv_certificatearn = |string|
)
it_and = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
)
)
it_and = VALUE /aws1/cl_acmcertfilterstmt=>tt_certfilterstatementlist(
)
)
)
)
)
iv_maxresults = 123
iv_nexttoken = |string|
iv_sortby = |string|
iv_sortorder = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_results( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_arn = lo_row_1->get_certificatearn( ).
lo_x509attributes = lo_row_1->get_x509attributes( ).
IF lo_x509attributes IS NOT INITIAL.
lo_distinguishedname = lo_x509attributes->get_issuer( ).
IF lo_distinguishedname IS NOT INITIAL.
lv_string = lo_distinguishedname->get_commonname( ).
LOOP AT lo_distinguishedname->get_domaincomponents( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_distinguishedname->get_country( ).
LOOP AT lo_distinguishedname->get_customattributes( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_objectidentifier( ).
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_distinguishedname->get_distingnamequalifier( ).
lv_string = lo_distinguishedname->get_generationqualifier( ).
lv_string = lo_distinguishedname->get_givenname( ).
lv_string = lo_distinguishedname->get_initials( ).
lv_string = lo_distinguishedname->get_locality( ).
lv_string = lo_distinguishedname->get_organization( ).
lv_string = lo_distinguishedname->get_organizationalunit( ).
lv_string = lo_distinguishedname->get_pseudonym( ).
lv_string = lo_distinguishedname->get_serialnumber( ).
lv_string = lo_distinguishedname->get_state( ).
lv_string = lo_distinguishedname->get_surname( ).
lv_string = lo_distinguishedname->get_title( ).
ENDIF.
lo_distinguishedname = lo_x509attributes->get_subject( ).
IF lo_distinguishedname IS NOT INITIAL.
lv_string = lo_distinguishedname->get_commonname( ).
LOOP AT lo_distinguishedname->get_domaincomponents( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_distinguishedname->get_country( ).
LOOP AT lo_distinguishedname->get_customattributes( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_objectidentifier( ).
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_distinguishedname->get_distingnamequalifier( ).
lv_string = lo_distinguishedname->get_generationqualifier( ).
lv_string = lo_distinguishedname->get_givenname( ).
lv_string = lo_distinguishedname->get_initials( ).
lv_string = lo_distinguishedname->get_locality( ).
lv_string = lo_distinguishedname->get_organization( ).
lv_string = lo_distinguishedname->get_organizationalunit( ).
lv_string = lo_distinguishedname->get_pseudonym( ).
lv_string = lo_distinguishedname->get_serialnumber( ).
lv_string = lo_distinguishedname->get_state( ).
lv_string = lo_distinguishedname->get_surname( ).
lv_string = lo_distinguishedname->get_title( ).
ENDIF.
LOOP AT lo_x509attributes->get_subjectalternativenames( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lo_distinguishedname = lo_row_7->get_directoryname( ).
IF lo_distinguishedname IS NOT INITIAL.
lv_string = lo_distinguishedname->get_commonname( ).
LOOP AT lo_distinguishedname->get_domaincomponents( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_distinguishedname->get_country( ).
LOOP AT lo_distinguishedname->get_customattributes( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_objectidentifier( ).
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_distinguishedname->get_distingnamequalifier( ).
lv_string = lo_distinguishedname->get_generationqualifier( ).
lv_string = lo_distinguishedname->get_givenname( ).
lv_string = lo_distinguishedname->get_initials( ).
lv_string = lo_distinguishedname->get_locality( ).
lv_string = lo_distinguishedname->get_organization( ).
lv_string = lo_distinguishedname->get_organizationalunit( ).
lv_string = lo_distinguishedname->get_pseudonym( ).
lv_string = lo_distinguishedname->get_serialnumber( ).
lv_string = lo_distinguishedname->get_state( ).
lv_string = lo_distinguishedname->get_surname( ).
lv_string = lo_distinguishedname->get_title( ).
ENDIF.
lv_string = lo_row_7->get_dnsname( ).
lv_string = lo_row_7->get_ipaddress( ).
lo_othername = lo_row_7->get_othername( ).
IF lo_othername IS NOT INITIAL.
lv_string = lo_othername->get_objectidentifier( ).
lv_string = lo_othername->get_value( ).
ENDIF.
lv_string = lo_row_7->get_registeredid( ).
lv_string = lo_row_7->get_rfc822name( ).
lv_string = lo_row_7->get_uniformresourceid( ).
ENDIF.
ENDLOOP.
LOOP AT lo_x509attributes->get_extendedkeyusages( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_extendedkeyusagename = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
lv_keyalgorithm = lo_x509attributes->get_keyalgorithm( ).
LOOP AT lo_x509attributes->get_keyusages( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_keyusagename = lo_row_11->get_value( ).
ENDIF.
ENDLOOP.
lv_serialnumber = lo_x509attributes->get_serialnumber( ).
lv_tstamp = lo_x509attributes->get_notafter( ).
lv_tstamp = lo_x509attributes->get_notbefore( ).
ENDIF.
lo_certificatemetadata = lo_row_1->get_certificatemetadata( ).
IF lo_certificatemetadata IS NOT INITIAL.
lo_acmcertificatemetadata = lo_certificatemetadata->get_acmcertificatemetadata( ).
IF lo_acmcertificatemetadata IS NOT INITIAL.
lv_tstamp = lo_acmcertificatemetadata->get_createdat( ).
lv_nullableboolean = lo_acmcertificatemetadata->get_exported( ).
lv_tstamp = lo_acmcertificatemetadata->get_importedat( ).
lv_nullableboolean = lo_acmcertificatemetadata->get_inuse( ).
lv_tstamp = lo_acmcertificatemetadata->get_issuedat( ).
lv_renewaleligibility = lo_acmcertificatemetadata->get_renewaleligibility( ).
lv_tstamp = lo_acmcertificatemetadata->get_revokedat( ).
lv_certificatestatus = lo_acmcertificatemetadata->get_status( ).
lv_renewalstatus = lo_acmcertificatemetadata->get_renewalstatus( ).
lv_certificatetype = lo_acmcertificatemetadata->get_type( ).
lv_certificateexport = lo_acmcertificatemetadata->get_exportoption( ).
lv_certificatemanagedby = lo_acmcertificatemetadata->get_managedby( ).
lv_validationmethod = lo_acmcertificatemetadata->get_validationmethod( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.