Skip to content

update_scheduled_report async

update_scheduled_report(
    arn: ScheduledReportArn,
    *,
    config_overrides: Optional[AsyncBCMDashboardsClientConfig] = None,
    name: Optional[ScheduledReportName] = None,
    description: Optional[Description] = None,
    dashboard_arn: Optional[DashboardArn] = None,
    scheduled_report_execution_role_arn: Optional[ServiceRoleArn] = None,
    schedule_config: Optional[ScheduleConfig] = None,
    widget_ids: Optional[WidgetIdList] = None,
    widget_date_range_override: Optional[DateTimeRange] = None,
    clear_widget_ids: Optional[bool] = None,
    clear_widget_date_range_override: Optional[bool] = None,
) -> UpdateScheduledReportResponse

Updates an existing scheduled report's properties, including its name, description, schedule configuration, and widget settings. Only the parameters included in the request are updated; all other properties remain unchanged.

Parameters:

  • arn (ScheduledReportArn) –

    The ARN of the scheduled report to update.

  • name (Optional[ScheduledReportName], default: None ) –

    The new name for the scheduled report.

  • description (Optional[Description], default: None ) –

    The new description for the scheduled report.

  • dashboard_arn (Optional[DashboardArn], default: None ) –

    The ARN of the dashboard to associate with the scheduled report.

  • scheduled_report_execution_role_arn (Optional[ServiceRoleArn], default: None ) –

    The ARN of the IAM role that the scheduled report uses to execute. Amazon Web Services Billing and Cost Management Dashboards will assume this IAM role while executing the scheduled report.

  • schedule_config (Optional[ScheduleConfig], default: None ) –

    The updated schedule configuration for the report.

  • widget_ids (Optional[WidgetIdList], default: None ) –

    The list of widget identifiers to include in the scheduled report. If not specified, all widgets in the dashboard are included.

  • widget_date_range_override (Optional[DateTimeRange], default: None ) –

    The date range override to apply to widgets in the scheduled report.

  • clear_widget_ids (Optional[bool], default: None ) –

    Set to true to clear existing widgetIds.

  • clear_widget_date_range_override (Optional[bool], default: None ) –

    Set to true to clear existing widgetDateRangeOverride.

Raises:

  • AccessDeniedException –

    You do not have sufficient permissions to perform this action. Verify your IAM permissions and any resource policies.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the resource. For example, attempting to create a resource that already exists or is being created.

  • InternalServerException –

    An internal error occurred while processing the request. Retry your request. If the problem persists, contact Amazon Web Services Support.

  • ResourceNotFoundException –

    The specified resource (dashboard, policy, or widget) was not found. Verify the ARN and try again.

  • ThrottlingException –

    The request was denied due to request throttling. Reduce the frequency of requests and use exponential backoff.

  • ValidationException –

    The input parameters do not satisfy the requirements. Check the error message for specific validation details.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_bcm_dashboards/_services/async_bcm_dashboards.py
async def update_scheduled_report(
    self,
    arn: "capo_bcm_dashboards.types.scheduled_report_arn.ScheduledReportArn",
    *,
    config_overrides: Optional[AsyncBCMDashboardsClientConfig] = None,
    name: Optional[
        "capo_bcm_dashboards.types.scheduled_report_name.ScheduledReportName"
    ] = None,
    description: Optional[
        "capo_bcm_dashboards.types.description.Description"
    ] = None,
    dashboard_arn: Optional[
        "capo_bcm_dashboards.types.dashboard_arn.DashboardArn"
    ] = None,
    scheduled_report_execution_role_arn: Optional[
        "capo_bcm_dashboards.types.service_role_arn.ServiceRoleArn"
    ] = None,
    schedule_config: Optional[
        "capo_bcm_dashboards.types.schedule_config.ScheduleConfig"
    ] = None,
    widget_ids: Optional[
        "capo_bcm_dashboards.types.widget_id_list.WidgetIdList"
    ] = None,
    widget_date_range_override: Optional[
        "capo_bcm_dashboards.types.date_time_range.DateTimeRange"
    ] = None,
    clear_widget_ids: Optional[bool] = None,
    clear_widget_date_range_override: Optional[bool] = None,
) -> "capo_bcm_dashboards.types.update_scheduled_report_response.UpdateScheduledReportResponse":
    """<p>Updates an existing scheduled report's properties, including its name, description, schedule configuration, and widget settings. Only the parameters included in the request are updated; all other properties remain unchanged.</p>

    Args:
        arn: <p>The ARN of the scheduled report to update.</p>
        name: <p>The new name for the scheduled report.</p>
        description: <p>The new description for the scheduled report.</p>
        dashboard_arn: <p>The ARN of the dashboard to associate with the scheduled report.</p>
        scheduled_report_execution_role_arn: <p>The ARN of the IAM role that the scheduled report uses to execute. Amazon Web Services Billing and Cost Management Dashboards will assume this IAM role while executing the scheduled report.</p>
        schedule_config: <p>The updated schedule configuration for the report.</p>
        widget_ids: <p>The list of widget identifiers to include in the scheduled report. If not specified, all widgets in the dashboard are included.</p>
        widget_date_range_override: <p>The date range override to apply to widgets in the scheduled report.</p>
        clear_widget_ids: Set to true to clear existing widgetIds.
        clear_widget_date_range_override: Set to true to clear existing widgetDateRangeOverride.

    Raises:
        capo_bcm_dashboards.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action. Verify your IAM permissions and any resource policies.</p>
        capo_bcm_dashboards.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. For example, attempting to create a resource that already exists or is being created.</p>
        capo_bcm_dashboards.errors.internal_server_exception.InternalServerException: <p>An internal error occurred while processing the request. Retry your request. If the problem persists, contact Amazon Web Services Support.</p>
        capo_bcm_dashboards.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource (dashboard, policy, or widget) was not found. Verify the ARN and try again.</p>
        capo_bcm_dashboards.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Reduce the frequency of requests and use exponential backoff.</p>
        capo_bcm_dashboards.errors.validation_exception.ValidationException: <p>The input parameters do not satisfy the requirements. Check the error message for specific validation details.</p>
        capo_bcm_dashboards.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bcm_dashboards.types.update_scheduled_report_request.UpdateScheduledReportRequest]",
    ) -> AsyncOperationResponse[
        "capo_bcm_dashboards.types.update_scheduled_report_response.UpdateScheduledReportResponse"
    ]:
        import capo_bcm_dashboards._operations.awsbcm_dashboards_service.update_scheduled_report

        (
            output,
            http_response,
        ) = await capo_bcm_dashboards._operations.awsbcm_dashboards_service.update_scheduled_report.async_update_scheduled_report(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateScheduledReport")
    )
    input_: capo_bcm_dashboards.types.update_scheduled_report_request.UpdateScheduledReportRequest = {
        "arn": arn
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if dashboard_arn is not None:
        input_["dashboard_arn"] = dashboard_arn
    if scheduled_report_execution_role_arn is not None:
        input_["scheduled_report_execution_role_arn"] = (
            scheduled_report_execution_role_arn
        )
    if schedule_config is not None:
        input_["schedule_config"] = schedule_config
    if widget_ids is not None:
        input_["widget_ids"] = widget_ids
    if widget_date_range_override is not None:
        input_["widget_date_range_override"] = widget_date_range_override
    if clear_widget_ids is not None:
        input_["clear_widget_ids"] = clear_widget_ids
    if clear_widget_date_range_override is not None:
        input_["clear_widget_date_range_override"] = (
            clear_widget_date_range_override
        )

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output