/AWS1/IF_CWE=>CREATEARCHIVE()¶
About CreateArchive¶
Creates an archive of events with the specified settings. When you create an archive, incoming events might not immediately start being sent to the archive. Allow a short period of time for changes to take effect. If you do not specify a pattern to filter events sent to the archive, all events are sent to the archive except replayed events. Replayed events are not sent to an archive.
Method Signature¶
METHODS /AWS1/IF_CWE~CREATEARCHIVE
IMPORTING
!IV_ARCHIVENAME TYPE /AWS1/CWEARCHIVENAME OPTIONAL
!IV_EVENTSOURCEARN TYPE /AWS1/CWEARN OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/CWEARCHIVEDESCRIPTION OPTIONAL
!IV_EVENTPATTERN TYPE /AWS1/CWEEVENTPATTERN OPTIONAL
!IV_RETENTIONDAYS TYPE /AWS1/CWERETENTIONDAYS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cwecreatearchiversp
RAISING
/AWS1/CX_CWECONCURRENTMODEX
/AWS1/CX_CWEINTERNALEXCEPTION
/AWS1/CX_CWEINVEVENTPATTERNEX
/AWS1/CX_CWELIMITEXCEEDEDEX
/AWS1/CX_CWERESRCALRDYEXISTSEX
/AWS1/CX_CWERESOURCENOTFOUNDEX
/AWS1/CX_CWECLIENTEXC
/AWS1/CX_CWESERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_archivename TYPE /AWS1/CWEARCHIVENAME /AWS1/CWEARCHIVENAME¶
The name for the archive to create.
iv_eventsourcearn TYPE /AWS1/CWEARN /AWS1/CWEARN¶
The ARN of the event bus that sends events to the archive.
Optional arguments:¶
iv_description TYPE /AWS1/CWEARCHIVEDESCRIPTION /AWS1/CWEARCHIVEDESCRIPTION¶
A description for the archive.
iv_eventpattern TYPE /AWS1/CWEEVENTPATTERN /AWS1/CWEEVENTPATTERN¶
An event pattern to use to filter events sent to the archive.
iv_retentiondays TYPE /AWS1/CWERETENTIONDAYS /AWS1/CWERETENTIONDAYS¶
The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cwecreatearchiversp /AWS1/CL_CWECREATEARCHIVERSP¶
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->createarchive(
iv_archivename = |string|
iv_description = |string|
iv_eventpattern = |string|
iv_eventsourcearn = |string|
iv_retentiondays = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_archivearn = lo_result->get_archivearn( ).
lv_archivestate = lo_result->get_state( ).
lv_archivestatereason = lo_result->get_statereason( ).
lv_timestamp = lo_result->get_creationtime( ).
ENDIF.