GetLatestConfiguration - AWS AppConfig

GetLatestConfiguration

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 AWS CLI commands that show how to use it with the StartConfigurationSession API action, see Retrieving the configuration in the AWS AppConfig User Guide.

Important

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.

Request Syntax

GET /configuration?configuration_token=ConfigurationToken HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

ConfigurationToken

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.

Important

This token expires after 24 hours. If a GetLatestConfiguration call uses an expired token, the system returns BadRequestException.

Pattern: \S{1,8192}

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Next-Poll-Configuration-Token: NextPollConfigurationToken Next-Poll-Interval-In-Seconds: NextPollIntervalInSeconds Content-Type: ContentType Configuration

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

ContentType

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

NextPollConfigurationToken

The latest token describing the current state of the configuration session. This must be provided to the next call to GetLatestConfiguration.

Important

This token expires after 24 hours. If a GetLatestConfiguration call uses an expired token, the system returns BadRequestException.

Pattern: \S{1,8192}

NextPollIntervalInSeconds

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

The response returns the following as the HTTP body.

Configuration

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

Errors

For information about the errors that are common to all actions, see Common Errors.

BadRequestException

The input fails to satisfy the constraints specified by the service.

HTTP Status Code: 400

InternalServerException

There was an internal failure in the service.

HTTP Status Code: 500

ResourceNotFoundException

The requested resource could not be found.

HTTP Status Code: 404

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

Examples

Example

This example illustrates one usage of GetLatestConfiguration.

Sample Request

GET /configuration?configuration_token=AYADeNgfsRxdKiJ37A12OZ9vN2cAXwABABVhd3MtY3J5cHRvLXB1YmxpYy1rZXkAREF1RzlLMTg1Tkx2Wjk4OGV2UXkyQ1UxV2ZxaGJTdkt2MkprKzJ4TlY2VkM0ZDVoRzBvbXFBTnFHcXpXcjU0dUM3Zz09AAEAB2F3cy1rbXMAS2Fybjphd3M6a21zOnVzLXdlc3QtMTo4MzIyNzQ3ODA3Mzc6a2V5LzA4MGYxYWI3LTNjNmYtNGE1Yi04ZTg2LWE2MjdmNWJiMmRlMQC4AQIBAHiWVBJIpqEFGgjvLHxtJImRmyljpZnxt7FfxeEOE5H8xQF1SfOlWZFnHujbzJmIvNeSAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM0iTa25yw3uwnO6%2BrAgEQgDvLYYILWH%2Fx3SKKgyW1nOeBtS6go21vVPA6b8%2FwoFpxhzwjxy80jOfkVC2lM2l626BnJCvSPFfuZvcz%2FQIAAAAADAAAEAAAAAAAAAAAAAAAAADpQpWKSwnomgzEkYmidGKJ%2F%2F%2F%2F%2FwAAAAEAAAAAAAAAAAAAAAEAAAD8yfxkWB0geYfyI%2BDNJGiryebhmEoi8S8UHZSNN5JjJzTN2iORkjrA3DVvnhBTfoPh7o5bl4jwSYa%2F6as%2BmuQ9ntjYwymTZu7inYhsICYUKEDFxonBFJaEC32jEfg%2FMbPaGLOhNHdISiPAlMlOYmsw7phgl6ldbs9qrKVLlk1WNO3XTJiXyaWY4ANMfAX2JgMbGvNNY3HbfUneDGOENg6IfwKDykELIrJ6feE0JyKOV7mXfp%2F0r2pNiW9d6q%2BWDD1w4T87gCxgUGEPB%2FJ7JG3RhpGvECUmgKA0T06MjA7kWdt2IofDaLzRppFGpgLoPmxpM4qHz%2Fw6dMDmeXybKNZP84UP12zsJtUMhuspEQBnMGUCMQD8ssc6G8e6u8nov1ZdgF4m1ad3qyjiFd9DNRZHgLRFpw7%2BQIO%2FRB1l%2FIExP2ftUlkCMBT9oNlClJg4l9uGW5%2FqAiJ5n9ivK0ElRMwpvx96damGxt125XtMkmYf6a0OWSqnBw%3D%3D HTTP/1.1 Host: appconfigdata.us-west-1.amazonaws.com Accept-Encoding: identity User-Agent: aws-cli/2.4.15 Python/3.8.8 Windows/10 exe/AMD64 prompt/off command/appconfigdata.get-latest-configuration X-Amz-Date: 20220218T190734Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20220218/us-west-1/appconfig/aws4_request, SignedHeaders=host;x-amz-date, Signature=39c3b3042cd2aEXAMPLE

Sample Response

{ "betaGroup": { "enabled": true } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: