createQuickConnect method

Future<CreateQuickConnectResponse> createQuickConnect({
  1. required String instanceId,
  2. required String name,
  3. required QuickConnectConfig quickConnectConfig,
  4. String? description,
  5. Map<String, String>? tags,
})

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

Creates a quick connect for the specified Amazon Connect instance.

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

Parameter instanceId : The identifier of the Amazon Connect instance.

Parameter name : The name of the quick connect.

Parameter quickConnectConfig : Configuration settings for the quick connect.

Parameter description : The description of the quick connect.

Parameter tags : One or more tags.

Implementation

Future<CreateQuickConnectResponse> createQuickConnect({
  required String instanceId,
  required String name,
  required QuickConnectConfig quickConnectConfig,
  String? description,
  Map<String, String>? tags,
}) async {
  ArgumentError.checkNotNull(instanceId, 'instanceId');
  _s.validateStringLength(
    'instanceId',
    instanceId,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    127,
    isRequired: true,
  );
  ArgumentError.checkNotNull(quickConnectConfig, 'quickConnectConfig');
  _s.validateStringLength(
    'description',
    description,
    0,
    250,
  );
  final $payload = <String, dynamic>{
    'Name': name,
    'QuickConnectConfig': quickConnectConfig,
    if (description != null) 'Description': description,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/quick-connects/${Uri.encodeComponent(instanceId)}',
    exceptionFnMap: _exceptionFns,
  );
  return CreateQuickConnectResponse.fromJson(response);
}