update_cluster_operation¶
- DwhManagementApi.update_cluster_operation(role_id, clustertype, operations, content_type=None, name=None, tenant_name=None, tenant_name2=None, input_body=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update DWH user-access, tenant metadata, WLM queue, or trigger an OpenSearch reindex
For cluster type dwh: - user-access — enable or disable catalog table-view access - tenants — update tenant metadata - wlm — update a workload management queue For cluster type os: - reindex — rebuild the catalog OpenSearch indexes - delete — delete the catalog OpenSearch indexes Note both OpenSearch operations are issued as PUT, including delete; there is no HTTP DELETE route for them. The os operations read no request body — anything sent is ignored — and they are asynchronous. A 200 means the job was triggered via a state machine, not that reindexing has finished; the caller receives an email notification on completion. Poll GET /clusters/os/indexhistory to see the operation recorded. clustertype=rag is not supported on PUT and is rejected with IPV-1004.
- Parameters:
role_id (str) – Amorphic role ID used for authorization. (required)
clustertype (str) – Use dwh for user-access/tenants/wlm. os supports reindex/delete. (required)
operations (str) – DWH operation: user-access, tenants, or wlm. OpenSearch operation: reindex or delete. (required)
content_type (str) – Should be application/json when sending a body.
name (str) – WLM queue name when operations=wlm.
tenant_name (str) – Tenant name when operations=tenants.
tenant_name2 (str) – Optional tenant/database when operations=user-access and multi-tenancy is enabled.
input_body (InputBody) – Required for dwh user-access, tenants, and wlm. Not used at all by os reindex/delete: the handler never reads the body on those operations, so any payload sent is accepted and silently ignored. Send no body for them.
_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:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /clusters/{clustertype}/{operations}
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
header |
|
|
header |
|
|
path |
|
|
path |
|
|
query |
|
|
query |
|
|
query |
|
Request¶
Required for dwh `user-access`, `tenants`, and `wlm`.
Not used at all by os `reindex`/`delete`: the handler never reads the body on those operations, so any payload sent is accepted and silently ignored. Send no body for them.
The request body is optional.
Enable or disable user table-view access (dwh)
{
"UserAccess": "enable"
}
Update tenant metadata (dwh)
{
"TenantDescription": "Updated description",
"DisplayName": "Sales Tenant",
"TenantClusterName": "my-redshift.abc123.us-east-1.redshift.amazonaws.com"
}
Success (HTTP 200)¶
Update accepted/completed.
dwh user-access updated
{
"Message": "Updated user table view access successfully"
}
dwh tenant metadata updated
{
"Message": "Successfully updated the details of the tenant."
}
dwh WLM queue updated
{
"Message": "Successfully updated queue details in the work load configuration - default-queue"
}
OpenSearch reindex triggered (clustertype=os, operations=reindex)
{
"Message": "Reindexing triggered successfully for OS Indexes"
}
OpenSearch index deletion triggered (clustertype=os, operations=delete)
{
"Message": "Deletion triggered successfully for OS Indexes"
}
Errors¶
Documented error codes: IPV-1008, IPV-1004, GE-1004.
HTTP 400
Validation or auth failure.
UserAccess absent for dwh user-access
{
"Message": "IPV-1008 - Missing required parameter - UserAccess"
}
Unsupported operation for clustertype=dwh
{
"Message": "IPV-1004 - Invalid operation type. Supported types are user-access, tenants and wlm."
}
Unsupported operation for clustertype=os, which allows reindex and delete only
{
"Message": "GE-1004 - Failed to invoke function due to error - Invalid operation type"
}
PUT attempted against clustertype=rag
{
"Message": "IPV-1004 - PUT operations not supported for clustertype rag."
}
HTTP 500
Backend/generic failure.