Skip to content

EC2  >  Operations  >  modify_instance_maintenance_options

modify_instance_maintenance_options

Operation

modify_instance_maintenance_options async

modify_instance_maintenance_options(input: ModifyInstanceMaintenanceOptionsInput, plugins: list[Plugin] | None = None) -> ModifyInstanceMaintenanceOptionsOutput

Modifies the recovery behavior of your instance to disable simplified automatic recovery or set the recovery behavior to default. The default configuration will not enable simplified automatic recovery for an unsupported instance type. For more information, see Simplified automatic recovery.

Modifies the reboot migration behavior during a user-initiated reboot of an instance that has a pending system-reboot event. For more information, see Enable or disable reboot migration.

Parameters:

Name Type Description Default
input ModifyInstanceMaintenanceOptionsInput

An instance of ModifyInstanceMaintenanceOptionsInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ModifyInstanceMaintenanceOptionsOutput

An instance of ModifyInstanceMaintenanceOptionsOutput.

Input

ModifyInstanceMaintenanceOptionsInput dataclass

Bases: _SerdeShape

Dataclass for ModifyInstanceMaintenanceOptionsInput structure.

Attributes

auto_recovery class-attribute instance-attribute
auto_recovery: str | None = ...

Disables the automatic recovery behavior of your instance or sets it to default.

dry_run class-attribute instance-attribute
dry_run: bool | None = ...

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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

instance_id class-attribute instance-attribute
instance_id: str | None = ...

The ID of the instance.

reboot_migration class-attribute instance-attribute
reboot_migration: str | None = ...

Specifies whether to attempt reboot migration during a user-initiated reboot of an instance that has a scheduled system-reboot event:

  • default - Amazon EC2 attempts to migrate the instance to new hardware (reboot migration). If successful, the system-reboot event is cleared. If unsuccessful, an in-place reboot occurs and the event remains scheduled.

  • disabled - Amazon EC2 keeps the instance on the same hardware (in-place reboot). The system-reboot event remains scheduled.

This setting only applies to supported instances that have a scheduled reboot event. For more information, see Enable or disable reboot migration in the Amazon EC2 User Guide.

Output

ModifyInstanceMaintenanceOptionsOutput dataclass

Bases: _SerdeShape

Dataclass for ModifyInstanceMaintenanceOptionsOutput structure.

Attributes

auto_recovery class-attribute instance-attribute
auto_recovery: str | None = ...

Provides information on the current automatic recovery behavior of your instance.

instance_id class-attribute instance-attribute
instance_id: str | None = ...

The ID of the instance.

reboot_migration class-attribute instance-attribute
reboot_migration: str | None = ...

Specifies whether to attempt reboot migration during a user-initiated reboot of an instance that has a scheduled system-reboot event:

  • default - Amazon EC2 attempts to migrate the instance to new hardware (reboot migration). If successful, the system-reboot event is cleared. If unsuccessful, an in-place reboot occurs and the event remains scheduled.

  • disabled - Amazon EC2 keeps the instance on the same hardware (in-place reboot). The system-reboot event remains scheduled.

This setting only applies to supported instances that have a scheduled reboot event. For more information, see Enable or disable reboot migration in the Amazon EC2 User Guide.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.