Skip to content

list_queues async

list_queues(
    instance_id: InstanceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    queue_types: Optional[QueueTypes] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResult1000] = None,
) -> ListQueuesResponse

Provides 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.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • queue_types (Optional[QueueTypes], default: None ) –

    The type of queue.

  • next_token (Optional[NextToken], default: None ) –

    The 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.

  • max_results (Optional[MaxResult1000], default: None ) –

    The maximum number of results to return per page. The default MaxResult size is 100.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def list_queues(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    queue_types: Optional["capo_connect.types.queue_types.QueueTypes"] = None,
    next_token: Optional["capo_connect.types.next_token.NextToken"] = None,
    max_results: Optional["capo_connect.types.max_result1000.MaxResult1000"] = None,
) -> "capo_connect.types.list_queues_response.ListQueuesResponse":
    """<p>Provides information about the queues for the specified Connect Customer instance.</p> <p>If you do not specify a <code>QueueTypes</code> 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.</p> <p>For more information about queues, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/concepts-queues-standard-and-agent.html">Queues: Standard and Agent</a> in the <i>Connect Customer Administrator Guide</i>.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        queue_types: <p>The type of queue.</p>
        next_token: <p>The 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.</p>
        max_results: <p>The maximum number of results to return per page. The default MaxResult size is 100.</p>

    Raises:
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.list_queues_request.ListQueuesRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.list_queues_response.ListQueuesResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.list_queues

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.list_queues.async_list_queues(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListQueues")
    )
    input_: capo_connect.types.list_queues_request.ListQueuesRequest = {
        "instance_id": instance_id
    }
    if queue_types is not None:
        input_["queue_types"] = queue_types
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output