Starts an on-demand report job for the specified report plan.
Parameters:
-
report_plan_name
(ReportPlanName)
–
The unique name of a report plan.
-
idempotency_token
(Optional[string], default:
None
)
–
A customer-chosen string that you can use to distinguish between otherwise identical calls to StartReportJobInput. Retrying a successful request with the same idempotency token results in a success message with no action taken.
Raises:
Source code in docs_src/capo_backup/_services/backup.py
| def start_report_job(
self,
report_plan_name: "capo_backup.types.report_plan_name.ReportPlanName",
*,
config_overrides: Optional[BackupClientConfig] = None,
idempotency_token: Optional["capo_backup.types.string.string"] = None,
) -> "capo_backup.types.start_report_job_output.StartReportJobOutput":
"""<p>Starts an on-demand report job for the specified report plan.</p>
Args:
report_plan_name: <p>The unique name of a report plan.</p>
idempotency_token: <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartReportJobInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</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.
"""
def _handler(
req: "OperationRequest[capo_backup.types.start_report_job_input.StartReportJobInput]",
) -> OperationResponse[
"capo_backup.types.start_report_job_output.StartReportJobOutput"
]:
import capo_backup._operations.cryo_controller_user_manager.start_report_job
output, http_response = (
capo_backup._operations.cryo_controller_user_manager.start_report_job.start_report_job(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartReportJob")
)
input_: capo_backup.types.start_report_job_input.StartReportJobInput = {
"report_plan_name": report_plan_name
}
if idempotency_token is None:
idempotency_token = str(uuid.uuid4())
input_["idempotency_token"] = idempotency_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|