updateAsset method
Updates the name and description of an existing asset in Glue Data Catalog. Only the fields that you provide are updated.
May throw AccessDeniedException.
May throw ConcurrentModificationException.
May throw EntityNotFoundException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw ThrottlingException.
Parameter identifier :
The unique identifier of the asset to update.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter description :
The new description of the asset.
Parameter name :
The new name of the asset.
Implementation
Future<UpdateAssetResponse> updateAsset({
required String identifier,
String? clientToken,
String? description,
String? name,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.UpdateAsset'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Identifier': identifier,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'Description': description,
if (name != null) 'Name': name,
},
);
return UpdateAssetResponse.fromJson(jsonResponse.body);
}