create_omni_dashboard
async
¶
create_omni_dashboard(
space_id: SpaceId,
name: str,
body: str,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
description: Optional[str] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateOmniDashboardOutput
Creates a new dashboard within a space. Use GetOmniDashboard and ListOmniDashboards to retrieve dashboards, UpdateOmniDashboard to modify one, and DeleteOmniDashboard to remove it.
Parameters:
-
space_id(SpaceId) –The unique ID of the space to create the dashboard in.
-
name(str) –A name that identifies the dashboard.
-
body(str) –The dashboard definition, as a JSON document. Maximum 1 MiB.
-
description(Optional[str], default:None) –An optional description of the dashboard.
-
tags(Optional[TagMap], default:None) –The tags to associate with the dashboard.
-
client_token(Optional[ClientToken], default:None) –Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
ConflictException–The operation could not be completed because of a conflict with the current state of the resource.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–A service quota was exceeded.
-
ThrottlingException–The request was throttled due to exceeding the allowed request rate.
-
ValidationException–A parameter is specified incorrectly.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create a dashboard 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.
>>> await client.create_omni_dashboard(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d', name='service-health-overview', body='{"panels":[{"type":"markdown","title":"Overview","layout":{"x":0,"y":0,"w":60,"h":120},"config":{"content":"Service health for OrderProcessor."}},{"type":"explore","title":"Lambda errors","layout":{"x":0,"y":120,"w":60,"h":400},"config":{"queries":[{"queryId":"A","queryLanguage":"promql","queryString":"sum(rate(aws_lambda_errors_sum{function_name=\\"OrderProcessor\\"}[5m]))"}],"visualization":"line"}}]}', description='Overview of service health metrics.', tags={'Team': 'observability'}, client_token='3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73')
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 | |