AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the CreateEnvironment operation. Launches an AWS Elastic Beanstalk environment for the specified application using the specified configuration.
Namespace: Amazon.ElasticBeanstalk.Model
Assembly: AWSSDK.ElasticBeanstalk.dll
Version: 3.x.y.z
public class CreateEnvironmentRequest : AmazonElasticBeanstalkRequest IAmazonWebServiceRequest
The CreateEnvironmentRequest type exposes the following members
Name | Description | |
---|---|---|
CreateEnvironmentRequest() |
Empty constructor used to set properties independently even when a simple constructor is available |
|
CreateEnvironmentRequest(string, string) |
Instantiates CreateEnvironmentRequest with the parameterized properties |
Name | Type | Description | |
---|---|---|---|
ApplicationName | System.String |
Gets and sets the property ApplicationName. The name of the application that is associated with this environment. |
|
CNAMEPrefix | System.String |
Gets and sets the property CNAMEPrefix. If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name. |
|
Description | System.String |
Gets and sets the property Description. Your description for this environment. |
|
EnvironmentName | System.String |
Gets and sets the property EnvironmentName. A unique name for the environment.
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 the specified name already exists in the region,
Elastic Beanstalk returns an
If you don't specify the |
|
GroupName | System.String |
Gets and sets the property GroupName. The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name parameter. See Environment Manifest (env.yaml) for details. |
|
OperationsRole | System.String |
Gets and sets the property OperationsRole.
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 |
|
OptionSettings | System.Collections.Generic.List<Amazon.ElasticBeanstalk.Model.ConfigurationOptionSetting> |
Gets and sets the property OptionSettings. If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template. |
|
OptionsToRemove | System.Collections.Generic.List<Amazon.ElasticBeanstalk.Model.OptionSpecification> |
Gets and sets the property OptionsToRemove. A list of custom user-defined configuration options to remove from the configuration set for this new environment. |
|
PlatformArn | System.String |
Gets and sets the property PlatformArn. The Amazon Resource Name (ARN) of the custom platform to use with the environment. For more information, see Custom Platforms in the AWS Elastic Beanstalk Developer Guide.
If you specify |
|
SolutionStackName | System.String |
Gets and sets the property SolutionStackName. The name of an Elastic Beanstalk solution stack (platform version) to use with the environment. 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 |
|
Tags | System.Collections.Generic.List<Amazon.ElasticBeanstalk.Model.Tag> |
Gets and sets the property Tags. Specifies the tags applied to resources in the environment. |
|
TemplateName | System.String |
Gets and sets the property TemplateName. The name of the Elastic Beanstalk configuration template to use with the environment.
If you specify |
|
Tier | Amazon.ElasticBeanstalk.Model.EnvironmentTier |
Gets and sets the property Tier. Specifies the tier to use in creating this environment. 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. |
|
VersionLabel | System.String |
Gets and sets the property VersionLabel. The name of the application version to deploy. Default: If not specified, Elastic Beanstalk attempts to deploy the sample application. |
The following operation creates a new environment for version v1 of a java application named my-app:
var client = new AmazonElasticBeanstalkClient(); var response = client.CreateEnvironment(new CreateEnvironmentRequest { ApplicationName = "my-app", CNAMEPrefix = "my-app", EnvironmentName = "my-env", SolutionStackName = "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8", VersionLabel = "v1" }); string applicationName = response.ApplicationName; string cname = response.CNAME; DateTime dateCreated = response.DateCreated; DateTime dateUpdated = response.DateUpdated; string environmentId = response.EnvironmentId; string environmentName = response.EnvironmentName; string health = response.Health; string solutionStackName = response.SolutionStackName; string status = response.Status; EnvironmentTier tier = response.Tier; string versionLabel = response.VersionLabel;
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5