createSnapshotSchedule method

Future<SnapshotSchedule> createSnapshotSchedule({
  1. bool? dryRun,
  2. int? nextInvocations,
  3. List<String>? scheduleDefinitions,
  4. String? scheduleDescription,
  5. String? scheduleIdentifier,
  6. List<Tag>? tags,
})

Create a snapshot schedule that can be associated to a cluster and which overrides the default system backup schedule.

May throw SnapshotScheduleAlreadyExistsFault. May throw InvalidScheduleFault. May throw SnapshotScheduleQuotaExceededFault. May throw TagLimitExceededFault. May throw ScheduleDefinitionTypeUnsupportedFault. May throw InvalidTagFault.

Parameter dryRun :

Parameter nextInvocations :

Parameter scheduleDefinitions : The definition of the snapshot schedule. The definition is made up of schedule expressions, for example "cron(30 12 *)" or "rate(12 hours)".

Parameter scheduleDescription : The description of the snapshot schedule.

Parameter scheduleIdentifier : A unique identifier for a snapshot schedule. Only alphanumeric characters are allowed for the identifier.

Parameter tags : An optional set of tags you can use to search for the schedule.

Implementation

Future<SnapshotSchedule> createSnapshotSchedule({
  bool? dryRun,
  int? nextInvocations,
  List<String>? scheduleDefinitions,
  String? scheduleDescription,
  String? scheduleIdentifier,
  List<Tag>? tags,
}) async {
  _s.validateStringLength(
    'scheduleDescription',
    scheduleDescription,
    0,
    2147483647,
  );
  _s.validateStringLength(
    'scheduleIdentifier',
    scheduleIdentifier,
    0,
    2147483647,
  );
  final $request = <String, dynamic>{};
  dryRun?.also((arg) => $request['DryRun'] = arg);
  nextInvocations?.also((arg) => $request['NextInvocations'] = arg);
  scheduleDefinitions?.also((arg) => $request['ScheduleDefinitions'] = arg);
  scheduleDescription?.also((arg) => $request['ScheduleDescription'] = arg);
  scheduleIdentifier?.also((arg) => $request['ScheduleIdentifier'] = arg);
  tags?.also((arg) => $request['Tags'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'CreateSnapshotSchedule',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateSnapshotScheduleMessage'],
    shapes: shapes,
    resultWrapper: 'CreateSnapshotScheduleResult',
  );
  return SnapshotSchedule.fromXml($result);
}