aliyun-log-python-sdk 0.9.46__tar.gz → 0.9.48__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. {aliyun_log_python_sdk-0.9.46/aliyun_log_python_sdk.egg-info → aliyun_log_python_sdk-0.9.48}/PKG-INFO +12 -2
  2. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/README.md +12 -1
  3. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/__init__.py +4 -0
  4. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/__init__.pyi +4 -0
  5. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/auth.py +8 -14
  6. aliyun_log_python_sdk-0.9.48/aliyun/log/deletelogsv2request.py +114 -0
  7. aliyun_log_python_sdk-0.9.48/aliyun/log/deletelogsv2request.pyi +17 -0
  8. aliyun_log_python_sdk-0.9.48/aliyun/log/deletelogsv2response.py +23 -0
  9. aliyun_log_python_sdk-0.9.48/aliyun/log/deletelogsv2response.pyi +10 -0
  10. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logclient.py +194 -36
  11. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logclient.pyi +8 -1
  12. aliyun_log_python_sdk-0.9.48/aliyun/log/updatelogsrequest.py +128 -0
  13. aliyun_log_python_sdk-0.9.48/aliyun/log/updatelogsrequest.pyi +21 -0
  14. aliyun_log_python_sdk-0.9.48/aliyun/log/updatelogsresponse.py +23 -0
  15. aliyun_log_python_sdk-0.9.48/aliyun/log/updatelogsresponse.pyi +10 -0
  16. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/version.py +1 -1
  17. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48/aliyun_log_python_sdk.egg-info}/PKG-INFO +12 -2
  18. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun_log_python_sdk.egg-info/SOURCES.txt +10 -3
  19. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun_log_python_sdk.egg-info/requires.txt +2 -0
  20. aliyun_log_python_sdk-0.9.48/pyproject.toml +6 -0
  21. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/setup.py +2 -0
  22. aliyun_log_python_sdk-0.9.46/tests/test_alert.py +0 -30
  23. aliyun_log_python_sdk-0.9.46/tests/test_util.py +0 -16
  24. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/LICENSE +0 -0
  25. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/MANIFEST.in +0 -0
  26. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/__init__.py +0 -0
  27. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/__init__.pyi +0 -0
  28. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/_proto_py2/__init__.py +0 -0
  29. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/_proto_py2/log_logs_pb2.py +0 -0
  30. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/_proto_py2/log_logs_raw_pb2.py +0 -0
  31. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/acl_config.py +0 -0
  32. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/acl_response.py +0 -0
  33. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/async_sql_pb2.py +0 -0
  34. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/async_sql_response.py +0 -0
  35. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/common_response.py +0 -0
  36. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/compress.py +0 -0
  37. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/__init__.py +0 -0
  38. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/__init__.pyi +0 -0
  39. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/checkpoint_tracker.py +0 -0
  40. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/config.py +0 -0
  41. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/config.pyi +0 -0
  42. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/consumer_client.py +0 -0
  43. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/exceptions.py +0 -0
  44. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/fetched_log_group.py +0 -0
  45. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/heart_beat.py +0 -0
  46. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/preprocessor.py +0 -0
  47. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/py.typed +0 -0
  48. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/shard_worker.py +0 -0
  49. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/tasks.py +0 -0
  50. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/tasks.pyi +0 -0
  51. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/worker.py +0 -0
  52. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer/worker.pyi +0 -0
  53. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer_group_request.py +0 -0
  54. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/consumer_group_response.py +0 -0
  55. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/credentials.py +0 -0
  56. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/credentials.pyi +0 -0
  57. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/cursor_response.py +0 -0
  58. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/cursor_response.pyi +0 -0
  59. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/cursor_time_response.py +0 -0
  60. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/cursor_time_response.pyi +0 -0
  61. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/delete_async_sql_request.py +0 -0
  62. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/deletelogsrequest.py +0 -0
  63. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/deletelogssresponse.py +0 -0
  64. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/__init__.py +0 -0
  65. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/doc_logitem_converter.py +0 -0
  66. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/index_logstore_mappings.py +0 -0
  67. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/mapping_index_converter.py +0 -0
  68. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/migration_log.py +0 -0
  69. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/migration_manager.py +0 -0
  70. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/migration_response.py +0 -0
  71. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/migration_task.py +0 -0
  72. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/es_migration/util.py +0 -0
  73. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_config_response.py +0 -0
  74. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/__init__.py +0 -0
  75. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/config_parser.py +0 -0
  76. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/etl_util.py +0 -0
  77. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/exceptions.py +0 -0
  78. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/restrict_config_parser.py +0 -0
  79. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/runner.py +0 -0
  80. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/settings.py +0 -0
  81. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/__init__.py +0 -0
  82. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/trans_base.py +0 -0
  83. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/trans_csv.py +0 -0
  84. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/trans_json.py +0 -0
  85. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/trans_kv.py +0 -0
  86. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/trans_lookup.py +0 -0
  87. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/trans_mv.py +0 -0
  88. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/trans_regex.py +0 -0
  89. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/trans_comp/trans_set_field.py +0 -0
  90. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/transform/__init__.py +0 -0
  91. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/transform/condition_list.py +0 -0
  92. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/transform/condition_transform.py +0 -0
  93. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/transform/condition_util.py +0 -0
  94. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/transform/transform_base.py +0 -0
  95. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/transform/transform_list.py +0 -0
  96. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/etl_core/transform/transform_meta.py +0 -0
  97. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/export_response.py +0 -0
  98. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/ext/__init__.py +0 -0
  99. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/ext/jupyter_magic.py +0 -0
  100. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/ext/syslogclient.py +0 -0
  101. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/external_store_config.py +0 -0
  102. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/external_store_config_response.py +0 -0
  103. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/get_async_sql_request.py +0 -0
  104. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/getcontextlogsresponse.py +0 -0
  105. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/getdeletelogsstatusrequest.py +0 -0
  106. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/getdeletelogsstatusresponse.py +0 -0
  107. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/gethistogramsrequest.py +0 -0
  108. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/gethistogramsrequest.pyi +0 -0
  109. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/gethistogramsresponse.py +0 -0
  110. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/gethistogramsresponse.pyi +0 -0
  111. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/getlogsrequest.py +0 -0
  112. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/getlogsrequest.pyi +0 -0
  113. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/getlogsresponse.py +0 -0
  114. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/getlogsresponse.pyi +0 -0
  115. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/histogram.py +0 -0
  116. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/index_config.py +0 -0
  117. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/index_config.pyi +0 -0
  118. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/index_config_response.py +0 -0
  119. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/ingestion_response.py +0 -0
  120. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/job.py +0 -0
  121. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listdeletelogsstasksrequest.py +0 -0
  122. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listdeletelogsstasksresponse.py +0 -0
  123. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listlogstoresrequest.py +0 -0
  124. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listlogstoresrequest.pyi +0 -0
  125. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listlogstoresresponse.py +0 -0
  126. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listlogstoresresponse.pyi +0 -0
  127. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listtopicsrequest.py +0 -0
  128. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listtopicsrequest.pyi +0 -0
  129. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listtopicsresponse.py +0 -0
  130. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/listtopicsresponse.pyi +0 -0
  131. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/log_logs_pb2.py +0 -0
  132. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/log_logs_raw_pb2.py +0 -0
  133. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logclient_core.py +0 -0
  134. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logclient_operator.py +0 -0
  135. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logexception.py +0 -0
  136. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logexception.pyi +0 -0
  137. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logger_hanlder.py +0 -0
  138. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logitem.py +0 -0
  139. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logitem.pyi +0 -0
  140. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logrequest.py +0 -0
  141. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logresponse.py +0 -0
  142. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logresponse.pyi +0 -0
  143. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logstore_config_response.py +0 -0
  144. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logtail_config_detail.py +0 -0
  145. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logtail_config_response.py +0 -0
  146. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logtail_pipeline_config_detail.py +0 -0
  147. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/logtail_pipeline_config_response.py +0 -0
  148. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/machine_group_detail.py +0 -0
  149. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/machine_group_detail.pyi +0 -0
  150. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/machinegroup_response.py +0 -0
  151. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/metering_mode_response.py +0 -0
  152. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/metering_mode_response.pyi +0 -0
  153. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/multimodal_config_response.py +0 -0
  154. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/multimodal_config_response.pyi +0 -0
  155. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/object_response.py +0 -0
  156. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/object_response.pyi +0 -0
  157. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/odps_sink.py +0 -0
  158. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/oss_sink.py +0 -0
  159. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/pluralize.py +0 -0
  160. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/project_response.py +0 -0
  161. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/proto.py +0 -0
  162. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/pulllog_response.py +0 -0
  163. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/pulllog_response.pyi +0 -0
  164. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/putlogsrequest.py +0 -0
  165. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/putlogsrequest.pyi +0 -0
  166. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/putlogsresponse.py +0 -0
  167. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/putlogsresponse.pyi +0 -0
  168. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/py.typed +0 -0
  169. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/queriedlog.py +0 -0
  170. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/queriedlog.pyi +0 -0
  171. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/rebuild_index_response.py +0 -0
  172. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/resource_params.py +0 -0
  173. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/resource_response.py +0 -0
  174. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/scheduled_sql.py +0 -0
  175. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/scheduled_sql_response.py +0 -0
  176. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/shard_response.py +0 -0
  177. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/shipper_config.py +0 -0
  178. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/shipper_config.pyi +0 -0
  179. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/shipper_response.py +0 -0
  180. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/sink.py +0 -0
  181. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/sql_instance_response.py +0 -0
  182. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/store_view.py +0 -0
  183. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/store_view.pyi +0 -0
  184. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/store_view_response.py +0 -0
  185. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/store_view_response.pyi +0 -0
  186. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/submit_async_sql_request.py +0 -0
  187. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/submit_async_sql_request.pyi +0 -0
  188. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/substore_config_response.py +0 -0
  189. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/tag_response.py +0 -0
  190. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/topostore_params.py +0 -0
  191. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/topostore_response.py +0 -0
  192. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/log/util.py +0 -0
  193. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun/py.typed +0 -0
  194. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun_log_python_sdk.egg-info/dependency_links.txt +0 -0
  195. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/aliyun_log_python_sdk.egg-info/top_level.txt +0 -0
  196. {aliyun_log_python_sdk-0.9.46 → aliyun_log_python_sdk-0.9.48}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.46
