deleteSchedule method

Future<void> deleteSchedule({
  1. required String name,
  2. String? clientToken,
  3. String? groupName,
})

Deletes the specified schedule.

May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter name : The name of the schedule to delete.

Parameter clientToken : Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.

Parameter groupName : The name of the schedule group associated with this schedule. If you omit this, the default schedule group is used.

Implementation

Future<void> deleteSchedule({
  required String name,
  String? clientToken,
  String? groupName,
}) async {
  final $query = <String, List<String>>{
    if (clientToken != null) 'clientToken': [clientToken],
    if (groupName != null) 'groupName': [groupName],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/schedules/${Uri.encodeComponent(name)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}