Skip to content

AppConfigData  >  Operations  >  get_latest_configuration

get_latest_configuration

Operation

get_latest_configuration async

get_latest_configuration(input: GetLatestConfigurationInput, plugins: list[Plugin] | None = None) -> GetLatestConfigurationOutput

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.

  • Each configuration token is only valid for one call to 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.

Parameters:

Name Type Description Default
input GetLatestConfigurationInput

An instance of GetLatestConfigurationInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetLatestConfigurationOutput

An instance of GetLatestConfigurationOutput.

Input

GetLatestConfigurationInput dataclass

Bases: _SerdeShape

Dataclass for GetLatestConfigurationInput structure.

Attributes

configuration_token class-attribute instance-attribute
configuration_token: str | None = ...

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.

Output

GetLatestConfigurationOutput dataclass

Bases: _SerdeShape

Dataclass for GetLatestConfigurationOutput structure.

Attributes

configuration class-attribute instance-attribute
configuration: bytes | None = ...

The data of the configuration. This may be empty if the client already has the latest version of configuration.

content_type class-attribute instance-attribute
content_type: str | None = ...

A standard MIME type describing the format of the configuration content.

next_poll_configuration_token class-attribute instance-attribute
next_poll_configuration_token: str | None = ...

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.

next_poll_interval_in_seconds class-attribute instance-attribute
next_poll_interval_in_seconds: int = ...

The amount of time the client should wait before polling for configuration updates again. Use RequiredMinimumPollIntervalInSeconds to set the desired poll interval.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

version_label class-attribute instance-attribute
version_label: str | None = ...

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.