- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateConfigurationTemplateCommand
Creates an AWS Elastic Beanstalk configuration template, associated with a specific Elastic Beanstalk application. You define application configuration settings in a configuration template. You can then use the configuration template to deploy different versions of the application with the same configuration settings.
Templates aren't associated with any environment. The EnvironmentName
response element is always null
.
Related Topics
-
DescribeConfigurationOptions
-
DescribeConfigurationSettings
-
ListAvailableSolutionStacks
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ElasticBeanstalkClient, CreateConfigurationTemplateCommand } from "@aws-sdk/client-elastic-beanstalk"; // ES Modules import
// const { ElasticBeanstalkClient, CreateConfigurationTemplateCommand } = require("@aws-sdk/client-elastic-beanstalk"); // CommonJS import
const client = new ElasticBeanstalkClient(config);
const input = { // CreateConfigurationTemplateMessage
ApplicationName: "STRING_VALUE", // required
TemplateName: "STRING_VALUE", // required
SolutionStackName: "STRING_VALUE",
PlatformArn: "STRING_VALUE",
SourceConfiguration: { // SourceConfiguration
ApplicationName: "STRING_VALUE",
TemplateName: "STRING_VALUE",
},
EnvironmentId: "STRING_VALUE",
Description: "STRING_VALUE",
OptionSettings: [ // ConfigurationOptionSettingsList
{ // ConfigurationOptionSetting
ResourceName: "STRING_VALUE",
Namespace: "STRING_VALUE",
OptionName: "STRING_VALUE",
Value: "STRING_VALUE",
},
],
Tags: [ // Tags
{ // Tag
Key: "STRING_VALUE",
Value: "STRING_VALUE",
},
],
};
const command = new CreateConfigurationTemplateCommand(input);
const response = await client.send(command);
// { // ConfigurationSettingsDescription
// SolutionStackName: "STRING_VALUE",
// PlatformArn: "STRING_VALUE",
// ApplicationName: "STRING_VALUE",
// TemplateName: "STRING_VALUE",
// Description: "STRING_VALUE",
// EnvironmentName: "STRING_VALUE",
// DeploymentStatus: "deployed" || "pending" || "failed",
// DateCreated: new Date("TIMESTAMP"),
// DateUpdated: new Date("TIMESTAMP"),
// OptionSettings: [ // ConfigurationOptionSettingsList
// { // ConfigurationOptionSetting
// ResourceName: "STRING_VALUE",
// Namespace: "STRING_VALUE",
// OptionName: "STRING_VALUE",
// Value: "STRING_VALUE",
// },
// ],
// };
Example Usage
CreateConfigurationTemplateCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ApplicationName Required | string | undefined | The name of the Elastic Beanstalk application to associate with this configuration template. |
TemplateName Required | string | undefined | The name of the configuration template. Constraint: This name must be unique per application. |
Description | string | undefined | An optional description for this configuration. |
EnvironmentId | string | undefined | The ID of an environment whose settings you want to use to create the configuration template. You must specify |
OptionSettings | ConfigurationOptionSetting[] | undefined | Option values for the Elastic Beanstalk configuration, such as the instance type. If specified, these values override the values obtained from the solution stack or the source configuration template. For a complete list of Elastic Beanstalk configuration options, see Option Values in the AWS Elastic Beanstalk Developer Guide. |
PlatformArn | string | undefined | The Amazon Resource Name (ARN) of the custom platform. For more information, see Custom Platforms in the AWS Elastic Beanstalk Developer Guide. If you specify |
SolutionStackName | string | undefined | The name of an Elastic Beanstalk solution stack (platform version) that this configuration uses. For example, You must specify Use the |
SourceConfiguration | SourceConfiguration | undefined | An Elastic Beanstalk configuration template to base this one on. If specified, Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration. Values specified in You must specify Constraint: If both solution stack name and source configuration are specified, the solution stack of the source configuration template must match the specified solution stack name. |
Tags | Tag[] | undefined | Specifies the tags applied to the configuration template. |
CreateConfigurationTemplateCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ApplicationName | string | undefined | The name of the application associated with this configuration set. |
DateCreated | Date | undefined | The date (in UTC time) when this configuration set was created. |
DateUpdated | Date | undefined | The date (in UTC time) when this configuration set was last modified. |
DeploymentStatus | ConfigurationDeploymentStatus | undefined | If this configuration set is associated with an environment, the
|
Description | string | undefined | Describes this configuration set. |
EnvironmentName | string | undefined | If not |
OptionSettings | ConfigurationOptionSetting[] | undefined | A list of the configuration options and their values in this configuration set. |
PlatformArn | string | undefined | The ARN of the platform version. |
SolutionStackName | string | undefined | The name of the solution stack this configuration set uses. |
TemplateName | string | undefined | If not |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InsufficientPrivilegesException | client | The specified account does not have sufficient privileges for one or more AWS services. |
TooManyBucketsException | client | The specified account has reached its limit of Amazon S3 buckets. |
TooManyConfigurationTemplatesException | client | The specified account has reached its limit of configuration templates. |
ElasticBeanstalkServiceException | Base exception class for all service exceptions from ElasticBeanstalk service. |