CfnEnvironmentProps Struct
Properties for defining a CfnEnvironment.
Example
// 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 cfnEnvironmentProps: elasticbeanstalk.CfnEnvironmentProps = {
applicationName: 'applicationName',
// the properties below are optional
cnamePrefix: 'cnamePrefix',
description: 'description',
environmentName: 'environmentName',
operationsRole: 'operationsRole',
optionSettings: [{
namespace: 'namespace',
optionName: 'optionName',
// the properties below are optional
resourceName: 'resourceName',
value: 'value',
}],
platformArn: 'platformArn',
solutionStackName: 'solutionStackName',
tags: [{
key: 'key',
value: 'value',
}],
templateName: 'templateName',
tier: {
name: 'name',
type: 'type',
version: 'version',
},
versionLabel: 'versionLabel',
};
Properties
applicationNamestring | IApplicationRefapplication_nametyping.Union[str, IApplicationRef]applicationNameStringApplicationNamestringApplicationNameinterface{}required#cnamePrefixoptionalstringcname_prefixoptionalstrcnamePrefixoptionalStringCnamePrefixoptionalstringCnamePrefixoptional*string#If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#environmentNameoptionalstringenvironment_nameoptionalstrenvironmentNameoptionalStringEnvironmentNameoptionalstringEnvironmentNameoptional*string#notes
Constraint: Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It can't start or end with a hyphen. This name must be unique within a region in your account.
If you don't specify the CNAMEPrefix parameter, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.
If you don't specify an environment name, AWS CloudFormation generates a unique physical ID and uses that ID for the environment name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
operationsRoleoptionalstringoperations_roleoptionalstroperationsRoleoptionalStringOperationsRoleoptionalstringOperationsRoleoptional*string#notes
The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role. If specified, Elastic Beanstalk uses the operations role for permissions to downstream services during this call and during subsequent calls acting on this environment. To specify an operations role, you must have the iam:PassRole permission for the role.
optionSettingsoptionalIResolvable | IResolvable | CfnEnvironment.OptionSettingProperty[]option_settingsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, OptionSettingProperty]]]optionSettingsoptionalIResolvableOptionSettingsoptionalIResolvableOptionSettingsoptionalinterface{}#notes
These options override the values that are defined in the solution stack or the configuration template . If you remove any options during a stack update, the removed options retain their current values.
platformArnoptionalstringplatform_arnoptionalstrplatformArnoptionalStringPlatformArnoptionalstringPlatformArnoptional*string#notes
For more information, see Custom Platforms in the AWS Elastic Beanstalk Developer Guide .
If you specify
PlatformArn, don't specifySolutionStackName.
solutionStackNameoptionalstringsolution_stack_nameoptionalstrsolutionStackNameoptionalStringSolutionStackNameoptionalstringSolutionStackNameoptional*string#notes
If specified, Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack. For a list of current solution stacks, see Elastic Beanstalk Supported Platforms in the AWS Elastic Beanstalk Platforms guide.
If you specify
SolutionStackName, don't specifyPlatformArnorTemplateName.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#templateNameoptionalstring | IConfigurationTemplateReftemplate_nameoptionaltyping.Union[str, IConfigurationTemplateRef]templateNameoptionalStringTemplateNameoptionalstringTemplateNameoptionalinterface{}#If you specify
TemplateName, then don't specifySolutionStackName.
tieroptionalIResolvable | CfnEnvironment.TierPropertytieroptionaltyping.Union[IResolvable, TierProperty]tieroptionalIResolvableTieroptionalIResolvableTieroptionalinterface{}#The environment tier that you choose determines whether Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks.
versionLabeloptionalstringversion_labeloptionalstrversionLabeloptionalStringVersionLabeloptionalstringVersionLabeloptional*string#Default: If not specified, Elastic Beanstalk attempts to deploy the sample application.