:doc:`Connect <../../connect>` / Client / create_queue

************
create_queue
************



.. py:method:: Connect.Client.create_queue(**kwargs)

  

  Creates a new queue for the specified Amazon Connect instance.

   

  .. warning::

     

    
    * If the phone number is claimed to a traffic distribution group that was created in the same Region as the Amazon Connect 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 <https://docs.aws.amazon.com/connect/latest/APIReference/API_ListPhoneNumbersV2.html>`__ 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 <https://docs.aws.amazon.com/connect/latest/adminguide/security_iam_resource-level-policy-examples.html#allow-deny-queue-actions-replica-region>`__.
    

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/CreateQueue>`_  


  **Request Syntax**
  ::

    response = client.create_queue(
        InstanceId='string',
        Name='string',
        Description='string',
        OutboundCallerConfig={
            'OutboundCallerIdName': 'string',
            'OutboundCallerIdNumberId': 'string',
            'OutboundFlowId': 'string'
        },
        OutboundEmailConfig={
            'OutboundEmailAddressId': 'string'
        },
        HoursOfOperationId='string',
        MaxContacts=123,
        QuickConnectIds=[
            'string',
        ],
        Tags={
            'string': 'string'
        }
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can `find the instance ID <https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html>`__ in the Amazon Resource Name (ARN) of the instance.

    

  
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the queue.

    

  
  :type Description: string
  :param Description: 

    The description of the queue.

    

  
  :type OutboundCallerConfig: dict
  :param OutboundCallerConfig: 

    The outbound caller ID name, number, and outbound whisper flow.

    

  
    - **OutboundCallerIdName** *(string) --* 

      The caller ID name.

      

    
    - **OutboundCallerIdNumberId** *(string) --* 

      The caller ID number.

      

    
    - **OutboundFlowId** *(string) --* 

      The outbound whisper flow to be used during an outbound call.

      

    
  
  :type OutboundEmailConfig: dict
  :param OutboundEmailConfig: 

    The outbound email address ID for a specified queue.

    

  
    - **OutboundEmailAddressId** *(string) --* 

      The identifier of the email address.

      

    
  
  :type HoursOfOperationId: string
  :param HoursOfOperationId: **[REQUIRED]** 

    The identifier for the hours of operation.

    

  
  :type MaxContacts: integer
  :param MaxContacts: 

    The maximum number of contacts that can be in the queue before it is considered full.

    

  
  :type QuickConnectIds: list
  :param QuickConnectIds: 

    The quick connects available to agents who are working the queue.

    

  
    - *(string) --* 

    

  :type Tags: dict
  :param Tags: 

    The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'QueueArn': 'string',
          'QueueId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **QueueArn** *(string) --* 

        The Amazon Resource Name (ARN) of the queue.

        
      

      - **QueueId** *(string) --* 

        The identifier for the queue.

        
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Connect.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Connect.Client.exceptions.DuplicateResourceException`

  
  *   :py:class:`Connect.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Connect.Client.exceptions.LimitExceededException`

  
  *   :py:class:`Connect.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  