aws_sdk_m2/client/
update_environment.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`UpdateEnvironment`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`environment_id(impl Into<String>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::environment_id) / [`set_environment_id(Option<String>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_environment_id):<br>required: **true**<br><p>The unique identifier of the runtime environment that you want to update.</p><br>
7    ///   - [`desired_capacity(i32)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::desired_capacity) / [`set_desired_capacity(Option<i32>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_desired_capacity):<br>required: **false**<br><p>The desired capacity for the runtime environment to update. The minimum possible value is 0 and the maximum is 100.</p><br>
8    ///   - [`instance_type(impl Into<String>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::instance_type) / [`set_instance_type(Option<String>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_instance_type):<br>required: **false**<br><p>The instance type for the runtime environment to update.</p><br>
9    ///   - [`engine_version(impl Into<String>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::engine_version) / [`set_engine_version(Option<String>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_engine_version):<br>required: **false**<br><p>The version of the runtime engine for the runtime environment.</p><br>
10    ///   - [`preferred_maintenance_window(impl Into<String>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::preferred_maintenance_window) / [`set_preferred_maintenance_window(Option<String>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_preferred_maintenance_window):<br>required: **false**<br><p>Configures the maintenance window that you want for the runtime environment. The maintenance window must have the format <code>ddd:hh24:mi-ddd:hh24:mi</code> and must be less than 24 hours. The following two examples are valid maintenance windows: <code>sun:23:45-mon:00:15</code> or <code>sat:01:00-sat:03:00</code>.</p> <p>If you do not provide a value, a random system-generated value will be assigned.</p><br>
11    ///   - [`apply_during_maintenance_window(bool)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::apply_during_maintenance_window) / [`set_apply_during_maintenance_window(Option<bool>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_apply_during_maintenance_window):<br>required: **false**<br><p>Indicates whether to update the runtime environment during the maintenance window. The default is false. Currently, Amazon Web Services Mainframe Modernization accepts the <code>engineVersion</code> parameter only if <code>applyDuringMaintenanceWindow</code> is true. If any parameter other than <code>engineVersion</code> is provided in <code>UpdateEnvironmentRequest</code>, it will fail if <code>applyDuringMaintenanceWindow</code> is set to true.</p><br>
12    ///   - [`force_update(bool)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::force_update) / [`set_force_update(Option<bool>)`](crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::set_force_update):<br>required: **false**<br><p>Forces the updates on the environment. This option is needed if the applications in the environment are not stopped or if there are ongoing application-related activities in the environment.</p> <p>If you use this option, be aware that it could lead to data corruption in the applications, and that you might need to perform repair and recovery procedures for the applications.</p> <p>This option is not needed if the attribute being updated is <code>preferredMaintenanceWindow</code>.</p><br>
13    /// - On success, responds with [`UpdateEnvironmentOutput`](crate::operation::update_environment::UpdateEnvironmentOutput) with field(s):
14    ///   - [`environment_id(String)`](crate::operation::update_environment::UpdateEnvironmentOutput::environment_id): <p>The unique identifier of the runtime environment that was updated.</p>
15    /// - On failure, responds with [`SdkError<UpdateEnvironmentError>`](crate::operation::update_environment::UpdateEnvironmentError)
16    pub fn update_environment(&self) -> crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder {
17        crate::operation::update_environment::builders::UpdateEnvironmentFluentBuilder::new(self.handle.clone())
18    }
19}