Deletes a backup plan. A backup plan can only be deleted after all associated selections of resources have been deleted. Deleting a backup plan deletes the current version of a backup plan. Previous versions, if any, will still exist.
Parameters:
-
backup_plan_id
(string)
–
Uniquely identifies a backup plan.
Raises:
Source code in docs_src/capo_backup/_services/async_backup.py
| async def delete_backup_plan(
self,
backup_plan_id: "capo_backup.types.string.string",
*,
config_overrides: Optional[AsyncBackupClientConfig] = None,
) -> "capo_backup.types.delete_backup_plan_output.DeleteBackupPlanOutput":
"""<p>Deletes a backup plan. A backup plan can only be deleted after all associated selections of resources have been deleted. Deleting a backup plan deletes the current version of a backup plan. Previous versions, if any, will still exist.</p>
Args:
backup_plan_id: <p>Uniquely identifies a backup plan.</p>
Raises:
capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
capo_backup.errors.invalid_request_exception.InvalidRequestException: <p>Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong type.</p>
capo_backup.errors.missing_parameter_value_exception.MissingParameterValueException: <p>Indicates that a required parameter is missing.</p>
capo_backup.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action doesn't exist.</p>
capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_backup.types.delete_backup_plan_input.DeleteBackupPlanInput]",
) -> AsyncOperationResponse[
"capo_backup.types.delete_backup_plan_output.DeleteBackupPlanOutput"
]:
import capo_backup._operations.cryo_controller_user_manager.delete_backup_plan
(
output,
http_response,
) = await capo_backup._operations.cryo_controller_user_manager.delete_backup_plan.async_delete_backup_plan(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteBackupPlan")
)
input_: capo_backup.types.delete_backup_plan_input.DeleteBackupPlanInput = {
"backup_plan_id": backup_plan_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|