API for Amazon AppConfig¶
| ABAP Package | /AWS1/API_APC |
|---|---|
| ABAP SDK "TLA" | APC |
| ABAP Interface | /AWS1/IF_APC |
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 Amazon AppConfig is APC.
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 AppConfig 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¶
AppConfig helps you safely change application behavior in production without redeploying code. Using feature flags and dynamic free-form configurations, you can control how your application runs in real time. This approach reduces risk, accelerates releases, and enables faster responses to issues. You can gradually roll out new features to specific users, monitor their impact, and expand availability with confidence. You can also update block lists, allow lists, throttling limits, and logging levels instantly, allowing you to mitigate issues and fine-tune performance without a deployment.
AppConfig supports a broad spectrum of use cases:
-
Feature flags and toggles – Gradually release new capabilities to targeted users, monitor impact, and instantly roll back changes if issues occur.
-
Application tuning – Introduce changes safely in production, measure their effects, and refine behavior without redeploying code.
-
Allow list or block list – Control access to features or restrict specific users in real time, without modifying application code.
-
Centralized configuration storage – Manage configuration data consistently across workloads. AppConfig can deploy configuration from the AppConfig hosted configuration store, Secrets Manager, Systems Manager, Systems Manager Parameter Store, or Amazon S3.
How AppConfig works
This section provides a high-level description of how AppConfig works and how you get started.
- 1. Identify configuration data to manage in AppConfig
-
Before creating a configuration profile, identify the configuration data in your code that you want to manage dynamically using AppConfig. Common examples include feature flags, allow and block lists, logging levels, service limits, and throttling rules. These values tend to change frequently and can cause issues if misconfigured.
If your configuration data already exists in cloud services such as Systems Manager Parameter Store or Amazon S3, you can use AppConfig to validate, deploy, and manage that data more effectively.
- 2. Create a configuration profile in AppConfig
-
A configuration profile defines how AppConfig locates and manages your configuration data. It includes a URI that points to the data source and a profile type.
AppConfig supports two profile types
-
Feature flags – Enable controlled feature releases, gradual rollouts, and testing in production.
-
Free-form configurations – Store and retrieve configuration data from external sources and update it without redeploying code.
Both profile types help decouple configuration from code, support continuous delivery, and reduce deployment risk.
You can also add optional validators to ensure that configuration data is syntactically and semantically correct. During deployment, AppConfig evaluates these validators and automatically rolls back changes if validation fails.
Each configuration profile is associated with an application, which acts as a logical container for your configuration resources. For more information about creating a configuration profile, see Creating a configuration profile in AppConfig in the the AppConfig User Guide.
-
- 3. Deploy configuration data
-
When you start a deployment, AppConfig:
-
Retrieves configuration data from the source defined in the configuration profile
-
Validates the data using the configured validators
-
Delivers the validated configuration to AppConfig Agent
The delivered configuration becomes the deployed version used by your application. For more information about deploying a configuration, see Deploying feature flags and configuration data in AppConfig.
-
- 4. Retrieve configuration data
-
Your application retrieves configuration data by calling a local endpoint exposed by AppConfig Agent, which caches the deployed configuration. Retrieving data is a metered event. AppConfig Agent supports a variety of use cases, as described in How to use AppConfig Agent to retrieve configuration data.
If the agent is not suitable for your use case, your application can retrieve configuration data directly from AppConfig by calling the StartConfigurationSession and GetLatestConfiguration API actions.
For more information about retrieving a configuration, see Retrieving feature flags and configuration data in AppConfig.
This reference is intended to be used with the AppConfig User Guide.
Using the SDK¶
In your code, create a client using the SDK module for Amazon AppConfig, which is created with
factory method /AWS1/CL_APC_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_apc) = /aws1/cl_apc_factory=>create( go_session ).
Your variable go_apc is an instance of /AWS1/IF_APC,
and all of the operations
in the Amazon AppConfig service are accessed by calling methods in /AWS1/IF_APC.
API Operations¶
For an overview of ABAP method calls corresponding to API operations in Amazon AppConfig, see the Operation List.
Factory Method¶
/AWS1/CL_APC_FACTORY=>create( )¶
Creates an object of type /AWS1/IF_APC.
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_apc /AWS1/IF_APC¶
/AWS1/IF_APCrepresents the ABAP client for the AppConfig service, representing each operation as a method call. For more information see the API Page page.
Configuring Programmatically¶
DATA(lo_config) = DATA(go_apc)->get_config( ).
lo_config is a variable of type /AWS1/CL_APC_CONFIG. See the documentation for /AWS1/CL_APC_CONFIG for
details on the settings that can be configured.
Waiters¶
Waiters for Implementation can be accessed via get_waiter() method followed by the waiter method to be called.
Details about the waiter methods available for service Implementation can be found in interface /AWS1/IF_APC_WAITER.
Paginators¶
Paginators for Amazon AppConfig can be created via get_paginator() which returns a paginator object of type /AWS1/IF_APC_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 Amazon AppConfig can be found in interface /AWS1/IF_APC_PAGINATOR.