huaweicloudsdkworkspace 3.1.101__py2.py3-none-any.whl → 3.1.103__py2.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.
Potentially problematic release.
This version of huaweicloudsdkworkspace might be problematic. Click here for more details.
- huaweicloudsdkworkspace/v2/__init__.py +5 -0
- huaweicloudsdkworkspace/v2/model/__init__.py +5 -0
- huaweicloudsdkworkspace/v2/model/list_metrics_request.py +228 -0
- huaweicloudsdkworkspace/v2/model/list_metrics_response.py +116 -0
- huaweicloudsdkworkspace/v2/model/list_metrics_trend_request.py +228 -0
- huaweicloudsdkworkspace/v2/model/list_metrics_trend_response.py +116 -0
- huaweicloudsdkworkspace/v2/model/metrics_with_time.py +144 -0
- huaweicloudsdkworkspace/v2/workspace_async_client.py +148 -0
- huaweicloudsdkworkspace/v2/workspace_client.py +148 -0
- {huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/METADATA +2 -2
- {huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/RECORD +14 -9
- {huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/LICENSE +0 -0
- {huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/WHEEL +0 -0
- {huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/top_level.txt +0 -0
|
@@ -203,6 +203,10 @@ from huaweicloudsdkworkspace.v2.model.list_metric_notify_record_request import L
|
|
|
203
203
|
from huaweicloudsdkworkspace.v2.model.list_metric_notify_record_response import ListMetricNotifyRecordResponse
|
|
204
204
|
from huaweicloudsdkworkspace.v2.model.list_metric_notify_rule_request import ListMetricNotifyRuleRequest
|
|
205
205
|
from huaweicloudsdkworkspace.v2.model.list_metric_notify_rule_response import ListMetricNotifyRuleResponse
|
|
206
|
+
from huaweicloudsdkworkspace.v2.model.list_metrics_request import ListMetricsRequest
|
|
207
|
+
from huaweicloudsdkworkspace.v2.model.list_metrics_response import ListMetricsResponse
|
|
208
|
+
from huaweicloudsdkworkspace.v2.model.list_metrics_trend_request import ListMetricsTrendRequest
|
|
209
|
+
from huaweicloudsdkworkspace.v2.model.list_metrics_trend_response import ListMetricsTrendResponse
|
|
206
210
|
from huaweicloudsdkworkspace.v2.model.list_otp_devices_by_user_id_request import ListOtpDevicesByUserIdRequest
|
|
207
211
|
from huaweicloudsdkworkspace.v2.model.list_otp_devices_by_user_id_response import ListOtpDevicesByUserIdResponse
|
|
208
212
|
from huaweicloudsdkworkspace.v2.model.list_products_request import ListProductsRequest
|
|
@@ -240,6 +244,7 @@ from huaweicloudsdkworkspace.v2.model.logoff_desktops_req import LogoffDesktopsR
|
|
|
240
244
|
from huaweicloudsdkworkspace.v2.model.match import Match
|
|
241
245
|
from huaweicloudsdkworkspace.v2.model.metric import Metric
|
|
242
246
|
from huaweicloudsdkworkspace.v2.model.metric_notify_rule import MetricNotifyRule
|
|
247
|
+
from huaweicloudsdkworkspace.v2.model.metrics_with_time import MetricsWithTime
|
|
243
248
|
from huaweicloudsdkworkspace.v2.model.modify_workspace_attributes_req import ModifyWorkspaceAttributesReq
|
|
244
249
|
from huaweicloudsdkworkspace.v2.model.network_info import NetworkInfo
|
|
245
250
|
from huaweicloudsdkworkspace.v2.model.nic import Nic
|
|
@@ -201,6 +201,10 @@ from huaweicloudsdkworkspace.v2.model.list_metric_notify_record_request import L
|
|
|
201
201
|
from huaweicloudsdkworkspace.v2.model.list_metric_notify_record_response import ListMetricNotifyRecordResponse
|
|
202
202
|
from huaweicloudsdkworkspace.v2.model.list_metric_notify_rule_request import ListMetricNotifyRuleRequest
|
|
203
203
|
from huaweicloudsdkworkspace.v2.model.list_metric_notify_rule_response import ListMetricNotifyRuleResponse
|
|
204
|
+
from huaweicloudsdkworkspace.v2.model.list_metrics_request import ListMetricsRequest
|
|
205
|
+
from huaweicloudsdkworkspace.v2.model.list_metrics_response import ListMetricsResponse
|
|
206
|
+
from huaweicloudsdkworkspace.v2.model.list_metrics_trend_request import ListMetricsTrendRequest
|
|
207
|
+
from huaweicloudsdkworkspace.v2.model.list_metrics_trend_response import ListMetricsTrendResponse
|
|
204
208
|
from huaweicloudsdkworkspace.v2.model.list_otp_devices_by_user_id_request import ListOtpDevicesByUserIdRequest
|
|
205
209
|
from huaweicloudsdkworkspace.v2.model.list_otp_devices_by_user_id_response import ListOtpDevicesByUserIdResponse
|
|
206
210
|
from huaweicloudsdkworkspace.v2.model.list_products_request import ListProductsRequest
|
|
@@ -238,6 +242,7 @@ from huaweicloudsdkworkspace.v2.model.logoff_desktops_req import LogoffDesktopsR
|
|
|
238
242
|
from huaweicloudsdkworkspace.v2.model.match import Match
|
|
239
243
|
from huaweicloudsdkworkspace.v2.model.metric import Metric
|
|
240
244
|
from huaweicloudsdkworkspace.v2.model.metric_notify_rule import MetricNotifyRule
|
|
245
|
+
from huaweicloudsdkworkspace.v2.model.metrics_with_time import MetricsWithTime
|
|
241
246
|
from huaweicloudsdkworkspace.v2.model.modify_workspace_attributes_req import ModifyWorkspaceAttributesReq
|
|
242
247
|
from huaweicloudsdkworkspace.v2.model.network_info import NetworkInfo
|
|
243
248
|
from huaweicloudsdkworkspace.v2.model.nic import Nic
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListMetricsRequest:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'start_time': 'str',
|
|
21
|
+
'end_time': 'str',
|
|
22
|
+
'dim': 'str',
|
|
23
|
+
'metric_names': 'list[str]',
|
|
24
|
+
'period': 'str'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
attribute_map = {
|
|
28
|
+
'start_time': 'start_time',
|
|
29
|
+
'end_time': 'end_time',
|
|
30
|
+
'dim': 'dim',
|
|
31
|
+
'metric_names': 'metric_names',
|
|
32
|
+
'period': 'period'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def __init__(self, start_time=None, end_time=None, dim=None, metric_names=None, period=None):
|
|
36
|
+
"""ListMetricsRequest
|
|
37
|
+
|
|
38
|
+
The model defined in huaweicloud sdk
|
|
39
|
+
|
|
40
|
+
:param start_time: 开始时间, UTC时间
|
|
41
|
+
:type start_time: str
|
|
42
|
+
:param end_time: 结束时间,UTC时间
|
|
43
|
+
:type end_time: str
|
|
44
|
+
:param dim: 指标维度 | 目前最大支持3个维度,必须从0开始;维度格式为dim.{i}=key,value,key的最大长度32,value的最大长度为256。 单维度:dim.0=instance_id,6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d 多维度:dim.0=key,value&dim.1=key,value
|
|
45
|
+
:type dim: str
|
|
46
|
+
:param metric_names: 指标名称列表
|
|
47
|
+
:type metric_names: list[str]
|
|
48
|
+
:param period: 数据周期 | DAY - 天级数据 HOUR - 小时级数据
|
|
49
|
+
:type period: str
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
self._start_time = None
|
|
55
|
+
self._end_time = None
|
|
56
|
+
self._dim = None
|
|
57
|
+
self._metric_names = None
|
|
58
|
+
self._period = None
|
|
59
|
+
self.discriminator = None
|
|
60
|
+
|
|
61
|
+
self.start_time = start_time
|
|
62
|
+
self.end_time = end_time
|
|
63
|
+
if dim is not None:
|
|
64
|
+
self.dim = dim
|
|
65
|
+
self.metric_names = metric_names
|
|
66
|
+
if period is not None:
|
|
67
|
+
self.period = period
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def start_time(self):
|
|
71
|
+
"""Gets the start_time of this ListMetricsRequest.
|
|
72
|
+
|
|
73
|
+
开始时间, UTC时间
|
|
74
|
+
|
|
75
|
+
:return: The start_time of this ListMetricsRequest.
|
|
76
|
+
:rtype: str
|
|
77
|
+
"""
|
|
78
|
+
return self._start_time
|
|
79
|
+
|
|
80
|
+
@start_time.setter
|
|
81
|
+
def start_time(self, start_time):
|
|
82
|
+
"""Sets the start_time of this ListMetricsRequest.
|
|
83
|
+
|
|
84
|
+
开始时间, UTC时间
|
|
85
|
+
|
|
86
|
+
:param start_time: The start_time of this ListMetricsRequest.
|
|
87
|
+
:type start_time: str
|
|
88
|
+
"""
|
|
89
|
+
self._start_time = start_time
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def end_time(self):
|
|
93
|
+
"""Gets the end_time of this ListMetricsRequest.
|
|
94
|
+
|
|
95
|
+
结束时间,UTC时间
|
|
96
|
+
|
|
97
|
+
:return: The end_time of this ListMetricsRequest.
|
|
98
|
+
:rtype: str
|
|
99
|
+
"""
|
|
100
|
+
return self._end_time
|
|
101
|
+
|
|
102
|
+
@end_time.setter
|
|
103
|
+
def end_time(self, end_time):
|
|
104
|
+
"""Sets the end_time of this ListMetricsRequest.
|
|
105
|
+
|
|
106
|
+
结束时间,UTC时间
|
|
107
|
+
|
|
108
|
+
:param end_time: The end_time of this ListMetricsRequest.
|
|
109
|
+
:type end_time: str
|
|
110
|
+
"""
|
|
111
|
+
self._end_time = end_time
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def dim(self):
|
|
115
|
+
"""Gets the dim of this ListMetricsRequest.
|
|
116
|
+
|
|
117
|
+
指标维度 | 目前最大支持3个维度,必须从0开始;维度格式为dim.{i}=key,value,key的最大长度32,value的最大长度为256。 单维度:dim.0=instance_id,6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d 多维度:dim.0=key,value&dim.1=key,value
|
|
118
|
+
|
|
119
|
+
:return: The dim of this ListMetricsRequest.
|
|
120
|
+
:rtype: str
|
|
121
|
+
"""
|
|
122
|
+
return self._dim
|
|
123
|
+
|
|
124
|
+
@dim.setter
|
|
125
|
+
def dim(self, dim):
|
|
126
|
+
"""Sets the dim of this ListMetricsRequest.
|
|
127
|
+
|
|
128
|
+
指标维度 | 目前最大支持3个维度,必须从0开始;维度格式为dim.{i}=key,value,key的最大长度32,value的最大长度为256。 单维度:dim.0=instance_id,6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d 多维度:dim.0=key,value&dim.1=key,value
|
|
129
|
+
|
|
130
|
+
:param dim: The dim of this ListMetricsRequest.
|
|
131
|
+
:type dim: str
|
|
132
|
+
"""
|
|
133
|
+
self._dim = dim
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def metric_names(self):
|
|
137
|
+
"""Gets the metric_names of this ListMetricsRequest.
|
|
138
|
+
|
|
139
|
+
指标名称列表
|
|
140
|
+
|
|
141
|
+
:return: The metric_names of this ListMetricsRequest.
|
|
142
|
+
:rtype: list[str]
|
|
143
|
+
"""
|
|
144
|
+
return self._metric_names
|
|
145
|
+
|
|
146
|
+
@metric_names.setter
|
|
147
|
+
def metric_names(self, metric_names):
|
|
148
|
+
"""Sets the metric_names of this ListMetricsRequest.
|
|
149
|
+
|
|
150
|
+
指标名称列表
|
|
151
|
+
|
|
152
|
+
:param metric_names: The metric_names of this ListMetricsRequest.
|
|
153
|
+
:type metric_names: list[str]
|
|
154
|
+
"""
|
|
155
|
+
self._metric_names = metric_names
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def period(self):
|
|
159
|
+
"""Gets the period of this ListMetricsRequest.
|
|
160
|
+
|
|
161
|
+
数据周期 | DAY - 天级数据 HOUR - 小时级数据
|
|
162
|
+
|
|
163
|
+
:return: The period of this ListMetricsRequest.
|
|
164
|
+
:rtype: str
|
|
165
|
+
"""
|
|
166
|
+
return self._period
|
|
167
|
+
|
|
168
|
+
@period.setter
|
|
169
|
+
def period(self, period):
|
|
170
|
+
"""Sets the period of this ListMetricsRequest.
|
|
171
|
+
|
|
172
|
+
数据周期 | DAY - 天级数据 HOUR - 小时级数据
|
|
173
|
+
|
|
174
|
+
:param period: The period of this ListMetricsRequest.
|
|
175
|
+
:type period: str
|
|
176
|
+
"""
|
|
177
|
+
self._period = period
|
|
178
|
+
|
|
179
|
+
def to_dict(self):
|
|
180
|
+
"""Returns the model properties as a dict"""
|
|
181
|
+
result = {}
|
|
182
|
+
|
|
183
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
184
|
+
value = getattr(self, attr)
|
|
185
|
+
if isinstance(value, list):
|
|
186
|
+
result[attr] = list(map(
|
|
187
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
188
|
+
value
|
|
189
|
+
))
|
|
190
|
+
elif hasattr(value, "to_dict"):
|
|
191
|
+
result[attr] = value.to_dict()
|
|
192
|
+
elif isinstance(value, dict):
|
|
193
|
+
result[attr] = dict(map(
|
|
194
|
+
lambda item: (item[0], item[1].to_dict())
|
|
195
|
+
if hasattr(item[1], "to_dict") else item,
|
|
196
|
+
value.items()
|
|
197
|
+
))
|
|
198
|
+
else:
|
|
199
|
+
if attr in self.sensitive_list:
|
|
200
|
+
result[attr] = "****"
|
|
201
|
+
else:
|
|
202
|
+
result[attr] = value
|
|
203
|
+
|
|
204
|
+
return result
|
|
205
|
+
|
|
206
|
+
def to_str(self):
|
|
207
|
+
"""Returns the string representation of the model"""
|
|
208
|
+
import simplejson as json
|
|
209
|
+
if six.PY2:
|
|
210
|
+
import sys
|
|
211
|
+
reload(sys)
|
|
212
|
+
sys.setdefaultencoding("utf-8")
|
|
213
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
214
|
+
|
|
215
|
+
def __repr__(self):
|
|
216
|
+
"""For `print`"""
|
|
217
|
+
return self.to_str()
|
|
218
|
+
|
|
219
|
+
def __eq__(self, other):
|
|
220
|
+
"""Returns true if both objects are equal"""
|
|
221
|
+
if not isinstance(other, ListMetricsRequest):
|
|
222
|
+
return False
|
|
223
|
+
|
|
224
|
+
return self.__dict__ == other.__dict__
|
|
225
|
+
|
|
226
|
+
def __ne__(self, other):
|
|
227
|
+
"""Returns true if both objects are not equal"""
|
|
228
|
+
return not self == other
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
|
6
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListMetricsResponse(SdkResponse):
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
openapi_types (dict): The key is attribute name
|
|
14
|
+
and the value is attribute type.
|
|
15
|
+
attribute_map (dict): The key is attribute name
|
|
16
|
+
and the value is json key in definition.
|
|
17
|
+
"""
|
|
18
|
+
sensitive_list = []
|
|
19
|
+
|
|
20
|
+
openapi_types = {
|
|
21
|
+
'body': 'list[Metric]'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'body': 'body'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
def __init__(self, body=None):
|
|
29
|
+
"""ListMetricsResponse
|
|
30
|
+
|
|
31
|
+
The model defined in huaweicloud sdk
|
|
32
|
+
|
|
33
|
+
:param body: 查询指标响应体
|
|
34
|
+
:type body: list[:class:`huaweicloudsdkworkspace.v2.Metric`]
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
super(ListMetricsResponse, self).__init__()
|
|
38
|
+
|
|
39
|
+
self._body = None
|
|
40
|
+
self.discriminator = None
|
|
41
|
+
|
|
42
|
+
if body is not None:
|
|
43
|
+
self.body = body
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def body(self):
|
|
47
|
+
"""Gets the body of this ListMetricsResponse.
|
|
48
|
+
|
|
49
|
+
查询指标响应体
|
|
50
|
+
|
|
51
|
+
:return: The body of this ListMetricsResponse.
|
|
52
|
+
:rtype: list[:class:`huaweicloudsdkworkspace.v2.Metric`]
|
|
53
|
+
"""
|
|
54
|
+
return self._body
|
|
55
|
+
|
|
56
|
+
@body.setter
|
|
57
|
+
def body(self, body):
|
|
58
|
+
"""Sets the body of this ListMetricsResponse.
|
|
59
|
+
|
|
60
|
+
查询指标响应体
|
|
61
|
+
|
|
62
|
+
:param body: The body of this ListMetricsResponse.
|
|
63
|
+
:type body: list[:class:`huaweicloudsdkworkspace.v2.Metric`]
|
|
64
|
+
"""
|
|
65
|
+
self._body = body
|
|
66
|
+
|
|
67
|
+
def to_dict(self):
|
|
68
|
+
"""Returns the model properties as a dict"""
|
|
69
|
+
result = {}
|
|
70
|
+
|
|
71
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
72
|
+
value = getattr(self, attr)
|
|
73
|
+
if isinstance(value, list):
|
|
74
|
+
result[attr] = list(map(
|
|
75
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
76
|
+
value
|
|
77
|
+
))
|
|
78
|
+
elif hasattr(value, "to_dict"):
|
|
79
|
+
result[attr] = value.to_dict()
|
|
80
|
+
elif isinstance(value, dict):
|
|
81
|
+
result[attr] = dict(map(
|
|
82
|
+
lambda item: (item[0], item[1].to_dict())
|
|
83
|
+
if hasattr(item[1], "to_dict") else item,
|
|
84
|
+
value.items()
|
|
85
|
+
))
|
|
86
|
+
else:
|
|
87
|
+
if attr in self.sensitive_list:
|
|
88
|
+
result[attr] = "****"
|
|
89
|
+
else:
|
|
90
|
+
result[attr] = value
|
|
91
|
+
|
|
92
|
+
return result
|
|
93
|
+
|
|
94
|
+
def to_str(self):
|
|
95
|
+
"""Returns the string representation of the model"""
|
|
96
|
+
import simplejson as json
|
|
97
|
+
if six.PY2:
|
|
98
|
+
import sys
|
|
99
|
+
reload(sys)
|
|
100
|
+
sys.setdefaultencoding("utf-8")
|
|
101
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
102
|
+
|
|
103
|
+
def __repr__(self):
|
|
104
|
+
"""For `print`"""
|
|
105
|
+
return self.to_str()
|
|
106
|
+
|
|
107
|
+
def __eq__(self, other):
|
|
108
|
+
"""Returns true if both objects are equal"""
|
|
109
|
+
if not isinstance(other, ListMetricsResponse):
|
|
110
|
+
return False
|
|
111
|
+
|
|
112
|
+
return self.__dict__ == other.__dict__
|
|
113
|
+
|
|
114
|
+
def __ne__(self, other):
|
|
115
|
+
"""Returns true if both objects are not equal"""
|
|
116
|
+
return not self == other
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListMetricsTrendRequest:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'start_time': 'str',
|
|
21
|
+
'end_time': 'str',
|
|
22
|
+
'dim': 'str',
|
|
23
|
+
'metric_names': 'list[str]',
|
|
24
|
+
'period': 'str'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
attribute_map = {
|
|
28
|
+
'start_time': 'start_time',
|
|
29
|
+
'end_time': 'end_time',
|
|
30
|
+
'dim': 'dim',
|
|
31
|
+
'metric_names': 'metric_names',
|
|
32
|
+
'period': 'period'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def __init__(self, start_time=None, end_time=None, dim=None, metric_names=None, period=None):
|
|
36
|
+
"""ListMetricsTrendRequest
|
|
37
|
+
|
|
38
|
+
The model defined in huaweicloud sdk
|
|
39
|
+
|
|
40
|
+
:param start_time: 开始时间
|
|
41
|
+
:type start_time: str
|
|
42
|
+
:param end_time: 结束时间
|
|
43
|
+
:type end_time: str
|
|
44
|
+
:param dim: 指标维度 | 目前最大支持3个维度,必须从0开始;维度格式为dim.{i}=key,value,key的最大长度32,value的最大长度为256。 单维度:dim.0=instance_id,6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d 多维度:dim.0=key,value&dim.1=key,value
|
|
45
|
+
:type dim: str
|
|
46
|
+
:param metric_names: 指标名称列表
|
|
47
|
+
:type metric_names: list[str]
|
|
48
|
+
:param period: 数据周期 | DAY - 天级数据 HOUR - 小时级数据
|
|
49
|
+
:type period: str
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
self._start_time = None
|
|
55
|
+
self._end_time = None
|
|
56
|
+
self._dim = None
|
|
57
|
+
self._metric_names = None
|
|
58
|
+
self._period = None
|
|
59
|
+
self.discriminator = None
|
|
60
|
+
|
|
61
|
+
self.start_time = start_time
|
|
62
|
+
self.end_time = end_time
|
|
63
|
+
if dim is not None:
|
|
64
|
+
self.dim = dim
|
|
65
|
+
self.metric_names = metric_names
|
|
66
|
+
if period is not None:
|
|
67
|
+
self.period = period
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def start_time(self):
|
|
71
|
+
"""Gets the start_time of this ListMetricsTrendRequest.
|
|
72
|
+
|
|
73
|
+
开始时间
|
|
74
|
+
|
|
75
|
+
:return: The start_time of this ListMetricsTrendRequest.
|
|
76
|
+
:rtype: str
|
|
77
|
+
"""
|
|
78
|
+
return self._start_time
|
|
79
|
+
|
|
80
|
+
@start_time.setter
|
|
81
|
+
def start_time(self, start_time):
|
|
82
|
+
"""Sets the start_time of this ListMetricsTrendRequest.
|
|
83
|
+
|
|
84
|
+
开始时间
|
|
85
|
+
|
|
86
|
+
:param start_time: The start_time of this ListMetricsTrendRequest.
|
|
87
|
+
:type start_time: str
|
|
88
|
+
"""
|
|
89
|
+
self._start_time = start_time
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def end_time(self):
|
|
93
|
+
"""Gets the end_time of this ListMetricsTrendRequest.
|
|
94
|
+
|
|
95
|
+
结束时间
|
|
96
|
+
|
|
97
|
+
:return: The end_time of this ListMetricsTrendRequest.
|
|
98
|
+
:rtype: str
|
|
99
|
+
"""
|
|
100
|
+
return self._end_time
|
|
101
|
+
|
|
102
|
+
@end_time.setter
|
|
103
|
+
def end_time(self, end_time):
|
|
104
|
+
"""Sets the end_time of this ListMetricsTrendRequest.
|
|
105
|
+
|
|
106
|
+
结束时间
|
|
107
|
+
|
|
108
|
+
:param end_time: The end_time of this ListMetricsTrendRequest.
|
|
109
|
+
:type end_time: str
|
|
110
|
+
"""
|
|
111
|
+
self._end_time = end_time
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def dim(self):
|
|
115
|
+
"""Gets the dim of this ListMetricsTrendRequest.
|
|
116
|
+
|
|
117
|
+
指标维度 | 目前最大支持3个维度,必须从0开始;维度格式为dim.{i}=key,value,key的最大长度32,value的最大长度为256。 单维度:dim.0=instance_id,6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d 多维度:dim.0=key,value&dim.1=key,value
|
|
118
|
+
|
|
119
|
+
:return: The dim of this ListMetricsTrendRequest.
|
|
120
|
+
:rtype: str
|
|
121
|
+
"""
|
|
122
|
+
return self._dim
|
|
123
|
+
|
|
124
|
+
@dim.setter
|
|
125
|
+
def dim(self, dim):
|
|
126
|
+
"""Sets the dim of this ListMetricsTrendRequest.
|
|
127
|
+
|
|
128
|
+
指标维度 | 目前最大支持3个维度,必须从0开始;维度格式为dim.{i}=key,value,key的最大长度32,value的最大长度为256。 单维度:dim.0=instance_id,6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d 多维度:dim.0=key,value&dim.1=key,value
|
|
129
|
+
|
|
130
|
+
:param dim: The dim of this ListMetricsTrendRequest.
|
|
131
|
+
:type dim: str
|
|
132
|
+
"""
|
|
133
|
+
self._dim = dim
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def metric_names(self):
|
|
137
|
+
"""Gets the metric_names of this ListMetricsTrendRequest.
|
|
138
|
+
|
|
139
|
+
指标名称列表
|
|
140
|
+
|
|
141
|
+
:return: The metric_names of this ListMetricsTrendRequest.
|
|
142
|
+
:rtype: list[str]
|
|
143
|
+
"""
|
|
144
|
+
return self._metric_names
|
|
145
|
+
|
|
146
|
+
@metric_names.setter
|
|
147
|
+
def metric_names(self, metric_names):
|
|
148
|
+
"""Sets the metric_names of this ListMetricsTrendRequest.
|
|
149
|
+
|
|
150
|
+
指标名称列表
|
|
151
|
+
|
|
152
|
+
:param metric_names: The metric_names of this ListMetricsTrendRequest.
|
|
153
|
+
:type metric_names: list[str]
|
|
154
|
+
"""
|
|
155
|
+
self._metric_names = metric_names
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def period(self):
|
|
159
|
+
"""Gets the period of this ListMetricsTrendRequest.
|
|
160
|
+
|
|
161
|
+
数据周期 | DAY - 天级数据 HOUR - 小时级数据
|
|
162
|
+
|
|
163
|
+
:return: The period of this ListMetricsTrendRequest.
|
|
164
|
+
:rtype: str
|
|
165
|
+
"""
|
|
166
|
+
return self._period
|
|
167
|
+
|
|
168
|
+
@period.setter
|
|
169
|
+
def period(self, period):
|
|
170
|
+
"""Sets the period of this ListMetricsTrendRequest.
|
|
171
|
+
|
|
172
|
+
数据周期 | DAY - 天级数据 HOUR - 小时级数据
|
|
173
|
+
|
|
174
|
+
:param period: The period of this ListMetricsTrendRequest.
|
|
175
|
+
:type period: str
|
|
176
|
+
"""
|
|
177
|
+
self._period = period
|
|
178
|
+
|
|
179
|
+
def to_dict(self):
|
|
180
|
+
"""Returns the model properties as a dict"""
|
|
181
|
+
result = {}
|
|
182
|
+
|
|
183
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
184
|
+
value = getattr(self, attr)
|
|
185
|
+
if isinstance(value, list):
|
|
186
|
+
result[attr] = list(map(
|
|
187
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
188
|
+
value
|
|
189
|
+
))
|
|
190
|
+
elif hasattr(value, "to_dict"):
|
|
191
|
+
result[attr] = value.to_dict()
|
|
192
|
+
elif isinstance(value, dict):
|
|
193
|
+
result[attr] = dict(map(
|
|
194
|
+
lambda item: (item[0], item[1].to_dict())
|
|
195
|
+
if hasattr(item[1], "to_dict") else item,
|
|
196
|
+
value.items()
|
|
197
|
+
))
|
|
198
|
+
else:
|
|
199
|
+
if attr in self.sensitive_list:
|
|
200
|
+
result[attr] = "****"
|
|
201
|
+
else:
|
|
202
|
+
result[attr] = value
|
|
203
|
+
|
|
204
|
+
return result
|
|
205
|
+
|
|
206
|
+
def to_str(self):
|
|
207
|
+
"""Returns the string representation of the model"""
|
|
208
|
+
import simplejson as json
|
|
209
|
+
if six.PY2:
|
|
210
|
+
import sys
|
|
211
|
+
reload(sys)
|
|
212
|
+
sys.setdefaultencoding("utf-8")
|
|
213
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
214
|
+
|
|
215
|
+
def __repr__(self):
|
|
216
|
+
"""For `print`"""
|
|
217
|
+
return self.to_str()
|
|
218
|
+
|
|
219
|
+
def __eq__(self, other):
|
|
220
|
+
"""Returns true if both objects are equal"""
|
|
221
|
+
if not isinstance(other, ListMetricsTrendRequest):
|
|
222
|
+
return False
|
|
223
|
+
|
|
224
|
+
return self.__dict__ == other.__dict__
|
|
225
|
+
|
|
226
|
+
def __ne__(self, other):
|
|
227
|
+
"""Returns true if both objects are not equal"""
|
|
228
|
+
return not self == other
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.sdk_response import SdkResponse
|
|
6
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListMetricsTrendResponse(SdkResponse):
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
Attributes:
|
|
13
|
+
openapi_types (dict): The key is attribute name
|
|
14
|
+
and the value is attribute type.
|
|
15
|
+
attribute_map (dict): The key is attribute name
|
|
16
|
+
and the value is json key in definition.
|
|
17
|
+
"""
|
|
18
|
+
sensitive_list = []
|
|
19
|
+
|
|
20
|
+
openapi_types = {
|
|
21
|
+
'body': 'list[MetricsWithTime]'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'body': 'body'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
def __init__(self, body=None):
|
|
29
|
+
"""ListMetricsTrendResponse
|
|
30
|
+
|
|
31
|
+
The model defined in huaweicloud sdk
|
|
32
|
+
|
|
33
|
+
:param body: 查询指标趋势响应
|
|
34
|
+
:type body: list[:class:`huaweicloudsdkworkspace.v2.MetricsWithTime`]
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
super(ListMetricsTrendResponse, self).__init__()
|
|
38
|
+
|
|
39
|
+
self._body = None
|
|
40
|
+
self.discriminator = None
|
|
41
|
+
|
|
42
|
+
if body is not None:
|
|
43
|
+
self.body = body
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def body(self):
|
|
47
|
+
"""Gets the body of this ListMetricsTrendResponse.
|
|
48
|
+
|
|
49
|
+
查询指标趋势响应
|
|
50
|
+
|
|
51
|
+
:return: The body of this ListMetricsTrendResponse.
|
|
52
|
+
:rtype: list[:class:`huaweicloudsdkworkspace.v2.MetricsWithTime`]
|
|
53
|
+
"""
|
|
54
|
+
return self._body
|
|
55
|
+
|
|
56
|
+
@body.setter
|
|
57
|
+
def body(self, body):
|
|
58
|
+
"""Sets the body of this ListMetricsTrendResponse.
|
|
59
|
+
|
|
60
|
+
查询指标趋势响应
|
|
61
|
+
|
|
62
|
+
:param body: The body of this ListMetricsTrendResponse.
|
|
63
|
+
:type body: list[:class:`huaweicloudsdkworkspace.v2.MetricsWithTime`]
|
|
64
|
+
"""
|
|
65
|
+
self._body = body
|
|
66
|
+
|
|
67
|
+
def to_dict(self):
|
|
68
|
+
"""Returns the model properties as a dict"""
|
|
69
|
+
result = {}
|
|
70
|
+
|
|
71
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
72
|
+
value = getattr(self, attr)
|
|
73
|
+
if isinstance(value, list):
|
|
74
|
+
result[attr] = list(map(
|
|
75
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
76
|
+
value
|
|
77
|
+
))
|
|
78
|
+
elif hasattr(value, "to_dict"):
|
|
79
|
+
result[attr] = value.to_dict()
|
|
80
|
+
elif isinstance(value, dict):
|
|
81
|
+
result[attr] = dict(map(
|
|
82
|
+
lambda item: (item[0], item[1].to_dict())
|
|
83
|
+
if hasattr(item[1], "to_dict") else item,
|
|
84
|
+
value.items()
|
|
85
|
+
))
|
|
86
|
+
else:
|
|
87
|
+
if attr in self.sensitive_list:
|
|
88
|
+
result[attr] = "****"
|
|
89
|
+
else:
|
|
90
|
+
result[attr] = value
|
|
91
|
+
|
|
92
|
+
return result
|
|
93
|
+
|
|
94
|
+
def to_str(self):
|
|
95
|
+
"""Returns the string representation of the model"""
|
|
96
|
+
import simplejson as json
|
|
97
|
+
if six.PY2:
|
|
98
|
+
import sys
|
|
99
|
+
reload(sys)
|
|
100
|
+
sys.setdefaultencoding("utf-8")
|
|
101
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
102
|
+
|
|
103
|
+
def __repr__(self):
|
|
104
|
+
"""For `print`"""
|
|
105
|
+
return self.to_str()
|
|
106
|
+
|
|
107
|
+
def __eq__(self, other):
|
|
108
|
+
"""Returns true if both objects are equal"""
|
|
109
|
+
if not isinstance(other, ListMetricsTrendResponse):
|
|
110
|
+
return False
|
|
111
|
+
|
|
112
|
+
return self.__dict__ == other.__dict__
|
|
113
|
+
|
|
114
|
+
def __ne__(self, other):
|
|
115
|
+
"""Returns true if both objects are not equal"""
|
|
116
|
+
return not self == other
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class MetricsWithTime:
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
Attributes:
|
|
12
|
+
openapi_types (dict): The key is attribute name
|
|
13
|
+
and the value is attribute type.
|
|
14
|
+
attribute_map (dict): The key is attribute name
|
|
15
|
+
and the value is json key in definition.
|
|
16
|
+
"""
|
|
17
|
+
sensitive_list = []
|
|
18
|
+
|
|
19
|
+
openapi_types = {
|
|
20
|
+
'time': 'str',
|
|
21
|
+
'metrics': 'list[Metric]'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
attribute_map = {
|
|
25
|
+
'time': 'time',
|
|
26
|
+
'metrics': 'metrics'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, time=None, metrics=None):
|
|
30
|
+
"""MetricsWithTime
|
|
31
|
+
|
|
32
|
+
The model defined in huaweicloud sdk
|
|
33
|
+
|
|
34
|
+
:param time: 时间
|
|
35
|
+
:type time: str
|
|
36
|
+
:param metrics: 指标值
|
|
37
|
+
:type metrics: list[:class:`huaweicloudsdkworkspace.v2.Metric`]
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
self._time = None
|
|
43
|
+
self._metrics = None
|
|
44
|
+
self.discriminator = None
|
|
45
|
+
|
|
46
|
+
if time is not None:
|
|
47
|
+
self.time = time
|
|
48
|
+
if metrics is not None:
|
|
49
|
+
self.metrics = metrics
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def time(self):
|
|
53
|
+
"""Gets the time of this MetricsWithTime.
|
|
54
|
+
|
|
55
|
+
时间
|
|
56
|
+
|
|
57
|
+
:return: The time of this MetricsWithTime.
|
|
58
|
+
:rtype: str
|
|
59
|
+
"""
|
|
60
|
+
return self._time
|
|
61
|
+
|
|
62
|
+
@time.setter
|
|
63
|
+
def time(self, time):
|
|
64
|
+
"""Sets the time of this MetricsWithTime.
|
|
65
|
+
|
|
66
|
+
时间
|
|
67
|
+
|
|
68
|
+
:param time: The time of this MetricsWithTime.
|
|
69
|
+
:type time: str
|
|
70
|
+
"""
|
|
71
|
+
self._time = time
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def metrics(self):
|
|
75
|
+
"""Gets the metrics of this MetricsWithTime.
|
|
76
|
+
|
|
77
|
+
指标值
|
|
78
|
+
|
|
79
|
+
:return: The metrics of this MetricsWithTime.
|
|
80
|
+
:rtype: list[:class:`huaweicloudsdkworkspace.v2.Metric`]
|
|
81
|
+
"""
|
|
82
|
+
return self._metrics
|
|
83
|
+
|
|
84
|
+
@metrics.setter
|
|
85
|
+
def metrics(self, metrics):
|
|
86
|
+
"""Sets the metrics of this MetricsWithTime.
|
|
87
|
+
|
|
88
|
+
指标值
|
|
89
|
+
|
|
90
|
+
:param metrics: The metrics of this MetricsWithTime.
|
|
91
|
+
:type metrics: list[:class:`huaweicloudsdkworkspace.v2.Metric`]
|
|
92
|
+
"""
|
|
93
|
+
self._metrics = metrics
|
|
94
|
+
|
|
95
|
+
def to_dict(self):
|
|
96
|
+
"""Returns the model properties as a dict"""
|
|
97
|
+
result = {}
|
|
98
|
+
|
|
99
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
100
|
+
value = getattr(self, attr)
|
|
101
|
+
if isinstance(value, list):
|
|
102
|
+
result[attr] = list(map(
|
|
103
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
104
|
+
value
|
|
105
|
+
))
|
|
106
|
+
elif hasattr(value, "to_dict"):
|
|
107
|
+
result[attr] = value.to_dict()
|
|
108
|
+
elif isinstance(value, dict):
|
|
109
|
+
result[attr] = dict(map(
|
|
110
|
+
lambda item: (item[0], item[1].to_dict())
|
|
111
|
+
if hasattr(item[1], "to_dict") else item,
|
|
112
|
+
value.items()
|
|
113
|
+
))
|
|
114
|
+
else:
|
|
115
|
+
if attr in self.sensitive_list:
|
|
116
|
+
result[attr] = "****"
|
|
117
|
+
else:
|
|
118
|
+
result[attr] = value
|
|
119
|
+
|
|
120
|
+
return result
|
|
121
|
+
|
|
122
|
+
def to_str(self):
|
|
123
|
+
"""Returns the string representation of the model"""
|
|
124
|
+
import simplejson as json
|
|
125
|
+
if six.PY2:
|
|
126
|
+
import sys
|
|
127
|
+
reload(sys)
|
|
128
|
+
sys.setdefaultencoding("utf-8")
|
|
129
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
130
|
+
|
|
131
|
+
def __repr__(self):
|
|
132
|
+
"""For `print`"""
|
|
133
|
+
return self.to_str()
|
|
134
|
+
|
|
135
|
+
def __eq__(self, other):
|
|
136
|
+
"""Returns true if both objects are equal"""
|
|
137
|
+
if not isinstance(other, MetricsWithTime):
|
|
138
|
+
return False
|
|
139
|
+
|
|
140
|
+
return self.__dict__ == other.__dict__
|
|
141
|
+
|
|
142
|
+
def __ne__(self, other):
|
|
143
|
+
"""Returns true if both objects are not equal"""
|
|
144
|
+
return not self == other
|
|
@@ -5082,6 +5082,154 @@ class WorkspaceAsyncClient(Client):
|
|
|
5082
5082
|
|
|
5083
5083
|
return http_info
|
|
5084
5084
|
|
|
5085
|
+
def list_metrics_async(self, request):
|
|
5086
|
+
"""查询指标
|
|
5087
|
+
|
|
5088
|
+
查询指标
|
|
5089
|
+
|
|
5090
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
5091
|
+
|
|
5092
|
+
|
|
5093
|
+
:param request: Request instance for ListMetrics
|
|
5094
|
+
:type request: :class:`huaweicloudsdkworkspace.v2.ListMetricsRequest`
|
|
5095
|
+
:rtype: :class:`huaweicloudsdkworkspace.v2.ListMetricsResponse`
|
|
5096
|
+
"""
|
|
5097
|
+
http_info = self._list_metrics_http_info(request)
|
|
5098
|
+
return self._call_api(**http_info)
|
|
5099
|
+
|
|
5100
|
+
def list_metrics_async_invoker(self, request):
|
|
5101
|
+
http_info = self._list_metrics_http_info(request)
|
|
5102
|
+
return AsyncInvoker(self, http_info)
|
|
5103
|
+
|
|
5104
|
+
def _list_metrics_http_info(self, request):
|
|
5105
|
+
http_info = {
|
|
5106
|
+
"method": "GET",
|
|
5107
|
+
"resource_path": "/v2/{project_id}/statistics/metrics",
|
|
5108
|
+
"request_type": request.__class__.__name__,
|
|
5109
|
+
"response_type": "ListMetricsResponse"
|
|
5110
|
+
}
|
|
5111
|
+
|
|
5112
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
5113
|
+
|
|
5114
|
+
cname = None
|
|
5115
|
+
|
|
5116
|
+
collection_formats = {}
|
|
5117
|
+
|
|
5118
|
+
path_params = {}
|
|
5119
|
+
|
|
5120
|
+
query_params = []
|
|
5121
|
+
if 'start_time' in local_var_params:
|
|
5122
|
+
query_params.append(('start_time', local_var_params['start_time']))
|
|
5123
|
+
if 'end_time' in local_var_params:
|
|
5124
|
+
query_params.append(('end_time', local_var_params['end_time']))
|
|
5125
|
+
if 'dim' in local_var_params:
|
|
5126
|
+
query_params.append(('dim', local_var_params['dim']))
|
|
5127
|
+
if 'metric_names' in local_var_params:
|
|
5128
|
+
query_params.append(('metric_names', local_var_params['metric_names']))
|
|
5129
|
+
collection_formats['metric_names'] = 'csv'
|
|
5130
|
+
if 'period' in local_var_params:
|
|
5131
|
+
query_params.append(('period', local_var_params['period']))
|
|
5132
|
+
|
|
5133
|
+
header_params = {}
|
|
5134
|
+
|
|
5135
|
+
form_params = {}
|
|
5136
|
+
|
|
5137
|
+
body = None
|
|
5138
|
+
if isinstance(request, SdkStreamRequest):
|
|
5139
|
+
body = request.get_file_stream()
|
|
5140
|
+
|
|
5141
|
+
response_headers = []
|
|
5142
|
+
|
|
5143
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
5144
|
+
['application/json'])
|
|
5145
|
+
|
|
5146
|
+
auth_settings = []
|
|
5147
|
+
|
|
5148
|
+
http_info["cname"] = cname
|
|
5149
|
+
http_info["collection_formats"] = collection_formats
|
|
5150
|
+
http_info["path_params"] = path_params
|
|
5151
|
+
http_info["query_params"] = query_params
|
|
5152
|
+
http_info["header_params"] = header_params
|
|
5153
|
+
http_info["post_params"] = form_params
|
|
5154
|
+
http_info["body"] = body
|
|
5155
|
+
http_info["response_headers"] = response_headers
|
|
5156
|
+
|
|
5157
|
+
return http_info
|
|
5158
|
+
|
|
5159
|
+
def list_metrics_trend_async(self, request):
|
|
5160
|
+
"""查询指标趋势
|
|
5161
|
+
|
|
5162
|
+
查询指标趋势
|
|
5163
|
+
|
|
5164
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
5165
|
+
|
|
5166
|
+
|
|
5167
|
+
:param request: Request instance for ListMetricsTrend
|
|
5168
|
+
:type request: :class:`huaweicloudsdkworkspace.v2.ListMetricsTrendRequest`
|
|
5169
|
+
:rtype: :class:`huaweicloudsdkworkspace.v2.ListMetricsTrendResponse`
|
|
5170
|
+
"""
|
|
5171
|
+
http_info = self._list_metrics_trend_http_info(request)
|
|
5172
|
+
return self._call_api(**http_info)
|
|
5173
|
+
|
|
5174
|
+
def list_metrics_trend_async_invoker(self, request):
|
|
5175
|
+
http_info = self._list_metrics_trend_http_info(request)
|
|
5176
|
+
return AsyncInvoker(self, http_info)
|
|
5177
|
+
|
|
5178
|
+
def _list_metrics_trend_http_info(self, request):
|
|
5179
|
+
http_info = {
|
|
5180
|
+
"method": "GET",
|
|
5181
|
+
"resource_path": "/v2/{project_id}/statistics/metrics/trend",
|
|
5182
|
+
"request_type": request.__class__.__name__,
|
|
5183
|
+
"response_type": "ListMetricsTrendResponse"
|
|
5184
|
+
}
|
|
5185
|
+
|
|
5186
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
5187
|
+
|
|
5188
|
+
cname = None
|
|
5189
|
+
|
|
5190
|
+
collection_formats = {}
|
|
5191
|
+
|
|
5192
|
+
path_params = {}
|
|
5193
|
+
|
|
5194
|
+
query_params = []
|
|
5195
|
+
if 'start_time' in local_var_params:
|
|
5196
|
+
query_params.append(('start_time', local_var_params['start_time']))
|
|
5197
|
+
if 'end_time' in local_var_params:
|
|
5198
|
+
query_params.append(('end_time', local_var_params['end_time']))
|
|
5199
|
+
if 'dim' in local_var_params:
|
|
5200
|
+
query_params.append(('dim', local_var_params['dim']))
|
|
5201
|
+
if 'metric_names' in local_var_params:
|
|
5202
|
+
query_params.append(('metric_names', local_var_params['metric_names']))
|
|
5203
|
+
collection_formats['metric_names'] = 'csv'
|
|
5204
|
+
if 'period' in local_var_params:
|
|
5205
|
+
query_params.append(('period', local_var_params['period']))
|
|
5206
|
+
|
|
5207
|
+
header_params = {}
|
|
5208
|
+
|
|
5209
|
+
form_params = {}
|
|
5210
|
+
|
|
5211
|
+
body = None
|
|
5212
|
+
if isinstance(request, SdkStreamRequest):
|
|
5213
|
+
body = request.get_file_stream()
|
|
5214
|
+
|
|
5215
|
+
response_headers = []
|
|
5216
|
+
|
|
5217
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
5218
|
+
['application/json'])
|
|
5219
|
+
|
|
5220
|
+
auth_settings = []
|
|
5221
|
+
|
|
5222
|
+
http_info["cname"] = cname
|
|
5223
|
+
http_info["collection_formats"] = collection_formats
|
|
5224
|
+
http_info["path_params"] = path_params
|
|
5225
|
+
http_info["query_params"] = query_params
|
|
5226
|
+
http_info["header_params"] = header_params
|
|
5227
|
+
http_info["post_params"] = form_params
|
|
5228
|
+
http_info["body"] = body
|
|
5229
|
+
http_info["response_headers"] = response_headers
|
|
5230
|
+
|
|
5231
|
+
return http_info
|
|
5232
|
+
|
|
5085
5233
|
def list_user_usage_metric_async(self, request):
|
|
5086
5234
|
"""查询用户使用统计数据
|
|
5087
5235
|
|
|
@@ -5082,6 +5082,154 @@ class WorkspaceClient(Client):
|
|
|
5082
5082
|
|
|
5083
5083
|
return http_info
|
|
5084
5084
|
|
|
5085
|
+
def list_metrics(self, request):
|
|
5086
|
+
"""查询指标
|
|
5087
|
+
|
|
5088
|
+
查询指标
|
|
5089
|
+
|
|
5090
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
5091
|
+
|
|
5092
|
+
:param request: Request instance for ListMetrics
|
|
5093
|
+
:type request: :class:`huaweicloudsdkworkspace.v2.ListMetricsRequest`
|
|
5094
|
+
:rtype: :class:`huaweicloudsdkworkspace.v2.ListMetricsResponse`
|
|
5095
|
+
"""
|
|
5096
|
+
http_info = self._list_metrics_http_info(request)
|
|
5097
|
+
return self._call_api(**http_info)
|
|
5098
|
+
|
|
5099
|
+
def list_metrics_invoker(self, request):
|
|
5100
|
+
http_info = self._list_metrics_http_info(request)
|
|
5101
|
+
return SyncInvoker(self, http_info)
|
|
5102
|
+
|
|
5103
|
+
@classmethod
|
|
5104
|
+
def _list_metrics_http_info(cls, request):
|
|
5105
|
+
http_info = {
|
|
5106
|
+
"method": "GET",
|
|
5107
|
+
"resource_path": "/v2/{project_id}/statistics/metrics",
|
|
5108
|
+
"request_type": request.__class__.__name__,
|
|
5109
|
+
"response_type": "ListMetricsResponse"
|
|
5110
|
+
}
|
|
5111
|
+
|
|
5112
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
5113
|
+
|
|
5114
|
+
cname = None
|
|
5115
|
+
|
|
5116
|
+
collection_formats = {}
|
|
5117
|
+
|
|
5118
|
+
path_params = {}
|
|
5119
|
+
|
|
5120
|
+
query_params = []
|
|
5121
|
+
if 'start_time' in local_var_params:
|
|
5122
|
+
query_params.append(('start_time', local_var_params['start_time']))
|
|
5123
|
+
if 'end_time' in local_var_params:
|
|
5124
|
+
query_params.append(('end_time', local_var_params['end_time']))
|
|
5125
|
+
if 'dim' in local_var_params:
|
|
5126
|
+
query_params.append(('dim', local_var_params['dim']))
|
|
5127
|
+
if 'metric_names' in local_var_params:
|
|
5128
|
+
query_params.append(('metric_names', local_var_params['metric_names']))
|
|
5129
|
+
collection_formats['metric_names'] = 'csv'
|
|
5130
|
+
if 'period' in local_var_params:
|
|
5131
|
+
query_params.append(('period', local_var_params['period']))
|
|
5132
|
+
|
|
5133
|
+
header_params = {}
|
|
5134
|
+
|
|
5135
|
+
form_params = {}
|
|
5136
|
+
|
|
5137
|
+
body = None
|
|
5138
|
+
if isinstance(request, SdkStreamRequest):
|
|
5139
|
+
body = request.get_file_stream()
|
|
5140
|
+
|
|
5141
|
+
response_headers = []
|
|
5142
|
+
|
|
5143
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
5144
|
+
['application/json'])
|
|
5145
|
+
|
|
5146
|
+
auth_settings = []
|
|
5147
|
+
|
|
5148
|
+
http_info["cname"] = cname
|
|
5149
|
+
http_info["collection_formats"] = collection_formats
|
|
5150
|
+
http_info["path_params"] = path_params
|
|
5151
|
+
http_info["query_params"] = query_params
|
|
5152
|
+
http_info["header_params"] = header_params
|
|
5153
|
+
http_info["post_params"] = form_params
|
|
5154
|
+
http_info["body"] = body
|
|
5155
|
+
http_info["response_headers"] = response_headers
|
|
5156
|
+
|
|
5157
|
+
return http_info
|
|
5158
|
+
|
|
5159
|
+
def list_metrics_trend(self, request):
|
|
5160
|
+
"""查询指标趋势
|
|
5161
|
+
|
|
5162
|
+
查询指标趋势
|
|
5163
|
+
|
|
5164
|
+
Please refer to HUAWEI cloud API Explorer for details.
|
|
5165
|
+
|
|
5166
|
+
:param request: Request instance for ListMetricsTrend
|
|
5167
|
+
:type request: :class:`huaweicloudsdkworkspace.v2.ListMetricsTrendRequest`
|
|
5168
|
+
:rtype: :class:`huaweicloudsdkworkspace.v2.ListMetricsTrendResponse`
|
|
5169
|
+
"""
|
|
5170
|
+
http_info = self._list_metrics_trend_http_info(request)
|
|
5171
|
+
return self._call_api(**http_info)
|
|
5172
|
+
|
|
5173
|
+
def list_metrics_trend_invoker(self, request):
|
|
5174
|
+
http_info = self._list_metrics_trend_http_info(request)
|
|
5175
|
+
return SyncInvoker(self, http_info)
|
|
5176
|
+
|
|
5177
|
+
@classmethod
|
|
5178
|
+
def _list_metrics_trend_http_info(cls, request):
|
|
5179
|
+
http_info = {
|
|
5180
|
+
"method": "GET",
|
|
5181
|
+
"resource_path": "/v2/{project_id}/statistics/metrics/trend",
|
|
5182
|
+
"request_type": request.__class__.__name__,
|
|
5183
|
+
"response_type": "ListMetricsTrendResponse"
|
|
5184
|
+
}
|
|
5185
|
+
|
|
5186
|
+
local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
|
|
5187
|
+
|
|
5188
|
+
cname = None
|
|
5189
|
+
|
|
5190
|
+
collection_formats = {}
|
|
5191
|
+
|
|
5192
|
+
path_params = {}
|
|
5193
|
+
|
|
5194
|
+
query_params = []
|
|
5195
|
+
if 'start_time' in local_var_params:
|
|
5196
|
+
query_params.append(('start_time', local_var_params['start_time']))
|
|
5197
|
+
if 'end_time' in local_var_params:
|
|
5198
|
+
query_params.append(('end_time', local_var_params['end_time']))
|
|
5199
|
+
if 'dim' in local_var_params:
|
|
5200
|
+
query_params.append(('dim', local_var_params['dim']))
|
|
5201
|
+
if 'metric_names' in local_var_params:
|
|
5202
|
+
query_params.append(('metric_names', local_var_params['metric_names']))
|
|
5203
|
+
collection_formats['metric_names'] = 'csv'
|
|
5204
|
+
if 'period' in local_var_params:
|
|
5205
|
+
query_params.append(('period', local_var_params['period']))
|
|
5206
|
+
|
|
5207
|
+
header_params = {}
|
|
5208
|
+
|
|
5209
|
+
form_params = {}
|
|
5210
|
+
|
|
5211
|
+
body = None
|
|
5212
|
+
if isinstance(request, SdkStreamRequest):
|
|
5213
|
+
body = request.get_file_stream()
|
|
5214
|
+
|
|
5215
|
+
response_headers = []
|
|
5216
|
+
|
|
5217
|
+
header_params['Content-Type'] = http_utils.select_header_content_type(
|
|
5218
|
+
['application/json'])
|
|
5219
|
+
|
|
5220
|
+
auth_settings = []
|
|
5221
|
+
|
|
5222
|
+
http_info["cname"] = cname
|
|
5223
|
+
http_info["collection_formats"] = collection_formats
|
|
5224
|
+
http_info["path_params"] = path_params
|
|
5225
|
+
http_info["query_params"] = query_params
|
|
5226
|
+
http_info["header_params"] = header_params
|
|
5227
|
+
http_info["post_params"] = form_params
|
|
5228
|
+
http_info["body"] = body
|
|
5229
|
+
http_info["response_headers"] = response_headers
|
|
5230
|
+
|
|
5231
|
+
return http_info
|
|
5232
|
+
|
|
5085
5233
|
def list_user_usage_metric(self, request):
|
|
5086
5234
|
"""查询用户使用统计数据
|
|
5087
5235
|
|
{huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: huaweicloudsdkworkspace
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.103
|
|
4
4
|
Summary: Workspace
|
|
5
5
|
Home-page: https://github.com/huaweicloud/huaweicloud-sdk-python-v3
|
|
6
6
|
Author: HuaweiCloud SDK
|
|
@@ -22,6 +22,6 @@ Classifier: Topic :: Software Development
|
|
|
22
22
|
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: huaweicloudsdkcore >=3.1.
|
|
25
|
+
Requires-Dist: huaweicloudsdkcore >=3.1.103
|
|
26
26
|
|
|
27
27
|
See detailed information in [huaweicloud-sdk-python-v3](https://github.com/huaweicloud/huaweicloud-sdk-python-v3).
|
{huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/RECORD
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
huaweicloudsdkworkspace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
huaweicloudsdkworkspace/v2/__init__.py,sha256=
|
|
3
|
-
huaweicloudsdkworkspace/v2/workspace_async_client.py,sha256=
|
|
4
|
-
huaweicloudsdkworkspace/v2/workspace_client.py,sha256=
|
|
5
|
-
huaweicloudsdkworkspace/v2/model/__init__.py,sha256
|
|
2
|
+
huaweicloudsdkworkspace/v2/__init__.py,sha256=jTLoXTel_YnuRuH0AQrXSSZ1lQ1zzAleIDVF2ktRvLM,32819
|
|
3
|
+
huaweicloudsdkworkspace/v2/workspace_async_client.py,sha256=4R4wctCJmbJZWxlsGrBZcwPo37bGaJDSYCfbXcnlKAU,241978
|
|
4
|
+
huaweicloudsdkworkspace/v2/workspace_client.py,sha256=KGh6EcbC30hHNy0YRRJ2nDChu7qew09ixwsu6EJ7I24,242079
|
|
5
|
+
huaweicloudsdkworkspace/v2/model/__init__.py,sha256=eOe_nUVbdUrP51t7GfqXa26wlHOdR1MSPHtOPYK_7Cw,32697
|
|
6
6
|
huaweicloudsdkworkspace/v2/model/access_policy_detail_info.py,sha256=IUDhfa-8D_b5U-bHF7Mt98BokuLqc0EvkvkN0tAqK8E,6089
|
|
7
7
|
huaweicloudsdkworkspace/v2/model/access_policy_info.py,sha256=yWW3l7exK5IeiBFTzrqcIZhezqqxsCDW7v1ItMv2quo,4338
|
|
8
8
|
huaweicloudsdkworkspace/v2/model/access_policy_object.py,sha256=mw_an1YHdWcDrPlfatFKip6Ls34nF_ckN-4RqX-Zhdw,4915
|
|
@@ -201,6 +201,10 @@ huaweicloudsdkworkspace/v2/model/list_metric_notify_record_request.py,sha256=Luc
|
|
|
201
201
|
huaweicloudsdkworkspace/v2/model/list_metric_notify_record_response.py,sha256=EtBqTEbG30K99gLQ1Evu3CBMHS7AjmnxihXnh2jBq6k,4141
|
|
202
202
|
huaweicloudsdkworkspace/v2/model/list_metric_notify_rule_request.py,sha256=bmKHVplcZy_TIkfM9oS1qS2Ms_gP1gilHJGxoDK2c_4,5617
|
|
203
203
|
huaweicloudsdkworkspace/v2/model/list_metric_notify_rule_response.py,sha256=ipFTrrMaoYm0x4IhHvNLOVf836D8kcTmn9JS5DF0WVM,4081
|
|
204
|
+
huaweicloudsdkworkspace/v2/model/list_metrics_request.py,sha256=c_6EoakLKPrTEO2fv0H5FulW8NXsRbkmAR5f3_11HDI,6961
|
|
205
|
+
huaweicloudsdkworkspace/v2/model/list_metrics_response.py,sha256=w78dizBL1iZYiLQtALTk6ZNk6OaIVYlM_DjhGAcfgmw,3265
|
|
206
|
+
huaweicloudsdkworkspace/v2/model/list_metrics_trend_request.py,sha256=9l9vMlcxi00QOp_oeYsFNS_b_0t_FyiqjbSVx3AOLTQ,7013
|
|
207
|
+
huaweicloudsdkworkspace/v2/model/list_metrics_trend_response.py,sha256=weso42eGzgABV2c5odk2EHnMEGTP6nJpPBQa3cWe6JY,3350
|
|
204
208
|
huaweicloudsdkworkspace/v2/model/list_otp_devices_by_user_id_request.py,sha256=QXZlWvmVLeM8bRKnUDOl8dqvZtN10eKVxZcUGuAoywo,3082
|
|
205
209
|
huaweicloudsdkworkspace/v2/model/list_otp_devices_by_user_id_response.py,sha256=Q8Bt_O4cjiwxwdNR-4PFNCVNAB-ABj-YkPvhgtwGCok,3499
|
|
206
210
|
huaweicloudsdkworkspace/v2/model/list_products_request.py,sha256=35hut7scqurimX2dmBR-pAxBsXuJs6moe1MoDU6OcPA,9280
|
|
@@ -238,6 +242,7 @@ huaweicloudsdkworkspace/v2/model/logoff_desktops_req.py,sha256=Ty2zSgy9IoFL2T2sA
|
|
|
238
242
|
huaweicloudsdkworkspace/v2/model/match.py,sha256=dZoCKxxDKfpGQ_PlFk3AF8xAQrvdYf6UdQ0sg8rEhbo,3629
|
|
239
243
|
huaweicloudsdkworkspace/v2/model/metric.py,sha256=KTCAIRh5TfRDTC8oPcs_-9P4GUv68iX_e_vKWVjmJm0,3850
|
|
240
244
|
huaweicloudsdkworkspace/v2/model/metric_notify_rule.py,sha256=QaH9IRkLKrJBrenkX47UlBoTmZNFXqK5SgiN0Slvzac,9529
|
|
245
|
+
huaweicloudsdkworkspace/v2/model/metrics_with_time.py,sha256=a_t3n_UR82PZFRZBKpp6t46gd_v3n4eX_eJH9b8qXsw,3791
|
|
241
246
|
huaweicloudsdkworkspace/v2/model/modify_workspace_attributes_req.py,sha256=K0tV8uoz9qeTbsd8WlImBMQIQs_r4sxkcocq8YxXI6g,15719
|
|
242
247
|
huaweicloudsdkworkspace/v2/model/network_info.py,sha256=N2WSrpI_jrNS9xglxua24wl1YRD0mk964sp-rDJGisA,6831
|
|
243
248
|
huaweicloudsdkworkspace/v2/model/nic.py,sha256=JBpZxWL1oBYLvb8HznG7ozOI4WeTriq1NVH3JpvsxjY,2989
|
|
@@ -342,8 +347,8 @@ huaweicloudsdkworkspace/v2/model/volume_detail.py,sha256=EadIl0qszTD9oQEGiRlmZrb
|
|
|
342
347
|
huaweicloudsdkworkspace/v2/model/vpc.py,sha256=rKqAU5vZK4Y059h5LIFxWfWefxsgiERApZaw3Wm5qlY,4099
|
|
343
348
|
huaweicloudsdkworkspace/v2/region/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
344
349
|
huaweicloudsdkworkspace/v2/region/workspace_region.py,sha256=sQ3AfV2rupDNT_nxIFCCXOLNLg-jtEI6B4CSXUYeof8,2359
|
|
345
|
-
huaweicloudsdkworkspace-3.1.
|
|
346
|
-
huaweicloudsdkworkspace-3.1.
|
|
347
|
-
huaweicloudsdkworkspace-3.1.
|
|
348
|
-
huaweicloudsdkworkspace-3.1.
|
|
349
|
-
huaweicloudsdkworkspace-3.1.
|
|
350
|
+
huaweicloudsdkworkspace-3.1.103.dist-info/LICENSE,sha256=4_VSTLuxcsybRG9N4Isktlj1rAIBBsfl0Tjc0gBTijo,604
|
|
351
|
+
huaweicloudsdkworkspace-3.1.103.dist-info/METADATA,sha256=s0H0Yei6sRVEy5BnO505qD1vH4HqZQ0PzIVdbowxRCM,1154
|
|
352
|
+
huaweicloudsdkworkspace-3.1.103.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
353
|
+
huaweicloudsdkworkspace-3.1.103.dist-info/top_level.txt,sha256=Iqj0R-5g-jAYosVE4_il8rB8wRuaDb2fefMXUBmIAs4,24
|
|
354
|
+
huaweicloudsdkworkspace-3.1.103.dist-info/RECORD,,
|
{huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/LICENSE
RENAMED
|
File without changes
|
{huaweicloudsdkworkspace-3.1.101.dist-info → huaweicloudsdkworkspace-3.1.103.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|