twilio.rest.voice.v1.connection_policy package¶
Submodules¶
twilio.rest.voice.v1.connection_policy.connection_policy_target module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.voice.v1.connection_policy.connection_policy_target.
ConnectionPolicyTargetContext
(version, connection_policy_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the ConnectionPolicyTargetInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the ConnectionPolicyTargetInstance
Returns: The fetched ConnectionPolicyTargetInstance Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance
-
update
(friendly_name=<object object>, target=<object object>, priority=<object object>, weight=<object object>, enabled=<object object>)[source]¶ Update the ConnectionPolicyTargetInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- target (unicode) – The SIP address you want Twilio to route your calls to
- priority (unicode) – The relative importance of the target
- weight (unicode) – The value that determines the relative load the Target should receive compared to others with the same priority
- enabled (bool) – Whether the Target is enabled
Returns: The updated ConnectionPolicyTargetInstance
Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance
-
-
class
twilio.rest.voice.v1.connection_policy.connection_policy_target.
ConnectionPolicyTargetInstance
(version, payload, connection_policy_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
-
connection_policy_sid
¶ Returns: The SID of the Connection Policy that owns the Target Return type: unicode
-
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 ConnectionPolicyTargetInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the ConnectionPolicyTargetInstance
Returns: The fetched ConnectionPolicyTargetInstance Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
priority
¶ Returns: The relative importance of the target Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
target
¶ Returns: The SIP address you want Twilio to route your calls to Return type: unicode
-
update
(friendly_name=<object object>, target=<object object>, priority=<object object>, weight=<object object>, enabled=<object object>)[source]¶ Update the ConnectionPolicyTargetInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- target (unicode) – The SIP address you want Twilio to route your calls to
- priority (unicode) – The relative importance of the target
- weight (unicode) – The value that determines the relative load the Target should receive compared to others with the same priority
- enabled (bool) – Whether the Target is enabled
Returns: The updated ConnectionPolicyTargetInstance
Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
weight
¶ Returns: The value that determines the relative load the Target should receive compared to others with the same priority Return type: unicode
-
-
class
twilio.rest.voice.v1.connection_policy.connection_policy_target.
ConnectionPolicyTargetList
(version, connection_policy_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(target, friendly_name=<object object>, priority=<object object>, weight=<object object>, enabled=<object object>)[source]¶ Create the ConnectionPolicyTargetInstance
Parameters: - target (unicode) – The SIP address you want Twilio to route your calls to
- friendly_name (unicode) – A string to describe the resource
- priority (unicode) – The relative importance of the target
- weight (unicode) – The value that determines the relative load the Target should receive compared to others with the same priority
- enabled (bool) – Whether the Target is enabled
Returns: The created ConnectionPolicyTargetInstance
Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance
-
get
(sid)[source]¶ Constructs a ConnectionPolicyTargetContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetContext Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of ConnectionPolicyTargetInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of ConnectionPolicyTargetInstance Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetPage
-
list
(limit=None, page_size=None)[source]¶ Lists ConnectionPolicyTargetInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - 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.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of ConnectionPolicyTargetInstance records from the API. Request is executed immediately
Parameters: Returns: Page of ConnectionPolicyTargetInstance
Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetPage
-
stream
(limit=None, page_size=None)[source]¶ Streams ConnectionPolicyTargetInstance 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: - 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.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance]
-
-
class
twilio.rest.voice.v1.connection_policy.connection_policy_target.
ConnectionPolicyTargetPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of ConnectionPolicyTargetInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.voice.v1.connection_policy.
ConnectionPolicyContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the ConnectionPolicyInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the ConnectionPolicyInstance
Returns: The fetched ConnectionPolicyInstance Return type: twilio.rest.voice.v1.connection_policy.ConnectionPolicyInstance
-
targets
¶ Access the targets
Returns: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetList Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetList
-
update
(friendly_name=<object object>)[source]¶ Update the ConnectionPolicyInstance
Parameters: friendly_name (unicode) – A string to describe the resource Returns: The updated ConnectionPolicyInstance Return type: twilio.rest.voice.v1.connection_policy.ConnectionPolicyInstance
-
-
class
twilio.rest.voice.v1.connection_policy.
ConnectionPolicyInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
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 ConnectionPolicyInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the ConnectionPolicyInstance
Returns: The fetched ConnectionPolicyInstance Return type: twilio.rest.voice.v1.connection_policy.ConnectionPolicyInstance
-
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
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
targets
¶ Access the targets
Returns: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetList Return type: twilio.rest.voice.v1.connection_policy.connection_policy_target.ConnectionPolicyTargetList
-
update
(friendly_name=<object object>)[source]¶ Update the ConnectionPolicyInstance
Parameters: friendly_name (unicode) – A string to describe the resource Returns: The updated ConnectionPolicyInstance Return type: twilio.rest.voice.v1.connection_policy.ConnectionPolicyInstance
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
-
class
twilio.rest.voice.v1.connection_policy.
ConnectionPolicyList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(friendly_name=<object object>)[source]¶ Create the ConnectionPolicyInstance
Parameters: friendly_name (unicode) – A string to describe the resource Returns: The created ConnectionPolicyInstance Return type: twilio.rest.voice.v1.connection_policy.ConnectionPolicyInstance
-
get
(sid)[source]¶ Constructs a ConnectionPolicyContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.voice.v1.connection_policy.ConnectionPolicyContext Return type: twilio.rest.voice.v1.connection_policy.ConnectionPolicyContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of ConnectionPolicyInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of ConnectionPolicyInstance Return type: twilio.rest.voice.v1.connection_policy.ConnectionPolicyPage
-
list
(limit=None, page_size=None)[source]¶ Lists ConnectionPolicyInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - 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.voice.v1.connection_policy.ConnectionPolicyInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of ConnectionPolicyInstance records from the API. Request is executed immediately
Parameters: Returns: Page of ConnectionPolicyInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams ConnectionPolicyInstance 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: - 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.voice.v1.connection_policy.ConnectionPolicyInstance]
-
-
class
twilio.rest.voice.v1.connection_policy.
ConnectionPolicyPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of ConnectionPolicyInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.voice.v1.connection_policy.ConnectionPolicyInstance Return type: twilio.rest.voice.v1.connection_policy.ConnectionPolicyInstance
-