createRuleset method
Creates a new ruleset that can be used in a profile job to validate the data quality of a dataset.
May throw ConflictException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter name :
The name of the ruleset to be created. Valid characters are alphanumeric
(A-Z, a-z, 0-9), hyphen (-), period (.), and space.
Parameter rules :
A list of rules that are defined with the ruleset. A rule includes one or
more checks to be validated on a DataBrew dataset.
Parameter targetArn :
The Amazon Resource Name (ARN) of a resource (dataset) that the ruleset is
associated with.
Parameter description :
The description of the ruleset.
Parameter tags :
Metadata tags to apply to the ruleset.
Implementation
Future<CreateRulesetResponse> createRuleset({
required String name,
required List<Rule> rules,
required String targetArn,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'Name': name,
'Rules': rules,
'TargetArn': targetArn,
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/rulesets',
exceptionFnMap: _exceptionFns,
);
return CreateRulesetResponse.fromJson(response);
}