update_environment
¶
update_environment(
*,
config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
application_name: Optional[ApplicationName] = None,
environment_id: Optional[EnvironmentId] = None,
environment_name: Optional[EnvironmentName] = None,
group_name: Optional[GroupName] = None,
description: Optional[Description] = None,
tier: Optional[EnvironmentTier] = None,
version_label: Optional[VersionLabel] = None,
template_name: Optional[ConfigurationTemplateName] = None,
solution_stack_name: Optional[SolutionStackName] = None,
platform_arn: Optional[PlatformArn] = None,
option_settings: Optional[ConfigurationOptionSettingsList] = None,
options_to_remove: Optional[OptionsSpecifierList] = None,
) -> EnvironmentDescription
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 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.
Parameters:
-
application_name(Optional[ApplicationName], default:None) –The name of the application with which the environment is associated.
-
environment_id(Optional[EnvironmentId], default:None) –The ID of the environment to update.
If no environment with this ID exists, Elastic Beanstalk returns an
InvalidParameterValueerror.Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, Elastic Beanstalk returns
MissingRequiredParametererror. -
environment_name(Optional[EnvironmentName], default:None) –The name of the environment to update. If no environment with this name exists, Elastic Beanstalk returns an
InvalidParameterValueerror.Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, Elastic Beanstalk returns
MissingRequiredParametererror. -
group_name(Optional[GroupName], default:None) –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 or environment ID parameters. See Environment Manifest (env.yaml) for details.
-
description(Optional[Description], default:None) –If this parameter is specified, Elastic Beanstalk updates the description of this environment.
-
tier(Optional[EnvironmentTier], default:None) –This specifies the tier to use to update the environment.
Condition: At this time, if you change the tier version, name, or type, Elastic Beanstalk returns
InvalidParameterValueerror. -
version_label(Optional[VersionLabel], default:None) –If this parameter is specified, Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an
InvalidParameterValueerror. -
template_name(Optional[ConfigurationTemplateName], default:None) –If this parameter is specified, Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, Elastic Beanstalk returns an
InvalidParameterValueerror. -
solution_stack_name(Optional[SolutionStackName], default:None) –This specifies the platform version that the environment will run after the environment is updated.
-
platform_arn(Optional[PlatformArn], default:None) –The ARN of the platform, if used.
-
option_settings(Optional[ConfigurationOptionSettingsList], default:None) –If specified, Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.
-
options_to_remove(Optional[OptionsSpecifierList], default:None) –A list of custom user-defined configuration options to remove from the configuration set for this environment.
Raises:
-
InsufficientPrivilegesException–The specified account does not have sufficient privileges for one or more Amazon Web Services services.
-
TooManyBucketsException–The specified account has reached its limit of Amazon S3 buckets.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To configure option settings The following operation configures several options in the aws:elb:loadbalancer namespace:
>>> client.update_environment(environment_name='my-env', option_settings=[{'Namespace': 'aws:elb:healthcheck', 'OptionName': 'Interval', 'Value': '15'}, {'Namespace': 'aws:elb:healthcheck', 'OptionName': 'Timeout', 'Value': '8'}, {'Namespace': 'aws:elb:healthcheck', 'OptionName': 'HealthyThreshold', 'Value': '2'}, {'Namespace': 'aws:elb:healthcheck', 'OptionName': 'UnhealthyThreshold', 'Value': '3'}])
To update an environment to a new version
The following operation updates an environment named "my-env" to version "v2" of the application to which it belongs:
Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 | |