updateRevision method

Future<UpdateRevisionResponse> updateRevision({
  1. required String dataSetId,
  2. required String revisionId,
  3. String? comment,
  4. bool? finalized,
})

This operation updates a revision.

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

Parameter dataSetId : The unique identifier for a data set.

Parameter revisionId : The unique identifier for a revision.

Parameter comment : An optional comment about the revision.

Parameter finalized : Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.

Implementation

Future<UpdateRevisionResponse> updateRevision({
  required String dataSetId,
  required String revisionId,
  String? comment,
  bool? finalized,
}) async {
  ArgumentError.checkNotNull(dataSetId, 'dataSetId');
  ArgumentError.checkNotNull(revisionId, 'revisionId');
  _s.validateStringLength(
    'comment',
    comment,
    0,
    16384,
  );
  final $payload = <String, dynamic>{
    if (comment != null) 'Comment': comment,
    if (finalized != null) 'Finalized': finalized,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/v1/data-sets/${Uri.encodeComponent(dataSetId)}/revisions/${Uri.encodeComponent(revisionId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateRevisionResponse.fromJson(response);
}