async def update_backup_plan(
self,
backup_plan_id: "capo_backup.types.string.string",
backup_plan: "capo_backup.types.backup_plan_input.BackupPlanInput",
*,
config_overrides: Optional[AsyncBackupClientConfig] = None,
) -> "capo_backup.types.update_backup_plan_output.UpdateBackupPlanOutput":
"""<p>Updates the specified backup plan. The new version is uniquely identified by its ID.</p>
Args:
backup_plan_id: <p>The ID of the backup plan.</p>
backup_plan: <p>The body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</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.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.update_backup_plan_input.UpdateBackupPlanInput]",
) -> AsyncOperationResponse[
"capo_backup.types.update_backup_plan_output.UpdateBackupPlanOutput"
]:
import capo_backup._operations.cryo_controller_user_manager.update_backup_plan
(
output,
http_response,
) = await capo_backup._operations.cryo_controller_user_manager.update_backup_plan.async_update_backup_plan(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_backup.types.update_backup_plan_input.UpdateBackupPlanInput",
) -> dict[str, Any]:
import capo_backup.types.update_backup_plan_input
return capo_backup.types.update_backup_plan_input.redact_sensitive(input_)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("UpdateBackupPlan", redact_input=_redact_input),
)
input_: capo_backup.types.update_backup_plan_input.UpdateBackupPlanInput = {
"backup_plan_id": backup_plan_id,
"backup_plan": backup_plan,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output