updateAsset method

Future<UpdateAssetResponse> updateAsset({
  1. required String assetId,
  2. required String dataSetId,
  3. required String name,
  4. required String revisionId,
})

This operation updates an asset.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

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 Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of "Database(s) included in the LF-tag policy" or "Table(s) included in LF-tag policy" are used as the name.

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 {
  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);
}