updateAsset method
This operation updates an asset.
May throw ValidationException. May throw InternalServerException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ConflictException.
Parameter assetId
:
The unique identifier for an asset.
Parameter dataSetId
:
The unique identifier for a data set.
Parameter name
:
The name of the asset. When importing from Amazon S3, the S3 object key is
used as the asset name. When exporting to Amazon S3, the asset name is
used as default target S3 object key.
Parameter revisionId
:
The unique identifier for a revision.
Implementation
Future<UpdateAssetResponse> updateAsset({
required String assetId,
required String dataSetId,
required String name,
required String revisionId,
}) async {
ArgumentError.checkNotNull(assetId, 'assetId');
ArgumentError.checkNotNull(dataSetId, 'dataSetId');
ArgumentError.checkNotNull(name, 'name');
ArgumentError.checkNotNull(revisionId, 'revisionId');
final $payload = <String, dynamic>{
'Name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/v1/data-sets/${Uri.encodeComponent(dataSetId)}/revisions/${Uri.encodeComponent(revisionId)}/assets/${Uri.encodeComponent(assetId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateAssetResponse.fromJson(response);
}