# Cloud Cost AutoStopping Rules

This contains APIs to create and manage AutoStopping Rules for your cloud resources.

## List AutoStopping Rules

 - [GET /gateway/lw/api/accounts/{account_id}/autostopping/rules](https://apidocs.harness.io/cloud-cost-autostopping-rules/listautostoppingrules.md): Retrieves a list of all AutoStopping Rules configured in your account. AutoStopping Rules help optimize cloud costs by automatically stopping idle resources and starting them on-demand when accessed.

## Create an AutoStopping Rule

 - [POST /gateway/lw/api/accounts/{account_id}/autostopping/rules](https://apidocs.harness.io/cloud-cost-autostopping-rules/updateautostoppingrule.md): Creates a new AutoStopping Rule to automatically manage cloud resources and reduce costs. The rule monitors resource activity and automatically stops resources during idle periods, then restarts them when traffic is detected. You can configure idle time thresholds, access methods (HTTP/HTTPS, SSH, RDP), custom domains, and schedules.

## Return AutoStopping Rule details

 - [GET /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}](https://apidocs.harness.io/cloud-cost-autostopping-rules/autostoppingruledetails.md): Retrieves details of a specific AutoStopping Rule including its configuration, associated resources, idle time settings, etc.

## Delete an AutoStopping Rule

 - [DELETE /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}](https://apidocs.harness.io/cloud-cost-autostopping-rules/deleteautostoppingrule.md): Permanently deletes an AutoStopping Rule from your account.

⚠️ CAUTION: This action is irreversible. Once deleted, the rule configuration cannot be recovered. Resources that were managed by this rule will no longer be automatically stopped, which may result in increased cloud costs.

## Return health status of an AutoStopping Rule

 - [GET /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/health](https://apidocs.harness.io/cloud-cost-autostopping-rules/healthofautostoppingrule.md): Retrieves the current health and operational status of an AutoStopping Rule.

## Return savings details for an AutoStopping Rule

 - [GET /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/savings](https://apidocs.harness.io/cloud-cost-autostopping-rules/savingsfromautostoppingrule.md): Retrieves detailed cost savings data for a specific AutoStopping Rule grouped by day over the specified time period.

## List all the resources for an AutoStopping Rule

 - [GET /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/resources](https://apidocs.harness.io/cloud-cost-autostopping-rules/allautostoppingresources.md): Lists all the resources for an AutoStopping Rule for the given identifier.

## Return diagnostics result of an AutoStopping Rule

 - [GET /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/diagnostics](https://apidocs.harness.io/cloud-cost-autostopping-rules/getautostoppingdiagnostics.md): Retrieves diagnostic information for an AutoStopping Rule to help troubleshoot issues.

## Warm up an AutoStopping Rule

 - [POST /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/warmup](https://apidocs.harness.io/cloud-cost-autostopping-rules/warmupautostoppingrule.md): Manually starts (warms up) the resources managed by an AutoStopping Rule, bringing them online immediately.

## Cool down an AutoStopping Rule

 - [POST /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/cooldown](https://apidocs.harness.io/cloud-cost-autostopping-rules/cooldownautostoppingrule.md): Manually stops (cools down) the resources managed by an AutoStopping Rule, shutting them down immediately to save costs.

## Return metadata of cool down of an AutoStopping Rule

 - [GET /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/cooldown_meta](https://apidocs.harness.io/cloud-cost-autostopping-rules/getautostoppingcooldownmeta.md): Retrieves metadata about the cooldown configuration and status of an AutoStopping Rule.

## Return cumulative savings for all the AutoStopping Rules

 - [GET /gateway/lw/api/accounts/{account_id}/autostopping/rules/savings/cumulative](https://apidocs.harness.io/cloud-cost-autostopping-rules/cumulativeautostoppingsavings.md): Retrieves the total cumulative cost savings achieved across all AutoStopping Rules in the account.

## Disable/Enable an Autostopping Rule

 - [PUT /gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/toggle_state](https://apidocs.harness.io/cloud-cost-autostopping-rules/toggleautostoppingrule.md): Enables or disables an AutoStopping Rule. When disabled, the rule will not automatically stop resources during idle periods.

