huaweicloudsdkmrs 3.1.70__py2.py3-none-any.whl → 3.1.72__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.
- huaweicloudsdkmrs/v1/__init__.py +9 -0
- huaweicloudsdkmrs/v1/model/__init__.py +9 -0
- huaweicloudsdkmrs/v1/model/component_external_datasource.py +144 -0
- huaweicloudsdkmrs/v1/model/flavor_lists.py +173 -0
- huaweicloudsdkmrs/v1/model/node_constraint.py +376 -0
- huaweicloudsdkmrs/v1/model/node_constraints.py +315 -0
- huaweicloudsdkmrs/v1/model/role_deploy_meta.py +637 -0
- huaweicloudsdkmrs/v1/model/show_mrs_version_metadata_request.py +143 -0
- huaweicloudsdkmrs/v1/model/show_mrs_version_metadata_response.py +456 -0
- huaweicloudsdkmrs/v1/model/version_component.py +434 -0
- huaweicloudsdkmrs/v1/model/version_constraint.py +169 -0
- huaweicloudsdkmrs/v1/mrs_async_client.py +75 -0
- huaweicloudsdkmrs/v1/mrs_client.py +75 -0
- huaweicloudsdkmrs/v1/region/mrs_region.py +3 -0
- huaweicloudsdkmrs/v2/__init__.py +15 -0
- huaweicloudsdkmrs/v2/model/__init__.py +15 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_delete_req.py +142 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_info.py +257 -0
- huaweicloudsdkmrs/v2/model/auto_scaling_policy_v2.py +11 -12
- huaweicloudsdkmrs/v2/model/create_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/create_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/model/delete_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/delete_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/model/modify_default_tags_request_body.py +114 -0
- huaweicloudsdkmrs/v2/model/show_tag_quota_request.py +143 -0
- huaweicloudsdkmrs/v2/model/show_tag_quota_response.py +145 -0
- huaweicloudsdkmrs/v2/model/show_tag_status_request.py +114 -0
- huaweicloudsdkmrs/v2/model/show_tag_status_response.py +145 -0
- huaweicloudsdkmrs/v2/model/switch_cluster_tags_request.py +139 -0
- huaweicloudsdkmrs/v2/model/switch_cluster_tags_response.py +85 -0
- huaweicloudsdkmrs/v2/model/update_auto_scaling_policy_request.py +139 -0
- huaweicloudsdkmrs/v2/model/update_auto_scaling_policy_response.py +85 -0
- huaweicloudsdkmrs/v2/mrs_async_client.py +400 -0
- huaweicloudsdkmrs/v2/mrs_client.py +400 -0
- huaweicloudsdkmrs/v2/region/mrs_region.py +3 -0
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/METADATA +2 -2
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/RECORD +40 -16
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/LICENSE +0 -0
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/WHEEL +0 -0
- {huaweicloudsdkmrs-3.1.70.dist-info → huaweicloudsdkmrs-3.1.72.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,257 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class AutoScalingPolicyInfo:
|
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
|
+
'auto_scaling_enable': 'bool',
|
21
|
+
'min_capacity': 'int',
|
22
|
+
'max_capacity': 'int',
|
23
|
+
'resources_plans': 'list[ResourcesPlan]',
|
24
|
+
'rules': 'list[Rule]',
|
25
|
+
'tags': 'list[Tag]'
|
26
|
+
}
|
27
|
+
|
28
|
+
attribute_map = {
|
29
|
+
'auto_scaling_enable': 'auto_scaling_enable',
|
30
|
+
'min_capacity': 'min_capacity',
|
31
|
+
'max_capacity': 'max_capacity',
|
32
|
+
'resources_plans': 'resources_plans',
|
33
|
+
'rules': 'rules',
|
34
|
+
'tags': 'tags'
|
35
|
+
}
|
36
|
+
|
37
|
+
def __init__(self, auto_scaling_enable=None, min_capacity=None, max_capacity=None, resources_plans=None, rules=None, tags=None):
|
38
|
+
"""AutoScalingPolicyInfo
|
39
|
+
|
40
|
+
The model defined in huaweicloud sdk
|
41
|
+
|
42
|
+
:param auto_scaling_enable: 当前自动伸缩规则是否开启。
|
43
|
+
:type auto_scaling_enable: bool
|
44
|
+
:param min_capacity: 指定该节点组的最小保留节点数。 取值范围:[0~500]
|
45
|
+
:type min_capacity: int
|
46
|
+
:param max_capacity: 指定该节点组的最大节点数。 取值范围:[0~500]
|
47
|
+
:type max_capacity: int
|
48
|
+
:param resources_plans: 资源计划列表。若该参数为空表示不启用资源计划。 当启用弹性伸缩时,资源计划与自动伸缩规则需至少配置其中一种。
|
49
|
+
:type resources_plans: list[:class:`huaweicloudsdkmrs.v2.ResourcesPlan`]
|
50
|
+
:param rules: 自动伸缩的规则列表。 当启用弹性伸缩时,资源计划与自动伸缩规则需至少配置其中一种。
|
51
|
+
:type rules: list[:class:`huaweicloudsdkmrs.v2.Rule`]
|
52
|
+
:param tags: 弹性伸缩标签列表
|
53
|
+
:type tags: list[:class:`huaweicloudsdkmrs.v2.Tag`]
|
54
|
+
"""
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
self._auto_scaling_enable = None
|
59
|
+
self._min_capacity = None
|
60
|
+
self._max_capacity = None
|
61
|
+
self._resources_plans = None
|
62
|
+
self._rules = None
|
63
|
+
self._tags = None
|
64
|
+
self.discriminator = None
|
65
|
+
|
66
|
+
self.auto_scaling_enable = auto_scaling_enable
|
67
|
+
self.min_capacity = min_capacity
|
68
|
+
self.max_capacity = max_capacity
|
69
|
+
if resources_plans is not None:
|
70
|
+
self.resources_plans = resources_plans
|
71
|
+
if rules is not None:
|
72
|
+
self.rules = rules
|
73
|
+
if tags is not None:
|
74
|
+
self.tags = tags
|
75
|
+
|
76
|
+
@property
|
77
|
+
def auto_scaling_enable(self):
|
78
|
+
"""Gets the auto_scaling_enable of this AutoScalingPolicyInfo.
|
79
|
+
|
80
|
+
当前自动伸缩规则是否开启。
|
81
|
+
|
82
|
+
:return: The auto_scaling_enable of this AutoScalingPolicyInfo.
|
83
|
+
:rtype: bool
|
84
|
+
"""
|
85
|
+
return self._auto_scaling_enable
|
86
|
+
|
87
|
+
@auto_scaling_enable.setter
|
88
|
+
def auto_scaling_enable(self, auto_scaling_enable):
|
89
|
+
"""Sets the auto_scaling_enable of this AutoScalingPolicyInfo.
|
90
|
+
|
91
|
+
当前自动伸缩规则是否开启。
|
92
|
+
|
93
|
+
:param auto_scaling_enable: The auto_scaling_enable of this AutoScalingPolicyInfo.
|
94
|
+
:type auto_scaling_enable: bool
|
95
|
+
"""
|
96
|
+
self._auto_scaling_enable = auto_scaling_enable
|
97
|
+
|
98
|
+
@property
|
99
|
+
def min_capacity(self):
|
100
|
+
"""Gets the min_capacity of this AutoScalingPolicyInfo.
|
101
|
+
|
102
|
+
指定该节点组的最小保留节点数。 取值范围:[0~500]
|
103
|
+
|
104
|
+
:return: The min_capacity of this AutoScalingPolicyInfo.
|
105
|
+
:rtype: int
|
106
|
+
"""
|
107
|
+
return self._min_capacity
|
108
|
+
|
109
|
+
@min_capacity.setter
|
110
|
+
def min_capacity(self, min_capacity):
|
111
|
+
"""Sets the min_capacity of this AutoScalingPolicyInfo.
|
112
|
+
|
113
|
+
指定该节点组的最小保留节点数。 取值范围:[0~500]
|
114
|
+
|
115
|
+
:param min_capacity: The min_capacity of this AutoScalingPolicyInfo.
|
116
|
+
:type min_capacity: int
|
117
|
+
"""
|
118
|
+
self._min_capacity = min_capacity
|
119
|
+
|
120
|
+
@property
|
121
|
+
def max_capacity(self):
|
122
|
+
"""Gets the max_capacity of this AutoScalingPolicyInfo.
|
123
|
+
|
124
|
+
指定该节点组的最大节点数。 取值范围:[0~500]
|
125
|
+
|
126
|
+
:return: The max_capacity of this AutoScalingPolicyInfo.
|
127
|
+
:rtype: int
|
128
|
+
"""
|
129
|
+
return self._max_capacity
|
130
|
+
|
131
|
+
@max_capacity.setter
|
132
|
+
def max_capacity(self, max_capacity):
|
133
|
+
"""Sets the max_capacity of this AutoScalingPolicyInfo.
|
134
|
+
|
135
|
+
指定该节点组的最大节点数。 取值范围:[0~500]
|
136
|
+
|
137
|
+
:param max_capacity: The max_capacity of this AutoScalingPolicyInfo.
|
138
|
+
:type max_capacity: int
|
139
|
+
"""
|
140
|
+
self._max_capacity = max_capacity
|
141
|
+
|
142
|
+
@property
|
143
|
+
def resources_plans(self):
|
144
|
+
"""Gets the resources_plans of this AutoScalingPolicyInfo.
|
145
|
+
|
146
|
+
资源计划列表。若该参数为空表示不启用资源计划。 当启用弹性伸缩时,资源计划与自动伸缩规则需至少配置其中一种。
|
147
|
+
|
148
|
+
:return: The resources_plans of this AutoScalingPolicyInfo.
|
149
|
+
:rtype: list[:class:`huaweicloudsdkmrs.v2.ResourcesPlan`]
|
150
|
+
"""
|
151
|
+
return self._resources_plans
|
152
|
+
|
153
|
+
@resources_plans.setter
|
154
|
+
def resources_plans(self, resources_plans):
|
155
|
+
"""Sets the resources_plans of this AutoScalingPolicyInfo.
|
156
|
+
|
157
|
+
资源计划列表。若该参数为空表示不启用资源计划。 当启用弹性伸缩时,资源计划与自动伸缩规则需至少配置其中一种。
|
158
|
+
|
159
|
+
:param resources_plans: The resources_plans of this AutoScalingPolicyInfo.
|
160
|
+
:type resources_plans: list[:class:`huaweicloudsdkmrs.v2.ResourcesPlan`]
|
161
|
+
"""
|
162
|
+
self._resources_plans = resources_plans
|
163
|
+
|
164
|
+
@property
|
165
|
+
def rules(self):
|
166
|
+
"""Gets the rules of this AutoScalingPolicyInfo.
|
167
|
+
|
168
|
+
自动伸缩的规则列表。 当启用弹性伸缩时,资源计划与自动伸缩规则需至少配置其中一种。
|
169
|
+
|
170
|
+
:return: The rules of this AutoScalingPolicyInfo.
|
171
|
+
:rtype: list[:class:`huaweicloudsdkmrs.v2.Rule`]
|
172
|
+
"""
|
173
|
+
return self._rules
|
174
|
+
|
175
|
+
@rules.setter
|
176
|
+
def rules(self, rules):
|
177
|
+
"""Sets the rules of this AutoScalingPolicyInfo.
|
178
|
+
|
179
|
+
自动伸缩的规则列表。 当启用弹性伸缩时,资源计划与自动伸缩规则需至少配置其中一种。
|
180
|
+
|
181
|
+
:param rules: The rules of this AutoScalingPolicyInfo.
|
182
|
+
:type rules: list[:class:`huaweicloudsdkmrs.v2.Rule`]
|
183
|
+
"""
|
184
|
+
self._rules = rules
|
185
|
+
|
186
|
+
@property
|
187
|
+
def tags(self):
|
188
|
+
"""Gets the tags of this AutoScalingPolicyInfo.
|
189
|
+
|
190
|
+
弹性伸缩标签列表
|
191
|
+
|
192
|
+
:return: The tags of this AutoScalingPolicyInfo.
|
193
|
+
:rtype: list[:class:`huaweicloudsdkmrs.v2.Tag`]
|
194
|
+
"""
|
195
|
+
return self._tags
|
196
|
+
|
197
|
+
@tags.setter
|
198
|
+
def tags(self, tags):
|
199
|
+
"""Sets the tags of this AutoScalingPolicyInfo.
|
200
|
+
|
201
|
+
弹性伸缩标签列表
|
202
|
+
|
203
|
+
:param tags: The tags of this AutoScalingPolicyInfo.
|
204
|
+
:type tags: list[:class:`huaweicloudsdkmrs.v2.Tag`]
|
205
|
+
"""
|
206
|
+
self._tags = tags
|
207
|
+
|
208
|
+
def to_dict(self):
|
209
|
+
"""Returns the model properties as a dict"""
|
210
|
+
result = {}
|
211
|
+
|
212
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
213
|
+
value = getattr(self, attr)
|
214
|
+
if isinstance(value, list):
|
215
|
+
result[attr] = list(map(
|
216
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
217
|
+
value
|
218
|
+
))
|
219
|
+
elif hasattr(value, "to_dict"):
|
220
|
+
result[attr] = value.to_dict()
|
221
|
+
elif isinstance(value, dict):
|
222
|
+
result[attr] = dict(map(
|
223
|
+
lambda item: (item[0], item[1].to_dict())
|
224
|
+
if hasattr(item[1], "to_dict") else item,
|
225
|
+
value.items()
|
226
|
+
))
|
227
|
+
else:
|
228
|
+
if attr in self.sensitive_list:
|
229
|
+
result[attr] = "****"
|
230
|
+
else:
|
231
|
+
result[attr] = value
|
232
|
+
|
233
|
+
return result
|
234
|
+
|
235
|
+
def to_str(self):
|
236
|
+
"""Returns the string representation of the model"""
|
237
|
+
import simplejson as json
|
238
|
+
if six.PY2:
|
239
|
+
import sys
|
240
|
+
reload(sys)
|
241
|
+
sys.setdefaultencoding("utf-8")
|
242
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
243
|
+
|
244
|
+
def __repr__(self):
|
245
|
+
"""For `print`"""
|
246
|
+
return self.to_str()
|
247
|
+
|
248
|
+
def __eq__(self, other):
|
249
|
+
"""Returns true if both objects are equal"""
|
250
|
+
if not isinstance(other, AutoScalingPolicyInfo):
|
251
|
+
return False
|
252
|
+
|
253
|
+
return self.__dict__ == other.__dict__
|
254
|
+
|
255
|
+
def __ne__(self, other):
|
256
|
+
"""Returns true if both objects are not equal"""
|
257
|
+
return not self == other
|
@@ -19,7 +19,7 @@ class AutoScalingPolicyV2:
|
|
19
19
|
openapi_types = {
|
20
20
|
'node_group_name': 'str',
|
21
21
|
'resource_pool_name': 'str',
|
22
|
-
'auto_scaling_policy': '
|
22
|
+
'auto_scaling_policy': 'AutoScalingPolicyInfo'
|
23
23
|
}
|
24
24
|
|
25
25
|
attribute_map = {
|
@@ -33,12 +33,12 @@ class AutoScalingPolicyV2:
|
|
33
33
|
|
34
34
|
The model defined in huaweicloud sdk
|
35
35
|
|
36
|
-
:param node_group_name:
|
36
|
+
:param node_group_name: 节点组名称。必填参数。如果resource_pool_name为default,则创建节点组维度的弹性伸缩策略。如果resource_pool_name不为default,则在该节点组下创建对应资源池维度的策略。
|
37
37
|
:type node_group_name: str
|
38
|
-
:param resource_pool_name:
|
38
|
+
:param resource_pool_name: 资源池名称。必填参数。当集群版本不支持按指定资源池进行弹性伸缩时,需要填写为default资源池。不为default时删除指定资源池维度的弹性伸缩策略。
|
39
39
|
:type resource_pool_name: str
|
40
40
|
:param auto_scaling_policy:
|
41
|
-
:type auto_scaling_policy: :class:`huaweicloudsdkmrs.v2.
|
41
|
+
:type auto_scaling_policy: :class:`huaweicloudsdkmrs.v2.AutoScalingPolicyInfo`
|
42
42
|
"""
|
43
43
|
|
44
44
|
|
@@ -48,8 +48,7 @@ class AutoScalingPolicyV2:
|
|
48
48
|
self._auto_scaling_policy = None
|
49
49
|
self.discriminator = None
|
50
50
|
|
51
|
-
|
52
|
-
self.node_group_name = node_group_name
|
51
|
+
self.node_group_name = node_group_name
|
53
52
|
self.resource_pool_name = resource_pool_name
|
54
53
|
if auto_scaling_policy is not None:
|
55
54
|
self.auto_scaling_policy = auto_scaling_policy
|
@@ -58,7 +57,7 @@ class AutoScalingPolicyV2:
|
|
58
57
|
def node_group_name(self):
|
59
58
|
"""Gets the node_group_name of this AutoScalingPolicyV2.
|
60
59
|
|
61
|
-
|
60
|
+
节点组名称。必填参数。如果resource_pool_name为default,则创建节点组维度的弹性伸缩策略。如果resource_pool_name不为default,则在该节点组下创建对应资源池维度的策略。
|
62
61
|
|
63
62
|
:return: The node_group_name of this AutoScalingPolicyV2.
|
64
63
|
:rtype: str
|
@@ -69,7 +68,7 @@ class AutoScalingPolicyV2:
|
|
69
68
|
def node_group_name(self, node_group_name):
|
70
69
|
"""Sets the node_group_name of this AutoScalingPolicyV2.
|
71
70
|
|
72
|
-
|
71
|
+
节点组名称。必填参数。如果resource_pool_name为default,则创建节点组维度的弹性伸缩策略。如果resource_pool_name不为default,则在该节点组下创建对应资源池维度的策略。
|
73
72
|
|
74
73
|
:param node_group_name: The node_group_name of this AutoScalingPolicyV2.
|
75
74
|
:type node_group_name: str
|
@@ -80,7 +79,7 @@ class AutoScalingPolicyV2:
|
|
80
79
|
def resource_pool_name(self):
|
81
80
|
"""Gets the resource_pool_name of this AutoScalingPolicyV2.
|
82
81
|
|
83
|
-
|
82
|
+
资源池名称。必填参数。当集群版本不支持按指定资源池进行弹性伸缩时,需要填写为default资源池。不为default时删除指定资源池维度的弹性伸缩策略。
|
84
83
|
|
85
84
|
:return: The resource_pool_name of this AutoScalingPolicyV2.
|
86
85
|
:rtype: str
|
@@ -91,7 +90,7 @@ class AutoScalingPolicyV2:
|
|
91
90
|
def resource_pool_name(self, resource_pool_name):
|
92
91
|
"""Sets the resource_pool_name of this AutoScalingPolicyV2.
|
93
92
|
|
94
|
-
|
93
|
+
资源池名称。必填参数。当集群版本不支持按指定资源池进行弹性伸缩时,需要填写为default资源池。不为default时删除指定资源池维度的弹性伸缩策略。
|
95
94
|
|
96
95
|
:param resource_pool_name: The resource_pool_name of this AutoScalingPolicyV2.
|
97
96
|
:type resource_pool_name: str
|
@@ -103,7 +102,7 @@ class AutoScalingPolicyV2:
|
|
103
102
|
"""Gets the auto_scaling_policy of this AutoScalingPolicyV2.
|
104
103
|
|
105
104
|
:return: The auto_scaling_policy of this AutoScalingPolicyV2.
|
106
|
-
:rtype: :class:`huaweicloudsdkmrs.v2.
|
105
|
+
:rtype: :class:`huaweicloudsdkmrs.v2.AutoScalingPolicyInfo`
|
107
106
|
"""
|
108
107
|
return self._auto_scaling_policy
|
109
108
|
|
@@ -112,7 +111,7 @@ class AutoScalingPolicyV2:
|
|
112
111
|
"""Sets the auto_scaling_policy of this AutoScalingPolicyV2.
|
113
112
|
|
114
113
|
:param auto_scaling_policy: The auto_scaling_policy of this AutoScalingPolicyV2.
|
115
|
-
:type auto_scaling_policy: :class:`huaweicloudsdkmrs.v2.
|
114
|
+
:type auto_scaling_policy: :class:`huaweicloudsdkmrs.v2.AutoScalingPolicyInfo`
|
116
115
|
"""
|
117
116
|
self._auto_scaling_policy = auto_scaling_policy
|
118
117
|
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class CreateAutoScalingPolicyRequest:
|
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
|
+
'cluster_id': 'str',
|
21
|
+
'body': 'AutoScalingPolicyV2'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'cluster_id': 'cluster_id',
|
26
|
+
'body': 'body'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, cluster_id=None, body=None):
|
30
|
+
"""CreateAutoScalingPolicyRequest
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param cluster_id: 集群ID。
|
35
|
+
:type cluster_id: str
|
36
|
+
:param body: Body of the CreateAutoScalingPolicyRequest
|
37
|
+
:type body: :class:`huaweicloudsdkmrs.v2.AutoScalingPolicyV2`
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._cluster_id = None
|
43
|
+
self._body = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
self.cluster_id = cluster_id
|
47
|
+
if body is not None:
|
48
|
+
self.body = body
|
49
|
+
|
50
|
+
@property
|
51
|
+
def cluster_id(self):
|
52
|
+
"""Gets the cluster_id of this CreateAutoScalingPolicyRequest.
|
53
|
+
|
54
|
+
集群ID。
|
55
|
+
|
56
|
+
:return: The cluster_id of this CreateAutoScalingPolicyRequest.
|
57
|
+
:rtype: str
|
58
|
+
"""
|
59
|
+
return self._cluster_id
|
60
|
+
|
61
|
+
@cluster_id.setter
|
62
|
+
def cluster_id(self, cluster_id):
|
63
|
+
"""Sets the cluster_id of this CreateAutoScalingPolicyRequest.
|
64
|
+
|
65
|
+
集群ID。
|
66
|
+
|
67
|
+
:param cluster_id: The cluster_id of this CreateAutoScalingPolicyRequest.
|
68
|
+
:type cluster_id: str
|
69
|
+
"""
|
70
|
+
self._cluster_id = cluster_id
|
71
|
+
|
72
|
+
@property
|
73
|
+
def body(self):
|
74
|
+
"""Gets the body of this CreateAutoScalingPolicyRequest.
|
75
|
+
|
76
|
+
:return: The body of this CreateAutoScalingPolicyRequest.
|
77
|
+
:rtype: :class:`huaweicloudsdkmrs.v2.AutoScalingPolicyV2`
|
78
|
+
"""
|
79
|
+
return self._body
|
80
|
+
|
81
|
+
@body.setter
|
82
|
+
def body(self, body):
|
83
|
+
"""Sets the body of this CreateAutoScalingPolicyRequest.
|
84
|
+
|
85
|
+
:param body: The body of this CreateAutoScalingPolicyRequest.
|
86
|
+
:type body: :class:`huaweicloudsdkmrs.v2.AutoScalingPolicyV2`
|
87
|
+
"""
|
88
|
+
self._body = body
|
89
|
+
|
90
|
+
def to_dict(self):
|
91
|
+
"""Returns the model properties as a dict"""
|
92
|
+
result = {}
|
93
|
+
|
94
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
95
|
+
value = getattr(self, attr)
|
96
|
+
if isinstance(value, list):
|
97
|
+
result[attr] = list(map(
|
98
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
99
|
+
value
|
100
|
+
))
|
101
|
+
elif hasattr(value, "to_dict"):
|
102
|
+
result[attr] = value.to_dict()
|
103
|
+
elif isinstance(value, dict):
|
104
|
+
result[attr] = dict(map(
|
105
|
+
lambda item: (item[0], item[1].to_dict())
|
106
|
+
if hasattr(item[1], "to_dict") else item,
|
107
|
+
value.items()
|
108
|
+
))
|
109
|
+
else:
|
110
|
+
if attr in self.sensitive_list:
|
111
|
+
result[attr] = "****"
|
112
|
+
else:
|
113
|
+
result[attr] = value
|
114
|
+
|
115
|
+
return result
|
116
|
+
|
117
|
+
def to_str(self):
|
118
|
+
"""Returns the string representation of the model"""
|
119
|
+
import simplejson as json
|
120
|
+
if six.PY2:
|
121
|
+
import sys
|
122
|
+
reload(sys)
|
123
|
+
sys.setdefaultencoding("utf-8")
|
124
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
125
|
+
|
126
|
+
def __repr__(self):
|
127
|
+
"""For `print`"""
|
128
|
+
return self.to_str()
|
129
|
+
|
130
|
+
def __eq__(self, other):
|
131
|
+
"""Returns true if both objects are equal"""
|
132
|
+
if not isinstance(other, CreateAutoScalingPolicyRequest):
|
133
|
+
return False
|
134
|
+
|
135
|
+
return self.__dict__ == other.__dict__
|
136
|
+
|
137
|
+
def __ne__(self, other):
|
138
|
+
"""Returns true if both objects are not equal"""
|
139
|
+
return not self == other
|
@@ -0,0 +1,85 @@
|
|
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 CreateAutoScalingPolicyResponse(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
|
+
}
|
22
|
+
|
23
|
+
attribute_map = {
|
24
|
+
}
|
25
|
+
|
26
|
+
def __init__(self):
|
27
|
+
"""CreateAutoScalingPolicyResponse
|
28
|
+
|
29
|
+
The model defined in huaweicloud sdk
|
30
|
+
|
31
|
+
"""
|
32
|
+
|
33
|
+
super(CreateAutoScalingPolicyResponse, self).__init__()
|
34
|
+
self.discriminator = None
|
35
|
+
|
36
|
+
def to_dict(self):
|
37
|
+
"""Returns the model properties as a dict"""
|
38
|
+
result = {}
|
39
|
+
|
40
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
41
|
+
value = getattr(self, attr)
|
42
|
+
if isinstance(value, list):
|
43
|
+
result[attr] = list(map(
|
44
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
45
|
+
value
|
46
|
+
))
|
47
|
+
elif hasattr(value, "to_dict"):
|
48
|
+
result[attr] = value.to_dict()
|
49
|
+
elif isinstance(value, dict):
|
50
|
+
result[attr] = dict(map(
|
51
|
+
lambda item: (item[0], item[1].to_dict())
|
52
|
+
if hasattr(item[1], "to_dict") else item,
|
53
|
+
value.items()
|
54
|
+
))
|
55
|
+
else:
|
56
|
+
if attr in self.sensitive_list:
|
57
|
+
result[attr] = "****"
|
58
|
+
else:
|
59
|
+
result[attr] = value
|
60
|
+
|
61
|
+
return result
|
62
|
+
|
63
|
+
def to_str(self):
|
64
|
+
"""Returns the string representation of the model"""
|
65
|
+
import simplejson as json
|
66
|
+
if six.PY2:
|
67
|
+
import sys
|
68
|
+
reload(sys)
|
69
|
+
sys.setdefaultencoding("utf-8")
|
70
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
71
|
+
|
72
|
+
def __repr__(self):
|
73
|
+
"""For `print`"""
|
74
|
+
return self.to_str()
|
75
|
+
|
76
|
+
def __eq__(self, other):
|
77
|
+
"""Returns true if both objects are equal"""
|
78
|
+
if not isinstance(other, CreateAutoScalingPolicyResponse):
|
79
|
+
return False
|
80
|
+
|
81
|
+
return self.__dict__ == other.__dict__
|
82
|
+
|
83
|
+
def __ne__(self, other):
|
84
|
+
"""Returns true if both objects are not equal"""
|
85
|
+
return not self == other
|