deleteAttachment method
Deletes a form attachment from an asset in Glue Data Catalog.
May throw AccessDeniedException.
May throw ConcurrentModificationException.
May throw EntityNotFoundException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw ThrottlingException.
Parameter assetIdentifier :
The unique identifier of the asset from which to delete the attachment.
Parameter attachmentName :
The name of the attachment to delete.
Parameter itemIdentifier :
The identifier of the item within the iterable form. Required when
iterableFormName is specified.
Parameter iterableFormName :
The name of the iterable form. When specified along with
itemIdentifier, the attachment is deleted from an item within
the iterable form rather than from the asset itself.
Implementation
Future<DeleteAttachmentResponse> deleteAttachment({
required String assetIdentifier,
required String attachmentName,
String? itemIdentifier,
String? iterableFormName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.DeleteAttachment'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AssetIdentifier': assetIdentifier,
'AttachmentName': attachmentName,
if (itemIdentifier != null) 'ItemIdentifier': itemIdentifier,
if (iterableFormName != null) 'IterableFormName': iterableFormName,
},
);
return DeleteAttachmentResponse.fromJson(jsonResponse.body);
}