createCloudWatchAlarmTemplateGroup method

Future<CreateCloudWatchAlarmTemplateGroupResponse> createCloudWatchAlarmTemplateGroup({
  1. required String name,
  2. String? description,
  3. String? requestId,
  4. Map<String, String>? tags,
})

Creates a cloudwatch alarm template group to group your cloudwatch alarm templates and to attach to signal maps for dynamically creating alarms.

May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter name : A resource's name. Names must be unique within the scope of a resource type in a specific region.

Parameter description : A resource's optional description.

Parameter requestId : An ID that you assign to a create request. This ID ensures idempotency when creating resources.

Implementation

Future<CreateCloudWatchAlarmTemplateGroupResponse>
    createCloudWatchAlarmTemplateGroup({
  required String name,
  String? description,
  String? requestId,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    if (description != null) 'description': description,
    'requestId': requestId ?? _s.generateIdempotencyToken(),
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/prod/cloudwatch-alarm-template-groups',
    exceptionFnMap: _exceptionFns,
  );
  return CreateCloudWatchAlarmTemplateGroupResponse.fromJson(response);
}