@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.021Z") @Stability(value=Stable) public class CfnEnvironment extends CfnResource implements IInspectable
Specify an AWS Elastic Beanstalk environment by using the AWS::ElasticBeanstalk::Environment resource in an AWS CloudFormation template.
The AWS::ElasticBeanstalk::Environment resource is an AWS Elastic Beanstalk resource type that specifies an Elastic Beanstalk environment.
Example:
// 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.*;
CfnEnvironment cfnEnvironment = CfnEnvironment.Builder.create(this, "MyCfnEnvironment")
.applicationName("applicationName")
// the properties below are optional
.cnamePrefix("cnamePrefix")
.description("description")
.environmentName("environmentName")
.operationsRole("operationsRole")
.optionSettings(List.of(OptionSettingProperty.builder()
.namespace("namespace")
.optionName("optionName")
// the properties below are optional
.resourceName("resourceName")
.value("value")
.build()))
.platformArn("platformArn")
.solutionStackName("solutionStackName")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.templateName("templateName")
.tier(TierProperty.builder()
.name("name")
.type("type")
.version("version")
.build())
.versionLabel("versionLabel")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnEnvironment.Builder
A fluent builder for
CfnEnvironment. |
static interface |
CfnEnvironment.OptionSettingProperty
Use the `OptionSetting` property type to specify an option for an AWS Elastic Beanstalk environment when defining an AWS::ElasticBeanstalk::Environment resource in an AWS CloudFormation template.
|
static interface |
CfnEnvironment.TierProperty
Use the `Tier` property type to specify the environment tier for an AWS Elastic Beanstalk environment when defining an AWS::ElasticBeanstalk::Environment resource in an AWS CloudFormation template.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnEnvironment(software.constructs.Construct scope,
String id,
CfnEnvironmentProps props)
Create a new `AWS::ElasticBeanstalk::Environment`.
|
protected |
CfnEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getApplicationName()
The name of the application that is associated with this environment.
|
String |
getAttrEndpointUrl()
For load-balanced, autoscaling environments, the URL to the load balancer.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getCnamePrefix()
If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL.
|
String |
getDescription()
Your description for this environment.
|
String |
getEnvironmentName()
A unique name for the environment.
|
String |
getOperationsRole()
> The operations role feature of AWS Elastic Beanstalk is in beta release and is subject to change.
|
Object |
getOptionSettings()
Key-value pairs defining configuration options for this environment, such as the instance type.
|
String |
getPlatformArn()
The Amazon Resource Name (ARN) of the custom platform to use with the environment.
|
String |
getSolutionStackName()
The name of an Elastic Beanstalk solution stack (platform version) to use with the environment.
|
TagManager |
getTags()
Specifies the tags applied to resources in the environment.
|
String |
getTemplateName()
The name of the Elastic Beanstalk configuration template to use with the environment.
|
Object |
getTier()
Specifies the tier to use in creating this environment.
|
String |
getVersionLabel()
The name of the application version to deploy.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setApplicationName(String value)
The name of the application that is associated with this environment.
|
void |
setCnamePrefix(String value)
If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL.
|
void |
setDescription(String value)
Your description for this environment.
|
void |
setEnvironmentName(String value)
A unique name for the environment.
|
void |
setOperationsRole(String value)
> The operations role feature of AWS Elastic Beanstalk is in beta release and is subject to change.
|
void |
setOptionSettings(IResolvable value)
Key-value pairs defining configuration options for this environment, such as the instance type.
|
void |
setOptionSettings(List<Object> value)
Key-value pairs defining configuration options for this environment, such as the instance type.
|
void |
setPlatformArn(String value)
The Amazon Resource Name (ARN) of the custom platform to use with the environment.
|
void |
setSolutionStackName(String value)
The name of an Elastic Beanstalk solution stack (platform version) to use with the environment.
|
void |
setTemplateName(String value)
The name of the Elastic Beanstalk configuration template to use with the environment.
|
void |
setTier(CfnEnvironment.TierProperty value)
Specifies the tier to use in creating this environment.
|
void |
setTier(IResolvable value)
Specifies the tier to use in creating this environment.
|
void |
setVersionLabel(String value)
The name of the application version to deploy.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnEnvironment(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnEnvironmentProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrEndpointUrl()
Example load balancer URL:
Example instance IP address:
192.0.2.0
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getApplicationName()
@Stability(value=Stable)
public void setApplicationName(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getCnamePrefix()
If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
@Stability(value=Stable)
public void setCnamePrefix(@Nullable
String value)
If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getEnvironmentName()
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.
@Stability(value=Stable)
public void setEnvironmentName(@Nullable
String value)
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.
@Stability(value=Stable) @Nullable public String getOperationsRole()
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.
@Stability(value=Stable)
public void setOperationsRole(@Nullable
String value)
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.
@Stability(value=Stable) @Nullable public Object getOptionSettings()
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.
@Stability(value=Stable)
public void setOptionSettings(@Nullable
IResolvable value)
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.
@Stability(value=Stable)
public void setOptionSettings(@Nullable
List<Object> value)
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.
@Stability(value=Stable) @Nullable public String getPlatformArn()
For more information, see Custom Platforms in the AWS Elastic Beanstalk Developer Guide .
If you specify
PlatformArn, don't specifySolutionStackName.
@Stability(value=Stable)
public void setPlatformArn(@Nullable
String value)
For more information, see Custom Platforms in the AWS Elastic Beanstalk Developer Guide .
If you specify
PlatformArn, don't specifySolutionStackName.
@Stability(value=Stable) @Nullable public String getSolutionStackName()
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.
@Stability(value=Stable)
public void setSolutionStackName(@Nullable
String value)
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.
@Stability(value=Stable) @Nullable public String getTemplateName()
If you specify
TemplateName, then don't specifySolutionStackName.
@Stability(value=Stable)
public void setTemplateName(@Nullable
String value)
If you specify
TemplateName, then don't specifySolutionStackName.
@Stability(value=Stable) @Nullable public Object getTier()
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.
@Stability(value=Stable)
public void setTier(@Nullable
CfnEnvironment.TierProperty value)
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.
@Stability(value=Stable)
public void setTier(@Nullable
IResolvable value)
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.
@Stability(value=Stable) @Nullable public String getVersionLabel()
Default: If not specified, Elastic Beanstalk attempts to deploy the sample application.
@Stability(value=Stable)
public void setVersionLabel(@Nullable
String value)
Default: If not specified, Elastic Beanstalk attempts to deploy the sample application.
Copyright © 2022. All rights reserved.