Table of Contents
AppConfigData.
Client
¶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:
GetLatestConfiguration
.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.
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
.
When calling GetLatestConfiguration
, your client code sends the most recent ConfigurationToken
value it has and receives in response:
NextPollConfigurationToken
: the ConfigurationToken
value to use on the next call to GetLatestConfiguration
.NextPollIntervalInSeconds
: the duration the client should wait before making its next call to GetLatestConfiguration
. This duration may vary over the course of the session, so it should be used instead of the value sent on the StartConfigurationSession
call.Warning
The InitialConfigurationToken
and NextPollConfigurationToken
should only be used once. To support long poll use cases, the tokens are valid for up to 24 hours. If a GetLatestConfiguration
call uses an expired token, the system returns BadRequestException
.
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 Retrieving the configuration in the AppConfig User Guide .
import boto3
client = boto3.client('appconfigdata')
These are the available methods:
can_paginate()
close()
get_latest_configuration()
get_paginator()
get_waiter()
start_configuration_session()
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
get_latest_configuration
(**kwargs)¶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 Retrieving the configuration in the AppConfig User Guide .
Warning
Note the following important information.
GetLatestConfiguration
. The GetLatestConfiguration
response includes a NextPollConfigurationToken
that should always replace the token used for the just-completed call in preparation for the next one.GetLatestConfiguration
is a priced call. For more information, see Pricing.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.
Warning
This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a GetLatestConfiguration
call uses an expired token, the system returns BadRequestException
.
{
'NextPollConfigurationToken': 'string',
'NextPollIntervalInSeconds': 123,
'ContentType': 'string',
'Configuration': StreamingBody(),
'VersionLabel': 'string'
}
Response Structure
The latest token describing the current state of the configuration session. This must be provided to the next call to GetLatestConfiguration.
Warning
This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a GetLatestConfiguration
call uses an expired token, the system returns BadRequestException
.
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.
StreamingBody
) --The data of the configuration. This may be empty if the client already has the latest version of configuration.
The user-defined label for the AppConfig hosted configuration version. This attribute doesn't apply if the configuration is not from an AppConfig hosted configuration version. If the client already has the latest version of the configuration data, this value is empty.
Exceptions
AppConfigData.Client.exceptions.ThrottlingException
AppConfigData.Client.exceptions.ResourceNotFoundException
AppConfigData.Client.exceptions.BadRequestException
AppConfigData.Client.exceptions.InternalServerException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
start_configuration_session
(**kwargs)¶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 Retrieving 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
.
The InitialConfigurationToken
and NextPollConfigurationToken
should only be used once. To support long poll use cases, the tokens are valid for up to 24 hours. If a GetLatestConfiguration
call uses an expired token, the system returns BadRequestException
.
Exceptions
AppConfigData.Client.exceptions.ThrottlingException
AppConfigData.Client.exceptions.ResourceNotFoundException
AppConfigData.Client.exceptions.BadRequestException
AppConfigData.Client.exceptions.InternalServerException
The available paginators are: