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.
Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment.
Attempting to update both the release and configuration is not allowed and AWS Elastic
Beanstalk returns an InvalidParameterCombination
error.
When updating the configuration settings to a new template or individual settings,
a draft configuration is created and DescribeConfigurationSettings for this
environment returns two setting descriptions with different DeploymentStatus
values.
For .NET Core this operation is only available in asynchronous form. Please refer to UpdateEnvironmentAsync.
Namespace: Amazon.ElasticBeanstalk
Assembly: AWSSDK.ElasticBeanstalk.dll
Version: 3.x.y.z
public abstract UpdateEnvironmentResponse UpdateEnvironment( UpdateEnvironmentRequest request )
Container for the necessary parameters to execute the UpdateEnvironment service method.
Exception | Condition |
---|---|
InsufficientPrivilegesException | The specified account does not have sufficient privileges for one or more AWS services. |
TooManyBucketsException | The specified account has reached its limit of Amazon S3 buckets. |
The following operation updates an environment named "my-env" to version "v2" of the application to which it belongs:
var client = new AmazonElasticBeanstalkClient(); var response = client.UpdateEnvironment(new UpdateEnvironmentRequest { EnvironmentName = "my-env", VersionLabel = "v2" }); string applicationName = response.ApplicationName; string cname = response.CNAME; DateTime dateCreated = response.DateCreated; DateTime dateUpdated = response.DateUpdated; string endpointURL = response.EndpointURL; 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;
The following operation configures several options in the aws:elb:loadbalancer namespace:
var client = new AmazonElasticBeanstalkClient(); var response = client.UpdateEnvironment(new UpdateEnvironmentRequest { EnvironmentName = "my-env", OptionSettings = new List<ConfigurationOptionSetting> { new ConfigurationOptionSetting { Namespace = "aws:elb:healthcheck", OptionName = "Interval", Value = "15" }, new ConfigurationOptionSetting { Namespace = "aws:elb:healthcheck", OptionName = "Timeout", Value = "8" }, new ConfigurationOptionSetting { Namespace = "aws:elb:healthcheck", OptionName = "HealthyThreshold", Value = "2" }, new ConfigurationOptionSetting { Namespace = "aws:elb:healthcheck", OptionName = "UnhealthyThreshold", Value = "3" } } }); bool abortableOperationInProgress = response.AbortableOperationInProgress; string applicationName = response.ApplicationName; string cname = response.CNAME; DateTime dateCreated = response.DateCreated; DateTime dateUpdated = response.DateUpdated; string endpointURL = response.EndpointURL; 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 Framework:
Supported in: 4.5 and newer, 3.5