Skip to main content

queues

Creates, updates, deletes, gets or lists a queues resource.

Overview

Namequeues
TypeResource
Idaws.connect.queues

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringThe description of the queue.
hours_of_operation_idstringThe identifier for the hours of operation.
last_modified_regionstringThe Amazon Web Services Region where this resource was last modified. (pattern: <code>[a-z]{2}(-[a-z]+){1,2}(-[0-9])?</code>)
last_modified_timestring (date-time)The timestamp when this resource was last modified.
max_contactsintegerThe maximum number of contacts that can be in the queue before it is considered full.
namestringThe name of the queue.
outbound_caller_configobjectThe outbound caller ID name, number, and outbound whisper flow.
outbound_email_configobjectThe outbound email address ID.
queue_arnstringThe Amazon Resource Name (ARN) for the queue.
queue_idstringThe identifier for the queue.
statusstringThe status of the queue. (ENABLED, DISABLED)
tagsobjectThe tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_queueselectinstance_id, queue_id, regionDescribes the specified queue.
list_queuesselectinstance_id, regionqueueTypes, nextToken, maxResultsProvides information about the queues for the specified Connect Customer instance. If you do not specify a QueueTypes parameter, both standard and agent queues are returned. This might cause an unexpected truncation of results if you have more than 1000 agents and you limit the number of results of the API call in code. For more information about queues, see Queues: Standard and Agent in the Connect Customer Administrator Guide.
search_queuesselectregionSearches queues in an Connect Customer instance, with optional filtering.
create_queueinsertinstance_id, region, HoursOfOperationIdCreates 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 a ResourceNotFoundException. Only use the phone number ARN format that doesn't contain instance in 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.
update_queue_outbound_caller_configupdateinstance_id, queue_id, region, OutboundCallerConfigUpdates the outbound caller ID name, number, and outbound whisper flow for a specified queue. 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 a ResourceNotFoundException. Only use the phone number ARN format that doesn't contain instance in 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.
update_queue_outbound_email_configupdateinstance_id, queue_id, region, OutboundEmailConfigUpdates the outbound email address Id for a specified queue.
update_routing_profile_default_outbound_queueupdateinstance_id, routing_profile_id, region, DefaultOutboundQueueIdUpdates the default outbound queue of a routing profile.
update_queue_nameupdateinstance_id, queue_id, regionUpdates the name and description of a queue. At least Name or Description must be provided.
delete_queuedeleteinstance_id, queue_id, regionDeletes a queue.
update_queue_statusexecinstance_id, queue_id, regionUpdates the status of the queue.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
instance_idstringThe identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
queue_idstringThe identifier for the queue.
regionstringAWS region (default: us-east-1)
routing_profile_idstringThe identifier of the routing profile.
maxResultsintegerThe maximum number of results to return per page. The default MaxResult size is 100.
nextTokenstringThe token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
queueTypesarrayThe type of queue.

SELECT examples

Describes the specified queue.

SELECT
description,
hours_of_operation_id,
last_modified_region,
last_modified_time,
max_contacts,
name,
outbound_caller_config,
outbound_email_config,
queue_arn,
queue_id,
status,
tags
FROM aws.connect.queues
WHERE instance_id = '{{ instance_id }}' -- required
AND queue_id = '{{ queue_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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 a ResourceNotFoundException. Only use the phone number ARN format that doesn't contain instance in 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.

INSERT INTO aws.connect.queues (
Name,
Description,
OutboundCallerConfig,
OutboundEmailConfig,
HoursOfOperationId,
MaxContacts,
QuickConnectIds,
EmailAddressesConfig,
Tags,
instance_id,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ OutboundCallerConfig }}',
'{{ OutboundEmailConfig }}',
'{{ HoursOfOperationId }}' /* required */,
{{ MaxContacts }},
'{{ QuickConnectIds }}',
'{{ EmailAddressesConfig }}',
'{{ Tags }}',
'{{ instance_id }}',
'{{ region }}'
RETURNING
queue_arn,
queue_id
;

UPDATE examples

Updates the outbound caller ID name, number, and outbound whisper flow for a specified queue. 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 a ResourceNotFoundException. Only use the phone number ARN format that doesn't contain instance in 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.

UPDATE aws.connect.queues
SET
OutboundCallerConfig = '{{ OutboundCallerConfig }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND queue_id = '{{ queue_id }}' --required
AND region = '{{ region }}' --required
AND OutboundCallerConfig = '{{ OutboundCallerConfig }}' --required;

DELETE examples

Deletes a queue.

DELETE FROM aws.connect.queues
WHERE instance_id = '{{ instance_id }}' --required
AND queue_id = '{{ queue_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Updates the status of the queue.

EXEC aws.connect.queues.update_queue_status
@instance_id='{{ instance_id }}' --required,
@queue_id='{{ queue_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"Status": "{{ Status }}"
}'
;