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
4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 | |