deleteDistribution method
Deletes your Amazon Lightsail content delivery network (CDN) distribution.
May throw AccessDeniedException.
May throw InvalidInputException.
May throw NotFoundException.
May throw OperationFailureException.
May throw ServiceException.
May throw UnauthenticatedException.
Parameter distributionName :
The name of the distribution to delete.
Use the GetDistributions action to get a list of distribution
names that you can specify.
Implementation
Future<DeleteDistributionResult> deleteDistribution({
String? distributionName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Lightsail_20161128.DeleteDistribution'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (distributionName != null) 'distributionName': distributionName,
},
);
return DeleteDistributionResult.fromJson(jsonResponse.body);
}