3
+ Version: 0.9.48
4
4
  Summary: Aliyun log service Python client SDK
5
5
  Home-page: https://github.com/aliyun/aliyun-log-python-sdk
6
6
  Author: Aliyun
@@ -26,9 +26,19 @@ Requires-Dist: protobuf<6.0.0,>=3.20.3
26
26
  Requires-Dist: lz4
27
27
  Provides-Extra: test
28
28
  Requires-Dist: pytest; extra == "test"
29
+ Requires-Dist: pytest-mock; extra == "test"
30
+ Requires-Dist: responses; extra == "test"
29
31
  Requires-Dist: lz4; extra == "test"
30
32
  Requires-Dist: virtualenv; extra == "test"
31
33
  Requires-Dist: zstandard; extra == "test"
34
+ Dynamic: author
35
+ Dynamic: classifier
36
+ Dynamic: description
37
+ Dynamic: home-page
38
+ Dynamic: license-file
39
+ Dynamic: provides-extra
40
+ Dynamic: requires-dist
41
+ Dynamic: summary
32
42
 
33
43
 
34
44
  Python SDK for Alicloud Log Service
@@ -2,11 +2,22 @@
2
2
 
3
3
  [![Documentation Status](https://readthedocs.org/projects/aliyun-log-python-sdk/badge/?version=latest)](http://aliyun-log-python-sdk.readthedocs.io/?badge=latest)
4
4
  [![Pypi Version](https://badge.fury.io/py/aliyun-log-python-sdk.svg)](https://badge.fury.io/py/aliyun-log-python-sdk)
5
- [![Travis CI](https://travis-ci.org/aliyun/aliyun-log-python-sdk.svg?branch=master)](https://travis-ci.org/aliyun/aliyun-log-python-sdk)
5
+ [![Py3 build/test](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/build.yaml/badge.svg?branch=master)](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/build.yaml)
6
+ [![Legacy Python build/test](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/py2-build.yaml/badge.svg?branch=master)](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/py2-build.yaml)
6
7
  [![Development Status](https://img.shields.io/pypi/status/aliyun-log-python-sdk.svg)](https://pypi.python.org/pypi/aliyun-log-python-sdk/)
7
8
  [![Python version](https://img.shields.io/pypi/pyversions/aliyun-log-python-sdk.svg)](https://pypi.python.org/pypi/aliyun-log-python-sdk/)
8
9
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/aliyun/aliyun-log-python-sdk/blob/master/LICENSE)
9
10
 
11
+ ### CI status
12
+
13
+ | Python | Status |
14
+ |---|---|
15
+ | 2.7 | [![py 2.7](https://img.shields.io/github/actions/workflow/status/aliyun/aliyun-log-python-sdk/py2-build.yaml?branch=master&label=py%202.7)](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/py2-build.yaml?query=branch%3Amaster) |
16
+ | 3.6 | [![py 3.6](https://img.shields.io/github/actions/workflow/status/aliyun/aliyun-log-python-sdk/py2-build.yaml?branch=master&label=py%203.6)](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/py2-build.yaml?query=branch%3Amaster) |
17
+ | 3.7 | [![py 3.7](https://img.shields.io/github/actions/workflow/status/aliyun/aliyun-log-python-sdk/py2-build.yaml?branch=master&label=py%203.7)](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/py2-build.yaml?query=branch%3Amaster) |
18
+ | 3.8 | [![py 3.8](https://img.shields.io/github/actions/workflow/status/aliyun/aliyun-log-python-sdk/build.yaml?branch=master&label=py%203.8)](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/build.yaml?query=branch%3Amaster) |
19
+ | 3.12 | [![py 3.12](https://img.shields.io/github/actions/workflow/status/aliyun/aliyun-log-python-sdk/build.yaml?branch=master&label=py%203.12)](https://github.com/aliyun/aliyun-log-python-sdk/actions/workflows/build.yaml?query=branch%3Amaster) |
20
+
10
21
  [中文版README](https://github.com/aliyun/aliyun-log-python-sdk/blob/master/README_CN.md)
11
22
 
12
23
  ## Introduction
@@ -39,6 +39,10 @@ from .proto import LogGroupRaw as LogGroup
39
39
  from .rebuild_index_response import *
40
40
  from .deletelogsrequest import *
41
41
  from .deletelogssresponse import *
42
+ from .deletelogsv2request import *
43
+ from .deletelogsv2response import *
44
+ from .updatelogsrequest import *
45
+ from .updatelogsresponse import *
42
46
  from .getdeletelogsstatusrequest import *
43
47
  from .getdeletelogsstatusresponse import *
44
48
  from .listdeletelogsstasksrequest import *
@@ -39,6 +39,10 @@ from .proto import LogGroupRaw as LogGroup
39
39
  from .rebuild_index_response import CreateRebuildIndexResponse as CreateRebuildIndexResponse, GetRebuildIndexResponse as GetRebuildIndexResponse
40
40
  from .deletelogsrequest import DeleteLogsRequest as DeleteLogsRequest
41
41
  from .deletelogssresponse import DeleteLogsResponse as DeleteLogsResponse
42
+ from .deletelogsv2request import DeleteLogsV2Request as DeleteLogsV2Request
43
+ from .deletelogsv2response import DeleteLogsV2Response as DeleteLogsV2Response
44
+ from .updatelogsrequest import UpdateLogsRequest as UpdateLogsRequest
45
+ from .updatelogsresponse import UpdateLogsResponse as UpdateLogsResponse
42
46
  from .getdeletelogsstatusrequest import GetDeleteLogsStatusRequest as GetDeleteLogsStatusRequest
43
47
  from .getdeletelogsstatusresponse import GetDeleteLogsStatusResponse as GetDeleteLogsStatusResponse
44
48
  from .listdeletelogsstasksrequest import ListDeleteLogsTasksRequest as ListDeleteLogsTasksRequest
@@ -165,20 +165,14 @@ class AuthV4(AuthBase):
165
165
 
166
166
  @staticmethod
167
167
  def _v4_uri_encode(raw_text):
168
- raw_text = str(raw_text)
169
-
170
- res = ''
171
- for b in raw_text:
172
- if isinstance(b, int):
173
- c = chr(b)
174
- else:
175
- c = b
176
- if ('A' <= c <= 'Z') or ('a' <= c <= 'z') \
177
- or ('0' <= c <= '9') or c in ['_', '-', '~', '.']:
178
- res += c
179
- else:
180
- res += "%{0:02X}".format(ord(c))
181
- return res
168
+ # RFC 3986 unreserved = A-Z a-z 0-9 _ . - ~; everything else
169
+ # percent-encoded as UTF-8 bytes. Py2 urllib.quote omits ~ from
170
+ # its default safe set, so we pass safe='~' for parity with py3.
171
+ if isinstance(raw_text, bytes):
172
+ data = raw_text
173
+ else:
174
+ data = u'{0}'.format(raw_text).encode('utf-8')
175
+ return urlquote(data, safe='~')
182
176
 
183
177
  @staticmethod
184
178
  def build_sign_key(key, region, date, string_to_sign):
@@ -0,0 +1,114 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logrequest import LogRequest
8
+ from .util import parse_timestamp
9
+
10
+
11
+ class DeleteLogsV2Request(LogRequest):
12
+ """The request used to delete logs from a logstore.
13
+
14
+ :type project: string
15
+ :param project: project name
16
+
17
+ :type logstore: string
18
+ :param logstore: logstore name
19
+
20
+ :type fromTime: int/string
21
+ :param fromTime: the begin time
22
+
23
+ :type toTime: int/string
24
+ :param toTime: the end time
25
+
26
+ :type query: string
27
+ :param query: user defined query
28
+
29
+ :type rowId: string
30
+ :param rowId: row id of the log
31
+ """
32
+
33
+ def __init__(self, project=None, logstore=None, fromTime=None, toTime=None, query=None, rowId=None):
34
+ LogRequest.__init__(self, project)
35
+ self.logstore = logstore
36
+ self.fromTime = parse_timestamp(fromTime) if fromTime is not None else fromTime
37
+ self.toTime = parse_timestamp(toTime) if toTime is not None else toTime
38
+ self.query = query
39
+ self.rowId = rowId
40
+
41
+ def get_logstore(self):
42
+ """Get logstore name.
43
+
44
+ :return: string, logstore name.
45
+ """
46
+ return self.logstore if self.logstore else ''
47
+
48
+ def set_logstore(self, logstore):
49
+ """Set logstore name.
50
+
51
+ :type logstore: string
52
+ :param logstore: logstore name
53
+ """
54
+ self.logstore = logstore
55
+
56
+ def get_from(self):
57
+ """Get begin time.
58
+
59
+ :return: int, begin time
60
+ """
61
+ return self.fromTime
62
+
63
+ def set_from(self, fromTime):
64
+ """Set begin time.
65
+
66
+ :type fromTime: int/string
67
+ :param fromTime: begin time
68
+ """
69
+ self.fromTime = parse_timestamp(fromTime) if fromTime is not None else fromTime
70
+
71
+ def get_to(self):
72
+ """Get end time.
73
+
74
+ :return: int, end time
75
+ """
76
+ return self.toTime
77
+
78
+ def set_to(self, toTime):
79
+ """Set end time.
80
+
81
+ :type toTime: int/string
82
+ :param toTime: end time
83
+ """
84
+ self.toTime = parse_timestamp(toTime) if toTime is not None else toTime
85
+
86
+ def get_query(self):
87
+ """Get user defined query.
88
+
89
+ :return: string, user defined query
90
+ """
91
+ return self.query
92
+
93
+ def set_query(self, query):
94
+ """Set user defined query.
95
+
96
+ :type query: string
97
+ :param query: user defined query
98
+ """
99
+ self.query = query
100
+
101
+ def get_row_id(self):
102
+ """Get row id.
103
+
104
+ :return: string, row id
105
+ """
106
+ return self.rowId
107
+
108
+ def set_row_id(self, rowId):
109
+ """Set row id.
110
+
111
+ :type rowId: string
112
+ :param rowId: row id
113
+ """
114
+ self.rowId = rowId
@@ -0,0 +1,17 @@
1
+ # -*- coding: utf-8 -*-
2
+ from typing import Optional, Union
3
+
4
+ from .logrequest import LogRequest
5
+
6
+ class DeleteLogsV2Request(LogRequest):
7
+ def __init__(self, project: Optional[str] = ..., logstore: Optional[str] = ..., fromTime: Optional[Union[int, str]] = ..., toTime: Optional[Union[int, str]] = ..., query: Optional[str] = ..., rowId: Optional[str] = ...) -> None: ...
8
+ def get_logstore(self) -> str: ...
9
+ def set_logstore(self, logstore: str) -> None: ...
10
+ def get_from(self) -> Optional[int]: ...
11
+ def set_from(self, fromTime: Optional[Union[int, str]]) -> None: ...
12
+ def get_to(self) -> Optional[int]: ...
13
+ def set_to(self, toTime: Optional[Union[int, str]]) -> None: ...
14
+ def get_query(self) -> Optional[str]: ...
15
+ def set_query(self, query: Optional[str]) -> None: ...
16
+ def get_row_id(self) -> Optional[str]: ...
17
+ def set_row_id(self, rowId: Optional[str]) -> None: ...
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logresponse import LogResponse
8
+
9
+
10
+ class DeleteLogsV2Response(LogResponse):
11
+ """The response of the DeleteLogsV2 API from log."""
12
+
13
+ def __init__(self, resp, header):
14
+ LogResponse.__init__(self, header, resp)
15
+ self.affected_rows = resp.get('affected_rows', 0)
16
+
17
+ def get_affected_rows(self):
18
+ return self.affected_rows
19
+
20
+ def log_print(self):
21
+ print('DeleteLogsV2Response:')
22
+ print('headers:', self.get_all_headers())
23
+ print('affected_rows:', self.affected_rows)
@@ -0,0 +1,10 @@
1
+ # -*- coding: utf-8 -*-
2
+ from typing import Any, Dict
3
+
4
+ from .logresponse import LogResponse
5
+
6
+ class DeleteLogsV2Response(LogResponse):
7
+ affected_rows: int
8
+ def __init__(self, resp: Dict[str, Any], header: Dict[str, Any]) -> None: ...
9
+ def get_affected_rows(self) -> int: ...
10
+ def log_print(self) -> None: ...
@@ -21,12 +21,16 @@ from .scheduled_sql_response import *
21
21
  from itertools import cycle
22
22
  from .consumer_group_request import *
23
23
  from .consumer_group_response import *
24
- from .getlogsrequest import *
25
- from .cursor_response import GetCursorResponse
26
- from .cursor_time_response import GetCursorTimeResponse
27
- from .gethistogramsresponse import GetHistogramsResponse
28
- from .deletelogssresponse import DeleteLogsResponse
29
- from .getlogsresponse import GetLogsResponse
24
+ from .getlogsrequest import *
25
+ from .cursor_response import GetCursorResponse
26
+ from .cursor_time_response import GetCursorTimeResponse
27
+ from .gethistogramsresponse import GetHistogramsResponse
28
+ from .deletelogssresponse import DeleteLogsResponse
29
+ from .deletelogsv2request import DeleteLogsV2Request
30
+ from .deletelogsv2response import DeleteLogsV2Response
31
+ from .updatelogsrequest import UpdateLogsRequest
32
+ from .updatelogsresponse import UpdateLogsResponse
33
+ from .getlogsresponse import GetLogsResponse
30
34
  from .getdeletelogsstatusresponse import GetDeleteLogsStatusResponse
31
35
  from .listdeletelogsstasksresponse import ListDeleteLogsTasksResponse
32
36
  from .getcontextlogsresponse import GetContextLogsResponse
@@ -90,6 +94,7 @@ if six.PY3:
90
94
  CONNECTION_TIME_OUT = 120
91
95
  MAX_LIST_PAGING_SIZE = 500
92
96
  MAX_GET_LOG_PAGING_SIZE = 100
97
+ MAX_PUT_LOG_SIZE = 30 * 1024 * 1024
93
98
 
94
99
  DEFAULT_QUERY_RETRY_COUNT = 5
95
100
  DEFAULT_QUERY_RETRY_INTERVAL = 0.5
@@ -425,7 +430,7 @@ class LogClient(object):
425
430
  return PutLogsResponse(header, resp)
426
431
 
427
432
  def put_logs(self, request):
428
- """ Put logs to log service. up to 512000 logs up to 10MB size
433
+ """ Put logs to log service. up to 512000 logs up to 30MB size
429
434
  Unsuccessful operation will cause an LogException.
430
435
 
431
436
  :type request: PutLogsRequest
@@ -464,9 +469,9 @@ class LogClient(object):
464
469
  pb_tag.Value = value
465
470
  body = logGroup.SerializeToString()
466
471
 
467
- if len(body) > 10 * 1024 * 1024: # 10 MB
472
+ if len(body) > MAX_PUT_LOG_SIZE:
468
473
  raise LogException('InvalidLogSize',
469
- "logItems' size exceeds maximum limitation: 10 MB. now: {0} MB.".format(
474
+ "logItems' size exceeds maximum limitation: 30 MB. now: {0} MB.".format(
470
475
  len(body) / 1024.0 / 1024))
471
476
 
472
477
  headers = {'x-log-bodyrawsize': str(len(body)), 'Content-Type': 'application/x-protobuf'}
@@ -566,9 +571,9 @@ class LogClient(object):
566
571
  (resp, header) = self._send("GET", project, None, resource, params, headers)
567
572
  return GetHistogramsResponse(resp, header)
568
573
 
569
- def delete_logs(self, request):
570
- """ delete logs of requested query from log service.
571
- Unsuccessful operation will cause an LogException.
574
+ def delete_logs(self, request):
575
+ """ delete logs of requested query from log service.
576
+ Unsuccessful operation will cause an LogException.
572
577
 
573
578
  :type request: DeleteLogsRequest
574
579
  :param request: the DeleteLogsRequest request parameters class.
@@ -595,12 +600,159 @@ class LogClient(object):
595
600
  resource = "/logstores/" + logstore + "/deletelogtasks"
596
601
  body_str = six.b(json.dumps(params))
597
602
  headers["x-log-bodyrawsize"] = str(len(body_str))
598
- (resp, header) = self._send("POST", project, body_str, resource, None, headers)
599
- return DeleteLogsResponse(resp, header)
600
-
601
- def get_delete_logs_status(self, request):
602
- """ Get get_delete_logs_status of requested logstore from log service.
603
- Unsuccessful operation will cause an LogException.
603
+ (resp, header) = self._send("POST", project, body_str, resource, None, headers)
604
+ return DeleteLogsResponse(resp, header)
605
+
606
+ @staticmethod
607
+ def _log_item_to_update_data(log_item):
608
+ if log_item is None:
609
+ return None
610
+ if hasattr(log_item, 'get_contents'):
611
+ return json.dumps(dict(log_item.get_contents()))
612
+ if isinstance(log_item, dict):
613
+ return json.dumps(log_item)
614
+ return log_item
615
+
616
+ @staticmethod
617
+ def _choose_row_id(rowid, row_id):
618
+ return rowid if rowid is not None else row_id
619
+
620
+ def delete_logs_v2(self, request=None, project=None, logstore=None, from_time=None, to_time=None,
621
+ query=None, rowid=None, row_id=None):
622
+ """Delete logs from a logstore.
623
+
624
+ Unsuccessful operation will cause an LogException.
625
+
626
+ :type request: DeleteLogsV2Request
627
+ :param request: the DeleteLogsV2Request request parameters class.
628
+
629
+ :type project: string
630
+ :param project: project name
631
+
632
+ :type logstore: string
633
+ :param logstore: logstore name
634
+
635
+ :type from_time: int/string
636
+ :param from_time: the begin time
637
+
638
+ :type to_time: int/string
639
+ :param to_time: the end time
640
+
641
+ :type query: string
642
+ :param query: user defined query
643
+
644
+ :type rowid: string
645
+ :param rowid: row id of the log
646
+
647
+ :type row_id: string
648
+ :param row_id: row id of the log
649
+
650
+ :return: DeleteLogsV2Response
651
+
652
+ :raise: LogException
653
+ """
654
+ if request is None:
655
+ request = DeleteLogsV2Request(project, logstore, from_time, to_time, query,
656
+ self._choose_row_id(rowid, row_id))
657
+
658
+ body = {}
659
+ if request.get_from() is not None:
660
+ body['from'] = request.get_from()
661
+ if request.get_to() is not None:
662
+ body['to'] = request.get_to()
663
+ if request.get_query() is not None:
664
+ body['query'] = request.get_query()
665
+ if request.get_row_id() is not None:
666
+ body['rowId'] = request.get_row_id()
667
+
668
+ body_str = six.b(json.dumps(body))
669
+ headers = {
670
+ 'Content-Type': 'application/json',
671
+ 'x-log-bodyrawsize': str(len(body_str))
672
+ }
673
+ logstore = request.get_logstore()
674
+ project = request.get_project()
675
+ resource = "/logstores/" + logstore + "/deletelogs"
676
+ (resp, header) = self._send("POST", project, body_str, resource, None, headers)
677
+ return DeleteLogsV2Response(resp, header)
678
+
679
+ def update_logs(self, request=None, project=None, logstore=None, from_time=None, to_time=None,
680
+ query=None, rowid=None, row_id=None, log_item=None, update_mode=None, data=None):
681
+ """Update logs in a logstore.
682
+
683
+ Unsuccessful operation will cause an LogException.
684
+
685
+ :type request: UpdateLogsRequest
686
+ :param request: the UpdateLogsRequest request parameters class.
687
+
688
+ :type project: string
689
+ :param project: project name
690
+
691
+ :type logstore: string
692
+ :param logstore: logstore name
693
+
694
+ :type from_time: int/string
695
+ :param from_time: the begin time
696
+
697
+ :type to_time: int/string
698
+ :param to_time: the end time
699
+
700
+ :type query: string
701
+ :param query: user defined query
702
+
703
+ :type rowid: string
704
+ :param rowid: row id of the log
705
+
706
+ :type row_id: string
707
+ :param row_id: row id of the log
708
+
709
+ :type log_item: LogItem/dict
710
+ :param log_item: fields to update
711
+
712
+ :type update_mode: string
713
+ :param update_mode: update mode
714
+
715
+ :type data: string
716
+ :param data: update data
717
+
718
+ :return: UpdateLogsResponse
719
+
720
+ :raise: LogException
721
+ """
722
+ if request is None:
723
+ if data is None:
724
+ data = self._log_item_to_update_data(log_item)
725
+ request = UpdateLogsRequest(project, logstore, from_time, to_time, query,
726
+ self._choose_row_id(rowid, row_id), update_mode, data)
727
+
728
+ body = {}
729
+ if request.get_from() is not None:
730
+ body['from'] = request.get_from()
731
+ if request.get_to() is not None:
732
+ body['to'] = request.get_to()
733
+ if request.get_query() is not None:
734
+ body['query'] = request.get_query()
735
+ if request.get_row_id() is not None:
736
+ body['rowId'] = request.get_row_id()
737
+ if request.get_update_mode() is not None:
738
+ body['updateMode'] = request.get_update_mode()
739
+ if request.get_data() is not None:
740
+ body['data'] = request.get_data()
741
+
742
+ body_str = six.b(json.dumps(body))
743
+ headers = {
744
+ 'Content-Type': 'application/json',
745
+ 'x-log-bodyrawsize': str(len(body_str))
746
+ }
747
+ logstore = request.get_logstore()
748
+ project = request.get_project()
749
+ resource = "/logstores/" + logstore + "/updatelogs"
750
+ (resp, header) = self._send("POST", project, body_str, resource, None, headers)
751
+ return UpdateLogsResponse(resp, header)
752
+
753
+ def get_delete_logs_status(self, request):
754
+ """ Get get_delete_logs_status of requested logstore from log service.
755
+ Unsuccessful operation will cause an LogException.
604
756
 
605
757
  :type request: GetDeleteLogsStatusRequest
606
758
  :param request: the GetDeleteLogsStatusRequest request parameters class.
@@ -1470,9 +1622,9 @@ class LogClient(object):
1470
1622
  batch_size=batch_size, compress=compress, encodings=encodings,
1471
1623
  shard_list=shard_list, no_escape=no_escape, query=query, processor=processor)
1472
1624
 
1473
- def create_logstore(self, project_name, logstore_name,
1474
- ttl=30,
1475
- shard_count=2,
1625
+ def create_logstore(self, project_name, logstore_name,
1626
+ ttl=30,
1627
+ shard_count=2,
1476
1628
  enable_tracking=False,
1477
1629
  append_meta=False,
1478
1630
  auto_split=True,
@@ -1480,10 +1632,11 @@ class LogClient(object):
1480
1632
  preserve_storage=False,
1481
1633
  encrypt_conf=None,
1482
1634
  telemetry_type='',
1483
- hot_ttl=-1,
1484
- mode = None,
1485
- infrequent_access_ttl=-1
1486
- ):
1635
+ hot_ttl=-1,
1636
+ mode = None,
1637
+ infrequent_access_ttl=-1,
1638
+ enable_modify=False
1639
+ ):
1487
1640
  """ create log store
1488
1641
  Unsuccessful operation will cause an LogException.
1489
1642
 
@@ -1535,12 +1688,15 @@ class LogClient(object):
1535
1688
  :type infrequent_access_ttl: int
1536
1689
  :param infrequent_access_ttl: infrequent access storage time
1537
1690
 
1538
- :type hot_ttl: int
1539
- :param hot_ttl: the life cycle of hot storage,[0-hot_ttl]is hot storage, (hot_ttl-ttl] is warm storage, if hot_ttl=-1, it means [0-ttl]is all hot storage
1540
-
1541
- :return: CreateLogStoreResponse
1542
-
1543
- :raise: LogException
1691
+ :type hot_ttl: int
1692
+ :param hot_ttl: the life cycle of hot storage,[0-hot_ttl]is hot storage, (hot_ttl-ttl] is warm storage, if hot_ttl=-1, it means [0-ttl]is all hot storage
1693
+
1694
+ :type enable_modify: bool
1695
+ :param enable_modify: enable log modification and deletion, default is False
1696
+
1697
+ :return: CreateLogStoreResponse
1698
+
1699
+ :raise: LogException
1544
1700
  """
1545
1701
  if preserve_storage:
1546
1702
  ttl = 3650
@@ -1555,11 +1711,13 @@ class LogClient(object):
1555
1711
  "enable_tracking": enable_tracking,
1556
1712
  "autoSplit": auto_split,
1557
1713
  "maxSplitShard": max_split_shard,
1558
- "appendMeta": append_meta,
1559
- "telemetryType": telemetry_type
1560
- }
1561
- if hot_ttl !=-1:
1562
- body['hot_ttl'] = hot_ttl
1714
+ "appendMeta": append_meta,
1715
+ "telemetryType": telemetry_type
1716
+ }
1717
+ if enable_modify:
1718
+ body["enableModify"] = enable_modify
1719
+ if hot_ttl !=-1:
1720
+ body['hot_ttl'] = hot_ttl
1563
1721
  if encrypt_conf != None:
1564
1722
  body["encrypt_conf"] = encrypt_conf
1565
1723
  if mode != None:
@@ -9,6 +9,8 @@ from .cursor_time_response import GetCursorTimeResponse
9
9
  from .delete_async_sql_request import DeleteAsyncSqlRequest
10
10
  from .deletelogsrequest import DeleteLogsRequest
11
11
  from .deletelogssresponse import DeleteLogsResponse
12
+ from .deletelogsv2request import DeleteLogsV2Request
13
+ from .deletelogsv2response import DeleteLogsV2Response
12
14
  from .etl_config_response import CreateEtlResponse, DeleteEtlResponse, GetEtlResponse, ListEtlsResponse, StartEtlResponse, StopEtlResponse, UpdateEtlResponse
13
15
  from .export_response import CreateExportResponse, DeleteExportResponse, GetExportResponse, ListExportResponse, UpdateExportResponse
14
16
  from .external_store_config import ExternalStoreConfigBase
@@ -31,6 +33,7 @@ from .listlogstoresrequest import ListLogstoresRequest
31
33
  from .listlogstoresresponse import ListLogstoresResponse
32
34
  from .listtopicsrequest import ListTopicsRequest
33
35
  from .listtopicsresponse import ListTopicsResponse
36
+ from .logitem import LogItem
34
37
  from .logclient_operator import ResourceUsageResponse, copy_project, list_more, query_more, pull_log_dump, copy_logstore, copy_data, get_resource_usage, arrange_shard, transform_data, copy_dashboard, copy_alert
35
38
  from .logexception import LogException
36
39
  from .logresponse import LogResponse
@@ -61,6 +64,8 @@ from .store_view import StoreView
61
64
  from .store_view_response import CreateStoreViewResponse, DeleteStoreViewResponse, GetStoreViewResponse, ListStoreViewsResponse, UpdateStoreViewResponse
62
65
  from .substore_config_response import CreateMetricsStoreResponse, CreateSubStoreResponse, DeleteSubStoreResponse, GetSubStoreResponse, GetSubStoreTTLResponse, ListSubStoreResponse, UpdateSubStoreResponse, UpdateSubStoreTTLResponse
63
66
  from .submit_async_sql_request import SubmitAsyncSqlRequest
67
+ from .updatelogsrequest import UpdateLogsRequest
68
+ from .updatelogsresponse import UpdateLogsResponse
64
69
  from .tag_response import GetResourceTagsResponse
65
70
  from .topostore_params import Topostore, TopostoreNode, TopostoreRelation
66
71
  from .topostore_response import CreateTopostoreNodeResponse, CreateTopostoreRelationResponse, CreateTopostoreResponse, DeleteTopostoreNodeResponse, DeleteTopostoreRelationResponse, DeleteTopostoreResponse, GetTopostoreNodeResponse, GetTopostoreRelationResponse, GetTopostoreResponse, ListTopostoreNodesResponse, ListTopostoreRelationsResponse, ListTopostoresResponse, UpdateTopostoreNodeResponse, UpdateTopostoreRelationResponse, UpdateTopostoreResponse, UpsertTopostoreNodeResponse, UpsertTopostoreRelationResponse
@@ -82,6 +87,8 @@ class LogClient(object):
82
87
  def list_topics(self, request: ListTopicsRequest) -> ListTopicsResponse: ...
83
88
  def get_histograms(self, request: GetHistogramsRequest) -> GetHistogramsResponse: ...
84
89
  def delete_logs(self, request: DeleteLogsRequest) -> DeleteLogsResponse: ...
90
+ def delete_logs_v2(self, request: Optional[DeleteLogsV2Request] = ..., project: Optional[str] = ..., logstore: Optional[str] = ..., from_time: Optional[Union[int, str]] = ..., to_time: Optional[Union[int, str]] = ..., query: Optional[str] = ..., rowid: Optional[str] = ..., row_id: Optional[str] = ...) -> DeleteLogsV2Response: ...
91
+ def update_logs(self, request: Optional[UpdateLogsRequest] = ..., project: Optional[str] = ..., logstore: Optional[str] = ..., from_time: Optional[Union[int, str]] = ..., to_time: Optional[Union[int, str]] = ..., query: Optional[str] = ..., rowid: Optional[str] = ..., row_id: Optional[str] = ..., log_item: Optional[Union[LogItem, Dict[str, Any], str]] = ..., update_mode: Optional[str] = ..., data: Optional[str] = ...) -> UpdateLogsResponse: ...
85
92
  def get_delete_logs_status(self, request: GetDeleteLogsStatusRequest) -> GetDeleteLogsStatusResponse: ...
86
93
  def list_delete_logs_tasks(self, request: ListDeleteLogsTasksRequest) -> ListDeleteLogsTasksResponse: ...
87
94
  def get_log(self, project: str, logstore: str, from_time: Union[int, str], to_time: Union[int, str], topic: Optional[str] = ..., query: Optional[str] = ..., reverse: bool = ..., offset: int = ..., size: int = ..., power_sql: bool = ..., scan: bool = ..., forward: bool = ..., accurate_query: bool = ..., from_time_nano_part: int = ..., to_time_nano_part: int = ...) -> GetLogsResponse: ...
@@ -103,7 +110,7 @@ class LogClient(object):
103
110
  def pull_logs(self, project_name: str, logstore_name: str, shard_id: int, cursor: str, count: Optional[int] = ..., end_cursor: Optional[str] = ..., compress: Optional[bool] = ..., query: Optional[str] = ..., accept_compress_type: Optional[str] = ..., processor: Optional[str] = ...) -> PullLogResponse: ...
104
111
  def pull_log(self, project_name: str, logstore_name: str, shard_id: int, from_time: Union[int, str], to_time: Union[int, str], batch_size: Optional[int] = ..., compress: Optional[bool] = ..., query: Optional[str] = ..., accept_compress_type: Optional[str] = ..., processor: Optional[str] = ...) -> Iterator[PullLogResponse]: ...
105
112
  def pull_log_dump(self, project_name: str, logstore_name: str, from_time: Union[int, str], to_time: Union[int, str], file_path: str, batch_size: Optional[int] = ..., compress: Optional[bool] = ..., encodings: Optional[List[str]] = ..., shard_list: Optional[Union[str, List[str]]] = ..., no_escape: Optional[bool] = ..., query: Optional[str] = ..., processor: Optional[str] = ...) -> LogResponse: ...
106
- def create_logstore(self, project_name: str, logstore_name: str, ttl: int = ..., shard_count: int = ..., enable_tracking: bool = ..., append_meta: bool = ..., auto_split: bool = ..., max_split_shard: int = ..., preserve_storage: bool = ..., encrypt_conf: Optional[Dict[str, Any]] = ..., telemetry_type: str = ..., hot_ttl: int = ..., mode: Optional[str] = ..., infrequent_access_ttl: int = ...) -> CreateLogStoreResponse: ...
113
+ def create_logstore(self, project_name: str, logstore_name: str, ttl: int = ..., shard_count: int = ..., enable_tracking: bool = ..., append_meta: bool = ..., auto_split: bool = ..., max_split_shard: int = ..., preserve_storage: bool = ..., encrypt_conf: Optional[Dict[str, Any]] = ..., telemetry_type: str = ..., hot_ttl: int = ..., mode: Optional[str] = ..., infrequent_access_ttl: int = ..., enable_modify: bool = ...) -> CreateLogStoreResponse: ...
107
114
  def delete_logstore(self, project_name: str, logstore_name: str) -> DeleteLogStoreResponse: ...
108
115
  def get_logstore(self, project_name: str, logstore_name: str) -> GetLogStoreResponse: ...
109
116
  def update_logstore(self, project_name: str, logstore_name: str, ttl: Optional[int] = ..., enable_tracking: Optional[bool] = ..., shard_count: Optional[int] = ..., append_meta: Optional[bool] = ..., auto_split: Optional[bool] = ..., max_split_shard: Optional[int] = ..., preserve_storage: Optional[bool] = ..., encrypt_conf: Optional[Dict[str, Any]] = ..., hot_ttl: int = ..., mode: Optional[str] = ..., telemetry_type: Optional[str] = ..., infrequent_access_ttl: int = ...) -> UpdateLogStoreResponse: ...