modify_hosts¶
Operation¶
modify_hosts
async
¶
modify_hosts(input: ModifyHostsInput, plugins: list[Plugin] | None = None) -> ModifyHostsOutput
Modify the auto-placement setting of a Dedicated Host. When
auto-placement is enabled, any instances that you launch with a tenancy
of host but without a specific host ID are placed onto any available
Dedicated Host in your account that has auto-placement enabled. When
auto-placement is disabled, you need to provide a host ID to have the
instance launch onto a specific host. If no host ID is provided, the
instance is launched onto a suitable host with auto-placement enabled.
You can also use this API action to modify a Dedicated Host to support either multiple instance types in an instance family, or to support a specific instance type only.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
ModifyHostsInput
|
An instance of |
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 |
|---|---|
ModifyHostsOutput
|
An instance of |
Input¶
ModifyHostsInput
dataclass
¶
Bases: _SerdeShape
Dataclass for ModifyHostsInput structure.
Attributes¶
auto_placement
class-attribute
instance-attribute
¶
auto_placement: str | None = ...
Specify whether to enable or disable auto-placement.
host_ids
class-attribute
instance-attribute
¶
The IDs of the Dedicated Hosts to modify.
host_maintenance
class-attribute
instance-attribute
¶
host_maintenance: str | None = ...
Indicates whether to enable or disable host maintenance for the Dedicated Host. For more information, see Host maintenance in the Amazon EC2 User Guide.
host_recovery
class-attribute
instance-attribute
¶
host_recovery: str | None = ...
Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host recovery in the Amazon EC2 User Guide.
instance_family
class-attribute
instance-attribute
¶
instance_family: str | None = ...
Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.
If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.
instance_type
class-attribute
instance-attribute
¶
instance_type: str | None = ...
Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.
If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.
Output¶
ModifyHostsOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for ModifyHostsOutput structure.
Attributes¶
response_metadata
class-attribute
instance-attribute
¶
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.
successful
class-attribute
instance-attribute
¶
The IDs of the Dedicated Hosts that were successfully modified.