# CfnConfigurationTemplateProps

Struct · External

Properties for defining a `CfnConfigurationTemplate`.

Used as props by: [CfnConfigurationTemplate](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticbeanstalk.CfnConfigurationTemplate.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticbeanstalk as elasticbeanstalk } from 'aws-cdk-lib';
const cfnConfigurationTemplateProps: elasticbeanstalk.CfnConfigurationTemplateProps = {
  applicationName: 'applicationName',

  // the properties below are optional
  description: 'description',
  environmentId: 'environmentId',
  optionSettings: [{
    namespace: 'namespace',
    optionName: 'optionName',

    // the properties below are optional
    resourceName: 'resourceName',
    value: 'value',
  }],
  platformArn: 'platformArn',
  solutionStackName: 'solutionStackName',
  sourceConfiguration: {
    applicationName: 'applicationName',
    templateName: 'templateName',
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticbeanstalk as elasticbeanstalk

cfn_configuration_template_props = elasticbeanstalk.CfnConfigurationTemplateProps(
    application_name="applicationName",

    # the properties below are optional
    description="description",
    environment_id="environmentId",
    option_settings=[elasticbeanstalk.CfnConfigurationTemplate.ConfigurationOptionSettingProperty(
        namespace="namespace",
        option_name="optionName",

        # the properties below are optional
        resource_name="resourceName",
        value="value"
    )],
    platform_arn="platformArn",
    solution_stack_name="solutionStackName",
    source_configuration=elasticbeanstalk.CfnConfigurationTemplate.SourceConfigurationProperty(
        application_name="applicationName",
        template_name="templateName"
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticbeanstalk.*;

CfnConfigurationTemplateProps cfnConfigurationTemplateProps = CfnConfigurationTemplateProps.builder()
        .applicationName("applicationName")

        // the properties below are optional
        .description("description")
        .environmentId("environmentId")
        .optionSettings(List.of(ConfigurationOptionSettingProperty.builder()
                .namespace("namespace")
                .optionName("optionName")

                // the properties below are optional
                .resourceName("resourceName")
                .value("value")
                .build()))
        .platformArn("platformArn")
        .solutionStackName("solutionStackName")
        .sourceConfiguration(SourceConfigurationProperty.builder()
                .applicationName("applicationName")
                .templateName("templateName")
                .build())
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElasticBeanstalk;

var cfnConfigurationTemplateProps = new CfnConfigurationTemplateProps {
    ApplicationName = "applicationName",

    // the properties below are optional
    Description = "description",
    EnvironmentId = "environmentId",
    OptionSettings = new [] { new ConfigurationOptionSettingProperty {
        Namespace = "namespace",
        OptionName = "optionName",

        // the properties below are optional
        ResourceName = "resourceName",
        Value = "value"
    } },
    PlatformArn = "platformArn",
    SolutionStackName = "solutionStackName",
    SourceConfiguration = new SourceConfigurationProperty {
        ApplicationName = "applicationName",
        TemplateName = "templateName"
    }
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnConfigurationTemplateProps := &CfnConfigurationTemplateProps{
	ApplicationName: jsii.String("applicationName"),

	// the properties below are optional
	Description: jsii.String("description"),
	EnvironmentId: jsii.String("environmentId"),
	OptionSettings: []interface{}{
		&ConfigurationOptionSettingProperty{
			Namespace: jsii.String("namespace"),
			OptionName: jsii.String("optionName"),

			// the properties below are optional
			ResourceName: jsii.String("resourceName"),
			Value: jsii.String("value"),
		},
	},
	PlatformArn: jsii.String("platformArn"),
	SolutionStackName: jsii.String("solutionStackName"),
	SourceConfiguration: &SourceConfigurationProperty{
		ApplicationName: jsii.String("applicationName"),
		TemplateName: jsii.String("templateName"),
	},
}
```

## Properties

- `applicationName`: string | [IApplicationRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_elasticbeanstalk.IApplicationRef.html) (required) — The name of the Elastic Beanstalk application to associate with this configuration template.

- `description`: string — An optional description for this configuration.

- `environmentId`: string — The ID of an environment whose settings you want to use to create the configuration template.

  You must specify `EnvironmentId` if you don't specify `PlatformArn` , `SolutionStackName` , or `SourceConfiguration` .

- `optionSettings`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigurationTemplate.ConfigurationOptionSettingProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticbeanstalk.CfnConfigurationTemplate.ConfigurationOptionSettingProperty.html)[] — 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](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html) in the *AWS Elastic Beanstalk Developer Guide* .

- `platformArn`: string — The Amazon Resource Name (ARN) of the custom platform.

  For more information, see [Custom Platforms](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html) in the *AWS Elastic Beanstalk Developer Guide* .

  > If you specify `PlatformArn` , then don't specify `SolutionStackName` .

- `solutionStackName`: string — The name of an Elastic Beanstalk solution stack (platform version) that this configuration uses.

  For example, `64bit Amazon Linux 2013.09 running Tomcat 7 Java 7` . A solution stack specifies the operating system, runtime, and application server for a configuration template. It also determines the set of configuration options as well as the possible and default values. For more information, see [Supported Platforms](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html) in the *AWS Elastic Beanstalk Developer Guide* .

  You must specify `SolutionStackName` if you don't specify `PlatformArn` , `EnvironmentId` , or `SourceConfiguration` .

  Use the [`ListAvailableSolutionStacks`](https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_ListAvailableSolutionStacks.html) API to obtain a list of available solution stacks.

- `sourceConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigurationTemplate.SourceConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticbeanstalk.CfnConfigurationTemplate.SourceConfigurationProperty.html) — 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 `OptionSettings` override any values obtained from the `SourceConfiguration` .

  You must specify `SourceConfiguration` if you don't specify `PlatformArn` , `EnvironmentId` , or `SolutionStackName` .

  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.
