---
title: "Delete a cluster resource"
method: DELETE
path: "/clusters/{id}"
tags: ["clusters"]
---

# Delete a cluster resource

`DELETE /clusters/{id}`

The cluster will be immediately deleted if it is not in use and has no active servers associated with it. If the cluster has any active servers associated with it, a task will be created to destroy all the active servers first after which the cluster will be deleted.

## Path parameters

- `id` string, required

## Response `200`

The cluster was successfully deleted.

- Cluster
  - `href` string, nullable, required — The endpoint for the cluster resource.
  - `automatic_size` integer, required — The size that the cluster is currently auto scaled to.
  - `active` boolean, required — Indicates if the cluster is active. Active clusters may auto scale and are monitored.
  - `servers` ClusterServer[], required
    - `public_address` string, required — The public address of the server
    - `active_since` string — An iso8601 formatted timestamp
    - `created` string — An iso8601 formatted timestamp
    - `href` string, required — The endpoint for the server resource
    - `is_failed` boolean — This will be true for a server that has been unreachable for longer than the server failure timeout for its cluster. Once a server has failed, it is not recoverable and will be replaced or destroyed
    - `name` string, required — The name of the server
    - `networks` ServerNetwork[], required
      - `name` string, required — The name of the network.
      - `external_ipv4_address` string, ipv4, required — The external ipv4 address of the cluster server.
      - `ipv4_address` string, ipv4, required — The ipv4 address of the cluster server.
    - `private_address` string — The private address of the server
    - `replacement_for` string — A reference to a server being replaced by this one
    - `server_blueprint` Blueprint — The endpoint resource reference to the blueprint of the servers.
      - `files` MetadataFileEntry[] — A set of files to be made available on servers created with this blueprint.
        - `file` string — A reference to a Webscale file.
        - `path` string — The absolute path where the file is made available on a server made with this blueprint.
      - `identity` IdentityConfiguration — Configuration of the identity assigned to cluster servers.
        - `name` string, required — Name of the identity.
        - `client_id` string, required — Client ID for the identity to be assigned.
        - `principal_id` string, required — Principal ID for the identity to be assigned.
      - `image` string — Resource href that includes the Webscale provider identifier.
      - `instance_template` string — The endpoint resource identifier for the instance template.
      - `instance_type` string — Resource href that includes the Webscale provider identifier.
      - `metadata` MetadataEntry[] — A set of key/value pairs that will be provided to servers created with this blueprint. Server blueprint metadata overrides the cluster metadata on a key-by-key basis.
        - `key` string — A key name.
        - `value` string — A value associated with the given key.
      - `networks` ProviderResourceHref[] — List of network or subnet endpoint resource references to associate the server with. Network availability may be limited to specific zones depending on the cloud provider.
      - `network_tags` string[] — List of network tags to associate with the server. Only applicable for Google provider.
      - `placement` union
        - string — Resource href that includes the Webscale provider identifier.
        - string — The endpoint resource identifier for the server group, must be a URL encoded string. Only valid for CenturyLink provider.
      - `provider` Provider
        - `created` string — An iso8601 formatted timestamp
        - `href` string — Resource identifier for the provider, must be a URL encoded string.
        - `name` string
        - `type` 'aliyun' | 'aws' | 'centurylink' | 'cloudsigma' | 'google' — Type of the cloud provider.
        - `links` ProviderAttributes — Provider attributes that represent cloud provider attributes and may be queried via the API.
      - `security_groups` SecurityGroupHref[] — List of security group endpoint resource references to associate with the server. Only applicable for AWS provider.
      - `storage_account` string — Resource href that includes the Webscale provider identifier.
      - `zone` string — Resource href that includes the Webscale provider identifier.
    - `state` 'creating' | 'joining' | 'active' | 'verifying' | 'leaving' | 'failed' | 'destroying', required — The current state of the server. The state 'creating' indicates that the virtual machine instance is getting created in the cloud but it is not ready to accept connections. The state 'verifying' indicates that the server was created successfully and it is being verified to check if the web service is responding on that server. The state 'joining' indicates that the server verification was successful and the system is being reconfigured so that the server will begin receiving traffic. The state 'active' indicates that the server is either serving the traffic or ready to accept connections. The state 'failed' indicates that the server has been unreachable for longer than the server failure timeout for its cluster and it is not recoverable and will be replaced or destroyed. The state 'leaving' indicates that the server is about to leave the cluster and the system is being reconfigured so that the server will stop receiving the traffic. The state 'destroying' indicates that the server has stopped receiving the traffic and the instance is getting deleted from the cloud
    - `unreachable_since` string — An iso8601 formatted timestamp
  - `created` string — An iso8601 formatted timestamp
  - `delete_pending` boolean — Indicates that the cluster is about to be deleted.
  - `name` string
  - `minimum_size` integer — An integer of value 0 or more.
  - `maximum_size` integer — An integer of value 0 or more.
  - `manual_size` union — The explicit size that a cluster will scale to. Overrides automatic size.
    - unknown
    - integer — An integer of value 0 or more.
  - `instance_type` 'micro' | 'small' | 'medium' | 'large' | 'xlarge' — Specifies the type (size) of instances to be created.
  - `scale_in_conditions` ScalingCondition[] — When any of these conditions become true for a server, then the cluster automatic size will be reduced by one.
    - `series_name` 'cpu_percent' | 'iowait_percent' | 'kilobytes_per_second' | 'loadavg_norm' | 'memory_used_percent' | 'requests_per_second', required — Name identifying the scaling condition type.
    - `operator` 'has_been_greater_than' | 'will_be_greater_than' | 'has_been_less_than' | 'will_be_less_than', required — Operator to determine scaling condition.
    - `value` number, required — Threshold value to trigger scaling in or out of servers.
    - `duration` integer, required — An integer of value 0 or more.
    - `display_unit` 'seconds' | 'minutes' | 'hours', required — Unit to use for displaying the time duration specified.
  - `scale_out_conditions` ScalingCondition[] — When any of these conditions become true for a server, then the cluster automatic size will be increased by one.
    - `series_name` 'cpu_percent' | 'iowait_percent' | 'kilobytes_per_second' | 'loadavg_norm' | 'memory_used_percent' | 'requests_per_second', required — Name identifying the scaling condition type.
    - `operator` 'has_been_greater_than' | 'will_be_greater_than' | 'has_been_less_than' | 'will_be_less_than', required — Operator to determine scaling condition.
    - `value` number, required — Threshold value to trigger scaling in or out of servers.
    - `duration` integer, required — An integer of value 0 or more.
    - `display_unit` 'seconds' | 'minutes' | 'hours', required — Unit to use for displaying the time duration specified.
  - `server_blueprints` Blueprint[] — Specifies how servers in this cluster are to be built.
    - `files` MetadataFileEntry[] — A set of files to be made available on servers created with this blueprint.
      - `file` string — A reference to a Webscale file.
      - `path` string — The absolute path where the file is made available on a server made with this blueprint.
    - `identity` IdentityConfiguration — Configuration of the identity assigned to cluster servers.
      - `name` string, required — Name of the identity.
      - `client_id` string, required — Client ID for the identity to be assigned.
      - `principal_id` string, required — Principal ID for the identity to be assigned.
    - `image` string — Resource href that includes the Webscale provider identifier.
    - `instance_template` string — The endpoint resource identifier for the instance template.
    - `instance_type` string — Resource href that includes the Webscale provider identifier.
    - `metadata` MetadataEntry[] — A set of key/value pairs that will be provided to servers created with this blueprint. Server blueprint metadata overrides the cluster metadata on a key-by-key basis.
      - `key` string — A key name.
      - `value` string — A value associated with the given key.
    - `networks` ProviderResourceHref[] — List of network or subnet endpoint resource references to associate the server with. Network availability may be limited to specific zones depending on the cloud provider.
    - `network_tags` string[] — List of network tags to associate with the server. Only applicable for Google provider.
    - `placement` union
      - string — Resource href that includes the Webscale provider identifier.
      - string — The endpoint resource identifier for the server group, must be a URL encoded string. Only valid for CenturyLink provider.
    - `provider` Provider
      - `created` string — An iso8601 formatted timestamp
      - `href` string — Resource identifier for the provider, must be a URL encoded string.
      - `name` string
      - `type` 'aliyun' | 'aws' | 'centurylink' | 'cloudsigma' | 'google' — Type of the cloud provider.
      - `links` ProviderAttributes — Provider attributes that represent cloud provider attributes and may be queried via the API.
    - `security_groups` SecurityGroupHref[] — List of security group endpoint resource references to associate with the server. Only applicable for AWS provider.
    - `storage_account` string — Resource href that includes the Webscale provider identifier.
    - `zone` string — Resource href that includes the Webscale provider identifier.
  - `bootstrap` BootstrapConfiguration
    - `file` string, required — Endpoint resource reference to a file.
    - `command` string, required — Cloud Init command to run once the server is commissioned.
  - `minimum_increment` integer — An integer of value 1 or more.
  - `server_failure_timeout` integer — An integer of value 0 or more.
  - `servers_update_webhook` string, uri — An HTTP URL address.
  - `verify_timeout` integer — The time to wait for a new server to verify. If a server does not respond to a GET / with a non-5xx status code after this many seconds, then it fails verification and will be replaced or destroyed
  - `failed_server_disposition` 'destroy' | 'detach' — If set to detach, failed servers won't be deleted from cloud provider after deletion.
  - `allocate_public_address` boolean — When set to true, server will have a public address associated with it. If set to false, the server will not have public address. Before making this change, please make sure that the proxy and servers with private addresses are in the same network. NOTE: As of now, this functionality is only supported for Centurylink cloud.
  - `measurement_type` 'none' | 'lg-status' | 'self-reporting' — When self-reporting, server will post its measurements to /v2/servers/metrics periodically. When lg-status, server needs to be installed with lg_mod_status and Webscale will pull the measurements from the server periodically. When none, Webscale will not monitor the cluster
  - `checks` Check[] — List of checks that needs to be performed to verify cluster server.
    - `url` string, uri, required — URL to perform server verification on.
    - `allowed_status_code` string, regex — Regular expression to check the status code for responses to verification requests, when it is not satisfied the check will be deemed as a failure. Defaults to '/^[23]/'
    - `body` string — Request body which needs to be sent with verification request. Defaults to empty string.
    - `headers` Header[] — Array of headers that needs to be included in the verification request. Defaults to no headers.
      - `name` string, required — The name of the header to be set.
      - `value` string, required — The value for the specified header.
    - `permitted_redirect_hosts` Alias[] — A list of host names to follow when redirect responses are received during verification. Defaults to empty list.
    - `prohibit_content` string, regex — A regular expression applied on the response body that if matched fails the check. Defaults to no regular expression.
    - `request_method` string — HTTP request method to use when sending verification requests. Defaults to 'GET'
    - `require_content` string, regex — A regular expression applied on the response body that must match for the check to succeed. Defaults to no regular expression.
    - `timeout` integer — Number of seconds to wait for the response from server. Defaults to 30 seconds.
    - `verify_certificates` boolean — Flag when set to true directs the check to verify the validity of the offered certificates. Defaults to true.
  - `metadata` MetadataEntry[] — A set of key/value pairs that will be provided to servers created in this cluster. Server blueprint metadata overrides the cluster metadata on a key-by-key basis.
    - `key` string — A key name.
    - `value` string — A value associated with the given key.
  - `files` MetadataFileEntry[] — A set of files to be made available on servers created with this blueprint. Server blueprint files overrides cluster files on a key-by-key basis.
    - `file` string — A reference to a Webscale file.
    - `path` string — The absolute path where the file is made available on a server made with this blueprint.

## Other responses

- `202` — A task was created to delete the cluster.

---

[API](https://skmtc.dev/webscale/apis/webscale-apis.md) · [All operations](https://skmtc.dev/webscale/apis/webscale-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/webscale/webscale-apis/revisions/c98d872b50cb/schema)
