createReviewTemplate method

Future<CreateReviewTemplateOutput> createReviewTemplate({
  1. required String description,
  2. required List<String> lenses,
  3. required String templateName,
  4. String? clientRequestToken,
  5. String? notes,
  6. Map<String, String>? tags,
})

Create a review template.

Do not include or gather personal identifiable information (PII) of end users or other identifiable individuals in or via your review templates. If your review template or those shared with you and used in your account do include or collect PII you are responsible for: ensuring that the included PII is processed in accordance with applicable law, providing adequate privacy notices, and obtaining necessary consents for processing such data.

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

Parameter description : The review template description.

Parameter lenses : Lenses applied to the review template.

Parameter templateName : Name of the review template.

Parameter tags : The tags assigned to the review template.

Implementation

Future<CreateReviewTemplateOutput> createReviewTemplate({
  required String description,
  required List<String> lenses,
  required String templateName,
  String? clientRequestToken,
  String? notes,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Description': description,
    'Lenses': lenses,
    'TemplateName': templateName,
    'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
    if (notes != null) 'Notes': notes,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/reviewTemplates',
    exceptionFnMap: _exceptionFns,
  );
  return CreateReviewTemplateOutput.fromJson(response);
}