updateReviewTemplate method

Future<UpdateReviewTemplateOutput> updateReviewTemplate({
  1. required String templateArn,
  2. String? description,
  3. List<String>? lensesToAssociate,
  4. List<String>? lensesToDisassociate,
  5. String? notes,
  6. String? templateName,
})

Update a review template.

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

Parameter templateArn : The review template ARN.

Parameter description : The review template description.

Parameter lensesToAssociate : A list of lens aliases or ARNs to apply to the review template.

Parameter lensesToDisassociate : A list of lens aliases or ARNs to unapply to the review template. The wellarchitected lens cannot be unapplied.

Parameter templateName : The review template name.

Implementation

Future<UpdateReviewTemplateOutput> updateReviewTemplate({
  required String templateArn,
  String? description,
  List<String>? lensesToAssociate,
  List<String>? lensesToDisassociate,
  String? notes,
  String? templateName,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'Description': description,
    if (lensesToAssociate != null) 'LensesToAssociate': lensesToAssociate,
    if (lensesToDisassociate != null)
      'LensesToDisassociate': lensesToDisassociate,
    if (notes != null) 'Notes': notes,
    if (templateName != null) 'TemplateName': templateName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/reviewTemplates/${Uri.encodeComponent(templateArn)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateReviewTemplateOutput.fromJson(response);
}