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
4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 | |