perform_cluster_action¶
- DwhManagementApi.perform_cluster_action(role_id, clustertype, perform_cluster_action_request, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Perform a management action on the DWH cluster
Performs a management action on the Amorphic Redshift DWH cluster. Only clustertype=dwh is supported. Cluster-type constraints: - Provisioned Redshift: all Action enum values are supported. - Redshift Serverless: only create_snapshot is supported.
- Parameters:
role_id (str) – Amorphic role ID the request is authorized against. Must be a role the caller belongs to that grants the permission required. (required)
clustertype (str) – Cluster type. Only dwh supports PUT actions. (required)
perform_cluster_action_request (PerformClusterActionRequest) – Cluster action payload. Action is required. (required)
content_type (str) – Must be application/json.
_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}
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
header |
|
Request¶
Cluster action payload. `Action` is required.
Pause provisioned cluster immediately
{
"Action": "pause_now"
}
Create a manual snapshot
{
"Action": "create_snapshot",
"ActionArgs": {
"RetentionPeriod": "7"
}
}
Success (HTTP 200)¶
Cluster action accepted/completed.
Pause accepted
{
"Message": "Pausing cluster - my-redshift-cluster"
}
Snapshot create accepted
{
"Message": "Creating cluster snapshot backup-my-redshift-cluster2026-08-12-05-30-00, for cluster my-redshift-cluster"
}
Errors¶
Documented error codes: IPV-1008, DWH-1004, EMF-1001, RTE-1001.
HTTP 400
Input validation, unsupported action, wrong cluster state, or authorization failure.
missingAction
{
"Message": "IPV-1008 - Missing required parameter - Action"
}
invalidStatus
{
"Message": "DWH-1004 - Cannot perform pause on cluster with status - paused"
}
HTTP 500
Backend/generic failure.
Request / response example
{
"Message": "EMF-1001 - RTE-1001 - <exception details>"
}