The following code examples show how to use ReleaseHosts
.
- AWS CLI
-
To release a Dedicated host from your account
To release a Dedicated host from your account. Instances that are on the host must be stopped or terminated before the host can be released.
Command:
aws ec2 release-hosts --host-id=h-0029d6e3cacf1b3da
Output:
{ "Successful": [ "h-0029d6e3cacf1b3da" ], "Unsuccessful": [] }
-
For API details, see ReleaseHosts
in AWS CLI Command Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Create Amazon EC2 resources using an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.