deleteWorkspaceImage method
Deletes the specified image from your account. To delete an image, you must first delete any bundles that are associated with the image and unshare the image if it is shared with other accounts.
May throw ResourceAssociatedException. May throw InvalidResourceStateException. May throw AccessDeniedException.
Parameter imageId
:
The identifier of the image.
Implementation
Future<void> deleteWorkspaceImage({
required String imageId,
}) async {
ArgumentError.checkNotNull(imageId, 'imageId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkspacesService.DeleteWorkspaceImage'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ImageId': imageId,
},
);
}