aliyun-log-python-sdk 0.9.24__tar.gz → 0.9.26__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 (132) hide show
  1. {aliyun_log_python_sdk-0.9.24/aliyun_log_python_sdk.egg-info → aliyun_log_python_sdk-0.9.26}/PKG-INFO +1 -1
  2. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/__init__.py +4 -0
  3. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/external_store_config.py +2 -0
  4. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logclient.py +119 -0
  5. aliyun_log_python_sdk-0.9.26/aliyun/log/store_view.py +162 -0
  6. aliyun_log_python_sdk-0.9.26/aliyun/log/store_view_response.py +125 -0
  7. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/version.py +1 -1
  8. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26/aliyun_log_python_sdk.egg-info}/PKG-INFO +1 -1
  9. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun_log_python_sdk.egg-info/SOURCES.txt +2 -0
  10. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/LICENSE +0 -0
  11. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/README.md +0 -0
  12. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/__init__.py +0 -0
  13. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/_proto_py2/__init__.py +0 -0
  14. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/_proto_py2/log_logs_pb2.py +0 -0
  15. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/_proto_py2/log_logs_raw_pb2.py +0 -0
  16. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/acl_config.py +0 -0
  17. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/acl_response.py +0 -0
  18. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/auth.py +0 -0
  19. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/common_response.py +0 -0
  20. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/compress.py +0 -0
  21. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/__init__.py +0 -0
  22. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/checkpoint_tracker.py +0 -0
  23. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/config.py +0 -0
  24. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/consumer_client.py +0 -0
  25. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/exceptions.py +0 -0
  26. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/fetched_log_group.py +0 -0
  27. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/heart_beat.py +0 -0
  28. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/shard_worker.py +0 -0
  29. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/tasks.py +0 -0
  30. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer/worker.py +0 -0
  31. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer_group_request.py +0 -0
  32. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/consumer_group_response.py +0 -0
  33. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/credentials.py +0 -0
  34. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/cursor_response.py +0 -0
  35. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/cursor_time_response.py +0 -0
  36. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/__init__.py +0 -0
  37. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/doc_logitem_converter.py +0 -0
  38. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/index_logstore_mappings.py +0 -0
  39. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/mapping_index_converter.py +0 -0
  40. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/migration_log.py +0 -0
  41. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/migration_manager.py +0 -0
  42. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/migration_response.py +0 -0
  43. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/migration_task.py +0 -0
  44. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/es_migration/util.py +0 -0
  45. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_config_response.py +0 -0
  46. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/__init__.py +0 -0
  47. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/config_parser.py +0 -0
  48. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/etl_util.py +0 -0
  49. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/exceptions.py +0 -0
  50. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/restrict_config_parser.py +0 -0
  51. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/runner.py +0 -0
  52. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/settings.py +0 -0
  53. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/__init__.py +0 -0
  54. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/trans_base.py +0 -0
  55. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/trans_csv.py +0 -0
  56. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/trans_json.py +0 -0
  57. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/trans_kv.py +0 -0
  58. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/trans_lookup.py +0 -0
  59. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/trans_mv.py +0 -0
  60. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/trans_regex.py +0 -0
  61. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/trans_comp/trans_set_field.py +0 -0
  62. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/transform/__init__.py +0 -0
  63. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/transform/condition_list.py +0 -0
  64. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/transform/condition_transform.py +0 -0
  65. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/transform/condition_util.py +0 -0
  66. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/transform/transform_base.py +0 -0
  67. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/transform/transform_list.py +0 -0
  68. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/etl_core/transform/transform_meta.py +0 -0
  69. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/export_response.py +0 -0
  70. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/ext/__init__.py +0 -0
  71. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/ext/jupyter_magic.py +0 -0
  72. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/ext/syslogclient.py +0 -0
  73. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/external_store_config_response.py +0 -0
  74. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/getcontextlogsresponse.py +0 -0
  75. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/gethistogramsrequest.py +0 -0
  76. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/gethistogramsresponse.py +0 -0
  77. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/getlogsrequest.py +0 -0
  78. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/getlogsresponse.py +0 -0
  79. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/histogram.py +0 -0
  80. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/index_config.py +0 -0
  81. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/index_config_response.py +0 -0
  82. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/ingestion_response.py +0 -0
  83. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/job.py +0 -0
  84. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/listlogstoresrequest.py +0 -0
  85. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/listlogstoresresponse.py +0 -0
  86. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/listtopicsrequest.py +0 -0
  87. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/listtopicsresponse.py +0 -0
  88. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/log_logs_pb2.py +0 -0
  89. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/log_logs_raw_pb2.py +0 -0
  90. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logclient_core.py +0 -0
  91. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logclient_operator.py +0 -0
  92. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logexception.py +0 -0
  93. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logger_hanlder.py +0 -0
  94. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logitem.py +0 -0
  95. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logrequest.py +0 -0
  96. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logresponse.py +0 -0
  97. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logstore_config_response.py +0 -0
  98. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logtail_config_detail.py +0 -0
  99. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/logtail_config_response.py +0 -0
  100. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/machine_group_detail.py +0 -0
  101. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/machinegroup_response.py +0 -0
  102. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/metering_mode_response.py +0 -0
  103. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/odps_sink.py +0 -0
  104. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/oss_sink.py +0 -0
  105. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/pluralize.py +0 -0
  106. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/project_response.py +0 -0
  107. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/proto.py +0 -0
  108. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/pulllog_response.py +0 -0
  109. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/putlogsrequest.py +0 -0
  110. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/putlogsresponse.py +0 -0
  111. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/queriedlog.py +0 -0
  112. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/rebuild_index_response.py +0 -0
  113. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/resource_params.py +0 -0
  114. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/resource_response.py +0 -0
  115. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/scheduled_sql.py +0 -0
  116. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/scheduled_sql_response.py +0 -0
  117. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/shard_response.py +0 -0
  118. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/shipper_config.py +0 -0
  119. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/shipper_response.py +0 -0
  120. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/sink.py +0 -0
  121. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/sql_instance_response.py +0 -0
  122. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/substore_config_response.py +0 -0
  123. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/tag_response.py +0 -0
  124. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/topostore_params.py +0 -0
  125. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/topostore_response.py +0 -0
  126. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun/log/util.py +0 -0
  127. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun_log_python_sdk.egg-info/dependency_links.txt +0 -0
  128. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun_log_python_sdk.egg-info/requires.txt +0 -0
  129. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/aliyun_log_python_sdk.egg-info/top_level.txt +0 -0
  130. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/setup.cfg +0 -0
  131. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/setup.py +0 -0
  132. {aliyun_log_python_sdk-0.9.24 → aliyun_log_python_sdk-0.9.26}/tests/test_alert.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.24
