createQueue method
- required String hoursOfOperationId,
- required String instanceId,
- required String name,
- String? description,
- List<
EmailAddressConfig> ? emailAddressesConfig, - int? maxContacts,
- OutboundCallerConfig? outboundCallerConfig,
- OutboundEmailConfig? outboundEmailConfig,
- List<
String> ? quickConnectIds, - Map<
String, String> ? tags,
Creates a new queue for the specified Connect Customer instance.
-
If the phone number is claimed to a traffic distribution group that was
created in the same Region as the Connect Customer instance where you are
calling this API, then you can use a full phone number ARN or a UUID for
OutboundCallerIdNumberId. However, if the phone number is claimed to a traffic distribution group that is in one Region, and you are calling this API from an instance in another Amazon Web Services Region that is associated with the traffic distribution group, you must provide a full phone number ARN. If a UUID is provided in this scenario, you will receive aResourceNotFoundException. -
Only use the phone number ARN format that doesn't contain
instancein the path, for example,arn:aws:connect:us-east-1:1234567890:phone-number/uuid. This is the same ARN format that is returned when you call the ListPhoneNumbersV2 API. - If you plan to use IAM policies to allow/deny access to this API for phone number resources claimed to a traffic distribution group, see Allow or Deny queue API actions for phone numbers in a replica Region.
May throw DuplicateResourceException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter hoursOfOperationId :
The identifier for the hours of operation.
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 name :
The name of the queue.
Parameter description :
The description of the queue.
Parameter emailAddressesConfig :
Configuration list containing the email addresses to associate with the
queue during creation. Each configuration specifies an email address ID
that agents can select when handling email contacts in this queue.
Parameter maxContacts :
The maximum number of contacts that can be in the queue before it is
considered full.
Parameter outboundCallerConfig :
The outbound caller ID name, number, and outbound whisper flow.
Parameter outboundEmailConfig :
The outbound email address ID for a specified queue.
Parameter quickConnectIds :
The quick connects available to agents who are working the queue.
Parameter tags :
The tags used to organize, track, or control access for this resource. For
example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Implementation
Future<CreateQueueResponse> createQueue({
required String hoursOfOperationId,
required String instanceId,
required String name,
String? description,
List<EmailAddressConfig>? emailAddressesConfig,
int? maxContacts,
OutboundCallerConfig? outboundCallerConfig,
OutboundEmailConfig? outboundEmailConfig,
List<String>? quickConnectIds,
Map<String, String>? tags,
}) async {
_s.validateNumRange(
'maxContacts',
maxContacts,
0,
1152921504606846976,
);
final $payload = <String, dynamic>{
'HoursOfOperationId': hoursOfOperationId,
'Name': name,
if (description != null) 'Description': description,
if (emailAddressesConfig != null)
'EmailAddressesConfig': emailAddressesConfig,
if (maxContacts != null) 'MaxContacts': maxContacts,
if (outboundCallerConfig != null)
'OutboundCallerConfig': outboundCallerConfig,
if (outboundEmailConfig != null)
'OutboundEmailConfig': outboundEmailConfig,
if (quickConnectIds != null) 'QuickConnectIds': quickConnectIds,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/queues/${Uri.encodeComponent(instanceId)}',
exceptionFnMap: _exceptionFns,
);
return CreateQueueResponse.fromJson(response);
}