stopContact method
Ends the specified contact.
May throw InvalidRequestException. May throw ContactNotFoundException. May throw InvalidParameterException. May throw ResourceNotFoundException. May throw InternalServiceException.
Parameter contactId :
The ID of the contact.
Parameter instanceId :
The identifier of the Amazon Connect instance.
Implementation
Future<void> stopContact({
required String contactId,
required String instanceId,
}) async {
ArgumentError.checkNotNull(contactId, 'contactId');
_s.validateStringLength(
'contactId',
contactId,
1,
256,
isRequired: true,
);
ArgumentError.checkNotNull(instanceId, 'instanceId');
_s.validateStringLength(
'instanceId',
instanceId,
1,
100,
isRequired: true,
);
final $payload = <String, dynamic>{
'ContactId': contactId,
'InstanceId': instanceId,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/contact/stop',
exceptionFnMap: _exceptionFns,
);
}