detachCertificateFromDistribution method
Future<DetachCertificateFromDistributionResult>
detachCertificateFromDistribution({
- required String distributionName,
Detaches an SSL/TLS certificate from your Amazon Lightsail content delivery network (CDN) distribution.
After the certificate is detached, your distribution stops accepting traffic for all of the domains that are associated with the certificate.
May throw ServiceException. May throw InvalidInputException. May throw NotFoundException. May throw OperationFailureException. May throw AccessDeniedException. May throw UnauthenticatedException.
Parameter distributionName
:
The name of the distribution from which to detach the certificate.
Use the GetDistributions
action to get a list of distribution
names that you can specify.
Implementation
Future<DetachCertificateFromDistributionResult>
detachCertificateFromDistribution({
required String distributionName,
}) async {
ArgumentError.checkNotNull(distributionName, 'distributionName');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Lightsail_20161128.DetachCertificateFromDistribution'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'distributionName': distributionName,
},
);
return DetachCertificateFromDistributionResult.fromJson(jsonResponse.body);
}