get_cluster_operation_details

DwhUserOperationsAndOpensearchIndexHistoryApi.get_cluster_operation_details(role_id, clustertype, operations, tenant_name=None, tenant_name2=None, tenant_cluster_name=None, schema_name=None, query_id=None, action=None, start_time=None, end_time=None, filter_value=None, cluster_id=None, duration=None, filter_expression=None, projection_expression=None, name=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Retrieve cluster operation details

Returns operation-specific cluster details for the given clustertype and operations. Supported dwh operations: - groups — list Redshift roles (Roles) - metrics — cluster CloudWatch metrics - queries — query execution details or result rows; requires queryId; set action=results for output - queries-loads — query and load history; requires startTime and endTime - schemas — list schemas in a tenant database, or tables when schema_name is provided - system-tables — list available Redshift system table names - tenants — list tenants, or return one tenant when TenantName is provided (tenancy required) - user-access — whether catalog table-view access is enabled - wlm — workload management queues (provisioned only; serverless returns 400 N/A) Supported os operations: - indexhistory — catalog index history. Returns a bare JSON array, not an object, capped at the 3 most recent entries with no pagination. - metrics — OpenSearch metrics, wrapped under Clusters exactly like the dwh metrics response. Supported rag operations: - metrics — RAG cluster metrics. Response shapes differ by clustertype — read this before writing a client. The dwh and os metrics responses nest their payload under a Clusters key, whereas the rag metrics response is returned flat at the top level with no wrapper. indexhistory is different again: a bare array. A client written against one clustertype will not work against another unchanged. Note also that when RAG metrics collection fails, the body carries an Error property with an empty Metrics object rather than the metric data. Inspect for that property before reading Metrics.

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

  • clustertype (str) – Cluster type to perform the operation on. - dwh: Redshift DWH (provisioned or serverless) - os: OpenSearch domain - rag: RAG vector store (AI services only) (required)

  • operations (str) – DWH operation name. Supported operations: groups, metrics, queries, queries-loads, schemas, system-tables, tenants, user-access, wlm. OS operation name. Supported operations: indexhistory, metrics RAG operation name. Supported operations: metrics (required)

  • tenant_name (str) – Tenant name when retrieving a single tenant (operations=tenants).

  • tenant_name2 (str) – Tenant/database name for schemas and user-access. Defaults to the environment DWH database when omitted.

  • tenant_cluster_name (str) – Tenant cluster hostname/identifier (used with tenant flows).

  • schema_name (str) – Schema name for operations=schemas. When provided, returns tables in that schema instead of the schema list.

  • query_id (str) – Redshift Data API query id. Required when operations=queries.

  • action (str) – When operations=queries, set to results to return query output for queryId. Omit to return query execution details.

  • start_time (str) – UTC start time for operations=queries-loads. Required with endTime

  • end_time (str) – UTC end time for operations=queries-loads. Must be after startTime

  • filter_value (str) – Status/category filter for operations=queries-loads. Uppercased by the handler. Defaults to ALL.

  • cluster_id (str) – Redshift cluster id for operations=queries-loads. Defaults to the environment cluster id when omitted.

  • duration (int) – Metrics lookback window in minutes for operations=metrics. Valid range is 1 to 525600 (one year). Note the failure mode differs by clustertype. For dwh and os a value outside the range is rejected with IPV-1019 (HTTP 400). For rag only a non-numeric value returns 400; an out-of-range value is swallowed and reported inside the response body instead.

  • filter_expression (str) – Comma-separated metric names to restrict operations=metrics to. An unrecognised name is rejected with IPV-1006. Valid names depend on the clustertype: - dwh: CPUUtilization, DatabaseConnections, HealthStatus, PercentageDiskSpaceUsed, NetworkReceiveThroughput - os: JVMMemoryPressure, Nodes, CPUUtilization, ClusterStatus.green, ClusterStatus.yellow, ClusterStatus.red, 4xx, 5xx, SearchRate, SearchableDocuments - rag on Aurora: CPUUtilization, ReadIOPS, WriteIOPS, ACUUtilization, DatabaseConnections, EngineUptime - rag on OpenSearch Serverless: SearchRequestRate, SearchRequestLatency, IngestionRequestRate, IngestionRequestLatency, SearchOCU, IndexingOCU, ActiveSearchOCU, ActiveIndexingOCU Names are not interchangeable between clustertypes: for example PercentageDiskSpaceUsed is valid for dwh but not for os.

  • projection_expression (str) – Comma-separated attributes to project from the response. Applies only when clustertype=dwh. It is silently ignored for os and rag, which always return their full response body.

  • name (str) – WLM queue name for operations=wlm. When set, returns that queue; otherwise returns all queues.

  • _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:

GetClusterOperationDetails200Response

Returns:

Returns the result object.

Request and Response Examples

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

Parameter examples

Name

In

Example

role_id

header

"role-admin"

clustertype

path

"dwh"

operations

path

"metrics"

TenantName

query

"sales"

tenantName

query

"sales"

schema_name

query

"public"

queryId

query

"a1b2c3d4-1111-2222-3333-444455556666"

action

query

"results"

startTime

query

"2026-08-01T00:00:00"

endTime

query

"2026-08-02T00:00:00"

filterValue

query

"ALL"

duration

query

30

filterExpression

query

"CPUUtilization,PercentageDiskSpaceUsed"

projectionExpression

query

"ClusterType,Metrics"

name

query

"default-queue"

Success (HTTP 200)

Successful API response.

Redshift roles

{
  "Roles": [
    "roleAdmin",
    "roleReadonly"
  ]
}

Cluster metrics

{
  "Clusters": {
    "ClusterType": "Redshift",
    "Metrics": {
      "StartTime": "2026-08-13T13:05:00",
      "EndTime": "2026-08-13T13:35:00",
      "CPUUtilization": {
        "Label": "CPUUtilization",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 12.5,
            "Unit": "Percent"
          }
        ]
      },
      "PercentageDiskSpaceUsed": {
        "Label": "PercentageDiskSpaceUsed",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 41.2,
            "Unit": "Percent"
          }
        ]
      },
      "HealthStatus": {
        "Label": "HealthStatus",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 1,
            "Unit": "Count"
          }
        ]
      }
    }
  }
}

