associateLambdaFunction method
This API is in preview release for Amazon Connect and is subject to change.
Allows the specified Amazon Connect instance to access the specified Lambda function.
May throw ResourceNotFoundException. May throw ResourceConflictException. May throw InternalServiceException. May throw InvalidRequestException. May throw InvalidParameterException. 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 Amazon Connect instance.
Implementation
Future<void> associateLambdaFunction({
required String functionArn,
required String instanceId,
}) async {
ArgumentError.checkNotNull(functionArn, 'functionArn');
_s.validateStringLength(
'functionArn',
functionArn,
1,
140,
isRequired: true,
);
ArgumentError.checkNotNull(instanceId, 'instanceId');
_s.validateStringLength(
'instanceId',
instanceId,
1,
100,
isRequired: true,
);
final $payload = <String, dynamic>{
'FunctionArn': functionArn,
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/instance/${Uri.encodeComponent(instanceId)}/lambda-function',
exceptionFnMap: _exceptionFns,
);
}