deleteAutoSnapshot method
Deletes an automatic snapshot of an instance or disk. For more information, see the Amazon Lightsail Developer Guide.
May throw AccessDeniedException.
May throw InvalidInputException.
May throw NotFoundException.
May throw OperationFailureException.
May throw RegionSetupInProgressException.
May throw ServiceException.
May throw UnauthenticatedException.
Parameter date :
The date of the automatic snapshot to delete in YYYY-MM-DD
format. Use the get auto snapshots operation to get the
available automatic snapshots for a resource.
Parameter resourceName :
The name of the source instance or disk from which to delete the automatic
snapshot.
Implementation
Future<DeleteAutoSnapshotResult> deleteAutoSnapshot({
required String date,
required String resourceName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Lightsail_20161128.DeleteAutoSnapshot'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'date': date,
'resourceName': resourceName,
},
);
return DeleteAutoSnapshotResult.fromJson(jsonResponse.body);
}