API for AWS CloudTrail¶
ABAP Package | /AWS1/API_TRL_IMPL |
---|---|
ABAP SDK "TLA" | TRL |
ABAP Interface | /AWS1/IF_TRL |
The "TLA" is a Three Letter Abbreviation that appears in ABAP class names, data dictionary
objects and other ABAP objects throughout the AWS SDK for SAP ABAP. The TLA for AWS CloudTrail is TRL
.
This TLA helps squeeze ABAP objects into the 30-character length limit of the ABAP data dictionary.
Installation¶
To install the AWS SDK for SAP ABAP, import the Core transport, along with the transport for the CloudTrail module and other API modules you are interested in. A few modules are included in the Core transport itself. For more information, see the Developer Guide guide.
About The Service¶
This is the CloudTrail API Reference. It provides descriptions of actions, data types, common parameters, and common errors for CloudTrail.
CloudTrail is a web service that records Amazon Web Services API calls for your Amazon Web Services account and delivers log files to an Amazon S3 bucket. The recorded information includes the identity of the user, the start time of the Amazon Web Services API call, the source IP address, the request parameters, and the response elements returned by the service.
As an alternative to the API, you can use one of the Amazon Web Services SDKs, which consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail. For example, the SDKs handle cryptographically signing requests, managing errors, and retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to download and install them, see Tools to Build on Amazon Web Services.
See the CloudTrail User Guide for information about the data that is included with each Amazon Web Services API call listed in the log files.
Using the SDK¶
In your code, create a client using the SDK module for AWS CloudTrail, which is created with
factory method /AWS1/CL_TRL_FACTORY
=>create()
.
In this example we will assume you have configured
an SDK profile in transaction /AWS1/IMG
called ZFINANCE
.
DATA(go_session) = /aws1/cl_rt_session_aws=>create( 'ZFINANCE' ).
DATA(go_trl) = /aws1/cl_trl_factory=>create( go_session ).
Your variable go_trl
is an instance of /AWS1/IF_TRL
,
and all of the operations
in the AWS CloudTrail service are accessed by calling methods in /AWS1/IF_TRL
.
API Operations¶
For an overview of ABAP method calls corresponding to API operations in AWS CloudTrail, see the Operation List.
Factory Method¶
/AWS1/CL_TRL_FACTORY=>create( )
¶
Creates an object of type /AWS1/IF_TRL
.
IMPORTING¶
Optional arguments:¶
IV_PROTOCOL
TYPE /AWS1/RT_PROTOCOL
/AWS1/RT_PROTOCOL
¶
IO_SESSION
TYPE REF TO /AWS1/CL_RT_SESSION_BASE
/AWS1/CL_RT_SESSION_BASE
¶
IV_REGION
TYPE /AWS1/RT_REGION_ID
/AWS1/RT_REGION_ID
¶
IV_CUSTOM_ENDPOINT
TYPE /AWS1/RT_ENDPOINT
/AWS1/RT_ENDPOINT
¶
RETURNING¶
OO_CLIENT
TYPE REF TO /AWS1/IF_TRL
/AWS1/IF_TRL
¶
/AWS1/IF_TRL
represents the ABAP client for the CloudTrail service, representing each operation as a method call. For more information see the API Page page.
Configuring Programmatically¶
DATA(lo_config) = DATA(go_trl)->get_config( ).
lo_config
is a variable of type /AWS1/CL_TRL_CONFIG
. See the documentation for /AWS1/CL_TRL_CONFIG
for
details on the settings that can be configured.
Paginators¶
Paginators for AWS CloudTrail can be created via get_paginator()
which returns a paginator object of type /AWS1/IF_TRL_PAGINATOR
. The operation method that is being paginated is called using the paginator object, which accepts any necessary parameters to provide to the underlying API operation. This returns an iterator object which can be used to iterate over paginated results using has_next()
and get_next()
methods.
Details about the paginator methods available for service AWS CloudTrail can be found in interface /AWS1/IF_TRL_PAGINATOR
.