This contains APIs to create and manage AutoStopping Rules for your cloud resources.
Lists all the AutoStopping rules separated by comma-separated strings.
successful operation
Invalid status value
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules?accountIdentifier=string&dry_run=false' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": [
- {
- "id": 0,
- "name": "string",
- "org_id": "string",
- "account_identifier": "string",
- "project_id": "string",
- "fulfilment": "string",
- "kind": "string",
- "cloud_account_id": "string",
- "idle_time_mins": 0,
- "host_name": "string",
- "health_check": { },
- "custom_domains": [
- "string"
], - "match_all_subdomains": true,
- "disabled": true,
- "routing": {
- "instance": {
- "filter_text": "string",
- "scale_group": {
- "id": "string",
- "name": "string",
- "desired": 0,
- "min": 0,
- "max": 0,
- "on_demand": 0,
- "spot": 0,
- "mixed_instance": true,
- "cloud_account_id": "string",
- "provider_name": "string",
- "target_groups": [
- {
- "id": null,
- "name": null,
- "port": null,
- "protocol": null,
- "vpc": null
}
], - "region": "string",
- "availability_zones": [
- "string"
], - "status": "string",
- "meta": { }
}
}, - "ports": [
- {
- "protocol": "string",
- "target_protocol": "string",
- "port": 0,
- "target_port": 0,
- "server_name": "string",
- "action": "string",
- "redirect_url": "string",
- "routing_rules": [
- {
- "path_match": null
}
]
}
], - "lb": "string",
- "k8s": {
- "RuleJson": "string",
- "ConnectorID": "string",
- "Namespace": "string"
}, - "custom_domain_providers": { },
- "container_svc": {
- "cluster": "string",
- "service": "string",
- "region": "string",
- "task_count": 0
}, - "database": {
- "id": "string",
- "region": "string"
}
}, - "opts": {
- "preserve_private_ip": true,
- "delete_cloud_resources": true,
- "always_use_private_ip": true,
- "access_details": { },
- "hide_progress_page": true
}, - "created_at": "string",
- "access_point_id": "string",
- "metadata": {
- "cloud_provider_details": {
- "name": "string",
- "type": "string"
}, - "target_group_details": { },
- "service_errors": [
- {
- "error": "string",
- "action": "string"
}
], - "kubernetes_connector_id": "string",
- "autostopping_proxy_config": {
- "http": {
- "proxy": {
- "id": "string"
}, - "ports": [
- {
- "protocol": null,
- "target_protocol": null,
- "port": null,
- "target_port": null,
- "server_name": null,
- "action": null,
- "redirect_url": null,
- "routing_rules": [ ]
}
]
}, - "tcp": {
- "proxy": {
- "id": "string"
}, - "ports": [
- {
- "protocol": null,
- "target_protocol": null,
- "port": null,
- "target_port": null,
- "server_name": null,
- "action": null,
- "redirect_url": null,
- "routing_rules": [ ]
}
]
}
}
}, - "status": "string"
}
]
}
Creates a new AutoStopping Rule.
successful operation
Invalid status value
curl -i -X POST \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules?accountIdentifier=string' \ -H 'Content-Type: */*' \ -H 'x-api-key: YOUR_API_KEY_HERE' \ -d '[object Object]'
{- "response": {
- "id": 0,
- "name": "string",
- "org_id": "string",
- "account_identifier": "string",
- "project_id": "string",
- "fulfilment": "string",
- "kind": "string",
- "cloud_account_id": "string",
- "idle_time_mins": 0,
- "host_name": "string",
- "health_check": { },
- "custom_domains": [
- "string"
], - "match_all_subdomains": true,
- "disabled": true,
- "routing": {
- "instance": {
- "filter_text": "string",
- "scale_group": {
- "id": "string",
- "name": "string",
- "desired": 0,
- "min": 0,
- "max": 0,
- "on_demand": 0,
- "spot": 0,
- "mixed_instance": true,
- "cloud_account_id": "string",
- "provider_name": "string",
- "target_groups": [
- {
- "id": "string",
- "name": "string",
- "port": 0,
- "protocol": "string",
- "vpc": "string"
}
], - "region": "string",
- "availability_zones": [
- "string"
], - "status": "string",
- "meta": { }
}
}, - "ports": [
- {
- "protocol": "string",
- "target_protocol": "string",
- "port": 0,
- "target_port": 0,
- "server_name": "string",
- "action": "string",
- "redirect_url": "string",
- "routing_rules": [
- {
- "path_match": "string"
}
]
}
], - "lb": "string",
- "k8s": {
- "RuleJson": "string",
- "ConnectorID": "string",
- "Namespace": "string"
}, - "custom_domain_providers": { },
- "container_svc": {
- "cluster": "string",
- "service": "string",
- "region": "string",
- "task_count": 0
}, - "database": {
- "id": "string",
- "region": "string"
}
}, - "opts": {
- "preserve_private_ip": true,
- "delete_cloud_resources": true,
- "always_use_private_ip": true,
- "access_details": { },
- "hide_progress_page": true
}, - "created_at": "string",
- "access_point_id": "string",
- "metadata": {
- "cloud_provider_details": {
- "name": "string",
- "type": "string"
}, - "target_group_details": { },
- "service_errors": [
- {
- "error": "string",
- "action": "string"
}
], - "kubernetes_connector_id": "string",
- "autostopping_proxy_config": {
- "http": {
- "proxy": {
- "id": "string"
}, - "ports": [
- {
- "protocol": "string",
- "target_protocol": "string",
- "port": 0,
- "target_port": 0,
- "server_name": "string",
- "action": "string",
- "redirect_url": "string",
- "routing_rules": [
- null
]
}
]
}, - "tcp": {
- "proxy": {
- "id": "string"
}, - "ports": [
- {
- "protocol": "string",
- "target_protocol": "string",
- "port": 0,
- "target_port": 0,
- "server_name": "string",
- "action": "string",
- "redirect_url": "string",
- "routing_rules": [
- null
]
}
]
}
}
}, - "status": "string"
}
}
Returns details of an AutoStopping Rule for the given identifier.
successful operation
Invalid status value
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}?accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": {
- "deps": [
- { }
], - "service": {
- "id": 0,
- "name": "string",
- "org_id": "string",
- "account_identifier": "string",
- "project_id": "string",
- "fulfilment": "string",
- "kind": "string",
- "cloud_account_id": "string",
- "idle_time_mins": 0,
- "host_name": "string",
- "health_check": { },
- "custom_domains": [
- "string"
], - "match_all_subdomains": true,
- "disabled": true,
- "routing": {
- "instance": {
- "filter_text": "string",
- "scale_group": {
- "id": "string",
- "name": "string",
- "desired": 0,
- "min": 0,
- "max": 0,
- "on_demand": 0,
- "spot": 0,
- "mixed_instance": true,
- "cloud_account_id": "string",
- "provider_name": "string",
- "target_groups": [
- {
- "id": null,
- "name": null,
- "port": null,
- "protocol": null,
- "vpc": null
}
], - "region": "string",
- "availability_zones": [
- "string"
], - "status": "string",
- "meta": { }
}
}, - "ports": [
- {
- "protocol": "string",
- "target_protocol": "string",
- "port": 0,
- "target_port": 0,
- "server_name": "string",
- "action": "string",
- "redirect_url": "string",
- "routing_rules": [
- {
- "path_match": null
}
]
}
], - "lb": "string",
- "k8s": {
- "RuleJson": "string",
- "ConnectorID": "string",
- "Namespace": "string"
}, - "custom_domain_providers": { },
- "container_svc": {
- "cluster": "string",
- "service": "string",
- "region": "string",
- "task_count": 0
}, - "database": {
- "id": "string",
- "region": "string"
}
}, - "opts": {
- "preserve_private_ip": true,
- "delete_cloud_resources": true,
- "always_use_private_ip": true,
- "access_details": { },
- "hide_progress_page": true
}, - "created_at": "string",
- "access_point_id": "string",
- "metadata": {
- "cloud_provider_details": {
- "name": "string",
- "type": "string"
}, - "target_group_details": { },
- "service_errors": [
- {
- "error": "string",
- "action": "string"
}
], - "kubernetes_connector_id": "string",
- "autostopping_proxy_config": {
- "http": {
- "proxy": {
- "id": "string"
}, - "ports": [
- {
- "protocol": null,
- "target_protocol": null,
- "port": null,
- "target_port": null,
- "server_name": null,
- "action": null,
- "redirect_url": null,
- "routing_rules": [ ]
}
]
}, - "tcp": {
- "proxy": {
- "id": "string"
}, - "ports": [
- {
- "protocol": null,
- "target_protocol": null,
- "port": null,
- "target_port": null,
- "server_name": null,
- "action": null,
- "redirect_url": null,
- "routing_rules": [ ]
}
]
}
}
}, - "status": "string"
}, - "apply_now": true
}
}
Deletes an AutoStopping Rule for the given identifier.
successful operation
Invalid status value
curl -i -X DELETE \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}?accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
Returns health status of an AutoStopping Rule for the given identifier.
successful operation
Invalid status value
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/health?accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": { }
}
Returns savings details for an AutoStopping rule for the given identifier and the specified time duration.
successful operation
Invalid status value
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/savings?accountIdentifier=string&from=string&to=string&group_by=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{ }
Lists all the resources for an AutoStopping Rule for the given identifier.
successful operation
Invalid status value
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/resources?cloud_account_id=string®ion=string&accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": [
- {
- "id": "string",
- "name": "string",
- "region": "string",
- "availability_zone": "string",
- "status": "string",
- "type": "string",
- "launch_time": "string",
- "ipv4": [
- "string"
], - "private_ipv4": [
- "string"
], - "tags": { },
- "resource_type": "string",
- "provider_name": "string",
- "is_spot": true,
- "platform": "string",
- "cloud_account_id": 0,
- "metadata": { },
- "provider_type": "string"
}
]
}
Returns the diagnostics result of an AutoStopping rule for the given identifier.
successful operation
Invalid status value
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/diagnostics?accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": [
- {
- "message": "string",
- "name": "string",
- "success": true,
- "type": "string"
}
]
}
Warm up resources under an Autostopping rule
Warm Up Options
successful operation
Internal error
curl -i -X POST \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/warmup?accountIdentifier=string' \ -H 'Content-Type: */*' \ -H 'x-api-key: YOUR_API_KEY_HERE' \ -d '[object Object]'
"string"
Cool down resources under an Autostopping rule
Cool Down Options
successful operation
Internal error
curl -i -X POST \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/cooldown?accountIdentifier=string' \ -H 'Content-Type: */*' \ -H 'x-api-key: YOUR_API_KEY_HERE' \ -d '[object Object]'
"string"
Return metadata of cool down of an AutoStopping Rule
successful operation
Internal error
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/cooldown_meta?accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "ts": 0,
- "success": true,
- "response": [
- "string"
]
}
Returns cumulative savings for all the AutoStopping Rules.
successful operation
Invalid status value
curl -i -X GET \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/savings/cumulative?accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": {
- "days": [
- "string"
], - "potential_cost": [
- 0
], - "actual_cost": [
- 0
], - "savings": [
- 0
], - "total_savings": 0,
- "total_potential": 0,
- "total_cost": 0,
- "savings_percent": 0,
- "total_active_services": 0
}
}
Disables or enables an Autostopping Rule for the given identifier.
successful operation
Invalid status value
curl -i -X PUT \ 'https://app.harness.io/gateway/lw/api/accounts/{account_id}/autostopping/rules/{rule_id}/toggle_state?disable=true&accountIdentifier=string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "response": [
- {
- "id": 0,
- "name": "string",
- "org_id": "string",
- "account_identifier": "string",
- "project_id": "string",
- "fulfilment": "string",
- "kind": "string",
- "cloud_account_id": "string",
- "idle_time_mins": 0,
- "host_name": "string",
- "health_check": { },
- "custom_domains": [
- "string"
], - "match_all_subdomains": true,
- "disabled": true,
- "routing": {
- "instance": {
- "filter_text": "string",
- "scale_group": {
- "id": "string",
- "name": "string",
- "desired": 0,
- "min": 0,
- "max": 0,
- "on_demand": 0,
- "spot": 0,
- "mixed_instance": true,
- "cloud_account_id": "string",
- "provider_name": "string",
- "target_groups": [
- {
- "id": null,
- "name": null,
- "port": null,
- "protocol": null,
- "vpc": null
}
], - "region": "string",
- "availability_zones": [
- "string"
], - "status": "string",
- "meta": { }
}
}, - "ports": [
- {
- "protocol": "string",
- "target_protocol": "string",
- "port": 0,
- "target_port": 0,
- "server_name": "string",
- "action": "string",
- "redirect_url": "string",
- "routing_rules": [
- {
- "path_match": null
}
]
}
], - "lb": "string",
- "k8s": {
- "RuleJson": "string",
- "ConnectorID": "string",
- "Namespace": "string"
}, - "custom_domain_providers": { },
- "container_svc": {
- "cluster": "string",
- "service": "string",
- "region": "string",
- "task_count": 0
}, - "database": {
- "id": "string",
- "region": "string"
}
}, - "opts": {
- "preserve_private_ip": true,
- "delete_cloud_resources": true,
- "always_use_private_ip": true,
- "access_details": { },
- "hide_progress_page": true
}, - "created_at": "string",
- "access_point_id": "string",
- "metadata": {
- "cloud_provider_details": {
- "name": "string",
- "type": "string"
}, - "target_group_details": { },
- "service_errors": [
- {
- "error": "string",
- "action": "string"
}
], - "kubernetes_connector_id": "string",
- "autostopping_proxy_config": {
- "http": {
- "proxy": {
- "id": "string"
}, - "ports": [
- {
- "protocol": null,
- "target_protocol": null,
- "port": null,
- "target_port": null,
- "server_name": null,
- "action": null,
- "redirect_url": null,
- "routing_rules": [ ]
}
]
}, - "tcp": {
- "proxy": {
- "id": "string"
}, - "ports": [
- {
- "protocol": null,
- "target_protocol": null,
- "port": null,
- "target_port": null,
- "server_name": null,
- "action": null,
- "redirect_url": null,
- "routing_rules": [ ]
}
]
}
}
}, - "status": "string"
}
]
}