createScheduledReport method
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter scheduledReport :
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.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter resourceTags :
The tags to apply to the scheduled report resource for organization and
management.
Implementation
Future<CreateScheduledReportResponse> createScheduledReport({
required ScheduledReportInput scheduledReport,
String? clientToken,
List<ResourceTag>? resourceTags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSBCMDashboardsService.CreateScheduledReport'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'scheduledReport': scheduledReport,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (resourceTags != null) 'resourceTags': resourceTags,
},
);
return CreateScheduledReportResponse.fromJson(jsonResponse.body);
}