createTemplate method
Creates an Active Directory compatible certificate template. The connectors issues certificates using these templates based on the requester’s Active Directory group membership.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter connectorArn :
The Amazon Resource Name (ARN) that was returned when you called CreateConnector.
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 name :
Name of the template. The template name must be unique.
Parameter clientToken :
Idempotency token.
Parameter tags :
Metadata assigned to a template consisting of a key-value pair.
Implementation
Future<CreateTemplateResponse> createTemplate({
required String connectorArn,
required TemplateDefinition definition,
required String name,
String? clientToken,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'ConnectorArn': connectorArn,
'Definition': definition,
'Name': name,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/templates',
exceptionFnMap: _exceptionFns,
);
return CreateTemplateResponse.fromJson(response);
}