huaweicloudsdkgaussdb 3.1.97__py2.py3-none-any.whl → 3.1.99__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 +63 -0
- huaweicloudsdkgaussdb/v3/gaussdb_async_client.py +1823 -435
- huaweicloudsdkgaussdb/v3/gaussdb_client.py +1823 -435
- huaweicloudsdkgaussdb/v3/model/__init__.py +63 -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_gauss_my_sql_proxy_route_mode_request_body.py +3 -3
- 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/proxy_update_proxy_name_request.py +114 -0
- huaweicloudsdkgaussdb/v3/model/proxy_upgrade_proxy_version_request.py +142 -0
- huaweicloudsdkgaussdb/v3/model/proxy_upgrade_version_detail.py +202 -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_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_request.py +171 -0
- huaweicloudsdkgaussdb/v3/model/show_proxy_ipgroup_response.py +170 -0
- huaweicloudsdkgaussdb/v3/model/show_proxy_version_request.py +199 -0
- huaweicloudsdkgaussdb/v3/model/show_proxy_version_response.py +174 -0
- 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_proxy_name_request.py +196 -0
- huaweicloudsdkgaussdb/v3/model/update_proxy_name_response.py +116 -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/v3/model/upgrade_proxy_version_request.py +196 -0
- huaweicloudsdkgaussdb/v3/model/upgrade_proxy_version_response.py +116 -0
- {huaweicloudsdkgaussdb-3.1.97.dist-info → huaweicloudsdkgaussdb-3.1.99.dist-info}/METADATA +2 -2
- {huaweicloudsdkgaussdb-3.1.97.dist-info → huaweicloudsdkgaussdb-3.1.99.dist-info}/RECORD +74 -11
- {huaweicloudsdkgaussdb-3.1.97.dist-info → huaweicloudsdkgaussdb-3.1.99.dist-info}/LICENSE +0 -0
- {huaweicloudsdkgaussdb-3.1.97.dist-info → huaweicloudsdkgaussdb-3.1.99.dist-info}/WHEEL +0 -0
- {huaweicloudsdkgaussdb-3.1.97.dist-info → huaweicloudsdkgaussdb-3.1.99.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,202 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class LtsConfig:
|
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
|
+
'log_type': 'str',
|
21
|
+
'lts_group_id': 'str',
|
22
|
+
'lts_stream_id': 'str',
|
23
|
+
'enabled': 'bool'
|
24
|
+
}
|
25
|
+
|
26
|
+
attribute_map = {
|
27
|
+
'log_type': 'log_type',
|
28
|
+
'lts_group_id': 'lts_group_id',
|
29
|
+
'lts_stream_id': 'lts_stream_id',
|
30
|
+
'enabled': 'enabled'
|
31
|
+
}
|
32
|
+
|
33
|
+
def __init__(self, log_type=None, lts_group_id=None, lts_stream_id=None, enabled=None):
|
34
|
+
"""LtsConfig
|
35
|
+
|
36
|
+
The model defined in huaweicloud sdk
|
37
|
+
|
38
|
+
:param log_type: 日志类型。
|
39
|
+
:type log_type: str
|
40
|
+
:param lts_group_id: 日志组ID。
|
41
|
+
:type lts_group_id: str
|
42
|
+
:param lts_stream_id: 日志流ID。
|
43
|
+
:type lts_stream_id: str
|
44
|
+
:param enabled: 是否开启
|
45
|
+
:type enabled: bool
|
46
|
+
"""
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
self._log_type = None
|
51
|
+
self._lts_group_id = None
|
52
|
+
self._lts_stream_id = None
|
53
|
+
self._enabled = None
|
54
|
+
self.discriminator = None
|
55
|
+
|
56
|
+
if log_type is not None:
|
57
|
+
self.log_type = log_type
|
58
|
+
if lts_group_id is not None:
|
59
|
+
self.lts_group_id = lts_group_id
|
60
|
+
if lts_stream_id is not None:
|
61
|
+
self.lts_stream_id = lts_stream_id
|
62
|
+
if enabled is not None:
|
63
|
+
self.enabled = enabled
|
64
|
+
|
65
|
+
@property
|
66
|
+
def log_type(self):
|
67
|
+
"""Gets the log_type of this LtsConfig.
|
68
|
+
|
69
|
+
日志类型。
|
70
|
+
|
71
|
+
:return: The log_type of this LtsConfig.
|
72
|
+
:rtype: str
|
73
|
+
"""
|
74
|
+
return self._log_type
|
75
|
+
|
76
|
+
@log_type.setter
|
77
|
+
def log_type(self, log_type):
|
78
|
+
"""Sets the log_type of this LtsConfig.
|
79
|
+
|
80
|
+
日志类型。
|
81
|
+
|
82
|
+
:param log_type: The log_type of this LtsConfig.
|
83
|
+
:type log_type: str
|
84
|
+
"""
|
85
|
+
self._log_type = log_type
|
86
|
+
|
87
|
+
@property
|
88
|
+
def lts_group_id(self):
|
89
|
+
"""Gets the lts_group_id of this LtsConfig.
|
90
|
+
|
91
|
+
日志组ID。
|
92
|
+
|
93
|
+
:return: The lts_group_id of this LtsConfig.
|
94
|
+
:rtype: str
|
95
|
+
"""
|
96
|
+
return self._lts_group_id
|
97
|
+
|
98
|
+
@lts_group_id.setter
|
99
|
+
def lts_group_id(self, lts_group_id):
|
100
|
+
"""Sets the lts_group_id of this LtsConfig.
|
101
|
+
|
102
|
+
日志组ID。
|
103
|
+
|
104
|
+
:param lts_group_id: The lts_group_id of this LtsConfig.
|
105
|
+
:type lts_group_id: str
|
106
|
+
"""
|
107
|
+
self._lts_group_id = lts_group_id
|
108
|
+
|
109
|
+
@property
|
110
|
+
def lts_stream_id(self):
|
111
|
+
"""Gets the lts_stream_id of this LtsConfig.
|
112
|
+
|
113
|
+
日志流ID。
|
114
|
+
|
115
|
+
:return: The lts_stream_id of this LtsConfig.
|
116
|
+
:rtype: str
|
117
|
+
"""
|
118
|
+
return self._lts_stream_id
|
119
|
+
|
120
|
+
@lts_stream_id.setter
|
121
|
+
def lts_stream_id(self, lts_stream_id):
|
122
|
+
"""Sets the lts_stream_id of this LtsConfig.
|
123
|
+
|
124
|
+
日志流ID。
|
125
|
+
|
126
|
+
:param lts_stream_id: The lts_stream_id of this LtsConfig.
|
127
|
+
:type lts_stream_id: str
|
128
|
+
"""
|
129
|
+
self._lts_stream_id = lts_stream_id
|
130
|
+
|
131
|
+
@property
|
132
|
+
def enabled(self):
|
133
|
+
"""Gets the enabled of this LtsConfig.
|
134
|
+
|
135
|
+
是否开启
|
136
|
+
|
137
|
+
:return: The enabled of this LtsConfig.
|
138
|
+
:rtype: bool
|
139
|
+
"""
|
140
|
+
return self._enabled
|
141
|
+
|
142
|
+
@enabled.setter
|
143
|
+
def enabled(self, enabled):
|
144
|
+
"""Sets the enabled of this LtsConfig.
|
145
|
+
|
146
|
+
是否开启
|
147
|
+
|
148
|
+
:param enabled: The enabled of this LtsConfig.
|
149
|
+
:type enabled: bool
|
150
|
+
"""
|
151
|
+
self._enabled = enabled
|
152
|
+
|
153
|
+
def to_dict(self):
|
154
|
+
"""Returns the model properties as a dict"""
|
155
|
+
result = {}
|
156
|
+
|
157
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
158
|
+
value = getattr(self, attr)
|
159
|
+
if isinstance(value, list):
|
160
|
+
result[attr] = list(map(
|
161
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
162
|
+
value
|
163
|
+
))
|
164
|
+
elif hasattr(value, "to_dict"):
|
165
|
+
result[attr] = value.to_dict()
|
166
|
+
elif isinstance(value, dict):
|
167
|
+
result[attr] = dict(map(
|
168
|
+
lambda item: (item[0], item[1].to_dict())
|
169
|
+
if hasattr(item[1], "to_dict") else item,
|
170
|
+
value.items()
|
171
|
+
))
|
172
|
+
else:
|
173
|
+
if attr in self.sensitive_list:
|
174
|
+
result[attr] = "****"
|
175
|
+
else:
|
176
|
+
result[attr] = value
|
177
|
+
|
178
|
+
return result
|
179
|
+
|
180
|
+
def to_str(self):
|
181
|
+
"""Returns the string representation of the model"""
|
182
|
+
import simplejson as json
|
183
|
+
if six.PY2:
|
184
|
+
import sys
|
185
|
+
reload(sys)
|
186
|
+
sys.setdefaultencoding("utf-8")
|
187
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
188
|
+
|
189
|
+
def __repr__(self):
|
190
|
+
"""For `print`"""
|
191
|
+
return self.to_str()
|
192
|
+
|
193
|
+
def __eq__(self, other):
|
194
|
+
"""Returns true if both objects are equal"""
|
195
|
+
if not isinstance(other, LtsConfig):
|
196
|
+
return False
|
197
|
+
|
198
|
+
return self.__dict__ == other.__dict__
|
199
|
+
|
200
|
+
def __ne__(self, other):
|
201
|
+
"""Returns true if both objects are not equal"""
|
202
|
+
return not self == other
|
@@ -0,0 +1,140 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class LtsConfigsV3:
|
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
|
+
'lts_configs': 'list[LtsConfig]',
|
21
|
+
'instance': 'InstanceLtsBasicInfo'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'lts_configs': 'lts_configs',
|
26
|
+
'instance': 'instance'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, lts_configs=None, instance=None):
|
30
|
+
"""LtsConfigsV3
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param lts_configs: LTS配置列表
|
35
|
+
:type lts_configs: list[:class:`huaweicloudsdkgaussdb.v3.LtsConfig`]
|
36
|
+
:param instance:
|
37
|
+
:type instance: :class:`huaweicloudsdkgaussdb.v3.InstanceLtsBasicInfo`
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._lts_configs = None
|
43
|
+
self._instance = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
if lts_configs is not None:
|
47
|
+
self.lts_configs = lts_configs
|
48
|
+
if instance is not None:
|
49
|
+
self.instance = instance
|
50
|
+
|
51
|
+
@property
|
52
|
+
def lts_configs(self):
|
53
|
+
"""Gets the lts_configs of this LtsConfigsV3.
|
54
|
+
|
55
|
+
LTS配置列表
|
56
|
+
|
57
|
+
:return: The lts_configs of this LtsConfigsV3.
|
58
|
+
:rtype: list[:class:`huaweicloudsdkgaussdb.v3.LtsConfig`]
|
59
|
+
"""
|
60
|
+
return self._lts_configs
|
61
|
+
|
62
|
+
@lts_configs.setter
|
63
|
+
def lts_configs(self, lts_configs):
|
64
|
+
"""Sets the lts_configs of this LtsConfigsV3.
|
65
|
+
|
66
|
+
LTS配置列表
|
67
|
+
|
68
|
+
:param lts_configs: The lts_configs of this LtsConfigsV3.
|
69
|
+
:type lts_configs: list[:class:`huaweicloudsdkgaussdb.v3.LtsConfig`]
|
70
|
+
"""
|
71
|
+
self._lts_configs = lts_configs
|
72
|
+
|
73
|
+
@property
|
74
|
+
def instance(self):
|
75
|
+
"""Gets the instance of this LtsConfigsV3.
|
76
|
+
|
77
|
+
:return: The instance of this LtsConfigsV3.
|
78
|
+
:rtype: :class:`huaweicloudsdkgaussdb.v3.InstanceLtsBasicInfo`
|
79
|
+
"""
|
80
|
+
return self._instance
|
81
|
+
|
82
|
+
@instance.setter
|
83
|
+
def instance(self, instance):
|
84
|
+
"""Sets the instance of this LtsConfigsV3.
|
85
|
+
|
86
|
+
:param instance: The instance of this LtsConfigsV3.
|
87
|
+
:type instance: :class:`huaweicloudsdkgaussdb.v3.InstanceLtsBasicInfo`
|
88
|
+
"""
|
89
|
+
self._instance = instance
|
90
|
+
|
91
|
+
def to_dict(self):
|
92
|
+
"""Returns the model properties as a dict"""
|
93
|
+
result = {}
|
94
|
+
|
95
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
96
|
+
value = getattr(self, attr)
|
97
|
+
if isinstance(value, list):
|
98
|
+
result[attr] = list(map(
|
99
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
100
|
+
value
|
101
|
+
))
|
102
|
+
elif hasattr(value, "to_dict"):
|
103
|
+
result[attr] = value.to_dict()
|
104
|
+
elif isinstance(value, dict):
|
105
|
+
result[attr] = dict(map(
|
106
|
+
lambda item: (item[0], item[1].to_dict())
|
107
|
+
if hasattr(item[1], "to_dict") else item,
|
108
|
+
value.items()
|
109
|
+
))
|
110
|
+
else:
|
111
|
+
if attr in self.sensitive_list:
|
112
|
+
result[attr] = "****"
|
113
|
+
else:
|
114
|
+
result[attr] = value
|
115
|
+
|
116
|
+
return result
|
117
|
+
|
118
|
+
def to_str(self):
|
119
|
+
"""Returns the string representation of the model"""
|
120
|
+
import simplejson as json
|
121
|
+
if six.PY2:
|
122
|
+
import sys
|
123
|
+
reload(sys)
|
124
|
+
sys.setdefaultencoding("utf-8")
|
125
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
126
|
+
|
127
|
+
def __repr__(self):
|
128
|
+
"""For `print`"""
|
129
|
+
return self.to_str()
|
130
|
+
|
131
|
+
def __eq__(self, other):
|
132
|
+
"""Returns true if both objects are equal"""
|
133
|
+
if not isinstance(other, LtsConfigsV3):
|
134
|
+
return False
|
135
|
+
|
136
|
+
return self.__dict__ == other.__dict__
|
137
|
+
|
138
|
+
def __ne__(self, other):
|
139
|
+
"""Returns true if both objects are not equal"""
|
140
|
+
return not self == other
|
@@ -45,7 +45,7 @@ class ModifyGaussMySqlProxyRouteModeRequestBody:
|
|
45
45
|
:type readonly_nodes: list[:class:`huaweicloudsdkgaussdb.v3.ModifyProxyRouteWeightReadonlyNode`]
|
46
46
|
:param new_node_auto_add_status: 是否开启新增节点自动加入该Proxy。如果需要设置是否开启新增节点自动加入该Proxy,请联系客服人员添加白名单,加入白名单后,方可输入该字段。 取值范围: - ON:开启。 - OFF:关闭。
|
47
47
|
:type new_node_auto_add_status: str
|
48
|
-
:param new_node_weight: 新增节点的读权重: - 如果路由模式为0,新增节点自动加入为ON,取值为0~1000。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。
|
48
|
+
:param new_node_weight: 新增节点的读权重: - 如果路由模式为0,新增节点自动加入为ON,取值为0~1000。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。
|
49
49
|
:type new_node_weight: int
|
50
50
|
"""
|
51
51
|
|
@@ -160,7 +160,7 @@ class ModifyGaussMySqlProxyRouteModeRequestBody:
|
|
160
160
|
def new_node_weight(self):
|
161
161
|
"""Gets the new_node_weight of this ModifyGaussMySqlProxyRouteModeRequestBody.
|
162
162
|
|
163
|
-
新增节点的读权重: - 如果路由模式为0,新增节点自动加入为ON,取值为0~1000。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。
|
163
|
+
新增节点的读权重: - 如果路由模式为0,新增节点自动加入为ON,取值为0~1000。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。
|
164
164
|
|
165
165
|
:return: The new_node_weight of this ModifyGaussMySqlProxyRouteModeRequestBody.
|
166
166
|
:rtype: int
|
@@ -171,7 +171,7 @@ class ModifyGaussMySqlProxyRouteModeRequestBody:
|
|
171
171
|
def new_node_weight(self, new_node_weight):
|
172
172
|
"""Sets the new_node_weight of this ModifyGaussMySqlProxyRouteModeRequestBody.
|
173
173
|
|
174
|
-
新增节点的读权重: - 如果路由模式为0,新增节点自动加入为ON,取值为0~1000。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。
|
174
|
+
新增节点的读权重: - 如果路由模式为0,新增节点自动加入为ON,取值为0~1000。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。 - 如果路由模式不为0或新增节点自动加入为OFF,则可不输入读权重。
|
175
175
|
|
176
176
|
:param new_node_weight: The new_node_weight of this ModifyGaussMySqlProxyRouteModeRequestBody.
|
177
177
|
:type new_node_weight: int
|
@@ -0,0 +1,196 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ModifyNodePriorityRequest:
|
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
|
+
'node_id': 'str',
|
23
|
+
'body': 'ModifyNodePriorityRequestBody'
|
24
|
+
}
|
25
|
+
|
26
|
+
attribute_map = {
|
27
|
+
'x_language': 'X-Language',
|
28
|
+
'instance_id': 'instance_id',
|
29
|
+
'node_id': 'node_id',
|
30
|
+
'body': 'body'
|
31
|
+
}
|
32
|
+
|
33
|
+
def __init__(self, x_language=None, instance_id=None, node_id=None, body=None):
|
34
|
+
"""ModifyNodePriorityRequest
|
35
|
+
|
36
|
+
The model defined in huaweicloud sdk
|
37
|
+
|
38
|
+
:param x_language: 语言。
|
39
|
+
:type x_language: str
|
40
|
+
:param instance_id: 实例ID。
|
41
|
+
:type instance_id: str
|
42
|
+
:param node_id: 节点ID。
|
43
|
+
:type node_id: str
|
44
|
+
:param body: Body of the ModifyNodePriorityRequest
|
45
|
+
:type body: :class:`huaweicloudsdkgaussdb.v3.ModifyNodePriorityRequestBody`
|
46
|
+
"""
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
self._x_language = None
|
51
|
+
self._instance_id = None
|
52
|
+
self._node_id = None
|
53
|
+
self._body = None
|
54
|
+
self.discriminator = None
|
55
|
+
|
56
|
+
if x_language is not None:
|
57
|
+
self.x_language = x_language
|
58
|
+
self.instance_id = instance_id
|
59
|
+
self.node_id = node_id
|
60
|
+
if body is not None:
|
61
|
+
self.body = body
|
62
|
+
|
63
|
+
@property
|
64
|
+
def x_language(self):
|
65
|
+
"""Gets the x_language of this ModifyNodePriorityRequest.
|
66
|
+
|
67
|
+
语言。
|
68
|
+
|
69
|
+
:return: The x_language of this ModifyNodePriorityRequest.
|
70
|
+
:rtype: str
|
71
|
+
"""
|
72
|
+
return self._x_language
|
73
|
+
|
74
|
+
@x_language.setter
|
75
|
+
def x_language(self, x_language):
|
76
|
+
"""Sets the x_language of this ModifyNodePriorityRequest.
|
77
|
+
|
78
|
+
语言。
|
79
|
+
|
80
|
+
:param x_language: The x_language of this ModifyNodePriorityRequest.
|
81
|
+
:type x_language: str
|
82
|
+
"""
|
83
|
+
self._x_language = x_language
|
84
|
+
|
85
|
+
@property
|
86
|
+
def instance_id(self):
|
87
|
+
"""Gets the instance_id of this ModifyNodePriorityRequest.
|
88
|
+
|
89
|
+
实例ID。
|
90
|
+
|
91
|
+
:return: The instance_id of this ModifyNodePriorityRequest.
|
92
|
+
:rtype: str
|
93
|
+
"""
|
94
|
+
return self._instance_id
|
95
|
+
|
96
|
+
@instance_id.setter
|
97
|
+
def instance_id(self, instance_id):
|
98
|
+
"""Sets the instance_id of this ModifyNodePriorityRequest.
|
99
|
+
|
100
|
+
实例ID。
|
101
|
+
|
102
|
+
:param instance_id: The instance_id of this ModifyNodePriorityRequest.
|
103
|
+
:type instance_id: str
|
104
|
+
"""
|
105
|
+
self._instance_id = instance_id
|
106
|
+
|
107
|
+
@property
|
108
|
+
def node_id(self):
|
109
|
+
"""Gets the node_id of this ModifyNodePriorityRequest.
|
110
|
+
|
111
|
+
节点ID。
|
112
|
+
|
113
|
+
:return: The node_id of this ModifyNodePriorityRequest.
|
114
|
+
:rtype: str
|
115
|
+
"""
|
116
|
+
return self._node_id
|
117
|
+
|
118
|
+
@node_id.setter
|
119
|
+
def node_id(self, node_id):
|
120
|
+
"""Sets the node_id of this ModifyNodePriorityRequest.
|
121
|
+
|
122
|
+
节点ID。
|
123
|
+
|
124
|
+
:param node_id: The node_id of this ModifyNodePriorityRequest.
|
125
|
+
:type node_id: str
|
126
|
+
"""
|
127
|
+
self._node_id = node_id
|
128
|
+
|
129
|
+
@property
|
130
|
+
def body(self):
|
131
|
+
"""Gets the body of this ModifyNodePriorityRequest.
|
132
|
+
|
133
|
+
:return: The body of this ModifyNodePriorityRequest.
|
134
|
+
:rtype: :class:`huaweicloudsdkgaussdb.v3.ModifyNodePriorityRequestBody`
|
135
|
+
"""
|
136
|
+
return self._body
|
137
|
+
|
138
|
+
@body.setter
|
139
|
+
def body(self, body):
|
140
|
+
"""Sets the body of this ModifyNodePriorityRequest.
|
141
|
+
|
142
|
+
:param body: The body of this ModifyNodePriorityRequest.
|
143
|
+
:type body: :class:`huaweicloudsdkgaussdb.v3.ModifyNodePriorityRequestBody`
|
144
|
+
"""
|
145
|
+
self._body = body
|
146
|
+
|
147
|
+
def to_dict(self):
|
148
|
+
"""Returns the model properties as a dict"""
|
149
|
+
result = {}
|
150
|
+
|
151
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
152
|
+
value = getattr(self, attr)
|
153
|
+
if isinstance(value, list):
|
154
|
+
result[attr] = list(map(
|
155
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
156
|
+
value
|
157
|
+
))
|
158
|
+
elif hasattr(value, "to_dict"):
|
159
|
+
result[attr] = value.to_dict()
|
160
|
+
elif isinstance(value, dict):
|
161
|
+
result[attr] = dict(map(
|
162
|
+
lambda item: (item[0], item[1].to_dict())
|
163
|
+
if hasattr(item[1], "to_dict") else item,
|
164
|
+
value.items()
|
165
|
+
))
|
166
|
+
else:
|
167
|
+
if attr in self.sensitive_list:
|
168
|
+
result[attr] = "****"
|
169
|
+
else:
|
170
|
+
result[attr] = value
|
171
|
+
|
172
|
+
return result
|
173
|
+
|
174
|
+
def to_str(self):
|
175
|
+
"""Returns the string representation of the model"""
|
176
|
+
import simplejson as json
|
177
|
+
if six.PY2:
|
178
|
+
import sys
|
179
|
+
reload(sys)
|
180
|
+
sys.setdefaultencoding("utf-8")
|
181
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
182
|
+
|
183
|
+
def __repr__(self):
|
184
|
+
"""For `print`"""
|
185
|
+
return self.to_str()
|
186
|
+
|
187
|
+
def __eq__(self, other):
|
188
|
+
"""Returns true if both objects are equal"""
|
189
|
+
if not isinstance(other, ModifyNodePriorityRequest):
|
190
|
+
return False
|
191
|
+
|
192
|
+
return self.__dict__ == other.__dict__
|
193
|
+
|
194
|
+
def __ne__(self, other):
|
195
|
+
"""Returns true if both objects are not equal"""
|
196
|
+
return not self == other
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ModifyNodePriorityRequestBody:
|
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
|
+
'priority': 'str'
|
21
|
+
}
|
22
|
+
|
23
|
+
attribute_map = {
|
24
|
+
'priority': 'priority'
|
25
|
+
}
|
26
|
+
|
27
|
+
def __init__(self, priority=None):
|
28
|
+
"""ModifyNodePriorityRequestBody
|
29
|
+
|
30
|
+
The model defined in huaweicloud sdk
|
31
|
+
|
32
|
+
:param priority: 故障倒换优先级。 故障倒换优先级的取值范围为1~16以及-1。取正数时数字越小,优先级越大,即故障倒换时,主节点会优先倒换到优先级高的只读节点上,优先级相同的只读节点选为主节点的概率相同。取-1时表示节点不参与故障倒换,当单可用区实例超过两个只读节点,或者多可用区实例修改后的可用区多于1个时可以设置成-1。
|
33
|
+
:type priority: str
|
34
|
+
"""
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
self._priority = None
|
39
|
+
self.discriminator = None
|
40
|
+
|
41
|
+
self.priority = priority
|
42
|
+
|
43
|
+
@property
|
44
|
+
def priority(self):
|
45
|
+
"""Gets the priority of this ModifyNodePriorityRequestBody.
|
46
|
+
|
47
|
+
故障倒换优先级。 故障倒换优先级的取值范围为1~16以及-1。取正数时数字越小,优先级越大,即故障倒换时,主节点会优先倒换到优先级高的只读节点上,优先级相同的只读节点选为主节点的概率相同。取-1时表示节点不参与故障倒换,当单可用区实例超过两个只读节点,或者多可用区实例修改后的可用区多于1个时可以设置成-1。
|
48
|
+
|
49
|
+
:return: The priority of this ModifyNodePriorityRequestBody.
|
50
|
+
:rtype: str
|
51
|
+
"""
|
52
|
+
return self._priority
|
53
|
+
|
54
|
+
@priority.setter
|
55
|
+
def priority(self, priority):
|
56
|
+
"""Sets the priority of this ModifyNodePriorityRequestBody.
|
57
|
+
|
58
|
+
故障倒换优先级。 故障倒换优先级的取值范围为1~16以及-1。取正数时数字越小,优先级越大,即故障倒换时,主节点会优先倒换到优先级高的只读节点上,优先级相同的只读节点选为主节点的概率相同。取-1时表示节点不参与故障倒换,当单可用区实例超过两个只读节点,或者多可用区实例修改后的可用区多于1个时可以设置成-1。
|
59
|
+
|
60
|
+
:param priority: The priority of this ModifyNodePriorityRequestBody.
|
61
|
+
:type priority: str
|
62
|
+
"""
|
63
|
+
self._priority = priority
|
64
|
+
|
65
|
+
def to_dict(self):
|
66
|
+
"""Returns the model properties as a dict"""
|
67
|
+
result = {}
|
68
|
+
|
69
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
70
|
+
value = getattr(self, attr)
|
71
|
+
if isinstance(value, list):
|
72
|
+
result[attr] = list(map(
|
73
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
74
|
+
value
|
75
|
+
))
|
76
|
+
elif hasattr(value, "to_dict"):
|
77
|
+
result[attr] = value.to_dict()
|
78
|
+
elif isinstance(value, dict):
|
79
|
+
result[attr] = dict(map(
|
80
|
+
lambda item: (item[0], item[1].to_dict())
|
81
|
+
if hasattr(item[1], "to_dict") else item,
|
82
|
+
value.items()
|
83
|
+
))
|
84
|
+
else:
|
85
|
+
if attr in self.sensitive_list:
|
86
|
+
result[attr] = "****"
|
87
|
+
else:
|
88
|
+
result[attr] = value
|
89
|
+
|
90
|
+
return result
|
91
|
+
|
92
|
+
def to_str(self):
|
93
|
+
"""Returns the string representation of the model"""
|
94
|
+
import simplejson as json
|
95
|
+
if six.PY2:
|
96
|
+
import sys
|
97
|
+
reload(sys)
|
98
|
+
sys.setdefaultencoding("utf-8")
|
99
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
100
|
+
|
101
|
+
def __repr__(self):
|
102
|
+
"""For `print`"""
|
103
|
+
return self.to_str()
|
104
|
+
|
105
|
+
def __eq__(self, other):
|
106
|
+
"""Returns true if both objects are equal"""
|
107
|
+
if not isinstance(other, ModifyNodePriorityRequestBody):
|
108
|
+
return False
|
109
|
+
|
110
|
+
return self.__dict__ == other.__dict__
|
111
|
+
|
112
|
+
def __ne__(self, other):
|
113
|
+
"""Returns true if both objects are not equal"""
|
114
|
+
return not self == other
|