Skip to content

create_scheduled_report

create_scheduled_report(
    scheduled_report: ScheduledReportInput,
    *,
    config_overrides: Optional[BCMDashboardsClientConfig] = None,
    resource_tags: Optional[ResourceTagList] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateScheduledReportResponse

Creates a new scheduled report for a dashboard. A scheduled report automatically generates and delivers dashboard snapshots on a recurring schedule. Reports are delivered within 15 minutes of the scheduled delivery time.

Parameters:

  • scheduled_report (ScheduledReportInput) –

    The configuration for the scheduled report, including the dashboard to report on, the schedule, and the execution role that the service will use to generate the dashboard snapshot.

  • resource_tags (Optional[ResourceTagList], default: None ) –

    The tags to apply to the scheduled report resource for organization and management.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

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.

  • ServiceQuotaExceededException –

    The request would exceed a service quota. Review the service quotas for Amazon Web Services Billing and Cost Management Dashboards and retry your request.

  • 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/bcm_dashboards.py
def create_scheduled_report(
    self,
    scheduled_report: "capo_bcm_dashboards.types.scheduled_report_input.ScheduledReportInput",
    *,
    config_overrides: Optional[BCMDashboardsClientConfig] = None,
    resource_tags: Optional[
        "capo_bcm_dashboards.types.resource_tag_list.ResourceTagList"
    ] = None,
    client_token: Optional[
        "capo_bcm_dashboards.types.client_token.ClientToken"
    ] = None,
) -> "capo_bcm_dashboards.types.create_scheduled_report_response.CreateScheduledReportResponse":
    """<p>Creates a new scheduled report for a dashboard. A scheduled report automatically generates and delivers dashboard snapshots on a recurring schedule. Reports are delivered within 15 minutes of the scheduled delivery time.</p>

    Args:
        scheduled_report: <p>The configuration for the scheduled report, including the dashboard to report on, the schedule, and the execution role that the service will use to generate the dashboard snapshot.</p>
        resource_tags: <p>The tags to apply to the scheduled report resource for organization and management.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>

    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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed a service quota. Review the service quotas for Amazon Web Services Billing and Cost Management Dashboards and retry your request.</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.
    """

    def _handler(
        req: "OperationRequest[capo_bcm_dashboards.types.create_scheduled_report_request.CreateScheduledReportRequest]",
    ) -> OperationResponse[
        "capo_bcm_dashboards.types.create_scheduled_report_response.CreateScheduledReportResponse"
    ]:
        import capo_bcm_dashboards._operations.awsbcm_dashboards_service.create_scheduled_report

        output, http_response = (
            capo_bcm_dashboards._operations.awsbcm_dashboards_service.create_scheduled_report.create_scheduled_report(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateScheduledReport")
    )
    input_: capo_bcm_dashboards.types.create_scheduled_report_request.CreateScheduledReportRequest = {
        "scheduled_report": scheduled_report
    }
    if resource_tags is not None:
        input_["resource_tags"] = resource_tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output