update_view
async
¶
update_view(
name: ViewName,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = 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.
>>> await 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/async_cloud_watch_omni.py
6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 | |