async def get_backup_plan_from_template(
self,
backup_plan_template_id: "capo_backup.types.string.string",
*,
config_overrides: Optional[AsyncBackupClientConfig] = None,
) -> "capo_backup.types.get_backup_plan_from_template_output.GetBackupPlanFromTemplateOutput":
"""<p>Returns the template specified by its <code>templateId</code> as a backup plan.</p>
Args:
backup_plan_template_id: <p>Uniquely identifies a stored backup plan template.</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.get_backup_plan_from_template_input.GetBackupPlanFromTemplateInput]",
) -> AsyncOperationResponse[
"capo_backup.types.get_backup_plan_from_template_output.GetBackupPlanFromTemplateOutput"
]:
import capo_backup._operations.cryo_controller_user_manager.get_backup_plan_from_template
(
output,
http_response,
) = await capo_backup._operations.cryo_controller_user_manager.get_backup_plan_from_template.async_get_backup_plan_from_template(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_backup.types.get_backup_plan_from_template_output.GetBackupPlanFromTemplateOutput",
) -> dict[str, Any]:
import capo_backup.types.get_backup_plan_from_template_output
return (
capo_backup.types.get_backup_plan_from_template_output.redact_sensitive(
output
)
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetBackupPlanFromTemplate", redact_output=_redact_output),
)
input_: capo_backup.types.get_backup_plan_from_template_input.GetBackupPlanFromTemplateInput = {
"backup_plan_template_id": backup_plan_template_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output