delete_cluster_operation

DwhManagementApi.delete_cluster_operation(role_id, clustertype, operations, tenant_name=None, tenant_cluster_name=None, name=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Delete a DWH tenant or WLM queue

Deletes a DWH tenant or WLM queue. Supported only when clustertype=dwh. - tenants — delete tenant asynchronously. Requires TenantName and matching TenantClusterName. Caller must be the tenant owner. Blocked for the default tenant, missing tenant, dependent domains/parameters, or delete already in progress. - wlm — delete a workload management queue (provisioned only). Uses query parameter name.

Parameters:
  • role_id (str) – Amorphic role ID used for authorization. (required)

  • clustertype (str) – Must be dwh for delete operations. (required)

  • operations (str) – Operation to perform. One of tenants or wlm. (required)

  • tenant_name (str) – Tenant name when operations=tenants.

  • tenant_cluster_name (str) – Must match the tenant’s stored cluster name when operations=tenants

  • name (str) – WLM queue name when operations=wlm.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

ClusterOperationsMessageResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: DELETE /clusters/{clustertype}/{operations}

Parameter examples

Name

In

Example

role_id

header

"role-admin"

clustertype

path

"dwh"

operations

path

"tenants"

TenantName

query

"sales"

name

query

"default-queue"

Success (HTTP 200)

Delete accepted. Tenant delete returns an initiation message. WLM delete returns a success Message.

tenantDeleteStarted

{
  "Message": "Tenant deletion initiated and will be running in the background"
}

wlmDeleted

{
  "Message": "Successfully deleted the redshift work load configuration queue - default-queue"
}

Errors

Documented error codes: IPV-1002, IPV-1004.

HTTP 400

Validation or dependency failure.

tenantNotFound

{
  "Message": "IPV-1002 - TenantName sales does not exist"
}

deleteNotSupported

{
  "Message": "IPV-1004 - DELETE operations not supported for clustertype os."
}

HTTP 500

Backend/generic failure.