Deletes the specified view. Queries that reference the view fail after it is deleted. Managed views cannot be deleted.
Parameters:
-
name
(ViewName)
–
The name of the view to delete.
Raises:
Examples:
Delete a view
The following example deletes a view. The response body is empty. Queries that reference the view fail after it is deleted. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> await client.delete_view(name='view.service_errors')
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
| async def delete_view(
self,
name: "capo_cloudwatchomni.types.view_name.ViewName",
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
) -> "capo_cloudwatchomni.types.delete_view_response.DeleteViewResponse":
"""Deletes the specified view. Queries that reference the view fail after it is deleted. Managed views cannot be deleted.
Args:
name: The name of the view to delete.
Raises:
capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Delete a view
The following example deletes a view. The response body is empty. Queries that reference the view fail after it is deleted. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> await client.delete_view(name='view.service_errors')
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudwatchomni.types.delete_view_request.DeleteViewRequest]",
) -> AsyncOperationResponse[
"capo_cloudwatchomni.types.delete_view_response.DeleteViewResponse"
]:
import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.delete_view
(
output,
http_response,
) = await capo_cloudwatchomni._operations.cloud_watch_omni_frontend.delete_view.async_delete_view(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteView")
)
input_: capo_cloudwatchomni.types.delete_view_request.DeleteViewRequest = {
"name": name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|