createRevision method
This operation creates a revision for a data set.
May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException. May throw InternalServerException. May throw AccessDeniedException.
Parameter dataSetId
:
The unique identifier for a data set.
Parameter comment
:
An optional comment about the revision.
Parameter tags
:
A revision tag is an optional label that you can assign to a revision when
you create it. Each tag consists of a key and an optional value, both of
which you define. When you use tagging, you can also use tag-based access
control in IAM policies to control access to these data sets and
revisions.
Implementation
Future<CreateRevisionResponse> createRevision({
required String dataSetId,
String? comment,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(dataSetId, 'dataSetId');
_s.validateStringLength(
'comment',
comment,
0,
16384,
);
final $payload = <String, dynamic>{
if (comment != null) 'Comment': comment,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/data-sets/${Uri.encodeComponent(dataSetId)}/revisions',
exceptionFnMap: _exceptionFns,
);
return CreateRevisionResponse.fromJson(response);
}