Cluster metrics (Redshift Serverless)

{
  "Clusters": {
    "ClusterType": "Redshift serverless",
    "Metrics": {
      "StartTime": "2026-08-13T13:05:00",
      "EndTime": "2026-08-13T13:35:00",
      "DatabaseConnections": {
        "Label": "DatabaseConnections",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 3,
            "Unit": "Count"
          }
        ]
      },
      "ComputeCapacity": {
        "Label": "ComputeCapacity",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 8,
            "Unit": "Count"
          }
        ]
      },
      "DataStorage": {
        "Label": "DataStorage",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 102400,
            "Unit": "Megabytes"
          }
        ]
      }
    }
  }
}

Query execution details

{
  "QueryDetails": {
    "QueryId": "a1b2c3d4-1111-2222-3333-444455556666",
    "QueryStatus": "FINISHED"
  }
}

Query and load history

{
  "QueryResults": {
    "Headers": [
      "START TIME",
      "QUERY",
      "STATUS"
    ],
    "Records": [],
    "TotalNumRows": 0
  }
}

Database schemas

{
  "Schemas": [
    "public",
    "sales"
  ]
}

System table names

{
  "SystemTables": [
    "STL_QUERY",
    "SVL_USER_INFO"
  ]
}

Tenant list

{
  "Tenants": []
}

Catalog table-view access status

{
  "Message": "User table view access is - enabled"
}

Workload management queues

{
  "WLMConfiguration": []
}

Catalog index history (clustertype=os, operations=indexhistory)

[
  {
    "UserId": "owner@example.com",
    "Time": "2026-02-25 12:30:45",
    "Action": "reindex"
  },
  {
    "UserId": "admin@example.com",
    "Time": "2026-02-20 09:02:11",
    "Action": "delete"
  }
]

No indexing operations recorded yet

[]

OpenSearch metrics (clustertype=os, operations=metrics)