3
+ Version: 0.9.26
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
@@ -41,3 +41,7 @@ from .logger_hanlder import SimpleLogHandler, QueuedLogHandler, LogFields, Uwsgi
41
41
  from .metering_mode_response import GetLogStoreMeteringModeResponse, \
42
42
  GetMetricStoreMeteringModeResponse, \
43
43
  UpdateLogStoreMeteringModeResponse, UpdateMetricStoreMeteringModeResponse
44
+
45
+
46
+ from .store_view import StoreView, StoreViewStore
47
+ from .store_view_response import CreateStoreViewResponse, UpdateStoreViewResponse, DeleteStoreViewResponse, ListStoreViewsResponse, GetStoreViewResponse
@@ -24,6 +24,8 @@ class ExternalStoreConfigBase(object):
24
24
  return ExternalStoreOssConfig.from_json(json_value)
25
25
  elif storeType == 'csv':
26
26
  return ExternalStoreCsvConfig.from_json(json_value)
27
+ elif storeType == 'postgresql':
28
+ return ExternalStoreConfig.from_json(json_value)
27
29
  else:
28
30
  raise LogException("Unknown storeType", "please contact support")
29
31
 
@@ -13,6 +13,8 @@ import time
13
13
  import zlib
14
14
  from datetime import datetime
15
15
  import logging
16
+
17
+ from .store_view_response import ListStoreViewsResponse, CreateStoreViewResponse, UpdateStoreViewResponse, DeleteStoreViewResponse, GetStoreViewResponse
16
18
  from .credentials import StaticCredentialsProvider
17
19
  from .scheduled_sql import ScheduledSQLConfiguration
18
20
  from .scheduled_sql_response import *
@@ -6011,3 +6013,120 @@ class LogClient(object):
6011
6013
  # make_lcrud_methods(LogClient, 'alert', name_field='name', root_resource='/jobs', entities_key='results', job_type="Alert")
6012
6014
  # make_lcrud_methods(LogClient, 'savedsearch', name_field='savedsearchName')
6013
6015
  # make_lcrud_methods(LogClient, 'shipper', logstore_level=True, root_resource='/shipper', name_field='shipperName', raw_resource_name='shipper')
