aws_sdk_ec2/client/
modify_instance_maintenance_options.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 [`ModifyInstanceMaintenanceOptions`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`instance_id(impl Into<String>)`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::set_instance_id):<br>required: **true**<br><p>The ID of the instance.</p><br>
7    ///   - [`auto_recovery(InstanceAutoRecoveryState)`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::auto_recovery) / [`set_auto_recovery(Option<InstanceAutoRecoveryState>)`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::set_auto_recovery):<br>required: **false**<br><p>Disables the automatic recovery behavior of your instance or sets it to default.</p><br>
8    ///   - [`reboot_migration(InstanceRebootMigrationState)`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::reboot_migration) / [`set_reboot_migration(Option<InstanceRebootMigrationState>)`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::set_reboot_migration):<br>required: **false**<br><p>Specifies whether to attempt reboot migration during a user-initiated reboot of an instance that has a scheduled <code>system-reboot</code> event:</p> <ul>  <li>   <p><code>default</code> - Amazon EC2 attempts to migrate the instance to new hardware (reboot migration). If successful, the <code>system-reboot</code> event is cleared. If unsuccessful, an in-place reboot occurs and the event remains scheduled.</p></li>  <li>   <p><code>disabled</code> - Amazon EC2 keeps the instance on the same hardware (in-place reboot). The <code>system-reboot</code> event remains scheduled.</p></li> </ul> <p>This setting only applies to supported instances that have a scheduled reboot event. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/schedevents_actions_reboot.html#reboot-migration">Enable or disable reboot migration</a> in the <i>Amazon EC2 User Guide</i>.</p><br>
9    ///   - [`dry_run(bool)`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
10    /// - On success, responds with [`ModifyInstanceMaintenanceOptionsOutput`](crate::operation::modify_instance_maintenance_options::ModifyInstanceMaintenanceOptionsOutput) with field(s):
11    ///   - [`instance_id(Option<String>)`](crate::operation::modify_instance_maintenance_options::ModifyInstanceMaintenanceOptionsOutput::instance_id): <p>The ID of the instance.</p>
12    ///   - [`auto_recovery(Option<InstanceAutoRecoveryState>)`](crate::operation::modify_instance_maintenance_options::ModifyInstanceMaintenanceOptionsOutput::auto_recovery): <p>Provides information on the current automatic recovery behavior of your instance.</p>
13    ///   - [`reboot_migration(Option<InstanceRebootMigrationState>)`](crate::operation::modify_instance_maintenance_options::ModifyInstanceMaintenanceOptionsOutput::reboot_migration): <p>Specifies whether to attempt reboot migration during a user-initiated reboot of an instance that has a scheduled <code>system-reboot</code> event:</p> <ul>  <li>   <p><code>default</code> - Amazon EC2 attempts to migrate the instance to new hardware (reboot migration). If successful, the <code>system-reboot</code> event is cleared. If unsuccessful, an in-place reboot occurs and the event remains scheduled.</p></li>  <li>   <p><code>disabled</code> - Amazon EC2 keeps the instance on the same hardware (in-place reboot). The <code>system-reboot</code> event remains scheduled.</p></li> </ul> <p>This setting only applies to supported instances that have a scheduled reboot event. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/schedevents_actions_reboot.html#reboot-migration">Enable or disable reboot migration</a> in the <i>Amazon EC2 User Guide</i>.</p>
14    /// - On failure, responds with [`SdkError<ModifyInstanceMaintenanceOptionsError>`](crate::operation::modify_instance_maintenance_options::ModifyInstanceMaintenanceOptionsError)
15    pub fn modify_instance_maintenance_options(
16        &self,
17    ) -> crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder {
18        crate::operation::modify_instance_maintenance_options::builders::ModifyInstanceMaintenanceOptionsFluentBuilder::new(self.handle.clone())
19    }
20}