getContextGraph

Queries the context graph with filtering, traversal, and pagination support. Pagination note: nodes and edges are returned together as a coherent subgraph. Pagination cursors advance over nodes (the primary collection); each page includes all edges connecting nodes within that page. Callers should treat nodes as the paginated collection and edges as supplementary relationship data attached to those nodes.

Samples

// The following example returns context graph nodes matching the filter and traverses one hop out to
// their direct dependencies, over a one hour window. Payloads are shown as JSON on the wire they are CBOR
// encoded.
val resp = cloudWatchOmniClient.getContextGraph {
    nodeFilters = NodeFilters {
        nodeType = NodeType.fromValue("SERVICE")
        namespace = listOf<String>(
            "ecommerce"
        )
    }
    startTime = "2026-09-16T00:00:00Z"
    endTime = "2026-09-16T01:00:00Z"
    depth = 1
    maxResults = 100
    includeMetadata = false
}