{
  "Clusters": {
    "ClusterType": "OpenSearch",
    "Metrics": {
      "StartTime": "2026-08-13 13:05:00",
      "EndTime": "2026-08-13 13:35:00",
      "CPUUtilization": {
        "Label": "CPUUtilization",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 18.4,
            "Unit": "Percent"
          }
        ]
      },
      "JVMMemoryPressure": {
        "Label": "JVMMemoryPressure",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 52.1,
            "Unit": "Percent"
          }
        ]
      },
      "Nodes": {
        "Label": "Nodes",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 2,
            "Unit": "Count"
          }
        ]
      },
      "SearchableDocuments": {
        "Label": "SearchableDocuments",
        "Datapoints": [
          {
            "Timestamp": "2026-08-13T13:10:00+00:00",
            "Average": 148302,
            "Unit": "Count"
          }
        ]
      }
    }
  }
}

RAG metrics on Aurora (clustertype=rag) - note the body is not wrapped in Clusters

{
  "ClusterType": "RAG Aurora",
  "ClusterIdentifier": "my-rag-aurora-cluster",
  "Engine": "aurora-postgresql",
  "Status": "available",
  "Metrics": {
    "StartTime": "2026-08-13 13:05:00",
    "EndTime": "2026-08-13 13:35:00",
    "CPUUtilization": {
      "Label": "CPUUtilization",
      "Datapoints": [
        {
          "Timestamp": "2026-08-13T13:10:00+00:00",
          "Average": 7.9,
          "Unit": "Percent"
        }
      ]
    },
    "ACUUtilization": {
      "Label": "ACUUtilization",
      "Datapoints": [
        {
          "Timestamp": "2026-08-13T13:10:00+00:00",
          "Average": 22.3,
          "Unit": "Percent"
        }
      ]
    },
    "DatabaseConnections": {
      "Label": "DatabaseConnections",
      "Datapoints": [
        {
          "Timestamp": "2026-08-13T13:10:00+00:00",
          "Average": 4,
          "Unit": "Count"
        }
      ]
    }
  }
}

RAG metrics on OpenSearch Serverless (clustertype=rag)

{
  "ClusterType": "RAG OpenSearch Serverless",
  "CollectionId": "abc123def456",
  "CollectionName": "amorphic-rag-collection",
  "CollectionEndpoint": "https://abc123def456.us-east-1.aoss.amazonaws.com",
  "Status": "ACTIVE",
  "Metrics": {
    "StartTime": "2026-08-13 13:05:00",
    "EndTime": "2026-08-13 13:35:00",
    "SearchRequestRate": {
      "Label": "SearchRequestRate",
      "Datapoints": [
        {
          "Timestamp": "2026-08-13T13:10:00+00:00",
          "Average": 12.0,
          "Unit": "Count/Second"
        }
      ]
    },
    "SearchOCU": {
      "Label": "SearchOCU",
      "Datapoints": [
        {
          "Timestamp": "2026-08-13T13:10:00+00:00",
          "Average": 2,
          "Unit": "Count"
        }
      ]
    }
  }
}

RAG metrics collection failed - see the operation description for the status code

{
  "ClusterType": "RDS Aurora",
  "Error": "Failed to retrieve RAG metrics: <exception details>",
  "Metrics": {}
}

Errors

Documented error codes: IPV-1045, IPV-1001, IPV-1004, IPV-1006, IPV-1019, AI-1004.

HTTP 400

Validation, authorization, or unsupported operation.

queryId absent for operations=queries (dwh)

{
  "Message": "IPV-1045 - Missing required parameter - queryId"
}

startTime/endTime absent for operations=queries-loads (dwh)

{
  "Message": "IPV-1001 - Missing required key(s) '[startTime, endTime]' in the input"
}

Unsupported operation for clustertype=os

{
  "Message": "IPV-1004 - Invalid operation type 'wlm' for OpenSearch cluster.Valid values are: ['indexhistory', 'metrics']."
}

Unsupported operation for clustertype=rag, which supports metrics only

{
  "Message": "IPV-1004 - Invalid operation type for RAG cluster."
}

filterExpression names a metric not valid for this clustertype

{
  "Message": "IPV-1006 - Invalid input filter keys - {'PercentageDiskSpaceUsed'}"
}

Non-numeric duration for operations=metrics

{
  "Message": "IPV-1019 - Invalid value for MetricDuration"
}

clustertype=rag on an environment without AI services enabled

{
  "Message": "AI-1004 - Rag Management is available only for the AI services enabled environment. Please contact the administrator to enable it."
}

HTTP 500

Backend/generic failure.