/AWS1/IF_TRL=>LISTPUBLICKEYS()¶
About ListPublicKeys¶
Returns all public keys whose private keys were used to sign the digest files within the specified time range. The public key is needed to validate digest files that were signed with its corresponding private key.
CloudTrail uses different private and public key pairs per Region. Each digest file is signed with a private key unique to its Region. When you validate a digest file from a specific Region, you must look in the same Region for its corresponding public key.
Method Signature¶
METHODS /AWS1/IF_TRL~LISTPUBLICKEYS
IMPORTING
!IV_STARTTIME TYPE /AWS1/TRLDATE OPTIONAL
!IV_ENDTIME TYPE /AWS1/TRLDATE OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/TRLSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_trllistpublickeysrsp
RAISING
/AWS1/CX_TRLINVALIDTIMERANGEEX
/AWS1/CX_TRLINVALIDTOKENEX
/AWS1/CX_TRLOPNOTPERMITTEDEX
/AWS1/CX_TRLUNSUPPORTEDOPEX
/AWS1/CX_TRLCLIENTEXC
/AWS1/CX_TRLSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_starttime TYPE /AWS1/TRLDATE /AWS1/TRLDATE¶
Optionally specifies, in UTC, the start of the time range to look up public keys for CloudTrail digest files. If not specified, the current time is used, and the current public key is returned.
iv_endtime TYPE /AWS1/TRLDATE /AWS1/TRLDATE¶
Optionally specifies, in UTC, the end of the time range to look up public keys for CloudTrail digest files. If not specified, the current time is used.
iv_nexttoken TYPE /AWS1/TRLSTRING /AWS1/TRLSTRING¶
Reserved for future use.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_trllistpublickeysrsp /AWS1/CL_TRLLISTPUBLICKEYSRSP¶
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->listpublickeys(
iv_endtime = '20150101000000.0000000'
iv_nexttoken = |string|
iv_starttime = '20150101000000.0000000'
).
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_publickeylist( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_bytebuffer = lo_row_1->get_value( ).
lv_date = lo_row_1->get_validitystarttime( ).
lv_date = lo_row_1->get_validityendtime( ).
lv_string = lo_row_1->get_fingerprint( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.