createAcmeEndpoint method
Creates an ACME endpoint, which is a managed ACME server with a unique endpoint URL. After creation, ACME clients can use the endpoint URL to automate certificate issuance using the ACME protocol.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter authorizationBehavior :
The authorization behavior for the ACME endpoint.
Parameter certificateAuthority :
The type of certificate authority to use for issuing certificates through
this ACME endpoint.
Parameter certificateTags :
Tags to apply to certificates issued through this ACME endpoint.
Parameter contact :
Specifies whether ACME clients must provide contact information during
account registration.
Parameter idempotencyToken :
A unique, case-sensitive identifier to ensure idempotency of the request.
Parameter tags :
One or more tags to associate with the ACME endpoint.
Implementation
Future<CreateAcmeEndpointResponse> createAcmeEndpoint({
required AcmeAuthorizationBehavior authorizationBehavior,
required CertificateAuthority certificateAuthority,
List<Tag>? certificateTags,
AcmeContact? contact,
String? idempotencyToken,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CertificateManager.CreateAcmeEndpoint'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AuthorizationBehavior': authorizationBehavior.value,
'CertificateAuthority': certificateAuthority,
if (certificateTags != null) 'CertificateTags': certificateTags,
if (contact != null) 'Contact': contact.value,
'IdempotencyToken': idempotencyToken ?? _s.generateIdempotencyToken(),
if (tags != null) 'Tags': tags,
},
endpoint: _resolveEndpoint(
serviceType: 'ACM-ACME',
),
);
return CreateAcmeEndpointResponse.fromJson(jsonResponse.body);
}