deleteInstanceSnapshot method
Future<DeleteInstanceSnapshotResult>
deleteInstanceSnapshot({
- required String instanceSnapshotName,
Deletes a specific snapshot of a virtual private server (or instance).
The delete instance snapshot
operation supports tag-based
access control via resource tags applied to the resource identified by
instance snapshot name
. For more information, see the Lightsail
Dev Guide.
May throw ServiceException. May throw InvalidInputException. May throw NotFoundException. May throw OperationFailureException. May throw AccessDeniedException. May throw AccountSetupInProgressException. May throw UnauthenticatedException.
Parameter instanceSnapshotName
:
The name of the snapshot to delete.
Implementation
Future<DeleteInstanceSnapshotResult> deleteInstanceSnapshot({
required String instanceSnapshotName,
}) async {
ArgumentError.checkNotNull(instanceSnapshotName, 'instanceSnapshotName');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Lightsail_20161128.DeleteInstanceSnapshot'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'instanceSnapshotName': instanceSnapshotName,
},
);
return DeleteInstanceSnapshotResult.fromJson(jsonResponse.body);
}