twilio.rest.monitor.v1 package¶
Submodules¶
twilio.rest.monitor.v1.alert module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.monitor.v1.alert.AlertContext(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext-
fetch()[source]¶ Fetch the AlertInstance
Returns: The fetched AlertInstance Return type: twilio.rest.monitor.v1.alert.AlertInstance
-
-
class
twilio.rest.monitor.v1.alert.AlertInstance(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
-
alert_text¶ Returns: The text of the alert Return type: unicode
-
api_version¶ Returns: The API version used when the alert was generated Return type: unicode
-
date_created¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_generated¶ Returns: The date and time when the alert was generated specified in ISO 8601 format Return type: datetime
-
date_updated¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
error_code¶ Returns: The error code for the condition that generated the alert Return type: unicode
-
fetch()[source]¶ Fetch the AlertInstance
Returns: The fetched AlertInstance Return type: twilio.rest.monitor.v1.alert.AlertInstance
-
log_level¶ Returns: The log level Return type: unicode
-
more_info¶ Returns: The URL of the page in our Error Dictionary with more information about the error condition Return type: unicode
-
request_headers¶ Returns: The request headers of the request that generated the alert Return type: unicode
-
request_method¶ Returns: The method used by the request that generated the alert Return type: unicode
-
request_url¶ Returns: The URL of the request that generated the alert Return type: unicode
-
request_variables¶ Returns: The variables passed in the request that generated the alert Return type: unicode
-
resource_sid¶ Returns: The SID of the resource for which the alert was generated Return type: unicode
-
response_body¶ Returns: The response body of the request that generated the alert Return type: unicode
-
response_headers¶ Returns: The response headers of the request that generated the alert Return type: unicode
-
service_sid¶ Returns: The SID of the service or resource that generated the alert Return type: unicode
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
url¶ Returns: The absolute URL of the Alert resource Return type: unicode
-
-
class
twilio.rest.monitor.v1.alert.AlertList(version)[source]¶ Bases:
twilio.base.list_resource.ListResource-
get(sid)[source]¶ Constructs a AlertContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.monitor.v1.alert.AlertContext Return type: twilio.rest.monitor.v1.alert.AlertContext
-
get_page(target_url)[source]¶ Retrieve a specific page of AlertInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of AlertInstance Return type: twilio.rest.monitor.v1.alert.AlertPage
-
list(log_level=<object object>, start_date=<object object>, end_date=<object object>, limit=None, page_size=None)[source]¶ Lists AlertInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - log_level (unicode) – Only show alerts for this log-level
- start_date (datetime) – Only include alerts that occurred on or after this date and time
- end_date (datetime) – Only include alerts that occurred on or before this date and time
- 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(log_level=<object object>, start_date=<object object>, end_date=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of AlertInstance records from the API. Request is executed immediately
Parameters: - log_level (unicode) – Only show alerts for this log-level
- start_date (datetime) – Only include alerts that occurred on or after this date and time
- end_date (datetime) – Only include alerts that occurred on or before this date and time
- 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 AlertInstance
Return type:
-
stream(log_level=<object object>, start_date=<object object>, end_date=<object object>, limit=None, page_size=None)[source]¶ Streams AlertInstance 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: - log_level (unicode) – Only show alerts for this log-level
- start_date (datetime) – Only include alerts that occurred on or after this date and time
- end_date (datetime) – Only include alerts that occurred on or before this date and time
- 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.monitor.v1.alert.AlertPage(version, response, solution)[source]¶ Bases:
twilio.base.page.Page-
get_instance(payload)[source]¶ Build an instance of AlertInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.monitor.v1.alert.AlertInstance Return type: twilio.rest.monitor.v1.alert.AlertInstance
-
twilio.rest.monitor.v1.event module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.monitor.v1.event.EventContext(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext-
fetch()[source]¶ Fetch the EventInstance
Returns: The fetched EventInstance Return type: twilio.rest.monitor.v1.event.EventInstance
-
-
class
twilio.rest.monitor.v1.event.EventInstance(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
-
actor_sid¶ Returns: The SID of the actor that caused the event, if available Return type: unicode
-
actor_type¶ Returns: The type of actor that caused the event Return type: unicode
-
description¶ Returns: A description of the event Return type: unicode
-
event_data¶ Returns: A JSON string that represents an object with additional data about the event Return type: dict
-
event_date¶ Returns: The ISO 8601 date and time in GMT when the event was recorded Return type: datetime
-
event_type¶ Returns: The event’s type Return type: unicode
-
fetch()[source]¶ Fetch the EventInstance
Returns: The fetched EventInstance Return type: twilio.rest.monitor.v1.event.EventInstance
-
links¶ Returns: The absolute URLs of related resources Return type: unicode
-
resource_sid¶ Returns: The SID of the resource that was affected Return type: unicode
-
resource_type¶ Returns: The type of resource that was affected Return type: unicode
-
sid¶ Returns: The unique string that identifies the resource Return type: unicode
-
source¶ Returns: The originating system or interface that caused the event Return type: unicode
-
source_ip_address¶ Returns: The IP address of the source Return type: unicode
-
url¶ Returns: The absolute URL of the resource that was affected Return type: unicode
-
-
class
twilio.rest.monitor.v1.event.EventList(version)[source]¶ Bases:
twilio.base.list_resource.ListResource-
get(sid)[source]¶ Constructs a EventContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.monitor.v1.event.EventContext Return type: twilio.rest.monitor.v1.event.EventContext
-
get_page(target_url)[source]¶ Retrieve a specific page of EventInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of EventInstance Return type: twilio.rest.monitor.v1.event.EventPage
-
list(actor_sid=<object object>, event_type=<object object>, resource_sid=<object object>, source_ip_address=<object object>, start_date=<object object>, end_date=<object object>, limit=None, page_size=None)[source]¶ Lists EventInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - actor_sid (unicode) – Only include events initiated by this Actor
- event_type (unicode) – Only include events of this Event Type
- resource_sid (unicode) – Only include events that refer to this resource
- source_ip_address (unicode) – Only include events that originated from this IP address
- start_date (datetime) – Only include events that occurred on or after this date
- end_date (datetime) – Only include events that occurred on or before this date
- 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(actor_sid=<object object>, event_type=<object object>, resource_sid=<object object>, source_ip_address=<object object>, start_date=<object object>, end_date=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of EventInstance records from the API. Request is executed immediately
Parameters: - actor_sid (unicode) – Only include events initiated by this Actor
- event_type (unicode) – Only include events of this Event Type
- resource_sid (unicode) – Only include events that refer to this resource
- source_ip_address (unicode) – Only include events that originated from this IP address
- start_date (datetime) – Only include events that occurred on or after this date
- end_date (datetime) – Only include events that occurred on or before this date
- 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 EventInstance
Return type:
-
stream(actor_sid=<object object>, event_type=<object object>, resource_sid=<object object>, source_ip_address=<object object>, start_date=<object object>, end_date=<object object>, limit=None, page_size=None)[source]¶ Streams EventInstance 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: - actor_sid (unicode) – Only include events initiated by this Actor
- event_type (unicode) – Only include events of this Event Type
- resource_sid (unicode) – Only include events that refer to this resource
- source_ip_address (unicode) – Only include events that originated from this IP address
- start_date (datetime) – Only include events that occurred on or after this date
- end_date (datetime) – Only include events that occurred on or before this date
- 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.monitor.v1.event.EventPage(version, response, solution)[source]¶ Bases:
twilio.base.page.Page-
get_instance(payload)[source]¶ Build an instance of EventInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.monitor.v1.event.EventInstance Return type: twilio.rest.monitor.v1.event.EventInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.monitor.v1.V1(domain)[source]¶ Bases:
twilio.base.version.Version-
alerts¶ Return type: twilio.rest.monitor.v1.alert.AlertList
-
events¶ Return type: twilio.rest.monitor.v1.event.EventList
-