API for AWS Security Token Service¶
| ABAP Package | /AWS1/API_STS |
|---|---|
| ABAP SDK "TLA" | STS |
| ABAP Interface | /AWS1/IF_STS |
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 Security Token Service is STS.
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 STS 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¶
Amazon Web Services provides Security Token Service (STS) as a web service that enables you to request temporary, limited-privilege credentials for users. This guide describes the STS API. For more information, see Temporary Security Credentials in the IAM User Guide.
As an alternative to using 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 such as Java, Ruby, .NET, iOS, Android, and others. The SDKs provide a convenient way to create programmatic access to STS. For example, the SDKs can cryptographically sign requests, manage errors, and retry requests automatically. For information about the Amazon Web Services SDKs, see Tools to Build on Amazon Web Services.
For information about setting up signatures and authorization through the API, see Signing Amazon Web Services API Requests in the Amazon Web Services General Reference. For general information about the Query API, see Making Query Requests in the IAM User Guide. For information about using security tokens with other Amazon Web Services products, see Amazon Web Services Services That Work with IAM in the IAM User Guide.
For information about STS endpoints, see STS Regions and endpoints in the IAM User Guide. For information about logging STS API calls, see Logging IAM and STS API calls with CloudTrail in the IAM User Guide.
Using the SDK¶
In your code, create a client using the SDK module for AWS Security Token Service, which is created with
factory method /AWS1/CL_STS_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_sts) = /aws1/cl_sts_factory=>create( go_session ).
Your variable go_sts is an instance of /AWS1/IF_STS,
and all of the operations
in the AWS Security Token Service service are accessed by calling methods in /AWS1/IF_STS.
API Operations¶
For an overview of ABAP method calls corresponding to API operations in AWS Security Token Service, see the Operation List.
Factory Method¶
/AWS1/CL_STS_FACTORY=>create( )¶
Creates an object of type /AWS1/IF_STS.
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_sts /AWS1/IF_STS¶
/AWS1/IF_STSrepresents the ABAP client for the STS service, representing each operation as a method call. For more information see the API Page page.
Configuring Programmatically¶
DATA(lo_config) = DATA(go_sts)->get_config( ).
lo_config is a variable of type /AWS1/CL_STS_CONFIG. See the documentation for /AWS1/CL_STS_CONFIG for
details on the settings that can be configured.
Level 2 ("L2") Functionality¶
This module includes higher-level Level 2 or "L2" functions beyond the basic web API. The L2 functionality builds on top of the basic API by providing convenience functions to simplify the use of the service for ABAP programmers. The L2 functionality does not replace the lower-level API functions but may be useful in simplifying ABAP code.
The L2 client can be created using the methods of the factory class
/aws1/cl_sts_l2_factory. See the documentation of that class for more details.