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 CreateHostedConfigurationVersionCommandProtected

Creates a new configuration in the AppConfig hosted configuration store.

Example

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

import { AppConfigClient, CreateHostedConfigurationVersionCommand } from "@aws-sdk/client-appconfig"; // ES Modules import
// const { AppConfigClient, CreateHostedConfigurationVersionCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import
const client = new AppConfigClient(config);
const input = { // CreateHostedConfigurationVersionRequest
ApplicationId: "STRING_VALUE", // required
ConfigurationProfileId: "STRING_VALUE", // required
Description: "STRING_VALUE",
Content: "BLOB_VALUE", // required
ContentType: "STRING_VALUE", // required
LatestVersionNumber: Number("int"),
VersionLabel: "STRING_VALUE",
};
const command = new CreateHostedConfigurationVersionCommand(input);
const response = await client.send(command);
// { // HostedConfigurationVersion
// ApplicationId: "STRING_VALUE",
// ConfigurationProfileId: "STRING_VALUE",
// VersionNumber: Number("int"),
// Description: "STRING_VALUE",
// Content: "BLOB_VALUE",
// ContentType: "STRING_VALUE",
// VersionLabel: "STRING_VALUE",
// };

Param

CreateHostedConfigurationVersionCommandInput

Returns

CreateHostedConfigurationVersionCommandOutput

See

Throws

BadRequestException (client fault)

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

Throws

ConflictException (client fault)

The request could not be processed because of conflict in the current state of the resource.

Throws

InternalServerException (server fault)

There was an internal failure in the AppConfig service.

Throws

PayloadTooLargeException (client fault)

The configuration size is too large.

Throws

ResourceNotFoundException (client fault)

The requested resource could not be found.

Throws

ServiceQuotaExceededException (client fault)

The number of hosted configuration versions exceeds the limit for the AppConfig hosted configuration store. Delete one or more versions and try again.

Throws

AppConfigServiceException

Base exception class for all service exceptions from AppConfig service.

Example

To create a hosted configuration version

// The following create-hosted-configuration-version example creates a new configuration in the AWS AppConfig configuration store.
const input = {
"ApplicationId": "339ohji",
"ConfigurationProfileId": "ur8hx2f",
"Content": "eyAiTmFtZSI6ICJFeGFtcGxlQXBwbGljYXRpb24iLCAiSWQiOiBFeGFtcGxlSUQsICJSYW5rIjogNyB9",
"ContentType": "text",
"LatestVersionNumber": 1
};
const command = new CreateHostedConfigurationVersionCommand(input);
const response = await client.send(command);
/* response ==
{
"ApplicationId": "339ohji",
"ConfigurationProfileId": "ur8hx2f",
"ContentType": "text",
"VersionNumber": 1
}
*/
// example id: to-create-a-hosted-configuration-version-1632265196980

Hierarchy

Constructors

Properties

Methods