BillingandCostManagementDashboards / Client / create_scheduled_report
create_scheduled_report¶
- BillingandCostManagementDashboards.Client.create_scheduled_report(**kwargs)¶
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.
See also: AWS API Documentation
Request Syntax
response = client.create_scheduled_report( scheduledReport={ 'name': 'string', 'dashboardArn': 'string', 'scheduledReportExecutionRoleArn': 'string', 'scheduleConfig': { 'scheduleExpression': 'string', 'scheduleExpressionTimeZone': 'string', 'schedulePeriod': { 'startTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1) }, 'state': 'ENABLED'|'DISABLED' }, 'description': 'string', 'widgetIds': [ 'string', ], 'widgetDateRangeOverride': { 'startTime': { 'type': 'ABSOLUTE'|'RELATIVE', 'value': 'string' }, 'endTime': { 'type': 'ABSOLUTE'|'RELATIVE', 'value': 'string' } } }, resourceTags=[ { 'key': 'string', 'value': 'string' }, ], clientToken='string' )
- Parameters:
scheduledReport (dict) –
[REQUIRED]
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.
name (string) – [REQUIRED]
The name of the scheduled report.
dashboardArn (string) – [REQUIRED]
The ARN of the dashboard to generate the scheduled report from.
scheduledReportExecutionRoleArn (string) – [REQUIRED]
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.
scheduleConfig (dict) – [REQUIRED]
The schedule configuration that defines when and how often the report is generated. If the schedule state is not specified, it defaults to
ENABLED.scheduleExpression (string) –
The schedule expression that specifies when to trigger the scheduled report run. This value must be a cron expression consisting of six fields separated by white spaces:
cron(minutes hours day_of_month month day_of_week year).scheduleExpressionTimeZone (string) –
The time zone for the schedule expression, for example,
UTC.schedulePeriod (dict) –
The time period during which the schedule is active.
startTime (datetime) –
The start time of the schedule period. If not specified, defaults to the time of the create or update request. The start time cannot be more than 5 minutes before the time of the request.
endTime (datetime) –
The end time of the schedule period. If not specified, defaults to 3 years from the time of the create or update request. The maximum allowed value is 3 years from the current time. Setting an end time beyond this limit returns a
ValidationException.
state (string) –
The state of the schedule.
ENABLEDmeans the scheduled report runs according to its schedule expression.DISABLEDmeans the scheduled report is paused and will not run until re-enabled.
description (string) –
A description of the scheduled report’s purpose or contents.
widgetIds (list) –
The list of widget identifiers to include in the scheduled report. If not specified, all widgets in the dashboard are included.
(string) –
widgetDateRangeOverride (dict) –
The date range override to apply to widgets in the scheduled report.
startTime (dict) – [REQUIRED]
The start time of the date range for querying data.
type (string) – [REQUIRED]
The type of date/time value:
ABSOLUTEfor specific dates orRELATIVEfor dynamic time periods.value (string) – [REQUIRED]
The actual date/time value.
endTime (dict) – [REQUIRED]
The end time of the date range for querying data.
type (string) – [REQUIRED]
The type of date/time value:
ABSOLUTEfor specific dates orRELATIVEfor dynamic time periods.value (string) – [REQUIRED]
The actual date/time value.
resourceTags (list) –
The tags to apply to the scheduled report resource for organization and management.
(dict) –
A key-value pair that can be attached to a dashboard for organization and management purposes.
key (string) – [REQUIRED]
The key of the tag to be attached to the dashboard resource.
value (string) – [REQUIRED]
The value of the tag to be attached to the dashboard resource.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'arn': 'string' }
Response Structure
(dict) –
arn (string) –
The ARN of the newly created scheduled report.
Exceptions
BillingandCostManagementDashboards.Client.exceptions.ThrottlingExceptionBillingandCostManagementDashboards.Client.exceptions.ConflictExceptionBillingandCostManagementDashboards.Client.exceptions.AccessDeniedExceptionBillingandCostManagementDashboards.Client.exceptions.InternalServerExceptionBillingandCostManagementDashboards.Client.exceptions.ValidationExceptionBillingandCostManagementDashboards.Client.exceptions.ServiceQuotaExceededException