Table of Contents
A low-level client representing AWS AppConfig Data
AppConfig Data provides the data plane APIs your application uses to retrieve configuration data. Here's how it works:
Your application retrieves configuration data by first establishing a configuration session using the AppConfig Data StartConfigurationSession API action. Your session's client then makes periodic calls to GetLatestConfiguration to check for and retrieve the latest data available.
When calling StartConfigurationSession , your code sends the following information:
In response, AppConfig provides an InitialConfigurationToken to be given to the session's client and used the first time it calls GetLatestConfiguration for that session.
When calling GetLatestConfiguration , your client code sends the most recent ConfigurationToken value it has and receives in response:
For more information and to view example CLI commands that show how to retrieve a configuration using the AppConfig Data StartConfigurationSession and GetLatestConfiguration API actions, see Receiving the configuration in the AppConfig User Guide .
import boto3
client = boto3.client('appconfigdata')
These are the available methods:
Check if an operation can be paginated.
Retrieves the latest deployed configuration. This API may return empty configuration data if the client already has the latest version. For more information about this API action and to view example CLI commands that show how to use it with the StartConfigurationSession API action, see Receiving the configuration in the AppConfig User Guide .
Warning
Note the following important information.
See also: AWS API Documentation
Request Syntax
response = client.get_latest_configuration(
ConfigurationToken='string'
)
[REQUIRED]
Token describing the current state of the configuration session. To obtain a token, first call the StartConfigurationSession API. Note that every call to GetLatestConfiguration will return a new ConfigurationToken (NextPollConfigurationToken in the response) and MUST be provided to subsequent GetLatestConfiguration API calls.
{
'NextPollConfigurationToken': 'string',
'NextPollIntervalInSeconds': 123,
'ContentType': 'string',
'Configuration': StreamingBody()
}
Response Structure
The latest token describing the current state of the configuration session. This MUST be provided to the next call to GetLatestConfiguration.
The amount of time the client should wait before polling for configuration updates again. Use RequiredMinimumPollIntervalInSeconds to set the desired poll interval.
A standard MIME type describing the format of the configuration content.
The data of the configuration. This may be empty if the client already has the latest version of configuration.
Exceptions
Create a paginator for an operation.
Returns an object that can wait for some condition.
Starts a configuration session used to retrieve a deployed configuration. For more information about this API action and to view example CLI commands that show how to use it with the GetLatestConfiguration API action, see Receiving the configuration in the AppConfig User Guide .
See also: AWS API Documentation
Request Syntax
response = client.start_configuration_session(
ApplicationIdentifier='string',
EnvironmentIdentifier='string',
ConfigurationProfileIdentifier='string',
RequiredMinimumPollIntervalInSeconds=123
)
[REQUIRED]
The application ID or the application name.
[REQUIRED]
The environment ID or the environment name.
[REQUIRED]
The configuration profile ID or the configuration profile name.
dict
Response Syntax
{
'InitialConfigurationToken': 'string'
}
Response Structure
(dict) --
InitialConfigurationToken (string) --
Token encapsulating state about the configuration session. Provide this token to the GetLatestConfiguration API to retrieve configuration data.
Warning
This token should only be used once in your first call to GetLatestConfiguration . You MUST use the new token in the GetLatestConfiguration response (NextPollConfigurationToken ) in each subsequent call to GetLatestConfiguration .
Exceptions
The available paginators are: