associateBot 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 or Amazon Lex V2 bot.
May throw InternalServiceException.
May throw InvalidRequestException.
May throw LimitExceededException.
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 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.
Parameter lexV2Bot :
The Amazon Lex V2 bot to associate with the instance.
Implementation
Future<void> associateBot({
required String instanceId,
String? clientToken,
LexBot? lexBot,
LexV2Bot? lexV2Bot,
}) async {
final $payload = <String, dynamic>{
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (lexBot != null) 'LexBot': lexBot,
if (lexV2Bot != null) 'LexV2Bot': lexV2Bot,
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/instance/${Uri.encodeComponent(instanceId)}/bot',
exceptionFnMap: _exceptionFns,
);
}