Pay-as-you-go dedicated hosts are billed from the moment they are created until they are released or stopped due to overdue payment. Release any dedicated host you no longer need to stop charges.
Releasing a dedicated host also releases all Elastic Compute Service (ECS) instances running on it. Make sure you no longer need those instances before you proceed.
Limitations
Subscription dedicated hosts cannot be released before expiry. If you have a subscription dedicated host that you no longer need, submit a ticket to request a refund.
Release a dedicated host immediately
Use instant release to stop a pay-as-you-go dedicated host and all its ECS instances right away.
Log on to the ECS console.
In the left-side navigation pane, choose Instances & Images >
> Dedicated Hosts.In the top navigation bar, select the region and resource group of the dedicated host.

Select the dedicated host you want to release, move the pointer over
next to Renew, and then select Release from the drop-down list.In the Release dialog box, select Instant Release.

Click OK.
Schedule automatic release
Schedule automatic release for a dedicated host that becomes idle during off-peak hours so billing stops without manual intervention.
Log on to the ECS console.
In the left-side navigation pane, choose Instances & Images >
> Dedicated Hosts.In the top navigation bar, select the region and resource group of the dedicated host.

Select the dedicated host you want to release, move the pointer over
next to Renew, and then select Release from the drop-down list.In the Release dialog box, configure the parameters.

Parameter Description Release mode Select Scheduled Release. Auto-release Click
to toggle automatic release on or off.
enables automatic release;
disables it.Release date Specify the date on which to release the host. Defaults to the current date. Available only when Auto-release is enabled. Release time Specify the time at which to release the host. Defaults to 1 hour after the current time. Must be 30 minutes after the current time. Available only when Auto-release is enabled. Click OK.
What's next
To understand how dedicated host charges are calculated, see Dedicated host billing.
To review charges after releasing a host, see View your bills.
To manage release programmatically, use the following API operations:
ReleaseDedicatedHost: releases a pay-as-you-go dedicated host.
ModifyDedicatedHostAutoReleaseTime: sets the automatic release time for a dedicated host.