updateTemplate method

Future<void> updateTemplate({
  1. required String templateArn,
  2. TemplateDefinition? definition,
  3. bool? reenrollAllCertificateHolders,
})

Update template configuration to define the information included in certificates.

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

Parameter templateArn : The Amazon Resource Name (ARN) that was returned when you called CreateTemplate.

Parameter definition : Template configuration to define the information included in certificates. Define certificate validity and renewal periods, certificate request handling and enrollment options, key usage extensions, application policies, and cryptography settings.

Parameter reenrollAllCertificateHolders : This setting allows the major version of a template to be increased automatically. All members of Active Directory groups that are allowed to enroll with a template will receive a new certificate issued using that template.

Implementation

Future<void> updateTemplate({
  required String templateArn,
  TemplateDefinition? definition,
  bool? reenrollAllCertificateHolders,
}) async {
  final $payload = <String, dynamic>{
    if (definition != null) 'Definition': definition,
    if (reenrollAllCertificateHolders != null)
      'ReenrollAllCertificateHolders': reenrollAllCertificateHolders,
  };
  await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/templates/${Uri.encodeComponent(templateArn)}',
    exceptionFnMap: _exceptionFns,
  );
}