disassociateLambdaFunction method

Future<void> disassociateLambdaFunction({
  1. required String functionArn,
  2. required String instanceId,
})

This API is in preview release for Amazon Connect and is subject to change.

Remove the Lambda function from the drop-down options available in the relevant contact flow blocks.

May throw ResourceNotFoundException. May throw InternalServiceException. May throw InvalidRequestException. May throw InvalidParameterException. May throw ThrottlingException.

Parameter functionArn : The Amazon Resource Name (ARN) of the Lambda function being disassociated.

Parameter instanceId : The identifier of the Amazon Connect instance..

Implementation

Future<void> disassociateLambdaFunction({
  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 $query = <String, List<String>>{
    'functionArn': [functionArn],
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/instance/${Uri.encodeComponent(instanceId)}/lambda-function',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}