associateLambdaFunction 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 Lambda function.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
Parameter functionArn :
The Amazon Resource Name (ARN) for the Lambda function being associated.
Maximum number of characters allowed is 140.
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.
Implementation
Future<void> associateLambdaFunction({
required String functionArn,
required String instanceId,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'FunctionArn': functionArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/instance/${Uri.encodeComponent(instanceId)}/lambda-function',
exceptionFnMap: _exceptionFns,
);
}