baiducloud-python-sdk-cprom 0.0.1__py3-none-any.whl
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.
- baiducloud_python_sdk_cprom/__init__.py +5 -0
- baiducloud_python_sdk_cprom/api/__init__.py +0 -0
- baiducloud_python_sdk_cprom/api/cprom_client.py +1197 -0
- baiducloud_python_sdk_cprom/models/__init__.py +90 -0
- baiducloud_python_sdk_cprom/models/bind_cluster_request.py +72 -0
- baiducloud_python_sdk_cprom/models/bind_cluster_response.py +61 -0
- baiducloud_python_sdk_cprom/models/callback_config.py +68 -0
- baiducloud_python_sdk_cprom/models/claim_alert_event_request.py +68 -0
- baiducloud_python_sdk_cprom/models/claim_alert_event_response.py +78 -0
- baiducloud_python_sdk_cprom/models/claim_condition.py +58 -0
- baiducloud_python_sdk_cprom/models/claimed_info.py +82 -0
- baiducloud_python_sdk_cprom/models/create_alert_request.py +142 -0
- baiducloud_python_sdk_cprom/models/create_alert_response.py +61 -0
- baiducloud_python_sdk_cprom/models/create_custom_scrape_task_request.py +72 -0
- baiducloud_python_sdk_cprom/models/create_custom_scrape_task_response.py +61 -0
- baiducloud_python_sdk_cprom/models/create_instance_request.py +117 -0
- baiducloud_python_sdk_cprom/models/create_notification_policy_request.py +149 -0
- baiducloud_python_sdk_cprom/models/create_notification_policy_response.py +61 -0
- baiducloud_python_sdk_cprom/models/create_podmonitor_request.py +98 -0
- baiducloud_python_sdk_cprom/models/create_podmonitor_response.py +61 -0
- baiducloud_python_sdk_cprom/models/create_service_monitor_request.py +98 -0
- baiducloud_python_sdk_cprom/models/create_service_monitor_response.py +61 -0
- baiducloud_python_sdk_cprom/models/delete_alert_request.py +64 -0
- baiducloud_python_sdk_cprom/models/delete_custom_scrape_task_request.py +70 -0
- baiducloud_python_sdk_cprom/models/delete_instance_request.py +64 -0
- baiducloud_python_sdk_cprom/models/delete_notification_policy_request.py +58 -0
- baiducloud_python_sdk_cprom/models/delete_podmonitor_request.py +70 -0
- baiducloud_python_sdk_cprom/models/delete_service_monitor_request.py +70 -0
- baiducloud_python_sdk_cprom/models/endpoint.py +82 -0
- baiducloud_python_sdk_cprom/models/escalate_param.py +78 -0
- baiducloud_python_sdk_cprom/models/event.py +216 -0
- baiducloud_python_sdk_cprom/models/event_claim_detail.py +74 -0
- baiducloud_python_sdk_cprom/models/generate_instance_token_request.py +72 -0
- baiducloud_python_sdk_cprom/models/get_alert_detail_request.py +64 -0
- baiducloud_python_sdk_cprom/models/get_alert_detail_response.py +136 -0
- baiducloud_python_sdk_cprom/models/get_alert_event_detail_request.py +58 -0
- baiducloud_python_sdk_cprom/models/get_alert_event_detail_response.py +218 -0
- baiducloud_python_sdk_cprom/models/get_cluster_bind_status_request.py +58 -0
- baiducloud_python_sdk_cprom/models/get_cluster_bind_status_response.py +77 -0
- baiducloud_python_sdk_cprom/models/get_notification_policy_request.py +58 -0
- baiducloud_python_sdk_cprom/models/get_notification_policy_response.py +167 -0
- baiducloud_python_sdk_cprom/models/label_selector.py +58 -0
- baiducloud_python_sdk_cprom/models/list_alert_events_request.py +159 -0
- baiducloud_python_sdk_cprom/models/list_alert_events_response.py +102 -0
- baiducloud_python_sdk_cprom/models/list_alert_templates_response.py +62 -0
- baiducloud_python_sdk_cprom/models/list_alerts_request.py +82 -0
- baiducloud_python_sdk_cprom/models/list_alerts_response.py +128 -0
- baiducloud_python_sdk_cprom/models/list_bindable_cloud_products_response.py +62 -0
- baiducloud_python_sdk_cprom/models/list_instances_request.py +82 -0
- baiducloud_python_sdk_cprom/models/list_instances_response.py +102 -0
- baiducloud_python_sdk_cprom/models/list_notification_policies_request.py +76 -0
- baiducloud_python_sdk_cprom/models/list_notification_policies_response.py +128 -0
- baiducloud_python_sdk_cprom/models/list_pod_monitors_request.py +110 -0
- baiducloud_python_sdk_cprom/models/list_pod_monitors_response.py +137 -0
- baiducloud_python_sdk_cprom/models/list_related_cloud_products_request.py +58 -0
- baiducloud_python_sdk_cprom/models/list_related_cloud_products_response.py +61 -0
- baiducloud_python_sdk_cprom/models/list_service_monitors_request.py +110 -0
- baiducloud_python_sdk_cprom/models/list_service_monitors_response.py +137 -0
- baiducloud_python_sdk_cprom/models/mentioned_user_config.py +66 -0
- baiducloud_python_sdk_cprom/models/monitor_instance.py +135 -0
- baiducloud_python_sdk_cprom/models/namespace_selector.py +58 -0
- baiducloud_python_sdk_cprom/models/notify_action.py +96 -0
- baiducloud_python_sdk_cprom/models/notify_rule.py +179 -0
- baiducloud_python_sdk_cprom/models/object_meta.py +66 -0
- baiducloud_python_sdk_cprom/models/pod_metrics_endpoint.py +74 -0
- baiducloud_python_sdk_cprom/models/pod_monitor.py +86 -0
- baiducloud_python_sdk_cprom/models/pod_monitor_item.py +92 -0
- baiducloud_python_sdk_cprom/models/pod_monitor_spec.py +80 -0
- baiducloud_python_sdk_cprom/models/remote_read_request.py +90 -0
- baiducloud_python_sdk_cprom/models/remote_read_response.py +127 -0
- baiducloud_python_sdk_cprom/models/remote_write_request.py +90 -0
- baiducloud_python_sdk_cprom/models/repeat_notify_config.py +90 -0
- baiducloud_python_sdk_cprom/models/rule_detail.py +142 -0
- baiducloud_python_sdk_cprom/models/rule_template.py +82 -0
- baiducloud_python_sdk_cprom/models/scope_detail.py +74 -0
- baiducloud_python_sdk_cprom/models/service_monitor.py +86 -0
- baiducloud_python_sdk_cprom/models/service_monitor_endpoint.py +74 -0
- baiducloud_python_sdk_cprom/models/service_monitor_item.py +92 -0
- baiducloud_python_sdk_cprom/models/service_monitor_spec.py +80 -0
- baiducloud_python_sdk_cprom/models/status.py +74 -0
- baiducloud_python_sdk_cprom/models/toggle_pod_monitor_service_request.py +70 -0
- baiducloud_python_sdk_cprom/models/toggle_service_monitor_service_request.py +70 -0
- baiducloud_python_sdk_cprom/models/update_alert_request.py +149 -0
- baiducloud_python_sdk_cprom/models/update_notification_policy_request.py +156 -0
- baiducloud_python_sdk_cprom/models/update_pod_monitor_request.py +87 -0
- baiducloud_python_sdk_cprom/models/update_related_cloud_products_request.py +66 -0
- baiducloud_python_sdk_cprom/models/update_service_monitor_request.py +87 -0
- baiducloud_python_sdk_cprom/models/user.py +90 -0
- baiducloud_python_sdk_cprom/models/user_group.py +74 -0
- baiducloud_python_sdk_cprom/models/webhook_detail.py +102 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/RECORD +95 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_cprom-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListAlertsResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_cprom.models.rule_detail import RuleDetail
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListAlertsResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListAlertsResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
keyword_type=None,
|
|
17
|
+
keyword=None,
|
|
18
|
+
order_by=None,
|
|
19
|
+
order=None,
|
|
20
|
+
page_no=None,
|
|
21
|
+
page_size=None,
|
|
22
|
+
total_count=None,
|
|
23
|
+
items=None,
|
|
24
|
+
):
|
|
25
|
+
"""
|
|
26
|
+
Initialize ListAlertsResponse response.
|
|
27
|
+
|
|
28
|
+
:param keyword_type: 筛选条件类型
|
|
29
|
+
:type keyword_type: str (optional)
|
|
30
|
+
|
|
31
|
+
:param keyword: 筛选条件关键字
|
|
32
|
+
:type keyword: str (optional)
|
|
33
|
+
|
|
34
|
+
:param order_by: 告警列表排序依据字段
|
|
35
|
+
:type order_by: str (optional)
|
|
36
|
+
|
|
37
|
+
:param order: 告警列表排序方式:desc倒序,asc升序
|
|
38
|
+
:type order: str (optional)
|
|
39
|
+
|
|
40
|
+
:param page_no: 分页当前页码数
|
|
41
|
+
:type page_no: int (optional)
|
|
42
|
+
|
|
43
|
+
:param page_size: 当前页告警个数
|
|
44
|
+
:type page_size: int (optional)
|
|
45
|
+
|
|
46
|
+
:param total_count: 告警总个数
|
|
47
|
+
:type total_count: int (optional)
|
|
48
|
+
|
|
49
|
+
:param items: 告警列表
|
|
50
|
+
:type items: List[RuleDetail] (optional)
|
|
51
|
+
"""
|
|
52
|
+
super().__init__()
|
|
53
|
+
self.keyword_type = keyword_type
|
|
54
|
+
self.keyword = keyword
|
|
55
|
+
self.order_by = order_by
|
|
56
|
+
self.order = order
|
|
57
|
+
self.page_no = page_no
|
|
58
|
+
self.page_size = page_size
|
|
59
|
+
self.total_count = total_count
|
|
60
|
+
self.items = items
|
|
61
|
+
|
|
62
|
+
def to_dict(self):
|
|
63
|
+
"""
|
|
64
|
+
Convert the response instance to a dictionary representation.
|
|
65
|
+
|
|
66
|
+
Includes metadata from the parent BceResponse class.
|
|
67
|
+
Nested model objects are recursively converted to dictionaries.
|
|
68
|
+
|
|
69
|
+
:return: Dictionary representation of the response
|
|
70
|
+
:rtype: dict
|
|
71
|
+
"""
|
|
72
|
+
_map = super().to_dict()
|
|
73
|
+
if _map is not None:
|
|
74
|
+
return _map
|
|
75
|
+
result = dict()
|
|
76
|
+
if self.metadata is not None:
|
|
77
|
+
result['metadata'] = dict(self.metadata)
|
|
78
|
+
if self.keyword_type is not None:
|
|
79
|
+
result['keywordType'] = self.keyword_type
|
|
80
|
+
if self.keyword is not None:
|
|
81
|
+
result['keyword'] = self.keyword
|
|
82
|
+
if self.order_by is not None:
|
|
83
|
+
result['orderBy'] = self.order_by
|
|
84
|
+
if self.order is not None:
|
|
85
|
+
result['order'] = self.order
|
|
86
|
+
if self.page_no is not None:
|
|
87
|
+
result['pageNo'] = self.page_no
|
|
88
|
+
if self.page_size is not None:
|
|
89
|
+
result['pageSize'] = self.page_size
|
|
90
|
+
if self.total_count is not None:
|
|
91
|
+
result['totalCount'] = self.total_count
|
|
92
|
+
if self.items is not None:
|
|
93
|
+
result['items'] = [i.to_dict() for i in self.items]
|
|
94
|
+
return result
|
|
95
|
+
|
|
96
|
+
def from_dict(self, m):
|
|
97
|
+
"""
|
|
98
|
+
Populate the response instance from a dictionary.
|
|
99
|
+
|
|
100
|
+
Nested dictionaries are recursively converted to model objects.
|
|
101
|
+
|
|
102
|
+
:param m: Dictionary containing response data
|
|
103
|
+
:type m: dict
|
|
104
|
+
|
|
105
|
+
:return: Self reference for method chaining
|
|
106
|
+
:rtype: ListAlertsResponse
|
|
107
|
+
|
|
108
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
109
|
+
:raises ValueError: If nested model conversion fails
|
|
110
|
+
"""
|
|
111
|
+
m = m or dict()
|
|
112
|
+
if m.get('keywordType') is not None:
|
|
113
|
+
self.keyword_type = m.get('keywordType')
|
|
114
|
+
if m.get('keyword') is not None:
|
|
115
|
+
self.keyword = m.get('keyword')
|
|
116
|
+
if m.get('orderBy') is not None:
|
|
117
|
+
self.order_by = m.get('orderBy')
|
|
118
|
+
if m.get('order') is not None:
|
|
119
|
+
self.order = m.get('order')
|
|
120
|
+
if m.get('pageNo') is not None:
|
|
121
|
+
self.page_no = m.get('pageNo')
|
|
122
|
+
if m.get('pageSize') is not None:
|
|
123
|
+
self.page_size = m.get('pageSize')
|
|
124
|
+
if m.get('totalCount') is not None:
|
|
125
|
+
self.total_count = m.get('totalCount')
|
|
126
|
+
if m.get('items') is not None:
|
|
127
|
+
self.items = [RuleDetail().from_dict(i) for i in m.get('items')]
|
|
128
|
+
return self
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListBindableCloudProductsResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_cprom.models.scope_detail import ScopeDetail
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListBindableCloudProductsResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListBindableCloudProductsResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, scopes=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListBindableCloudProductsResponse response.
|
|
17
|
+
|
|
18
|
+
:param scopes: BCM 支持的云产品列表
|
|
19
|
+
:type scopes: List[ScopeDetail] (optional)
|
|
20
|
+
"""
|
|
21
|
+
super().__init__()
|
|
22
|
+
self.scopes = scopes
|
|
23
|
+
|
|
24
|
+
def to_dict(self):
|
|
25
|
+
"""
|
|
26
|
+
Convert the response instance to a dictionary representation.
|
|
27
|
+
|
|
28
|
+
Includes metadata from the parent BceResponse class.
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the response
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
if self.metadata is not None:
|
|
39
|
+
result['metadata'] = dict(self.metadata)
|
|
40
|
+
if self.scopes is not None:
|
|
41
|
+
result['scopes'] = [i.to_dict() for i in self.scopes]
|
|
42
|
+
return result
|
|
43
|
+
|
|
44
|
+
def from_dict(self, m):
|
|
45
|
+
"""
|
|
46
|
+
Populate the response instance from a dictionary.
|
|
47
|
+
|
|
48
|
+
Nested dictionaries are recursively converted to model objects.
|
|
49
|
+
|
|
50
|
+
:param m: Dictionary containing response data
|
|
51
|
+
:type m: dict
|
|
52
|
+
|
|
53
|
+
:return: Self reference for method chaining
|
|
54
|
+
:rtype: ListBindableCloudProductsResponse
|
|
55
|
+
|
|
56
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
57
|
+
:raises ValueError: If nested model conversion fails
|
|
58
|
+
"""
|
|
59
|
+
m = m or dict()
|
|
60
|
+
if m.get('scopes') is not None:
|
|
61
|
+
self.scopes = [ScopeDetail().from_dict(i) for i in m.get('scopes')]
|
|
62
|
+
return self
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListInstancesRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListInstancesRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListInstancesRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, page_size=None, page_no=None, order_by=None, order=None, phase=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListInstancesRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param page_size: page_size parameter
|
|
20
|
+
:type page_size: int (optional)
|
|
21
|
+
|
|
22
|
+
:param page_no: page_no parameter
|
|
23
|
+
:type page_no: int (optional)
|
|
24
|
+
|
|
25
|
+
:param order_by: order_by parameter
|
|
26
|
+
:type order_by: str (optional)
|
|
27
|
+
|
|
28
|
+
:param order: order parameter
|
|
29
|
+
:type order: str (optional)
|
|
30
|
+
|
|
31
|
+
:param phase: phase parameter
|
|
32
|
+
:type phase: str (optional)
|
|
33
|
+
"""
|
|
34
|
+
super().__init__()
|
|
35
|
+
self.page_size = page_size
|
|
36
|
+
self.page_no = page_no
|
|
37
|
+
self.order_by = order_by
|
|
38
|
+
self.order = order
|
|
39
|
+
self.phase = phase
|
|
40
|
+
|
|
41
|
+
def to_dict(self):
|
|
42
|
+
"""
|
|
43
|
+
Convert the request entity to a dictionary representation.
|
|
44
|
+
|
|
45
|
+
Nested model objects are recursively converted to dictionaries.
|
|
46
|
+
|
|
47
|
+
:return: Dictionary representation of the request
|
|
48
|
+
:rtype: dict
|
|
49
|
+
"""
|
|
50
|
+
_map = super().to_dict()
|
|
51
|
+
if _map is not None:
|
|
52
|
+
return _map
|
|
53
|
+
result = dict()
|
|
54
|
+
return result
|
|
55
|
+
|
|
56
|
+
def from_dict(self, m):
|
|
57
|
+
"""
|
|
58
|
+
Populate the request entity from a dictionary.
|
|
59
|
+
|
|
60
|
+
Nested dictionaries are recursively converted to model objects.
|
|
61
|
+
|
|
62
|
+
:param m: Dictionary containing request data
|
|
63
|
+
:type m: dict
|
|
64
|
+
|
|
65
|
+
:return: Self reference for method chaining
|
|
66
|
+
:rtype: ListInstancesRequest
|
|
67
|
+
|
|
68
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
69
|
+
:raises ValueError: If nested model conversion fails
|
|
70
|
+
"""
|
|
71
|
+
m = m or dict()
|
|
72
|
+
if m.get('pageSize') is not None:
|
|
73
|
+
self.page_size = m.get('pageSize')
|
|
74
|
+
if m.get('pageNo') is not None:
|
|
75
|
+
self.page_no = m.get('pageNo')
|
|
76
|
+
if m.get('orderBy') is not None:
|
|
77
|
+
self.order_by = m.get('orderBy')
|
|
78
|
+
if m.get('order') is not None:
|
|
79
|
+
self.order = m.get('order')
|
|
80
|
+
if m.get('phase') is not None:
|
|
81
|
+
self.phase = m.get('phase')
|
|
82
|
+
return self
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListInstancesResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_cprom.models.monitor_instance import MonitorInstance
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListInstancesResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListInstancesResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, order_by=None, order=None, page_no=None, page_size=None, total_count=None, instances=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListInstancesResponse response.
|
|
17
|
+
|
|
18
|
+
:param order_by: 监控实例列表排序依据字段
|
|
19
|
+
:type order_by: str (optional)
|
|
20
|
+
|
|
21
|
+
:param order: 监控实例列表排序方式:desc倒序,asc升序
|
|
22
|
+
:type order: str (optional)
|
|
23
|
+
|
|
24
|
+
:param page_no: 实例列表分页当前页码数
|
|
25
|
+
:type page_no: int (optional)
|
|
26
|
+
|
|
27
|
+
:param page_size: 当前页页监控实例个数
|
|
28
|
+
:type page_size: int (optional)
|
|
29
|
+
|
|
30
|
+
:param total_count: 监控实例总个数
|
|
31
|
+
:type total_count: int (optional)
|
|
32
|
+
|
|
33
|
+
:param instances: 监控实例列表
|
|
34
|
+
:type instances: List[MonitorInstance] (optional)
|
|
35
|
+
"""
|
|
36
|
+
super().__init__()
|
|
37
|
+
self.order_by = order_by
|
|
38
|
+
self.order = order
|
|
39
|
+
self.page_no = page_no
|
|
40
|
+
self.page_size = page_size
|
|
41
|
+
self.total_count = total_count
|
|
42
|
+
self.instances = instances
|
|
43
|
+
|
|
44
|
+
def to_dict(self):
|
|
45
|
+
"""
|
|
46
|
+
Convert the response instance to a dictionary representation.
|
|
47
|
+
|
|
48
|
+
Includes metadata from the parent BceResponse class.
|
|
49
|
+
Nested model objects are recursively converted to dictionaries.
|
|
50
|
+
|
|
51
|
+
:return: Dictionary representation of the response
|
|
52
|
+
:rtype: dict
|
|
53
|
+
"""
|
|
54
|
+
_map = super().to_dict()
|
|
55
|
+
if _map is not None:
|
|
56
|
+
return _map
|
|
57
|
+
result = dict()
|
|
58
|
+
if self.metadata is not None:
|
|
59
|
+
result['metadata'] = dict(self.metadata)
|
|
60
|
+
if self.order_by is not None:
|
|
61
|
+
result['orderBy'] = self.order_by
|
|
62
|
+
if self.order is not None:
|
|
63
|
+
result['order'] = self.order
|
|
64
|
+
if self.page_no is not None:
|
|
65
|
+
result['pageNo'] = self.page_no
|
|
66
|
+
if self.page_size is not None:
|
|
67
|
+
result['pageSize'] = self.page_size
|
|
68
|
+
if self.total_count is not None:
|
|
69
|
+
result['totalCount'] = self.total_count
|
|
70
|
+
if self.instances is not None:
|
|
71
|
+
result['instances'] = [i.to_dict() for i in self.instances]
|
|
72
|
+
return result
|
|
73
|
+
|
|
74
|
+
def from_dict(self, m):
|
|
75
|
+
"""
|
|
76
|
+
Populate the response instance from a dictionary.
|
|
77
|
+
|
|
78
|
+
Nested dictionaries are recursively converted to model objects.
|
|
79
|
+
|
|
80
|
+
:param m: Dictionary containing response data
|
|
81
|
+
:type m: dict
|
|
82
|
+
|
|
83
|
+
:return: Self reference for method chaining
|
|
84
|
+
:rtype: ListInstancesResponse
|
|
85
|
+
|
|
86
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
87
|
+
:raises ValueError: If nested model conversion fails
|
|
88
|
+
"""
|
|
89
|
+
m = m or dict()
|
|
90
|
+
if m.get('orderBy') is not None:
|
|
91
|
+
self.order_by = m.get('orderBy')
|
|
92
|
+
if m.get('order') is not None:
|
|
93
|
+
self.order = m.get('order')
|
|
94
|
+
if m.get('pageNo') is not None:
|
|
95
|
+
self.page_no = m.get('pageNo')
|
|
96
|
+
if m.get('pageSize') is not None:
|
|
97
|
+
self.page_size = m.get('pageSize')
|
|
98
|
+
if m.get('totalCount') is not None:
|
|
99
|
+
self.total_count = m.get('totalCount')
|
|
100
|
+
if m.get('instances') is not None:
|
|
101
|
+
self.instances = [MonitorInstance().from_dict(i) for i in m.get('instances')]
|
|
102
|
+
return self
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListNotificationPoliciesRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListNotificationPoliciesRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListNotificationPoliciesRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, page_size=None, page_no=None, keyword_type=None, keyword=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListNotificationPoliciesRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param page_size: page_size parameter
|
|
20
|
+
:type page_size: int (optional)
|
|
21
|
+
|
|
22
|
+
:param page_no: page_no parameter
|
|
23
|
+
:type page_no: int (optional)
|
|
24
|
+
|
|
25
|
+
:param keyword_type: keyword_type parameter
|
|
26
|
+
:type keyword_type: str (optional)
|
|
27
|
+
|
|
28
|
+
:param keyword: keyword parameter
|
|
29
|
+
:type keyword: str (optional)
|
|
30
|
+
"""
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.page_size = page_size
|
|
33
|
+
self.page_no = page_no
|
|
34
|
+
self.keyword_type = keyword_type
|
|
35
|
+
self.keyword = keyword
|
|
36
|
+
|
|
37
|
+
def to_dict(self):
|
|
38
|
+
"""
|
|
39
|
+
Convert the request entity to a dictionary representation.
|
|
40
|
+
|
|
41
|
+
Nested model objects are recursively converted to dictionaries.
|
|
42
|
+
|
|
43
|
+
:return: Dictionary representation of the request
|
|
44
|
+
:rtype: dict
|
|
45
|
+
"""
|
|
46
|
+
_map = super().to_dict()
|
|
47
|
+
if _map is not None:
|
|
48
|
+
return _map
|
|
49
|
+
result = dict()
|
|
50
|
+
return result
|
|
51
|
+
|
|
52
|
+
def from_dict(self, m):
|
|
53
|
+
"""
|
|
54
|
+
Populate the request entity from a dictionary.
|
|
55
|
+
|
|
56
|
+
Nested dictionaries are recursively converted to model objects.
|
|
57
|
+
|
|
58
|
+
:param m: Dictionary containing request data
|
|
59
|
+
:type m: dict
|
|
60
|
+
|
|
61
|
+
:return: Self reference for method chaining
|
|
62
|
+
:rtype: ListNotificationPoliciesRequest
|
|
63
|
+
|
|
64
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
65
|
+
:raises ValueError: If nested model conversion fails
|
|
66
|
+
"""
|
|
67
|
+
m = m or dict()
|
|
68
|
+
if m.get('pageSize') is not None:
|
|
69
|
+
self.page_size = m.get('pageSize')
|
|
70
|
+
if m.get('pageNo') is not None:
|
|
71
|
+
self.page_no = m.get('pageNo')
|
|
72
|
+
if m.get('keywordType') is not None:
|
|
73
|
+
self.keyword_type = m.get('keywordType')
|
|
74
|
+
if m.get('keyword') is not None:
|
|
75
|
+
self.keyword = m.get('keyword')
|
|
76
|
+
return self
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListNotificationPoliciesResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_cprom.models.notify_rule import NotifyRule
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListNotificationPoliciesResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListNotificationPoliciesResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
keyword_type=None,
|
|
17
|
+
keyword=None,
|
|
18
|
+
order_by=None,
|
|
19
|
+
order=None,
|
|
20
|
+
page_no=None,
|
|
21
|
+
page_size=None,
|
|
22
|
+
total_count=None,
|
|
23
|
+
items=None,
|
|
24
|
+
):
|
|
25
|
+
"""
|
|
26
|
+
Initialize ListNotificationPoliciesResponse response.
|
|
27
|
+
|
|
28
|
+
:param keyword_type: 筛选条件类型
|
|
29
|
+
:type keyword_type: str (optional)
|
|
30
|
+
|
|
31
|
+
:param keyword: 筛选条件关键字
|
|
32
|
+
:type keyword: str (optional)
|
|
33
|
+
|
|
34
|
+
:param order_by: 通知策略列表排序依据字段
|
|
35
|
+
:type order_by: str (optional)
|
|
36
|
+
|
|
37
|
+
:param order: 通知策略列表排序方式:desc倒序,asc升序
|
|
38
|
+
:type order: str (optional)
|
|
39
|
+
|
|
40
|
+
:param page_no: 通知策略分页当前页码数
|
|
41
|
+
:type page_no: int (optional)
|
|
42
|
+
|
|
43
|
+
:param page_size: 当前页页通知策略个数
|
|
44
|
+
:type page_size: int (optional)
|
|
45
|
+
|
|
46
|
+
:param total_count: 通知策略总个数
|
|
47
|
+
:type total_count: int (optional)
|
|
48
|
+
|
|
49
|
+
:param items: 通知策略列表
|
|
50
|
+
:type items: List[NotifyRule] (optional)
|
|
51
|
+
"""
|
|
52
|
+
super().__init__()
|
|
53
|
+
self.keyword_type = keyword_type
|
|
54
|
+
self.keyword = keyword
|
|
55
|
+
self.order_by = order_by
|
|
56
|
+
self.order = order
|
|
57
|
+
self.page_no = page_no
|
|
58
|
+
self.page_size = page_size
|
|
59
|
+
self.total_count = total_count
|
|
60
|
+
self.items = items
|
|
61
|
+
|
|
62
|
+
def to_dict(self):
|
|
63
|
+
"""
|
|
64
|
+
Convert the response instance to a dictionary representation.
|
|
65
|
+
|
|
66
|
+
Includes metadata from the parent BceResponse class.
|
|
67
|
+
Nested model objects are recursively converted to dictionaries.
|
|
68
|
+
|
|
69
|
+
:return: Dictionary representation of the response
|
|
70
|
+
:rtype: dict
|
|
71
|
+
"""
|
|
72
|
+
_map = super().to_dict()
|
|
73
|
+
if _map is not None:
|
|
74
|
+
return _map
|
|
75
|
+
result = dict()
|
|
76
|
+
if self.metadata is not None:
|
|
77
|
+
result['metadata'] = dict(self.metadata)
|
|
78
|
+
if self.keyword_type is not None:
|
|
79
|
+
result['keywordType'] = self.keyword_type
|
|
80
|
+
if self.keyword is not None:
|
|
81
|
+
result['keyword'] = self.keyword
|
|
82
|
+
if self.order_by is not None:
|
|
83
|
+
result['orderBy'] = self.order_by
|
|
84
|
+
if self.order is not None:
|
|
85
|
+
result['order'] = self.order
|
|
86
|
+
if self.page_no is not None:
|
|
87
|
+
result['pageNo'] = self.page_no
|
|
88
|
+
if self.page_size is not None:
|
|
89
|
+
result['pageSize'] = self.page_size
|
|
90
|
+
if self.total_count is not None:
|
|
91
|
+
result['totalCount'] = self.total_count
|
|
92
|
+
if self.items is not None:
|
|
93
|
+
result['items'] = [i.to_dict() for i in self.items]
|
|
94
|
+
return result
|
|
95
|
+
|
|
96
|
+
def from_dict(self, m):
|
|
97
|
+
"""
|
|
98
|
+
Populate the response instance from a dictionary.
|
|
99
|
+
|
|
100
|
+
Nested dictionaries are recursively converted to model objects.
|
|
101
|
+
|
|
102
|
+
:param m: Dictionary containing response data
|
|
103
|
+
:type m: dict
|
|
104
|
+
|
|
105
|
+
:return: Self reference for method chaining
|
|
106
|
+
:rtype: ListNotificationPoliciesResponse
|
|
107
|
+
|
|
108
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
109
|
+
:raises ValueError: If nested model conversion fails
|
|
110
|
+
"""
|
|
111
|
+
m = m or dict()
|
|
112
|
+
if m.get('keywordType') is not None:
|
|
113
|
+
self.keyword_type = m.get('keywordType')
|
|
114
|
+
if m.get('keyword') is not None:
|
|
115
|
+
self.keyword = m.get('keyword')
|
|
116
|
+
if m.get('orderBy') is not None:
|
|
117
|
+
self.order_by = m.get('orderBy')
|
|
118
|
+
if m.get('order') is not None:
|
|
119
|
+
self.order = m.get('order')
|
|
120
|
+
if m.get('pageNo') is not None:
|
|
121
|
+
self.page_no = m.get('pageNo')
|
|
122
|
+
if m.get('pageSize') is not None:
|
|
123
|
+
self.page_size = m.get('pageSize')
|
|
124
|
+
if m.get('totalCount') is not None:
|
|
125
|
+
self.total_count = m.get('totalCount')
|
|
126
|
+
if m.get('items') is not None:
|
|
127
|
+
self.items = [NotifyRule().from_dict(i) for i in m.get('items')]
|
|
128
|
+
return self
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListPodMonitorsRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListPodMonitorsRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListPodMonitorsRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
instance_id,
|
|
18
|
+
agent_id,
|
|
19
|
+
page_no=None,
|
|
20
|
+
page_size=None,
|
|
21
|
+
keyword_type=None,
|
|
22
|
+
keyword=None,
|
|
23
|
+
order_by=None,
|
|
24
|
+
order=None,
|
|
25
|
+
):
|
|
26
|
+
"""
|
|
27
|
+
Initialize ListPodMonitorsRequest request entity.
|
|
28
|
+
|
|
29
|
+
:param instance_id: instance_id parameter
|
|
30
|
+
:type instance_id: str (required)
|
|
31
|
+
|
|
32
|
+
:param agent_id: agent_id parameter
|
|
33
|
+
:type agent_id: str (required)
|
|
34
|
+
|
|
35
|
+
:param page_no: page_no parameter
|
|
36
|
+
:type page_no: int (optional)
|
|
37
|
+
|
|
38
|
+
:param page_size: page_size parameter
|
|
39
|
+
:type page_size: int (optional)
|
|
40
|
+
|
|
41
|
+
:param keyword_type: keyword_type parameter
|
|
42
|
+
:type keyword_type: str (optional)
|
|
43
|
+
|
|
44
|
+
:param keyword: keyword parameter
|
|
45
|
+
:type keyword: str (optional)
|
|
46
|
+
|
|
47
|
+
:param order_by: order_by parameter
|
|
48
|
+
:type order_by: str (optional)
|
|
49
|
+
|
|
50
|
+
:param order: order parameter
|
|
51
|
+
:type order: str (optional)
|
|
52
|
+
"""
|
|
53
|
+
super().__init__()
|
|
54
|
+
self.instance_id = instance_id
|
|
55
|
+
self.agent_id = agent_id
|
|
56
|
+
self.page_no = page_no
|
|
57
|
+
self.page_size = page_size
|
|
58
|
+
self.keyword_type = keyword_type
|
|
59
|
+
self.keyword = keyword
|
|
60
|
+
self.order_by = order_by
|
|
61
|
+
self.order = order
|
|
62
|
+
|
|
63
|
+
def to_dict(self):
|
|
64
|
+
"""
|
|
65
|
+
Convert the request entity to a dictionary representation.
|
|
66
|
+
|
|
67
|
+
Nested model objects are recursively converted to dictionaries.
|
|
68
|
+
|
|
69
|
+
:return: Dictionary representation of the request
|
|
70
|
+
:rtype: dict
|
|
71
|
+
"""
|
|
72
|
+
_map = super().to_dict()
|
|
73
|
+
if _map is not None:
|
|
74
|
+
return _map
|
|
75
|
+
result = dict()
|
|
76
|
+
return result
|
|
77
|
+
|
|
78
|
+
def from_dict(self, m):
|
|
79
|
+
"""
|
|
80
|
+
Populate the request entity from a dictionary.
|
|
81
|
+
|
|
82
|
+
Nested dictionaries are recursively converted to model objects.
|
|
83
|
+
|
|
84
|
+
:param m: Dictionary containing request data
|
|
85
|
+
:type m: dict
|
|
86
|
+
|
|
87
|
+
:return: Self reference for method chaining
|
|
88
|
+
:rtype: ListPodMonitorsRequest
|
|
89
|
+
|
|
90
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
91
|
+
:raises ValueError: If nested model conversion fails
|
|
92
|
+
"""
|
|
93
|
+
m = m or dict()
|
|
94
|
+
if m.get('instanceId') is not None:
|
|
95
|
+
self.instance_id = m.get('instanceId')
|
|
96
|
+
if m.get('agentId') is not None:
|
|
97
|
+
self.agent_id = m.get('agentId')
|
|
98
|
+
if m.get('pageNo') is not None:
|
|
99
|
+
self.page_no = m.get('pageNo')
|
|
100
|
+
if m.get('pageSize') is not None:
|
|
101
|
+
self.page_size = m.get('pageSize')
|
|
102
|
+
if m.get('keywordType') is not None:
|
|
103
|
+
self.keyword_type = m.get('keywordType')
|
|
104
|
+
if m.get('keyword') is not None:
|
|
105
|
+
self.keyword = m.get('keyword')
|
|
106
|
+
if m.get('orderBy') is not None:
|
|
107
|
+
self.order_by = m.get('orderBy')
|
|
108
|
+
if m.get('order') is not None:
|
|
109
|
+
self.order = m.get('order')
|
|
110
|
+
return self
|