twilio.rest.taskrouter.v1.workspace.task_queue package¶
Submodules¶
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.
TaskQueueCumulativeStatisticsContext
(version, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
(end_date=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>)[source]¶ Fetch the TaskQueueCumulativeStatisticsInstance
Parameters: - end_date (datetime) – Only calculate statistics from on or before this date
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate cumulative statistics on this TaskChannel
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
Returns: The fetched TaskQueueCumulativeStatisticsInstance
Return type:
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.
TaskQueueCumulativeStatisticsInstance
(version, payload, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
avg_task_acceptance_time
¶ Returns: The average time in seconds between Task creation and acceptance Return type: unicode
-
end_time
¶ Returns: The end of the interval during which these statistics were calculated Return type: datetime
-
fetch
(end_date=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>)[source]¶ Fetch the TaskQueueCumulativeStatisticsInstance
Parameters: - end_date (datetime) – Only calculate statistics from on or before this date
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate cumulative statistics on this TaskChannel
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
Returns: The fetched TaskQueueCumulativeStatisticsInstance
Return type:
-
reservations_accepted
¶ Returns: The total number of Reservations accepted for Tasks in the TaskQueue Return type: unicode
-
reservations_canceled
¶ Returns: The total number of Reservations canceled for Tasks in the TaskQueue Return type: unicode
-
reservations_created
¶ Returns: The total number of Reservations created for Tasks in the TaskQueue Return type: unicode
-
reservations_rejected
¶ Returns: The total number of Reservations rejected for Tasks in the TaskQueue Return type: unicode
-
reservations_rescinded
¶ Returns: The total number of Reservations rescinded Return type: unicode
-
reservations_timed_out
¶ Returns: The total number of Reservations that timed out for Tasks in the TaskQueue Return type: unicode
-
split_by_wait_time
¶ Returns: A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds Return type: dict
-
start_time
¶ Returns: The beginning of the interval during which these statistics were calculated Return type: datetime
-
task_queue_sid
¶ Returns: The SID of the TaskQueue from which these statistics were calculated Return type: unicode
-
tasks_canceled
¶ Returns: The total number of Tasks canceled in the TaskQueue Return type: unicode
-
tasks_completed
¶ Returns: The total number of Tasks completed in the TaskQueue Return type: unicode
-
tasks_deleted
¶ Returns: The total number of Tasks deleted in the TaskQueue Return type: unicode
-
tasks_entered
¶ Returns: The total number of Tasks entered into the TaskQueue Return type: unicode
-
tasks_moved
¶ Returns: The total number of Tasks that were moved from one queue to another Return type: unicode
-
url
¶ Returns: The absolute URL of the TaskQueue statistics resource Return type: unicode
-
wait_duration_in_queue_until_accepted
¶ Returns: The relative wait duration statistics for Tasks accepted while in the TaskQueue Return type: dict
-
wait_duration_until_accepted
¶ Returns: The wait duration statistics for Tasks accepted while in the TaskQueue Return type: dict
-
wait_duration_until_canceled
¶ Returns: The wait duration statistics for Tasks canceled while in the TaskQueue Return type: dict
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the TaskQueue Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.
TaskQueueCumulativeStatisticsList
(version, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a TaskQueueCumulativeStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.
TaskQueueCumulativeStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of TaskQueueCumulativeStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsInstance
-
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.
TaskQueueRealTimeStatisticsContext
(version, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
(task_channel=<object object>)[source]¶ Fetch the TaskQueueRealTimeStatisticsInstance
Parameters: task_channel (unicode) – The TaskChannel for which to fetch statistics Returns: The fetched TaskQueueRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.
TaskQueueRealTimeStatisticsInstance
(version, payload, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
fetch
(task_channel=<object object>)[source]¶ Fetch the TaskQueueRealTimeStatisticsInstance
Parameters: task_channel (unicode) – The TaskChannel for which to fetch statistics Returns: The fetched TaskQueueRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance
-
longest_relative_task_age_in_queue
¶ Returns: The relative age in the TaskQueue for the longest waiting Task. Return type: unicode
-
longest_relative_task_sid_in_queue
¶ Returns: The SID of the Task waiting in the TaskQueue the longest. Return type: unicode
-
longest_task_waiting_age
¶ Returns: The age of the longest waiting Task Return type: unicode
-
longest_task_waiting_sid
¶ Returns: The SID of the longest waiting Task Return type: unicode
-
task_queue_sid
¶ Returns: The SID of the TaskQueue from which these statistics were calculated Return type: unicode
-
total_available_workers
¶ Returns: The total number of Workers available for Tasks in the TaskQueue Return type: unicode
-
total_eligible_workers
¶ Returns: The total number of Workers eligible for Tasks in the TaskQueue, independent of their Activity state Return type: unicode
-
total_tasks
¶ Returns: The total number of Tasks Return type: unicode
-
url
¶ Returns: The absolute URL of the TaskQueue statistics resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the TaskQueue Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.
TaskQueueRealTimeStatisticsList
(version, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a TaskQueueRealTimeStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.
TaskQueueRealTimeStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of TaskQueueRealTimeStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance
-
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.
TaskQueueStatisticsContext
(version, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
(end_date=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>)[source]¶ Fetch the TaskQueueStatisticsInstance
Parameters: - end_date (datetime) – Only calculate statistics from on or before this date
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate real-time and cumulative statistics for the specified TaskChannel
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds to calculate statistics on
Returns: The fetched TaskQueueStatisticsInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.
TaskQueueStatisticsInstance
(version, payload, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
cumulative
¶ Returns: An object that contains the cumulative statistics for the TaskQueue Return type: dict
-
fetch
(end_date=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>)[source]¶ Fetch the TaskQueueStatisticsInstance
Parameters: - end_date (datetime) – Only calculate statistics from on or before this date
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate real-time and cumulative statistics for the specified TaskChannel
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds to calculate statistics on
Returns: The fetched TaskQueueStatisticsInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance
-
realtime
¶ Returns: An object that contains the real-time statistics for the TaskQueue Return type: dict
-
task_queue_sid
¶ Returns: The SID of the TaskQueue from which these statistics were calculated Return type: unicode
-
url
¶ Returns: The absolute URL of the TaskQueue statistics resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the TaskQueue Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.
TaskQueueStatisticsList
(version, workspace_sid, task_queue_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a TaskQueueStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.
TaskQueueStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of TaskQueueStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance
-
twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.
TaskQueuesStatisticsInstance
(version, payload, workspace_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
cumulative
¶ Returns: An object that contains the cumulative statistics for the TaskQueues Return type: dict
-
realtime
¶ Returns: An object that contains the real-time statistics for the TaskQueues Return type: dict
-
task_queue_sid
¶ Returns: The SID of the TaskQueue from which these statistics were calculated Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the TaskQueues Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.
TaskQueuesStatisticsList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get_page
(target_url)[source]¶ Retrieve a specific page of TaskQueuesStatisticsInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of TaskQueuesStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsPage
-
list
(end_date=<object object>, friendly_name=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>, limit=None, page_size=None)[source]¶ Lists TaskQueuesStatisticsInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - end_date (datetime) – Only calculate statistics from on or before this date
- friendly_name (unicode) – The friendly_name of the TaskQueue statistics to read
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate statistics on this TaskChannel.
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds to calculate statistics on
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance]
-
page
(end_date=<object object>, friendly_name=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of TaskQueuesStatisticsInstance records from the API. Request is executed immediately
Parameters: - end_date (datetime) – Only calculate statistics from on or before this date
- friendly_name (unicode) – The friendly_name of the TaskQueue statistics to read
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate statistics on this TaskChannel.
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds to calculate statistics on
- page_token (str) – PageToken provided by the API
- page_number (int) – Page Number, this value is simply for client state
- page_size (int) – Number of records to return, defaults to 50
Returns: Page of TaskQueuesStatisticsInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsPage
-
stream
(end_date=<object object>, friendly_name=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>, limit=None, page_size=None)[source]¶ Streams TaskQueuesStatisticsInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - end_date (datetime) – Only calculate statistics from on or before this date
- friendly_name (unicode) – The friendly_name of the TaskQueue statistics to read
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate statistics on this TaskChannel.
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds to calculate statistics on
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance]
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.
TaskQueuesStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of TaskQueuesStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.
TaskQueueContext
(version, workspace_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
cumulative_statistics
¶ Access the cumulative_statistics
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsList
-
delete
()[source]¶ Deletes the TaskQueueInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the TaskQueueInstance
Returns: The fetched TaskQueueInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance
-
real_time_statistics
¶ Access the real_time_statistics
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsList
-
statistics
¶ Access the statistics
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsList
-
update
(friendly_name=<object object>, target_workers=<object object>, reservation_activity_sid=<object object>, assignment_activity_sid=<object object>, max_reserved_workers=<object object>, task_order=<object object>)[source]¶ Update the TaskQueueInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- target_workers (unicode) – A string describing the Worker selection criteria for any Tasks that enter the TaskQueue
- reservation_activity_sid (unicode) – The SID of the Activity to assign Workers when a task is reserved for them
- assignment_activity_sid (unicode) – The SID of the Activity to assign Workers when a task is assigned for them
- max_reserved_workers (unicode) – The maximum number of Workers to create reservations for the assignment of a task while in the queue
- task_order (TaskQueueInstance.TaskOrder) – How Tasks will be assigned to Workers
Returns: The updated TaskQueueInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.
TaskQueueInstance
(version, payload, workspace_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
assignment_activity_name
¶ Returns: The name of the Activity to assign Workers when a task is assigned for them Return type: unicode
-
assignment_activity_sid
¶ Returns: The SID of the Activity to assign Workers when a task is assigned for them Return type: unicode
-
cumulative_statistics
¶ Access the cumulative_statistics
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsList
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the TaskQueueInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the TaskQueueInstance
Returns: The fetched TaskQueueInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
links
¶ Returns: The URLs of related resources Return type: unicode
-
max_reserved_workers
¶ Returns: The maximum number of Workers to reserve Return type: unicode
-
real_time_statistics
¶ Access the real_time_statistics
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsList
-
reservation_activity_name
¶ Returns: The name of the Activity to assign Workers once a task is reserved for them Return type: unicode
-
reservation_activity_sid
¶ Returns: The SID of the Activity to assign Workers once a task is reserved for them Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
statistics
¶ Access the statistics
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsList
-
target_workers
¶ Returns: A string describing the Worker selection criteria for any Tasks that enter the TaskQueue Return type: unicode
-
task_order
¶ Returns: How Tasks will be assigned to Workers Return type: TaskQueueInstance.TaskOrder
-
update
(friendly_name=<object object>, target_workers=<object object>, reservation_activity_sid=<object object>, assignment_activity_sid=<object object>, max_reserved_workers=<object object>, task_order=<object object>)[source]¶ Update the TaskQueueInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- target_workers (unicode) – A string describing the Worker selection criteria for any Tasks that enter the TaskQueue
- reservation_activity_sid (unicode) – The SID of the Activity to assign Workers when a task is reserved for them
- assignment_activity_sid (unicode) – The SID of the Activity to assign Workers when a task is assigned for them
- max_reserved_workers (unicode) – The maximum number of Workers to create reservations for the assignment of a task while in the queue
- task_order (TaskQueueInstance.TaskOrder) – How Tasks will be assigned to Workers
Returns: The updated TaskQueueInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance
-
url
¶ Returns: The absolute URL of the TaskQueue resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the TaskQueue Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.
TaskQueueList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(friendly_name, target_workers=<object object>, max_reserved_workers=<object object>, task_order=<object object>, reservation_activity_sid=<object object>, assignment_activity_sid=<object object>)[source]¶ Create the TaskQueueInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- target_workers (unicode) – A string describing the Worker selection criteria for any Tasks that enter the TaskQueue
- max_reserved_workers (unicode) – The maximum number of Workers to reserve
- task_order (TaskQueueInstance.TaskOrder) – How Tasks will be assigned to Workers
- reservation_activity_sid (unicode) – The SID of the Activity to assign Workers when a task is reserved for them
- assignment_activity_sid (unicode) – The SID of the Activity to assign Workers once a task is assigned to them
Returns: The created TaskQueueInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance
-
get
(sid)[source]¶ Constructs a TaskQueueContext
Parameters: sid – The SID of the resource to Returns: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueContext Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of TaskQueueInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of TaskQueueInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueuePage
-
list
(friendly_name=<object object>, evaluate_worker_attributes=<object object>, worker_sid=<object object>, limit=None, page_size=None)[source]¶ Lists TaskQueueInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - friendly_name (unicode) – The friendly_name of the TaskQueue resources to read
- evaluate_worker_attributes (unicode) – The attributes of the Workers to read
- worker_sid (unicode) – The SID of the Worker with the TaskQueue resources to read
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance]
-
page
(friendly_name=<object object>, evaluate_worker_attributes=<object object>, worker_sid=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of TaskQueueInstance records from the API. Request is executed immediately
Parameters: - friendly_name (unicode) – The friendly_name of the TaskQueue resources to read
- evaluate_worker_attributes (unicode) – The attributes of the Workers to read
- worker_sid (unicode) – The SID of the Worker with the TaskQueue resources to read
- page_token (str) – PageToken provided by the API
- page_number (int) – Page Number, this value is simply for client state
- page_size (int) – Number of records to return, defaults to 50
Returns: Page of TaskQueueInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueuePage
-
statistics
¶ Access the statistics
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsList
-
stream
(friendly_name=<object object>, evaluate_worker_attributes=<object object>, worker_sid=<object object>, limit=None, page_size=None)[source]¶ Streams TaskQueueInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - friendly_name (unicode) – The friendly_name of the TaskQueue resources to read
- evaluate_worker_attributes (unicode) – The attributes of the Workers to read
- worker_sid (unicode) – The SID of the Worker with the TaskQueue resources to read
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance]
-
-
class
twilio.rest.taskrouter.v1.workspace.task_queue.
TaskQueuePage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of TaskQueueInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance
-