twilio.rest.events.v1.sink package¶
Submodules¶
twilio.rest.events.v1.sink.sink_test module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.events.v1.sink.sink_test.
SinkTestInstance
(version, payload, sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
result
¶ Returns: Feedback indicating whether the test event was generated. Return type: unicode
-
-
class
twilio.rest.events.v1.sink.sink_test.
SinkTestList
(version, sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
()[source]¶ Create the SinkTestInstance
Returns: The created SinkTestInstance Return type: twilio.rest.events.v1.sink.sink_test.SinkTestInstance
-
-
class
twilio.rest.events.v1.sink.sink_test.
SinkTestPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance
(payload)[source]¶ Build an instance of SinkTestInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.events.v1.sink.sink_test.SinkTestInstance Return type: twilio.rest.events.v1.sink.sink_test.SinkTestInstance
-
twilio.rest.events.v1.sink.sink_validate module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.events.v1.sink.sink_validate.
SinkValidateInstance
(version, payload, sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
result
¶ Returns: Feedback indicating whether the given Sink was validated. Return type: unicode
-
-
class
twilio.rest.events.v1.sink.sink_validate.
SinkValidateList
(version, sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
(test_id)[source]¶ Create the SinkValidateInstance
Parameters: test_id (unicode) – A string that uniquely identifies the test event for a Sink being validated. Returns: The created SinkValidateInstance Return type: twilio.rest.events.v1.sink.sink_validate.SinkValidateInstance
-
-
class
twilio.rest.events.v1.sink.sink_validate.
SinkValidatePage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance
(payload)[source]¶ Build an instance of SinkValidateInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.events.v1.sink.sink_validate.SinkValidateInstance Return type: twilio.rest.events.v1.sink.sink_validate.SinkValidateInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.events.v1.sink.
SinkContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
delete
()[source]¶ Deletes the SinkInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SinkInstance
Returns: The fetched SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-
sink_test
¶ Access the sink_test
Returns: twilio.rest.events.v1.sink.sink_test.SinkTestList Return type: twilio.rest.events.v1.sink.sink_test.SinkTestList
-
sink_validate
¶ Access the sink_validate
Returns: twilio.rest.events.v1.sink.sink_validate.SinkValidateList Return type: twilio.rest.events.v1.sink.sink_validate.SinkValidateList
-
update
(description)[source]¶ Update the SinkInstance
Parameters: description (unicode) – Sink Description Returns: The updated SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-
-
class
twilio.rest.events.v1.sink.
SinkInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
class
SinkType
[source]¶ Bases:
object
-
KINESIS
= 'kinesis'¶
-
SEGMENT
= 'segment'¶
-
WEBHOOK
= 'webhook'¶
-
-
class
Status
[source]¶ Bases:
object
-
ACTIVE
= 'active'¶
-
FAILED
= 'failed'¶
-
INITIALIZED
= 'initialized'¶
-
VALIDATING
= 'validating'¶
-
-
date_created
¶ Returns: The date this Sink was created Return type: datetime
-
date_updated
¶ Returns: The date this Sink was updated Return type: datetime
-
delete
()[source]¶ Deletes the SinkInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
description
¶ Returns: Sink Description Return type: unicode
-
fetch
()[source]¶ Fetch the SinkInstance
Returns: The fetched SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-
links
¶ Returns: Nested resource URLs. Return type: unicode
-
sid
¶ Returns: A string that uniquely identifies this Sink. Return type: unicode
-
sink_test
¶ Access the sink_test
Returns: twilio.rest.events.v1.sink.sink_test.SinkTestList Return type: twilio.rest.events.v1.sink.sink_test.SinkTestList
-
sink_type
¶ Returns: Sink type. Return type: SinkInstance.SinkType
-
sink_validate
¶ Access the sink_validate
Returns: twilio.rest.events.v1.sink.sink_validate.SinkValidateList Return type: twilio.rest.events.v1.sink.sink_validate.SinkValidateList
-
status
¶ Returns: The Status of this Sink Return type: SinkInstance.Status
-
update
(description)[source]¶ Update the SinkInstance
Parameters: description (unicode) – Sink Description Returns: The updated SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-
url
¶ Returns: The URL of this resource. Return type: unicode
-
class
-
class
twilio.rest.events.v1.sink.
SinkList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
(description, sink_configuration, sink_type)[source]¶ Create the SinkInstance
Parameters: - description (unicode) – Sink Description.
- sink_configuration (dict) – JSON Sink configuration.
- sink_type (SinkInstance.SinkType) – Sink type.
Returns: The created SinkInstance
Return type:
-
get
(sid)[source]¶ Constructs a SinkContext
Parameters: sid – A string that uniquely identifies this Sink. Returns: twilio.rest.events.v1.sink.SinkContext Return type: twilio.rest.events.v1.sink.SinkContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of SinkInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of SinkInstance Return type: twilio.rest.events.v1.sink.SinkPage
-
list
(in_use=<object object>, status=<object object>, limit=None, page_size=None)[source]¶ Lists SinkInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - in_use (bool) – A boolean to return sinks used/not used by a subscription.
- status (unicode) – A string to filter sinks by status.
- 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:
-
page
(in_use=<object object>, status=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of SinkInstance records from the API. Request is executed immediately
Parameters: - in_use (bool) – A boolean to return sinks used/not used by a subscription.
- status (unicode) – A string to filter sinks by status.
- 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 SinkInstance
Return type:
-
stream
(in_use=<object object>, status=<object object>, limit=None, page_size=None)[source]¶ Streams SinkInstance 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: - in_use (bool) – A boolean to return sinks used/not used by a subscription.
- status (unicode) – A string to filter sinks by status.
- 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:
-
-
class
twilio.rest.events.v1.sink.
SinkPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance
(payload)[source]¶ Build an instance of SinkInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.events.v1.sink.SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-