Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class GetConfigurationCommandProtected

Deprecated

(Deprecated) Retrieves the latest deployed configuration.

Note the following important information.

Example

Use a bare-bones client and the command you need to make an API call.

import { AppConfigClient, GetConfigurationCommand } from "@aws-sdk/client-appconfig"; // ES Modules import
// const { AppConfigClient, GetConfigurationCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import
const client = new AppConfigClient(config);
const input = { // GetConfigurationRequest
Application: "STRING_VALUE", // required
Environment: "STRING_VALUE", // required
Configuration: "STRING_VALUE", // required
ClientId: "STRING_VALUE", // required
ClientConfigurationVersion: "STRING_VALUE",
};
const command = new GetConfigurationCommand(input);
const response = await client.send(command);
// { // Configuration
// Content: "BLOB_VALUE",
// ConfigurationVersion: "STRING_VALUE",
// ContentType: "STRING_VALUE",
// };

Param

GetConfigurationCommandInput

Returns

GetConfigurationCommandOutput

See

Throws

BadRequestException (client fault)

The input fails to satisfy the constraints specified by an Amazon Web Services service.

Throws

InternalServerException (server fault)

There was an internal failure in the AppConfig service.

Throws

ResourceNotFoundException (client fault)

The requested resource could not be found.

Throws

AppConfigServiceException

Base exception class for all service exceptions from AppConfig service.

Example

To retrieve configuration details

// The following get-configuration example returns the configuration details of the example application. On subsequent calls to get-configuration, use the client-configuration-version parameter to only update the configuration of your application if the version has changed. Only updating the configuration when the version has changed avoids excess charges incurred by calling get-configuration.
const input = {
"Application": "example-application",
"ClientId": "example-id",
"Configuration": "Example-Configuration-Profile",
"Environment": "Example-Environment"
};
const command = new GetConfigurationCommand(input);
const response = await client.send(command);
/* response ==
{
"ConfigurationVersion": "1",
"ContentType": "application/octet-stream"
}
*/
// example id: to-retrieve-configuration-details-1632265954314

Hierarchy

Constructors

Properties

Methods