Deletes all dashboards that you specify. You can specify up to 100 dashboards to delete. If there is an error during this call, the operation attempts to delete as many dashboards as possible.
Parameters:
-
dashboard_names
(Optional[DashboardNames], default:
None
)
–
The dashboards to be deleted. This parameter is required.
Raises:
Source code in docs_src/capo_cloudwatch/_services/async_cloud_watch.py
| async def delete_dashboards(
self,
*,
config_overrides: Optional[AsyncCloudWatchClientConfig] = None,
dashboard_names: Optional[
"capo_cloudwatch.types.dashboard_names.DashboardNames"
] = None,
) -> "capo_cloudwatch.types.delete_dashboards_output.DeleteDashboardsOutput":
"""<p>Deletes all dashboards that you specify. You can specify up to 100 dashboards to delete. If there is an error during this call, the operation attempts to delete as many dashboards as possible.</p>
Args:
dashboard_names: <p>The dashboards to be deleted. This parameter is required.</p>
Raises:
capo_cloudwatch.errors.conflict_exception.ConflictException: <p>This operation attempted to create a resource that already exists.</p>
capo_cloudwatch.errors.internal_service_fault.InternalServiceFault: <p>Request processing has failed due to some unknown error, exception, or failure.</p>
capo_cloudwatch.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of an input parameter is bad or out-of-range.</p>
capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudwatch.types.delete_dashboards_input.DeleteDashboardsInput]",
) -> AsyncOperationResponse[
"capo_cloudwatch.types.delete_dashboards_output.DeleteDashboardsOutput"
]:
import capo_cloudwatch._operations.granite_service_version20100801.delete_dashboards
(
output,
http_response,
) = await capo_cloudwatch._operations.granite_service_version20100801.delete_dashboards.async_delete_dashboards(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDashboards")
)
input_: capo_cloudwatch.types.delete_dashboards_input.DeleteDashboardsInput = {}
if dashboard_names is not None:
input_["dashboard_names"] = dashboard_names
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|