createOmniDashboard
abstract suspend fun createOmniDashboard(input: CreateOmniDashboardRequest): CreateOmniDashboardResponse
Creates a new dashboard within a space. Use GetOmniDashboard and ListOmniDashboards to retrieve dashboards, UpdateOmniDashboard to modify one, and DeleteOmniDashboard to remove it.
Samples
// The following example creates a dashboard in a space from a JSON dashboard definition. Payloads are
// shown as JSON on the wire they are CBOR encoded.
val resp = cloudWatchOmniClient.createOmniDashboard {
spaceId = "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d"
name = "service-health-overview"
body = "{\"widgets\":[{\"type\":\"metric\",\"x\":0,\"y\":0,\"width\":12,\"height\":6,\"properties\":{\"metrics\":[[\"AWS/Lambda\",\"Errors\",\"FunctionName\",\"OrderProcessor\"]],\"region\":\"us-east-1\",\"title\":\"Lambda Errors\"}}]}"
description = "Overview of service health metrics."
tags = mapOf<String, String>(
"Team" to "observability"
)
clientToken = "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73"
}Content copied to clipboard