Skip to content

update_report_plan

update_report_plan(
    report_plan_name: ReportPlanName,
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    report_plan_description: Optional[ReportPlanDescription] = None,
    report_delivery_channel: Optional[ReportDeliveryChannel] = None,
    report_setting: Optional[ReportSetting] = None,
    idempotency_token: Optional[string] = None,
) -> UpdateReportPlanOutput

Updates the specified report plan.

Parameters:

  • report_plan_name (ReportPlanName) –

    The unique name of the report plan. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).

  • report_plan_description (Optional[ReportPlanDescription], default: None ) –

    An optional description of the report plan with a maximum 1,024 characters.

  • report_delivery_channel (Optional[ReportDeliveryChannel], default: None ) –

    The information about where to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.

  • report_setting (Optional[ReportSetting], default: None ) –

    The report template for the report. Reports are built using a report template. The report templates are:

    RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT

    If the report template is RESOURCE_COMPLIANCE_REPORT or CONTROL_COMPLIANCE_REPORT, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.

  • idempotency_token (Optional[string], default: None ) –

    A customer-chosen string that you can use to distinguish between otherwise identical calls to UpdateReportPlanInput. 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 update_report_plan(
    self,
    report_plan_name: "capo_backup.types.report_plan_name.ReportPlanName",
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    report_plan_description: Optional[
        "capo_backup.types.report_plan_description.ReportPlanDescription"
    ] = None,
    report_delivery_channel: Optional[
        "capo_backup.types.report_delivery_channel.ReportDeliveryChannel"
    ] = None,
    report_setting: Optional[
        "capo_backup.types.report_setting.ReportSetting"
    ] = None,
    idempotency_token: Optional["capo_backup.types.string.string"] = None,
) -> "capo_backup.types.update_report_plan_output.UpdateReportPlanOutput":
    """<p>Updates the specified report plan.</p>

    Args:
        report_plan_name: <p>The unique name of the report plan. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
        report_plan_description: <p>An optional description of the report plan with a maximum 1,024 characters.</p>
        report_delivery_channel: <p>The information about where to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.</p>
        report_setting: <p>The report template for the report. Reports are built using a report template. The report templates are:</p> <p> <code>RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT</code> </p> <p>If the report template is <code>RESOURCE_COMPLIANCE_REPORT</code> or <code>CONTROL_COMPLIANCE_REPORT</code>, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.</p>
        idempotency_token: <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>UpdateReportPlanInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>

    Raises:
        capo_backup.errors.conflict_exception.ConflictException: <p>Backup can't perform the action that you requested until it finishes performing a previous action. Try again later.</p>
        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.update_report_plan_input.UpdateReportPlanInput]",
    ) -> OperationResponse[
        "capo_backup.types.update_report_plan_output.UpdateReportPlanOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.update_report_plan

        output, http_response = (
            capo_backup._operations.cryo_controller_user_manager.update_report_plan.update_report_plan(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateReportPlan")
    )
    input_: capo_backup.types.update_report_plan_input.UpdateReportPlanInput = {
        "report_plan_name": report_plan_name
    }
    if report_plan_description is not None:
        input_["report_plan_description"] = report_plan_description
    if report_delivery_channel is not None:
        input_["report_delivery_channel"] = report_delivery_channel
    if report_setting is not None:
        input_["report_setting"] = report_setting
    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