6016
+
6017
+ def list_store_views(self, project_name, offset=0, size=100, store_type=None):
6018
+ """list store views
6019
+ Unsuccessful opertaion will cause an LogException.
6020
+
6021
+ :type project_name: string
6022
+ :param project_name: the project name
6023
+
6024
+ :type offset: int
6025
+ :param offset: the offset of the list store views
6026
+
6027
+ :type size: int
6028
+ :param size: the max return store view count, default is 100
6029
+
6030
+ :type store_type: string
6031
+ :param store_type: the type of the store view to filter, could be "logstore" or "metricstore"
6032
+
6033
+ :return: ListStoreViewsResponse
6034
+
6035
+ :raise: LogException
6036
+ """
6037
+ params = {
6038
+ "offset": str(offset),
6039
+ "size": str(size),
6040
+ }
6041
+ if store_type:
6042
+ params["storeType"] = store_type
6043
+ resource = "/storeviews"
6044
+ (resp, header) = self._send("GET", project_name, None, resource, params, {})
6045
+ return ListStoreViewsResponse(header, resp)
6046
+
6047
+ def get_store_view(self, project_name, store_view_name):
6048
+ """get store view by the given store_view_name
6049
+ Unsuccessful opertaion will cause an LogException.
6050
+
6051
+ :type project_name: string
6052
+ :param project_name: the project name
6053
+
6054
+ :type store_view_name: string
6055
+ :param store_view_name: the store view name
6056
+
6057
+ :return: GetStoreViewResponse
6058
+
6059
+ :raise: LogException
6060
+ """
6061
+ params = {}
6062
+ resource = "/storeviews/" + store_view_name
6063
+ (resp, header) = self._send("GET", project_name, None, resource, params, {})
6064
+ return GetStoreViewResponse(header, resp)
6065
+
6066
+ def update_store_view(self, project_name, store_view_name, store_view):
6067
+ """update store view by the given store_view_name
6068
+ Unsuccessful opertaion will cause an LogException.
6069
+
6070
+ :type project_name: string
6071
+ :param project_name: the project name
6072
+
6073
+ :type store_view_name: string
6074
+ :param store_view_name: the store view name
6075
+
6076
+ :type store_view: StoreView
6077
+ :param store_view: the store view to update
6078
+
6079
+ :return: UpdateStoreViewResponse
6080
+
6081
+ :raise: LogException
6082
+ """
6083
+ headers = {"Content-Type": "application/json"}
6084
+ params = {}
6085
+ resource = "/storeviews/" + store_view_name
6086
+ body_dict = store_view._to_json_dict()
6087
+ body = six.b(json.dumps(body_dict))
6088
+
6089
+ (resp, header) = self._send("PUT", project_name, body, resource, params, headers)
6090
+ return UpdateStoreViewResponse(header, resp)
6091
+
6092
+ def create_store_view(self, project_name, store_view):
6093
+ """create store view
6094
+ Unsuccessful opertaion will cause an LogException.
6095
+
6096
+ :type project_name: string
6097
+ :param project_name: the project name
6098
+
6099
+ :type store_view: StoreView
6100
+ :param store_view: the store view to create
6101
+
6102
+ :return: CreateStoreViewResponse
6103
+
6104
+ :raise: LogException
6105
+ """
6106
+
6107
+ headers = {"Content-Type": "application/json"}
6108
+ params = {}
6109
+ resource = "/storeviews"
6110
+ body_dict = store_view._to_json_dict()
6111
+ body = six.b(json.dumps(body_dict))
6112
+ (resp, header) = self._send("POST", project_name, body, resource, params, headers)
6113
+ return CreateStoreViewResponse(header, resp)
6114
+
6115
+ def delete_store_view(self, project_name, store_view_name):
6116
+ """delete store view by the given store_view_name
6117
+ Unsuccessful opertaion will cause an LogException.
6118
+
6119
+ :type project_name: string
6120
+ :param project_name: the project name
6121
+
6122
+ :type store_view_name: string
6123
+ :param store_view_name: the store view name
6124
+
6125
+ :return: DeleteStoreViewResponse
6126
+
6127
+ :raise: LogException
6128
+ """
6129
+ params = {}
6130
+ resource = "/storeviews/" + store_view_name
6131
+ (resp, header) = self._send("DELETE", project_name, None, resource, params, {})
6132
+ return DeleteStoreViewResponse(header, resp)
@@ -0,0 +1,162 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ class StoreViewStore:
8
+ def __init__(self, project_name, store_name, query=None):
9
+ self._project_name = project_name
10
+ self._store_name = store_name
11
+ self._query = query
12
+
13
+ @property
14
+ def project_name(self):
15
+ """
16
+ Get the project name of the store view store
17
+
18
+ :return: string, the project of the store view store
19
+ """
20
+ return self._project_name
21
+
22
+ @project_name.setter
23
+ def project_name(self, project_name):
24
+ """
25
+ Set the project name of the store view store
26
+
27
+ :param project_name: string, the project of the store view store
28
+ """
29
+ self._project_name = project_name
30
+
31
+ @property
32
+ def store_name(self):
33
+ """
34
+ Get the name of the store view store
35
+
36
+ :return: string, the name of the store view store
37
+ """
38
+ return self._store_name
39
+
40
+ @store_name.setter
41
+ def store_name(self, store_name):
42
+ """
43
+ Set the name of the store view store
44
+
45
+ :param store_name: string, the name of the store view store
46
+ """
47
+ self._store_name = store_name
48
+
49
+ @property
50
+ def query(self):
51
+ """
52
+ Get the query of the store view store
53
+
54
+ :return: string, the query of the store view store
55
+ """
56
+ return self._query
57
+
58
+ @query.setter
59
+ def query(self, query):
60
+ """
61
+ Set the query of the store view store
62
+
63
+ :param query: string, the query of the store view store, the query is optional
64
+ """
65
+ self._query = query
66
+
67
+ def _to_json_dict(self):
68
+ if self._query is not None:
69
+ return {
70
+ "project": self._project_name,
71
+ "storeName": self._store_name,
72
+ "query": self._query,
73
+ }
74
+ return {
75
+ "project": self._project_name,
76
+ "storeName": self._store_name,
77
+ }
78
+
79
+ @classmethod
80
+ def _from_json_dict(cls, json_data):
81
+ project_name = json_data.get("project")
82
+ store_name = json_data.get("storeName")
83
+ query = json_data.get("query")
84
+ return cls(project_name, store_name, query)
85
+
86
+
87
+ class StoreView:
88
+ def __init__(self, name, store_type, stores=[]):
89
+ self._name = name
90
+ self._store_type = store_type
91
+ self._stores = stores
92
+
93
+ @property
94
+ def name(self):
95
+ """
96
+ Get the name of the store view
97
+
98
+ :return: string, the name of the store view
99
+ """
100
+ return self._name
101
+
102
+ @name.setter
103
+ def name(self, name):
104
+ """
105
+ Set the name of the store view
106
+
107
+ :param name: string, the name of the store view
108
+ """
109
+ self._name = name
110
+
111
+ @property
112
+ def store_type(self):
113
+ """
114
+ Get the type of the store view
115
+
116
+ :return: string, the type of the store view, could be "logstore" or "metricstore"
117
+ """
118
+ return self._store_type
119
+
120
+ @store_type.setter
121
+ def store_type(self, store_type):
122
+ """
123
+ Set the type of the store view
124
+
125
+ :param store_type: string, the type of the store view, could be "logstore" or "metricstore"
126
+ """
127
+ self._store_type = store_type
128
+
129
+ @property
130
+ def stores(self):
131
+ """
132
+ Get the stores of the store view
133
+
134
+ :return: list, the unioned stores of the store view
135
+ """
136
+ return self._stores
137
+
138
+ @stores.setter
139
+ def stores(self, stores):
140
+ """
141
+ Set the stores of the store view
142
+
143
+ :param stores: list, the unioned stores of the store view
144
+ """
145
+ self._stores = stores
146
+
147
+ def _to_json_dict(self):
148
+ return {
149
+ "name": self._name,
150
+ "storeType": self._store_type,
151
+ "stores": [store._to_json_dict() for store in (self._stores or [])],
152
+ }
153
+
154
+ @classmethod
155
+ def _from_json_dict(cls, json_data):
156
+ name = json_data.get("name")
157
+ store_type = json_data.get("storeType")
158
+ stores = [
159
+ StoreViewStore._from_json_dict(store)
160
+ for store in json_data.get("stores", [])
161
+ ]
162
+ return cls(name, store_type, stores)
@@ -0,0 +1,125 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ __all__ = ['CreateStoreViewResponse', 'UpdateStoreViewResponse', 'DeleteStoreViewResponse', 'ListStoreViewsResponse', 'GetStoreViewResponse']
8
+
9
+ from .store_view import StoreView
10
+ from .logresponse import LogResponse
11
+
12
+
13
+ class CreateStoreViewResponse(LogResponse):
14
+ """ The response of the create_store_view API from log.
15
+
16
+ :type header: dict
17
+ :param header: CreateStoreViewResponse HTTP response header
18
+ """
19
+
20
+ def __init__(self, header, resp=''):
21
+ LogResponse.__init__(self, header, resp)
22
+
23
+ def log_print(self):
24
+ print('CreateStoreViewResponse:')
25
+ print('request_id:', self.get_request_id())
26
+ print('headers:', self.get_all_headers())
27
+
28
+
29
+ class UpdateStoreViewResponse(LogResponse):
30
+ """ The response of the update_store_view API from log.
31
+
32
+ :type header: dict
33
+ :param header: UpdateStoreViewResponse HTTP response header
34
+ """
35
+
36
+ def __init__(self, header, resp=''):
37
+ LogResponse.__init__(self, header, resp)
38
+
39
+ def log_print(self):
40
+ print('UpdateStoreViewResponse:')
41
+ print('request_id:', self.get_request_id())
42
+ print('headers:', self.get_all_headers())
43
+
44
+
45
+ class DeleteStoreViewResponse(LogResponse):
46
+ """ The response of the delete_store_view API from log.
47
+
48
+ :type header: dict
49
+ :param header: DeleteStoreViewResponse HTTP response header
50
+ """
51
+
52
+ def __init__(self, header, resp=''):
53
+ LogResponse.__init__(self, header, resp)
54
+
55
+ def log_print(self):
56
+ print('DeleteStoreViewResponse:')
57
+ print('request_id:', self.get_request_id())
58
+ print('headers:', self.get_all_headers())
59
+
60
+
61
+ class ListStoreViewsResponse(LogResponse):
62
+ """ The response of the list_store_views API from log.
63
+
64
+ :type header: dict
65
+ :param header: ListStoreViewsResponse HTTP response header
66
+ """
67
+
68
+ def __init__(self, header, resp):
69
+ LogResponse.__init__(self, header, resp)
70
+ self._count = resp['count']
71
+ self._total = resp['total']
72
+ self._store_views = resp['storeviews']
73
+
74
+ def get_count(self):
75
+ """Get the count of the store views
76
+
77
+ :return: int, the count of the store views
78
+ """
79
+ return self._count
80
+
81
+ def get_total(self):
82
+ """Get the total of the store views
83
+
84
+ :return: int, the total of the store views
85
+ """
86
+ return self._total
87
+
88
+ def get_store_views(self):
89
+ """Get the store views from the response
90
+
91
+ :return: list, the store view names, each item is a str
92
+ """
93
+ return self._store_views
94
+
95
+ def log_print(self):
96
+ print('ListStoreViewsResponse:')
97
+ print('request_id:', self.get_request_id())
98
+ print('headers:', self.get_all_headers())
99
+ print('response:', self.get_body())
100
+
101
+
102
+ class GetStoreViewResponse(LogResponse):
103
+ """ The response of the get_store_views API from log.
104
+
105
+ :type header: dict
106
+ :param header: GetStoreViewResponse HTTP response header
107
+ """
108
+
109
+ def __init__(self, header, resp):
110
+ LogResponse.__init__(self, header, resp)
111
+ self._store_view = StoreView._from_json_dict(resp)
112
+
113
+ def get_store_view(self):
114
+ # type: () -> StoreView
115
+ """Get StoreView from the response
116
+
117
+ :return: instance of StoreView
118
+ """
119
+ return self._store_view
120
+
121
+ def log_print(self):
122
+ print('GetStoreViewResponse:')
123
+ print('request_id:', self.get_request_id())
124
+ print('headers:', self.get_all_headers())
125
+ print('store_view:', self.get_body())
@@ -1,4 +1,4 @@
1
- __version__ = '0.9.24'
1
+ __version__ = '0.9.26'
2
2
 
3
3
  import sys
4
4
  OS_VERSION = str(sys.platform)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.24
3
+ Version: 0.9.26
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
@@ -66,6 +66,8 @@ aliyun/log/shipper_config.py
66
66
  aliyun/log/shipper_response.py
67
67
  aliyun/log/sink.py
68
68
  aliyun/log/sql_instance_response.py
69
+ aliyun/log/store_view.py
70
+ aliyun/log/store_view_response.py
69
71
  aliyun/log/substore_config_response.py
70
72
  aliyun/log/tag_response.py
71
73
  aliyun/log/topostore_params.py