createCaseRule method
Creates a new case rule. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainId :
Unique identifier of a Cases domain.
Parameter name :
Name of the case rule.
Parameter rule :
Represents what rule type should take place, under what conditions.
Parameter description :
The description of a case rule.
Implementation
Future<CreateCaseRuleResponse> createCaseRule({
required String domainId,
required String name,
required CaseRuleDetails rule,
String? description,
}) async {
final $payload = <String, dynamic>{
'name': name,
'rule': rule,
if (description != null) 'description': description,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/domains/${Uri.encodeComponent(domainId)}/case-rules',
exceptionFnMap: _exceptionFns,
);
return CreateCaseRuleResponse.fromJson(response);
}