associateLexBot method
This API is in preview release for Connect Customer and is subject to change.
Allows the specified Connect Customer instance to access the specified Amazon Lex V1 bot. This API only supports the association of Amazon Lex V1 bots.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter lexBot :
The Amazon Lex bot to associate with the instance.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. If not provided, the Amazon Web Services SDK
populates this field. For more information about idempotency, see Making
retries safe with idempotent APIs.
Implementation
Future<void> associateLexBot({
required String instanceId,
required LexBot lexBot,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'LexBot': lexBot,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/instance/${Uri.encodeComponent(instanceId)}/lex-bot',
exceptionFnMap: _exceptionFns,
);
}