update_view
¶
update_view(
name: ViewName,
*,
config_overrides: Optional[CloudWatchOmniClientConfig] = None,
definition: Optional[ViewDefinition] = None,
description: Optional[ViewDescription] = None,
) -> UpdateViewResponse
Updates an existing view's definition and/or description. Only the fields you provide are changed. Managed views cannot be updated.
Parameters:
-
name(ViewName) –The name of the view to update.
-
definition(Optional[ViewDefinition], default:None) –The new SQL query that defines the view. Omit to leave unchanged.
-
description(Optional[ViewDescription], default:None) –The new description of the view. Omit to leave unchanged.
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.
-
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:
Update a view's definition The following example changes only the definition; the omitted description is left unchanged. Managed views cannot be updated. The response carries the view's effective configuration. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.update_view(name='view.service_errors', definition='SELECT resource[\'attributes\'][\'service.name\'] AS service, COUNT(*) AS error_count FROM "logs.default" WHERE status[\'code\'] IN (\'2\', \'ERROR\') GROUP BY service')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 | |