huaweicloudsdkgaussdb 3.1.98__py2.py3-none-any.whl → 3.1.100__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.
- huaweicloudsdkgaussdb/v3/__init__.py +52 -0
- huaweicloudsdkgaussdb/v3/gaussdb_async_client.py +1151 -45
- huaweicloudsdkgaussdb/v3/gaussdb_client.py +1151 -45
- huaweicloudsdkgaussdb/v3/model/__init__.py +52 -0
- huaweicloudsdkgaussdb/v3/model/auto_scaling_record_info.py +318 -0
- huaweicloudsdkgaussdb/v3/model/create_lts_configs.py +114 -0
- huaweicloudsdkgaussdb/v3/model/create_lts_configs_request.py +140 -0
- huaweicloudsdkgaussdb/v3/model/create_lts_configs_response.py +85 -0
- huaweicloudsdkgaussdb/v3/model/delete_lts_configs_request.py +140 -0
- huaweicloudsdkgaussdb/v3/model/delete_lts_configs_request_body.py +114 -0
- huaweicloudsdkgaussdb/v3/model/delete_lts_configs_response.py +85 -0
- huaweicloudsdkgaussdb/v3/model/instance_delete_lts_config.py +142 -0
- huaweicloudsdkgaussdb/v3/model/instance_lts_basic_info.py +318 -0
- huaweicloudsdkgaussdb/v3/model/instance_save_lts_config.py +198 -0
- huaweicloudsdkgaussdb/v3/model/ip_group_item.py +142 -0
- huaweicloudsdkgaussdb/v3/model/list_params_template_apply_history_request.py +172 -0
- huaweicloudsdkgaussdb/v3/model/list_params_template_apply_history_response.py +145 -0
- huaweicloudsdkgaussdb/v3/model/list_recycle_instances_request.py +173 -0
- huaweicloudsdkgaussdb/v3/model/list_recycle_instances_response.py +145 -0
- huaweicloudsdkgaussdb/v3/model/lts_config.py +202 -0
- huaweicloudsdkgaussdb/v3/model/lts_configs_v3.py +140 -0
- huaweicloudsdkgaussdb/v3/model/modify_node_priority_request.py +196 -0
- huaweicloudsdkgaussdb/v3/model/modify_node_priority_request_body.py +114 -0
- huaweicloudsdkgaussdb/v3/model/modify_node_priority_response.py +116 -0
- huaweicloudsdkgaussdb/v3/model/mysql_update_instance_name_request.py +32 -3
- huaweicloudsdkgaussdb/v3/model/proxy_configuration.py +260 -0
- huaweicloudsdkgaussdb/v3/model/proxy_ip_group_detail.py +170 -0
- huaweicloudsdkgaussdb/v3/model/recycle_instance_v3.py +579 -0
- huaweicloudsdkgaussdb/v3/model/recycle_policy.py +114 -0
- huaweicloudsdkgaussdb/v3/model/rename_instance_node_request.py +168 -0
- huaweicloudsdkgaussdb/v3/model/rename_instance_node_request_body.py +114 -0
- huaweicloudsdkgaussdb/v3/model/rename_instance_node_response.py +116 -0
- huaweicloudsdkgaussdb/v3/model/restart_proxy_instance_request.py +171 -0
- huaweicloudsdkgaussdb/v3/model/restart_proxy_instance_response.py +116 -0
- huaweicloudsdkgaussdb/v3/model/set_recycle_policy_request.py +140 -0
- huaweicloudsdkgaussdb/v3/model/set_recycle_policy_request_body.py +111 -0
- huaweicloudsdkgaussdb/v3/model/set_recycle_policy_response.py +85 -0
- huaweicloudsdkgaussdb/v3/model/show_auto_scaling_history_request.py +201 -0
- huaweicloudsdkgaussdb/v3/model/show_auto_scaling_history_response.py +145 -0
- huaweicloudsdkgaussdb/v3/model/show_dedicated_resource_info_response.py +18 -18
- huaweicloudsdkgaussdb/v3/model/show_instance_eip_request.py +143 -0
- huaweicloudsdkgaussdb/v3/model/show_instance_eip_response.py +493 -0
- huaweicloudsdkgaussdb/v3/model/show_lts_configs_request.py +260 -0
- huaweicloudsdkgaussdb/v3/model/show_lts_configs_response.py +145 -0
- huaweicloudsdkgaussdb/v3/model/show_proxy_configurations_request.py +258 -0
- huaweicloudsdkgaussdb/v3/model/show_proxy_configurations_response.py +145 -0
- huaweicloudsdkgaussdb/v3/model/show_proxy_ipgroup_response.py +5 -9
- huaweicloudsdkgaussdb/v3/model/show_recycle_policy_request.py +115 -0
- huaweicloudsdkgaussdb/v3/model/show_recycle_policy_response.py +112 -0
- huaweicloudsdkgaussdb/v3/model/show_slowlog_sensitive_status_request.py +143 -0
- huaweicloudsdkgaussdb/v3/model/show_slowlog_sensitive_status_response.py +116 -0
- huaweicloudsdkgaussdb/v3/model/single_node_info.py +142 -0
- huaweicloudsdkgaussdb/v3/model/template_apply_history.py +231 -0
- huaweicloudsdkgaussdb/v3/model/update_serverless_policy.py +142 -0
- huaweicloudsdkgaussdb/v3/model/update_serverless_policy_request.py +168 -0
- huaweicloudsdkgaussdb/v3/model/update_serverless_policy_response.py +85 -0
- huaweicloudsdkgaussdb/v3/model/update_slowlog_sensitive_switch_request.py +168 -0
- huaweicloudsdkgaussdb/v3/model/update_slowlog_sensitive_switch_request_body.py +114 -0
- huaweicloudsdkgaussdb/v3/model/update_slowlog_sensitive_switch_response.py +85 -0
- {huaweicloudsdkgaussdb-3.1.98.dist-info → huaweicloudsdkgaussdb-3.1.100.dist-info}/METADATA +2 -2
- {huaweicloudsdkgaussdb-3.1.98.dist-info → huaweicloudsdkgaussdb-3.1.100.dist-info}/RECORD +64 -12
- {huaweicloudsdkgaussdb-3.1.98.dist-info → huaweicloudsdkgaussdb-3.1.100.dist-info}/LICENSE +0 -0
- {huaweicloudsdkgaussdb-3.1.98.dist-info → huaweicloudsdkgaussdb-3.1.100.dist-info}/WHEEL +0 -0
- {huaweicloudsdkgaussdb-3.1.98.dist-info → huaweicloudsdkgaussdb-3.1.100.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,142 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class SingleNodeInfo:
|
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
|
+
'node_id': 'str',
|
21
|
+
'name': 'str'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'node_id': 'node_id',
|
26
|
+
'name': 'name'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, node_id=None, name=None):
|
30
|
+
"""SingleNodeInfo
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param node_id: 节点ID。
|
35
|
+
:type node_id: str
|
36
|
+
:param name: 节点名称。支持中文、数字、字母、连接符-和_,长度为4-128。
|
37
|
+
:type name: str
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._node_id = None
|
43
|
+
self._name = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
self.node_id = node_id
|
47
|
+
self.name = name
|
48
|
+
|
49
|
+
@property
|
50
|
+
def node_id(self):
|
51
|
+
"""Gets the node_id of this SingleNodeInfo.
|
52
|
+
|
53
|
+
节点ID。
|
54
|
+
|
55
|
+
:return: The node_id of this SingleNodeInfo.
|
56
|
+
:rtype: str
|
57
|
+
"""
|
58
|
+
return self._node_id
|
59
|
+
|
60
|
+
@node_id.setter
|
61
|
+
def node_id(self, node_id):
|
62
|
+
"""Sets the node_id of this SingleNodeInfo.
|
63
|
+
|
64
|
+
节点ID。
|
65
|
+
|
66
|
+
:param node_id: The node_id of this SingleNodeInfo.
|
67
|
+
:type node_id: str
|
68
|
+
"""
|
69
|
+
self._node_id = node_id
|
70
|
+
|
71
|
+
@property
|
72
|
+
def name(self):
|
73
|
+
"""Gets the name of this SingleNodeInfo.
|
74
|
+
|
75
|
+
节点名称。支持中文、数字、字母、连接符-和_,长度为4-128。
|
76
|
+
|
77
|
+
:return: The name of this SingleNodeInfo.
|
78
|
+
:rtype: str
|
79
|
+
"""
|
80
|
+
return self._name
|
81
|
+
|
82
|
+
@name.setter
|
83
|
+
def name(self, name):
|
84
|
+
"""Sets the name of this SingleNodeInfo.
|
85
|
+
|
86
|
+
节点名称。支持中文、数字、字母、连接符-和_,长度为4-128。
|
87
|
+
|
88
|
+
:param name: The name of this SingleNodeInfo.
|
89
|
+
:type name: str
|
90
|
+
"""
|
91
|
+
self._name = name
|
92
|
+
|
93
|
+
def to_dict(self):
|
94
|
+
"""Returns the model properties as a dict"""
|
95
|
+
result = {}
|
96
|
+
|
97
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
98
|
+
value = getattr(self, attr)
|
99
|
+
if isinstance(value, list):
|
100
|
+
result[attr] = list(map(
|
101
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
102
|
+
value
|
103
|
+
))
|
104
|
+
elif hasattr(value, "to_dict"):
|
105
|
+
result[attr] = value.to_dict()
|
106
|
+
elif isinstance(value, dict):
|
107
|
+
result[attr] = dict(map(
|
108
|
+
lambda item: (item[0], item[1].to_dict())
|
109
|
+
if hasattr(item[1], "to_dict") else item,
|
110
|
+
value.items()
|
111
|
+
))
|
112
|
+
else:
|
113
|
+
if attr in self.sensitive_list:
|
114
|
+
result[attr] = "****"
|
115
|
+
else:
|
116
|
+
result[attr] = value
|
117
|
+
|
118
|
+
return result
|
119
|
+
|
120
|
+
def to_str(self):
|
121
|
+
"""Returns the string representation of the model"""
|
122
|
+
import simplejson as json
|
123
|
+
if six.PY2:
|
124
|
+
import sys
|
125
|
+
reload(sys)
|
126
|
+
sys.setdefaultencoding("utf-8")
|
127
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
128
|
+
|
129
|
+
def __repr__(self):
|
130
|
+
"""For `print`"""
|
131
|
+
return self.to_str()
|
132
|
+
|
133
|
+
def __eq__(self, other):
|
134
|
+
"""Returns true if both objects are equal"""
|
135
|
+
if not isinstance(other, SingleNodeInfo):
|
136
|
+
return False
|
137
|
+
|
138
|
+
return self.__dict__ == other.__dict__
|
139
|
+
|
140
|
+
def __ne__(self, other):
|
141
|
+
"""Returns true if both objects are not equal"""
|
142
|
+
return not self == other
|
@@ -0,0 +1,231 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class TemplateApplyHistory:
|
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
|
+
'target_id': 'str',
|
21
|
+
'target_name': 'str',
|
22
|
+
'apply_result': 'str',
|
23
|
+
'applied_at': 'float',
|
24
|
+
'error_code': 'str'
|
25
|
+
}
|
26
|
+
|
27
|
+
attribute_map = {
|
28
|
+
'target_id': 'target_id',
|
29
|
+
'target_name': 'target_name',
|
30
|
+
'apply_result': 'apply_result',
|
31
|
+
'applied_at': 'applied_at',
|
32
|
+
'error_code': 'error_code'
|
33
|
+
}
|
34
|
+
|
35
|
+
def __init__(self, target_id=None, target_name=None, apply_result=None, applied_at=None, error_code=None):
|
36
|
+
"""TemplateApplyHistory
|
37
|
+
|
38
|
+
The model defined in huaweicloud sdk
|
39
|
+
|
40
|
+
:param target_id: 应用实例ID。
|
41
|
+
:type target_id: str
|
42
|
+
:param target_name: 应用实例名称。
|
43
|
+
:type target_name: str
|
44
|
+
:param apply_result: 应用结果。
|
45
|
+
:type apply_result: str
|
46
|
+
:param applied_at: 应用时间。
|
47
|
+
:type applied_at: float
|
48
|
+
:param error_code: 错误码。
|
49
|
+
:type error_code: str
|
50
|
+
"""
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
self._target_id = None
|
55
|
+
self._target_name = None
|
56
|
+
self._apply_result = None
|
57
|
+
self._applied_at = None
|
58
|
+
self._error_code = None
|
59
|
+
self.discriminator = None
|
60
|
+
|
61
|
+
if target_id is not None:
|
62
|
+
self.target_id = target_id
|
63
|
+
if target_name is not None:
|
64
|
+
self.target_name = target_name
|
65
|
+
if apply_result is not None:
|
66
|
+
self.apply_result = apply_result
|
67
|
+
if applied_at is not None:
|
68
|
+
self.applied_at = applied_at
|
69
|
+
if error_code is not None:
|
70
|
+
self.error_code = error_code
|
71
|
+
|
72
|
+
@property
|
73
|
+
def target_id(self):
|
74
|
+
"""Gets the target_id of this TemplateApplyHistory.
|
75
|
+
|
76
|
+
应用实例ID。
|
77
|
+
|
78
|
+
:return: The target_id of this TemplateApplyHistory.
|
79
|
+
:rtype: str
|
80
|
+
"""
|
81
|
+
return self._target_id
|
82
|
+
|
83
|
+
@target_id.setter
|
84
|
+
def target_id(self, target_id):
|
85
|
+
"""Sets the target_id of this TemplateApplyHistory.
|
86
|
+
|
87
|
+
应用实例ID。
|
88
|
+
|
89
|
+
:param target_id: The target_id of this TemplateApplyHistory.
|
90
|
+
:type target_id: str
|
91
|
+
"""
|
92
|
+
self._target_id = target_id
|
93
|
+
|
94
|
+
@property
|
95
|
+
def target_name(self):
|
96
|
+
"""Gets the target_name of this TemplateApplyHistory.
|
97
|
+
|
98
|
+
应用实例名称。
|
99
|
+
|
100
|
+
:return: The target_name of this TemplateApplyHistory.
|
101
|
+
:rtype: str
|
102
|
+
"""
|
103
|
+
return self._target_name
|
104
|
+
|
105
|
+
@target_name.setter
|
106
|
+
def target_name(self, target_name):
|
107
|
+
"""Sets the target_name of this TemplateApplyHistory.
|
108
|
+
|
109
|
+
应用实例名称。
|
110
|
+
|
111
|
+
:param target_name: The target_name of this TemplateApplyHistory.
|
112
|
+
:type target_name: str
|
113
|
+
"""
|
114
|
+
self._target_name = target_name
|
115
|
+
|
116
|
+
@property
|
117
|
+
def apply_result(self):
|
118
|
+
"""Gets the apply_result of this TemplateApplyHistory.
|
119
|
+
|
120
|
+
应用结果。
|
121
|
+
|
122
|
+
:return: The apply_result of this TemplateApplyHistory.
|
123
|
+
:rtype: str
|
124
|
+
"""
|
125
|
+
return self._apply_result
|
126
|
+
|
127
|
+
@apply_result.setter
|
128
|
+
def apply_result(self, apply_result):
|
129
|
+
"""Sets the apply_result of this TemplateApplyHistory.
|
130
|
+
|
131
|
+
应用结果。
|
132
|
+
|
133
|
+
:param apply_result: The apply_result of this TemplateApplyHistory.
|
134
|
+
:type apply_result: str
|
135
|
+
"""
|
136
|
+
self._apply_result = apply_result
|
137
|
+
|
138
|
+
@property
|
139
|
+
def applied_at(self):
|
140
|
+
"""Gets the applied_at of this TemplateApplyHistory.
|
141
|
+
|
142
|
+
应用时间。
|
143
|
+
|
144
|
+
:return: The applied_at of this TemplateApplyHistory.
|
145
|
+
:rtype: float
|
146
|
+
"""
|
147
|
+
return self._applied_at
|
148
|
+
|
149
|
+
@applied_at.setter
|
150
|
+
def applied_at(self, applied_at):
|
151
|
+
"""Sets the applied_at of this TemplateApplyHistory.
|
152
|
+
|
153
|
+
应用时间。
|
154
|
+
|
155
|
+
:param applied_at: The applied_at of this TemplateApplyHistory.
|
156
|
+
:type applied_at: float
|
157
|
+
"""
|
158
|
+
self._applied_at = applied_at
|
159
|
+
|
160
|
+
@property
|
161
|
+
def error_code(self):
|
162
|
+
"""Gets the error_code of this TemplateApplyHistory.
|
163
|
+
|
164
|
+
错误码。
|
165
|
+
|
166
|
+
:return: The error_code of this TemplateApplyHistory.
|
167
|
+
:rtype: str
|
168
|
+
"""
|
169
|
+
return self._error_code
|
170
|
+
|
171
|
+
@error_code.setter
|
172
|
+
def error_code(self, error_code):
|
173
|
+
"""Sets the error_code of this TemplateApplyHistory.
|
174
|
+
|
175
|
+
错误码。
|
176
|
+
|
177
|
+
:param error_code: The error_code of this TemplateApplyHistory.
|
178
|
+
:type error_code: str
|
179
|
+
"""
|
180
|
+
self._error_code = error_code
|
181
|
+
|
182
|
+
def to_dict(self):
|
183
|
+
"""Returns the model properties as a dict"""
|
184
|
+
result = {}
|
185
|
+
|
186
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
187
|
+
value = getattr(self, attr)
|
188
|
+
if isinstance(value, list):
|
189
|
+
result[attr] = list(map(
|
190
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
191
|
+
value
|
192
|
+
))
|
193
|
+
elif hasattr(value, "to_dict"):
|
194
|
+
result[attr] = value.to_dict()
|
195
|
+
elif isinstance(value, dict):
|
196
|
+
result[attr] = dict(map(
|
197
|
+
lambda item: (item[0], item[1].to_dict())
|
198
|
+
if hasattr(item[1], "to_dict") else item,
|
199
|
+
value.items()
|
200
|
+
))
|
201
|
+
else:
|
202
|
+
if attr in self.sensitive_list:
|
203
|
+
result[attr] = "****"
|
204
|
+
else:
|
205
|
+
result[attr] = value
|
206
|
+
|
207
|
+
return result
|
208
|
+
|
209
|
+
def to_str(self):
|
210
|
+
"""Returns the string representation of the model"""
|
211
|
+
import simplejson as json
|
212
|
+
if six.PY2:
|
213
|
+
import sys
|
214
|
+
reload(sys)
|
215
|
+
sys.setdefaultencoding("utf-8")
|
216
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
217
|
+
|
218
|
+
def __repr__(self):
|
219
|
+
"""For `print`"""
|
220
|
+
return self.to_str()
|
221
|
+
|
222
|
+
def __eq__(self, other):
|
223
|
+
"""Returns true if both objects are equal"""
|
224
|
+
if not isinstance(other, TemplateApplyHistory):
|
225
|
+
return False
|
226
|
+
|
227
|
+
return self.__dict__ == other.__dict__
|
228
|
+
|
229
|
+
def __ne__(self, other):
|
230
|
+
"""Returns true if both objects are not equal"""
|
231
|
+
return not self == other
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class UpdateServerlessPolicy:
|
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
|
+
'min_vcpus': 'int',
|
21
|
+
'max_vcpus': 'int'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'min_vcpus': 'min_vcpus',
|
26
|
+
'max_vcpus': 'max_vcpus'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, min_vcpus=None, max_vcpus=None):
|
30
|
+
"""UpdateServerlessPolicy
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param min_vcpus: 单节点VCPUs伸缩下限,取值范围可根据[查询数据库规格](https://support.huaweicloud.com/api-gaussdb/ShowGaussMySqlFlavors.html)接口获取。
|
35
|
+
:type min_vcpus: int
|
36
|
+
:param max_vcpus: 单节点VCPUs伸缩上限,取值范围可根据[查询数据库规格](https://support.huaweicloud.com/api-gaussdb/ShowGaussMySqlFlavors.html)接口获取。
|
37
|
+
:type max_vcpus: int
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._min_vcpus = None
|
43
|
+
self._max_vcpus = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
self.min_vcpus = min_vcpus
|
47
|
+
self.max_vcpus = max_vcpus
|
48
|
+
|
49
|
+
@property
|
50
|
+
def min_vcpus(self):
|
51
|
+
"""Gets the min_vcpus of this UpdateServerlessPolicy.
|
52
|
+
|
53
|
+
单节点VCPUs伸缩下限,取值范围可根据[查询数据库规格](https://support.huaweicloud.com/api-gaussdb/ShowGaussMySqlFlavors.html)接口获取。
|
54
|
+
|
55
|
+
:return: The min_vcpus of this UpdateServerlessPolicy.
|
56
|
+
:rtype: int
|
57
|
+
"""
|
58
|
+
return self._min_vcpus
|
59
|
+
|
60
|
+
@min_vcpus.setter
|
61
|
+
def min_vcpus(self, min_vcpus):
|
62
|
+
"""Sets the min_vcpus of this UpdateServerlessPolicy.
|
63
|
+
|
64
|
+
单节点VCPUs伸缩下限,取值范围可根据[查询数据库规格](https://support.huaweicloud.com/api-gaussdb/ShowGaussMySqlFlavors.html)接口获取。
|
65
|
+
|
66
|
+
:param min_vcpus: The min_vcpus of this UpdateServerlessPolicy.
|
67
|
+
:type min_vcpus: int
|
68
|
+
"""
|
69
|
+
self._min_vcpus = min_vcpus
|
70
|
+
|
71
|
+
@property
|
72
|
+
def max_vcpus(self):
|
73
|
+
"""Gets the max_vcpus of this UpdateServerlessPolicy.
|
74
|
+
|
75
|
+
单节点VCPUs伸缩上限,取值范围可根据[查询数据库规格](https://support.huaweicloud.com/api-gaussdb/ShowGaussMySqlFlavors.html)接口获取。
|
76
|
+
|
77
|
+
:return: The max_vcpus of this UpdateServerlessPolicy.
|
78
|
+
:rtype: int
|
79
|
+
"""
|
80
|
+
return self._max_vcpus
|
81
|
+
|
82
|
+
@max_vcpus.setter
|
83
|
+
def max_vcpus(self, max_vcpus):
|
84
|
+
"""Sets the max_vcpus of this UpdateServerlessPolicy.
|
85
|
+
|
86
|
+
单节点VCPUs伸缩上限,取值范围可根据[查询数据库规格](https://support.huaweicloud.com/api-gaussdb/ShowGaussMySqlFlavors.html)接口获取。
|
87
|
+
|
88
|
+
:param max_vcpus: The max_vcpus of this UpdateServerlessPolicy.
|
89
|
+
:type max_vcpus: int
|
90
|
+
"""
|
91
|
+
self._max_vcpus = max_vcpus
|
92
|
+
|
93
|
+
def to_dict(self):
|
94
|
+
"""Returns the model properties as a dict"""
|
95
|
+
result = {}
|
96
|
+
|
97
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
98
|
+
value = getattr(self, attr)
|
99
|
+
if isinstance(value, list):
|
100
|
+
result[attr] = list(map(
|
101
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
102
|
+
value
|
103
|
+
))
|
104
|
+
elif hasattr(value, "to_dict"):
|
105
|
+
result[attr] = value.to_dict()
|
106
|
+
elif isinstance(value, dict):
|
107
|
+
result[attr] = dict(map(
|
108
|
+
lambda item: (item[0], item[1].to_dict())
|
109
|
+
if hasattr(item[1], "to_dict") else item,
|
110
|
+
value.items()
|
111
|
+
))
|
112
|
+
else:
|
113
|
+
if attr in self.sensitive_list:
|
114
|
+
result[attr] = "****"
|
115
|
+
else:
|
116
|
+
result[attr] = value
|
117
|
+
|
118
|
+
return result
|
119
|
+
|
120
|
+
def to_str(self):
|
121
|
+
"""Returns the string representation of the model"""
|
122
|
+
import simplejson as json
|
123
|
+
if six.PY2:
|
124
|
+
import sys
|
125
|
+
reload(sys)
|
126
|
+
sys.setdefaultencoding("utf-8")
|
127
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
128
|
+
|
129
|
+
def __repr__(self):
|
130
|
+
"""For `print`"""
|
131
|
+
return self.to_str()
|
132
|
+
|
133
|
+
def __eq__(self, other):
|
134
|
+
"""Returns true if both objects are equal"""
|
135
|
+
if not isinstance(other, UpdateServerlessPolicy):
|
136
|
+
return False
|
137
|
+
|
138
|
+
return self.__dict__ == other.__dict__
|
139
|
+
|
140
|
+
def __ne__(self, other):
|
141
|
+
"""Returns true if both objects are not equal"""
|
142
|
+
return not self == other
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class UpdateServerlessPolicyRequest:
|
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
|
+
'x_language': 'str',
|
21
|
+
'instance_id': 'str',
|
22
|
+
'body': 'UpdateServerlessPolicy'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'x_language': 'X-Language',
|
27
|
+
'instance_id': 'instance_id',
|
28
|
+
'body': 'body'
|
29
|
+
}
|
30
|
+
|
31
|
+
def __init__(self, x_language=None, instance_id=None, body=None):
|
32
|
+
"""UpdateServerlessPolicyRequest
|
33
|
+
|
34
|
+
The model defined in huaweicloud sdk
|
35
|
+
|
36
|
+
:param x_language: 语言。
|
37
|
+
:type x_language: str
|
38
|
+
:param instance_id: 实例ID。
|
39
|
+
:type instance_id: str
|
40
|
+
:param body: Body of the UpdateServerlessPolicyRequest
|
41
|
+
:type body: :class:`huaweicloudsdkgaussdb.v3.UpdateServerlessPolicy`
|
42
|
+
"""
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
self._x_language = None
|
47
|
+
self._instance_id = None
|
48
|
+
self._body = None
|
49
|
+
self.discriminator = None
|
50
|
+
|
51
|
+
if x_language is not None:
|
52
|
+
self.x_language = x_language
|
53
|
+
self.instance_id = instance_id
|
54
|
+
if body is not None:
|
55
|
+
self.body = body
|
56
|
+
|
57
|
+
@property
|
58
|
+
def x_language(self):
|
59
|
+
"""Gets the x_language of this UpdateServerlessPolicyRequest.
|
60
|
+
|
61
|
+
语言。
|
62
|
+
|
63
|
+
:return: The x_language of this UpdateServerlessPolicyRequest.
|
64
|
+
:rtype: str
|
65
|
+
"""
|
66
|
+
return self._x_language
|
67
|
+
|
68
|
+
@x_language.setter
|
69
|
+
def x_language(self, x_language):
|
70
|
+
"""Sets the x_language of this UpdateServerlessPolicyRequest.
|
71
|
+
|
72
|
+
语言。
|
73
|
+
|
74
|
+
:param x_language: The x_language of this UpdateServerlessPolicyRequest.
|
75
|
+
:type x_language: str
|
76
|
+
"""
|
77
|
+
self._x_language = x_language
|
78
|
+
|
79
|
+
@property
|
80
|
+
def instance_id(self):
|
81
|
+
"""Gets the instance_id of this UpdateServerlessPolicyRequest.
|
82
|
+
|
83
|
+
实例ID。
|
84
|
+
|
85
|
+
:return: The instance_id of this UpdateServerlessPolicyRequest.
|
86
|
+
:rtype: str
|
87
|
+
"""
|
88
|
+
return self._instance_id
|
89
|
+
|
90
|
+
@instance_id.setter
|
91
|
+
def instance_id(self, instance_id):
|
92
|
+
"""Sets the instance_id of this UpdateServerlessPolicyRequest.
|
93
|
+
|
94
|
+
实例ID。
|
95
|
+
|
96
|
+
:param instance_id: The instance_id of this UpdateServerlessPolicyRequest.
|
97
|
+
:type instance_id: str
|
98
|
+
"""
|
99
|
+
self._instance_id = instance_id
|
100
|
+
|
101
|
+
@property
|
102
|
+
def body(self):
|
103
|
+
"""Gets the body of this UpdateServerlessPolicyRequest.
|
104
|
+
|
105
|
+
:return: The body of this UpdateServerlessPolicyRequest.
|
106
|
+
:rtype: :class:`huaweicloudsdkgaussdb.v3.UpdateServerlessPolicy`
|
107
|
+
"""
|
108
|
+
return self._body
|
109
|
+
|
110
|
+
@body.setter
|
111
|
+
def body(self, body):
|
112
|
+
"""Sets the body of this UpdateServerlessPolicyRequest.
|
113
|
+
|
114
|
+
:param body: The body of this UpdateServerlessPolicyRequest.
|
115
|
+
:type body: :class:`huaweicloudsdkgaussdb.v3.UpdateServerlessPolicy`
|
116
|
+
"""
|
117
|
+
self._body = body
|
118
|
+
|
119
|
+
def to_dict(self):
|
120
|
+
"""Returns the model properties as a dict"""
|
121
|
+
result = {}
|
122
|
+
|
123
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
124
|
+
value = getattr(self, attr)
|
125
|
+
if isinstance(value, list):
|
126
|
+
result[attr] = list(map(
|
127
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
128
|
+
value
|
129
|
+
))
|
130
|
+
elif hasattr(value, "to_dict"):
|
131
|
+
result[attr] = value.to_dict()
|
132
|
+
elif isinstance(value, dict):
|
133
|
+
result[attr] = dict(map(
|
134
|
+
lambda item: (item[0], item[1].to_dict())
|
135
|
+
if hasattr(item[1], "to_dict") else item,
|
136
|
+
value.items()
|
137
|
+
))
|
138
|
+
else:
|
139
|
+
if attr in self.sensitive_list:
|
140
|
+
result[attr] = "****"
|
141
|
+
else:
|
142
|
+
result[attr] = value
|
143
|
+
|
144
|
+
return result
|
145
|
+
|
146
|
+
def to_str(self):
|
147
|
+
"""Returns the string representation of the model"""
|
148
|
+
import simplejson as json
|
149
|
+
if six.PY2:
|
150
|
+
import sys
|
151
|
+
reload(sys)
|
152
|
+
sys.setdefaultencoding("utf-8")
|
153
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
154
|
+
|
155
|
+
def __repr__(self):
|
156
|
+
"""For `print`"""
|
157
|
+
return self.to_str()
|
158
|
+
|
159
|
+
def __eq__(self, other):
|
160
|
+
"""Returns true if both objects are equal"""
|
161
|
+
if not isinstance(other, UpdateServerlessPolicyRequest):
|
162
|
+
return False
|
163
|
+
|
164
|
+
return self.__dict__ == other.__dict__
|
165
|
+
|
166
|
+
def __ne__(self, other):
|
167
|
+
"""Returns true if both objects are not equal"""
|
168
|
+
return not self == other
|