|
| 1 | +""" Code is generated by ucloud-model, DO NOT EDIT IT. """ |
| 2 | + |
| 3 | +import typing |
| 4 | + |
| 5 | + |
| 6 | +from ucloud.core.client import Client |
| 7 | +from ucloud.services.ulogservice.schemas import apis |
| 8 | + |
| 9 | + |
| 10 | +class ULogServiceClient(Client): |
| 11 | + def __init__( |
| 12 | + self, config: dict, transport=None, middleware=None, logger=None |
| 13 | + ): |
| 14 | + super(ULogServiceClient, self).__init__( |
| 15 | + config, transport, middleware, logger |
| 16 | + ) |
| 17 | + |
| 18 | + def query_u_log_service_log( |
| 19 | + self, req: typing.Optional[dict] = None, **kwargs |
| 20 | + ) -> dict: |
| 21 | + """QueryULogServiceLog - 查询ULogService日志 |
| 22 | +
|
| 23 | + **Request** |
| 24 | +
|
| 25 | + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_ |
| 26 | + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_ |
| 27 | + - **QueryCriteria** (str) - (Required) 查询条件Json格式,使用Base64编码 |
| 28 | + - **SortOrder** (str) - (Required) 日志时间排序;可选值ASC|DESC |
| 29 | + - **TopicId** (str) - (Required) 主题ID |
| 30 | + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_ |
| 31 | + - **EndTime** (int) - 终止日志时间,秒级时间戳 |
| 32 | + - **LastId** (str) - 滚动加载参数,上一页最后一条数据的ID |
| 33 | + - **LastTimestamp** (str) - 滚动加载参数,上一页最后一条数据的timestamp |
| 34 | + - **ScrollId** (str) - Deprecated. 滚动加载参数ScrollId |
| 35 | + - **Size** (int) - 一次返回条数,默认20 |
| 36 | + - **StartTime** (int) - 起始日志时间,秒级时间戳 |
| 37 | +
|
| 38 | + **Response** |
| 39 | +
|
| 40 | + - **Data** (dict) - 见 **LogQueryResult** 模型定义 |
| 41 | +
|
| 42 | + **Response Model** |
| 43 | +
|
| 44 | + **LogContent** |
| 45 | + - **LogId** (str) - 日志标识ID |
| 46 | + - **LogJson** (str) - JSON格式的日志内容 |
| 47 | + - **Timestamp** (int) - 日志时间 |
| 48 | +
|
| 49 | +
|
| 50 | + **LogQueryResult** |
| 51 | + - **Contents** (dict) - 见 **LogContent** 模型定义 |
| 52 | + - **IsOver** (bool) - 检索结果是否到底 |
| 53 | + - **LastId** (str) - 滚动检索,当前页最后一条数据ID |
| 54 | + - **LastTimestamp** (str) - 滚动检索,当前页最后一条数据Timestamp |
| 55 | + - **ScrollId** (str) - 滚动检索Id Deprecated |
| 56 | + - **TopicId** (str) - 所属日志ID |
| 57 | + - **TopicName** (str) - 所属日志名称 |
| 58 | +
|
| 59 | +
|
| 60 | + """ |
| 61 | + # build request |
| 62 | + d = { |
| 63 | + "ProjectId": self.config.project_id, |
| 64 | + "Region": self.config.region, |
| 65 | + } |
| 66 | + req and d.update(req) |
| 67 | + d = apis.QueryULogServiceLogRequestSchema().dumps(d) |
| 68 | + |
| 69 | + resp = self.invoke("QueryULogServiceLog", d, **kwargs) |
| 70 | + return apis.QueryULogServiceLogResponseSchema().loads(resp) |
0 commit comments