LTS API¶
The Log Tank Service Class¶
The nat high-level interface is available through the lts
member of a Connection
object. The
lts
member will only be added if the
otcextensions.sdk.register_otc_extensions(conn)
method is called.
LTS Group Operations¶
- class otcextensions.sdk.lts.v2._proxy.Proxy(session, *args, **kwargs)
- groups()
Query all log groups of an account.
- Returns:
A generator of log group
Group
instances
- create_group(**attrs)
Creating a log group for log retention and query
- update_group(group, **attrs)
Update log group attributes
- delete_group(group, ignore_missing=True)
Delete a single log group.
- Parameters:
group – The value can be the ID of a log group or a
Group
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the group does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent log group.
- Returns:
None
LTS Stream Operations¶
- class otcextensions.sdk.lts.v2._proxy.Proxy(session, *args, **kwargs)
- streams(log_group)
List log stream in log group
- create_stream(log_group, **query)
Create a log stream in log group