aws ec2 modify-hosts
Modify the auto-placement setting of a Dedicated Host. AWS CLI reference
2 examples 6 options Its page in the AWS CLI reference
Examples
Example 1: To enable auto-placement for a Dedicated Host
The following modify-hosts example enables auto-placement for a Dedicated Host so that it accepts any untargeted instance launches that match its instance type configuration.
aws ec2 modify-hosts --host-ids h-06c2f189b4EXAMPLE --auto-placement onIdentify--host-idsThe IDs of the Dedicated Hosts to modify.--auto-placementSpecify whether to enable or disable auto-placement.Its output
{
"Successful": [
"h-06c2f189b4EXAMPLE"
],
"Unsuccessful": []
}For more information, see Modify the auto-placement setting for a Dedicated Host in the Amazon EC2 User Guide.
Example 2: To enable host recovery for a Dedicated Host
The following modify-hosts example enables host recovery for the specified Dedicated Host.
aws ec2 modify-hosts --host-ids h-06c2f189b4EXAMPLE --host-recovery onIdentify--host-idsThe IDs of the Dedicated Hosts to modify.--host-recoveryIndicates whether to enable or disable host recovery for the Dedicated Host.Its output
{
"Successful": [
"h-06c2f189b4EXAMPLE"
],
"Unsuccessful": []
}For more information, see Modify the auto-placement setting for a Dedicated Host in the Amazon EC2 User Guide.
Options
--auto-placementSpecify whether to enable or disable auto-placement.--host-idsThe IDs of the Dedicated Hosts to modify.--host-maintenanceIndicates whether to enable or disable host maintenance for the Dedicated Host.--host-recoveryIndicates whether to enable or disable host recovery for the Dedicated Host.--instance-familySpecifies the instance family to be supported by the Dedicated Host.--instance-typeSpecifies the instance type to be supported by the Dedicated Host.