createScheduleGroup method

Future<CreateScheduleGroupOutput> createScheduleGroup({
  1. required String name,
  2. String? clientToken,
  3. List<Tag>? tags,
})

Creates the specified schedule group.

May throw ConflictException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter name : The name of the schedule group that you are creating.

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 tags : The list of tags to associate with the schedule group.

Implementation

Future<CreateScheduleGroupOutput> createScheduleGroup({
  required String name,
  String? clientToken,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/schedule-groups/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
  return CreateScheduleGroupOutput.fromJson(response);
}