createSchedule method
Creates a new schedule for one or more DataBrew jobs. Jobs can be run at a specific date and time, or at regular intervals.
May throw ConflictException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter cronExpression :
The date or dates and time or times when the jobs are to be run. For more
information, see Cron
expressions in the Glue DataBrew Developer Guide.
Parameter name :
A unique name for the schedule. Valid characters are alphanumeric (A-Z,
a-z, 0-9), hyphen (-), period (.), and space.
Parameter jobNames :
The name or names of one or more jobs to be run.
Parameter tags :
Metadata tags to apply to this schedule.
Implementation
Future<CreateScheduleResponse> createSchedule({
required String cronExpression,
required String name,
List<String>? jobNames,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'CronExpression': cronExpression,
'Name': name,
if (jobNames != null) 'JobNames': jobNames,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/schedules',
exceptionFnMap: _exceptionFns,
);
return CreateScheduleResponse.fromJson(response);
}