huaweicloudsdkdcs 3.1.86__py2.py3-none-any.whl → 3.1.132__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 huaweicloudsdkdcs might be problematic. Click here for more details.

Files changed (56) hide show
  1. huaweicloudsdkdcs/v2/__init__.py +35 -0
  2. huaweicloudsdkdcs/v2/dcs_async_client.py +753 -28
  3. huaweicloudsdkdcs/v2/dcs_client.py +753 -28
  4. huaweicloudsdkdcs/v2/model/__init__.py +35 -0
  5. huaweicloudsdkdcs/v2/model/backup_files_body.py +2 -1
  6. huaweicloudsdkdcs/v2/model/bandwidth_auto_scaling_policy.py +257 -0
  7. huaweicloudsdkdcs/v2/model/bandwidth_info.py +61 -3
  8. huaweicloudsdkdcs/v2/model/batch_restart_migration_task_result.py +202 -0
  9. huaweicloudsdkdcs/v2/model/batch_restart_online_migration_tasks_body.py +114 -0
  10. huaweicloudsdkdcs/v2/model/batch_restart_online_migration_tasks_request.py +111 -0
  11. huaweicloudsdkdcs/v2/model/batch_restart_online_migration_tasks_response.py +116 -0
  12. huaweicloudsdkdcs/v2/model/change_nodes_start_stop_status_body.py +144 -0
  13. huaweicloudsdkdcs/v2/model/change_nodes_start_stop_status_request.py +139 -0
  14. huaweicloudsdkdcs/v2/model/change_nodes_start_stop_status_resp.py +84 -0
  15. huaweicloudsdkdcs/v2/model/change_nodes_start_stop_status_response.py +112 -0
  16. huaweicloudsdkdcs/v2/model/client_info.py +4 -4
  17. huaweicloudsdkdcs/v2/model/delete_instance_bandwidth_auto_scaling_policy_request.py +114 -0
  18. huaweicloudsdkdcs/v2/model/delete_instance_bandwidth_auto_scaling_policy_resp.py +84 -0
  19. huaweicloudsdkdcs/v2/model/delete_instance_bandwidth_auto_scaling_policy_response.py +112 -0
  20. huaweicloudsdkdcs/v2/model/delete_public_ip_request.py +114 -0
  21. huaweicloudsdkdcs/v2/model/delete_public_ip_response.py +116 -0
  22. huaweicloudsdkdcs/v2/model/details_body.py +549 -27
  23. huaweicloudsdkdcs/v2/model/group_bandwidth_info.py +231 -0
  24. huaweicloudsdkdcs/v2/model/migration_task_list.py +366 -18
  25. huaweicloudsdkdcs/v2/model/resize_instance_body.py +3 -3
  26. huaweicloudsdkdcs/v2/model/show_bandwidths_request.py +114 -0
  27. huaweicloudsdkdcs/v2/model/show_bandwidths_response.py +203 -0
  28. huaweicloudsdkdcs/v2/model/show_instance_bandwidth_auto_scaling_policy_request.py +114 -0
  29. huaweicloudsdkdcs/v2/model/show_instance_bandwidth_auto_scaling_policy_response.py +258 -0
  30. huaweicloudsdkdcs/v2/model/show_instance_version_request.py +114 -0
  31. huaweicloudsdkdcs/v2/model/show_instance_version_response.py +261 -0
  32. huaweicloudsdkdcs/v2/model/show_migration_task_response.py +264 -3
  33. huaweicloudsdkdcs/v2/model/source_instance_body.py +206 -3
  34. huaweicloudsdkdcs/v2/model/stop_migration_task_response.py +264 -3
  35. huaweicloudsdkdcs/v2/model/stop_migration_task_result.py +61 -3
  36. huaweicloudsdkdcs/v2/model/target_instance_body.py +177 -3
  37. huaweicloudsdkdcs/v2/model/update_bandwidth_info_request.py +115 -0
  38. huaweicloudsdkdcs/v2/model/update_bandwidth_request.py +139 -0
  39. huaweicloudsdkdcs/v2/model/update_bandwidth_resp.py +84 -0
  40. huaweicloudsdkdcs/v2/model/update_bandwidth_response.py +112 -0
  41. huaweicloudsdkdcs/v2/model/update_group_bandwidth_info_request.py +142 -0
  42. huaweicloudsdkdcs/v2/model/update_instance_bandwidth_auto_scaling_policy_request.py +139 -0
  43. huaweicloudsdkdcs/v2/model/update_instance_bandwidth_auto_scaling_policy_request_body.py +257 -0
  44. huaweicloudsdkdcs/v2/model/update_instance_bandwidth_auto_scaling_policy_response.py +258 -0
  45. huaweicloudsdkdcs/v2/model/update_public_ip_request.py +139 -0
  46. huaweicloudsdkdcs/v2/model/update_public_ip_request_body.py +173 -0
  47. huaweicloudsdkdcs/v2/model/update_public_ip_response.py +116 -0
  48. huaweicloudsdkdcs/v2/model/upgrade_instance_minor_version_request.py +139 -0
  49. huaweicloudsdkdcs/v2/model/upgrade_instance_minor_version_response.py +116 -0
  50. huaweicloudsdkdcs/v2/model/upgrade_minor_version_request_body.py +144 -0
  51. huaweicloudsdkdcs/v2/region/dcs_region.py +6 -0
  52. {huaweicloudsdkdcs-3.1.86.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/METADATA +2 -2
  53. {huaweicloudsdkdcs-3.1.86.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/RECORD +56 -21
  54. {huaweicloudsdkdcs-3.1.86.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/WHEEL +1 -1
  55. {huaweicloudsdkdcs-3.1.86.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/LICENSE +0 -0
  56. {huaweicloudsdkdcs-3.1.86.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,203 @@
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 ShowBandwidthsResponse(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
+ 'bandwidth': 'int',
22
+ 'max_bandwidth': 'int',
23
+ 'allow_modify': 'bool',
24
+ 'group_bandwidths': 'list[GroupBandwidthInfo]'
25
+ }
26
+
27
+ attribute_map = {
28
+ 'bandwidth': 'bandwidth',
29
+ 'max_bandwidth': 'max_bandwidth',
30
+ 'allow_modify': 'allow_modify',
31
+ 'group_bandwidths': 'group_bandwidths'
32
+ }
33
+
34
+ def __init__(self, bandwidth=None, max_bandwidth=None, allow_modify=None, group_bandwidths=None):
35
+ """ShowBandwidthsResponse
36
+
37
+ The model defined in huaweicloud sdk
38
+
39
+ :param bandwidth: 实例当前带宽(Mbit/s)。
40
+ :type bandwidth: int
41
+ :param max_bandwidth: 实例最大带宽(Mbit/s)。
42
+ :type max_bandwidth: int
43
+ :param allow_modify: 是否支持调带宽。
44
+ :type allow_modify: bool
45
+ :param group_bandwidths: 分片带宽列表。
46
+ :type group_bandwidths: list[:class:`huaweicloudsdkdcs.v2.GroupBandwidthInfo`]
47
+ """
48
+
49
+ super(ShowBandwidthsResponse, self).__init__()
50
+
51
+ self._bandwidth = None
52
+ self._max_bandwidth = None
53
+ self._allow_modify = None
54
+ self._group_bandwidths = None
55
+ self.discriminator = None
56
+
57
+ if bandwidth is not None:
58
+ self.bandwidth = bandwidth
59
+ if max_bandwidth is not None:
60
+ self.max_bandwidth = max_bandwidth
61
+ if allow_modify is not None:
62
+ self.allow_modify = allow_modify
63
+ if group_bandwidths is not None:
64
+ self.group_bandwidths = group_bandwidths
65
+
66
+ @property
67
+ def bandwidth(self):
68
+ """Gets the bandwidth of this ShowBandwidthsResponse.
69
+
70
+ 实例当前带宽(Mbit/s)。
71
+
72
+ :return: The bandwidth of this ShowBandwidthsResponse.
73
+ :rtype: int
74
+ """
75
+ return self._bandwidth
76
+
77
+ @bandwidth.setter
78
+ def bandwidth(self, bandwidth):
79
+ """Sets the bandwidth of this ShowBandwidthsResponse.
80
+
81
+ 实例当前带宽(Mbit/s)。
82
+
83
+ :param bandwidth: The bandwidth of this ShowBandwidthsResponse.
84
+ :type bandwidth: int
85
+ """
86
+ self._bandwidth = bandwidth
87
+
88
+ @property
89
+ def max_bandwidth(self):
90
+ """Gets the max_bandwidth of this ShowBandwidthsResponse.
91
+
92
+ 实例最大带宽(Mbit/s)。
93
+
94
+ :return: The max_bandwidth of this ShowBandwidthsResponse.
95
+ :rtype: int
96
+ """
97
+ return self._max_bandwidth
98
+
99
+ @max_bandwidth.setter
100
+ def max_bandwidth(self, max_bandwidth):
101
+ """Sets the max_bandwidth of this ShowBandwidthsResponse.
102
+
103
+ 实例最大带宽(Mbit/s)。
104
+
105
+ :param max_bandwidth: The max_bandwidth of this ShowBandwidthsResponse.
106
+ :type max_bandwidth: int
107
+ """
108
+ self._max_bandwidth = max_bandwidth
109
+
110
+ @property
111
+ def allow_modify(self):
112
+ """Gets the allow_modify of this ShowBandwidthsResponse.
113
+
114
+ 是否支持调带宽。
115
+
116
+ :return: The allow_modify of this ShowBandwidthsResponse.
117
+ :rtype: bool
118
+ """
119
+ return self._allow_modify
120
+
121
+ @allow_modify.setter
122
+ def allow_modify(self, allow_modify):
123
+ """Sets the allow_modify of this ShowBandwidthsResponse.
124
+
125
+ 是否支持调带宽。
126
+
127
+ :param allow_modify: The allow_modify of this ShowBandwidthsResponse.
128
+ :type allow_modify: bool
129
+ """
130
+ self._allow_modify = allow_modify
131
+
132
+ @property
133
+ def group_bandwidths(self):
134
+ """Gets the group_bandwidths of this ShowBandwidthsResponse.
135
+
136
+ 分片带宽列表。
137
+
138
+ :return: The group_bandwidths of this ShowBandwidthsResponse.
139
+ :rtype: list[:class:`huaweicloudsdkdcs.v2.GroupBandwidthInfo`]
140
+ """
141
+ return self._group_bandwidths
142
+
143
+ @group_bandwidths.setter
144
+ def group_bandwidths(self, group_bandwidths):
145
+ """Sets the group_bandwidths of this ShowBandwidthsResponse.
146
+
147
+ 分片带宽列表。
148
+
149
+ :param group_bandwidths: The group_bandwidths of this ShowBandwidthsResponse.
150
+ :type group_bandwidths: list[:class:`huaweicloudsdkdcs.v2.GroupBandwidthInfo`]
151
+ """
152
+ self._group_bandwidths = group_bandwidths
153
+
154
+ def to_dict(self):
155
+ """Returns the model properties as a dict"""
156
+ result = {}
157
+
158
+ for attr, _ in six.iteritems(self.openapi_types):
159
+ value = getattr(self, attr)
160
+ if isinstance(value, list):
161
+ result[attr] = list(map(
162
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
163
+ value
164
+ ))
165
+ elif hasattr(value, "to_dict"):
166
+ result[attr] = value.to_dict()
167
+ elif isinstance(value, dict):
168
+ result[attr] = dict(map(
169
+ lambda item: (item[0], item[1].to_dict())
170
+ if hasattr(item[1], "to_dict") else item,
171
+ value.items()
172
+ ))
173
+ else:
174
+ if attr in self.sensitive_list:
175
+ result[attr] = "****"
176
+ else:
177
+ result[attr] = value
178
+
179
+ return result
180
+
181
+ def to_str(self):
182
+ """Returns the string representation of the model"""
183
+ import simplejson as json
184
+ if six.PY2:
185
+ import sys
186
+ reload(sys)
187
+ sys.setdefaultencoding("utf-8")
188
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
189
+
190
+ def __repr__(self):
191
+ """For `print`"""
192
+ return self.to_str()
193
+
194
+ def __eq__(self, other):
195
+ """Returns true if both objects are equal"""
196
+ if not isinstance(other, ShowBandwidthsResponse):
197
+ return False
198
+
199
+ return self.__dict__ == other.__dict__
200
+
201
+ def __ne__(self, other):
202
+ """Returns true if both objects are not equal"""
203
+ 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 ShowInstanceBandwidthAutoScalingPolicyRequest:
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
+ 'instance_id': 'str'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'instance_id': 'instance_id'
25
+ }
26
+
27
+ def __init__(self, instance_id=None):
28
+ """ShowInstanceBandwidthAutoScalingPolicyRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param instance_id: 实例ID。
33
+ :type instance_id: str
34
+ """
35
+
36
+
37
+
38
+ self._instance_id = None
39
+ self.discriminator = None
40
+
41
+ self.instance_id = instance_id
42
+
43
+ @property
44
+ def instance_id(self):
45
+ """Gets the instance_id of this ShowInstanceBandwidthAutoScalingPolicyRequest.
46
+
47
+ 实例ID。
48
+
49
+ :return: The instance_id of this ShowInstanceBandwidthAutoScalingPolicyRequest.
50
+ :rtype: str
51
+ """
52
+ return self._instance_id
53
+
54
+ @instance_id.setter
55
+ def instance_id(self, instance_id):
56
+ """Sets the instance_id of this ShowInstanceBandwidthAutoScalingPolicyRequest.
57
+
58
+ 实例ID。
59
+
60
+ :param instance_id: The instance_id of this ShowInstanceBandwidthAutoScalingPolicyRequest.
61
+ :type instance_id: str
62
+ """
63
+ self._instance_id = instance_id
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, ShowInstanceBandwidthAutoScalingPolicyRequest):
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
@@ -0,0 +1,258 @@
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 ShowInstanceBandwidthAutoScalingPolicyResponse(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
+ 'window_size': 'int',
22
+ 'bandwidth_usage_upper_threshold': 'int',
23
+ 'scale_out_cooldown': 'int',
24
+ 'scale_in_enabled': 'bool',
25
+ 'bandwidth_usage_lower_threshold': 'int',
26
+ 'scale_in_cooldown': 'int'
27
+ }
28
+
29
+ attribute_map = {
30
+ 'window_size': 'window_size',
31
+ 'bandwidth_usage_upper_threshold': 'bandwidth_usage_upper_threshold',
32
+ 'scale_out_cooldown': 'scale_out_cooldown',
33
+ 'scale_in_enabled': 'scale_in_enabled',
34
+ 'bandwidth_usage_lower_threshold': 'bandwidth_usage_lower_threshold',
35
+ 'scale_in_cooldown': 'scale_in_cooldown'
36
+ }
37
+
38
+ def __init__(self, window_size=None, bandwidth_usage_upper_threshold=None, scale_out_cooldown=None, scale_in_enabled=None, bandwidth_usage_lower_threshold=None, scale_in_cooldown=None):
39
+ """ShowInstanceBandwidthAutoScalingPolicyResponse
40
+
41
+ The model defined in huaweicloud sdk
42
+
43
+ :param window_size: 带宽弹性的观测窗口,单位:分钟。支持的取值:1、5、10、15、30。
44
+ :type window_size: int
45
+ :param bandwidth_usage_upper_threshold: 触发带宽自动扩展的带宽平均使用率阈值,单位:百分比。支持的取值:50、60、70、80、90、95。
46
+ :type bandwidth_usage_upper_threshold: int
47
+ :param scale_out_cooldown: 带宽扩展操作的静默时间(两次带宽扩展操作之间的最小间隔时间),单位:秒。 默认值:0。取值范围:0~86400。
48
+ :type scale_out_cooldown: int
49
+ :param scale_in_enabled: 是否启用带宽自动回缩。默认值:false。该参数暂未启用。
50
+ :type scale_in_enabled: bool
51
+ :param bandwidth_usage_lower_threshold: 触发带宽自动回缩的带宽平均使用率阈值,单位:百分比。支持的取值:10、20、30。该参数暂未启用。
52
+ :type bandwidth_usage_lower_threshold: int
53
+ :param scale_in_cooldown: 带宽回缩操作的静默时间(两次带宽回缩操作之间的最小间隔时间),单位:秒。该参数暂未启用。 默认值:300。取值范围:0~86400。
54
+ :type scale_in_cooldown: int
55
+ """
56
+
57
+ super(ShowInstanceBandwidthAutoScalingPolicyResponse, self).__init__()
58
+
59
+ self._window_size = None
60
+ self._bandwidth_usage_upper_threshold = None
61
+ self._scale_out_cooldown = None
62
+ self._scale_in_enabled = None
63
+ self._bandwidth_usage_lower_threshold = None
64
+ self._scale_in_cooldown = None
65
+ self.discriminator = None
66
+
67
+ self.window_size = window_size
68
+ self.bandwidth_usage_upper_threshold = bandwidth_usage_upper_threshold
69
+ self.scale_out_cooldown = scale_out_cooldown
70
+ if scale_in_enabled is not None:
71
+ self.scale_in_enabled = scale_in_enabled
72
+ if bandwidth_usage_lower_threshold is not None:
73
+ self.bandwidth_usage_lower_threshold = bandwidth_usage_lower_threshold
74
+ if scale_in_cooldown is not None:
75
+ self.scale_in_cooldown = scale_in_cooldown
76
+
77
+ @property
78
+ def window_size(self):
79
+ """Gets the window_size of this ShowInstanceBandwidthAutoScalingPolicyResponse.
80
+
81
+ 带宽弹性的观测窗口,单位:分钟。支持的取值:1、5、10、15、30。
82
+
83
+ :return: The window_size of this ShowInstanceBandwidthAutoScalingPolicyResponse.
84
+ :rtype: int
85
+ """
86
+ return self._window_size
87
+
88
+ @window_size.setter
89
+ def window_size(self, window_size):
90
+ """Sets the window_size of this ShowInstanceBandwidthAutoScalingPolicyResponse.
91
+
92
+ 带宽弹性的观测窗口,单位:分钟。支持的取值:1、5、10、15、30。
93
+
94
+ :param window_size: The window_size of this ShowInstanceBandwidthAutoScalingPolicyResponse.
95
+ :type window_size: int
96
+ """
97
+ self._window_size = window_size
98
+
99
+ @property
100
+ def bandwidth_usage_upper_threshold(self):
101
+ """Gets the bandwidth_usage_upper_threshold of this ShowInstanceBandwidthAutoScalingPolicyResponse.
102
+
103
+ 触发带宽自动扩展的带宽平均使用率阈值,单位:百分比。支持的取值:50、60、70、80、90、95。
104
+
105
+ :return: The bandwidth_usage_upper_threshold of this ShowInstanceBandwidthAutoScalingPolicyResponse.
106
+ :rtype: int
107
+ """
108
+ return self._bandwidth_usage_upper_threshold
109
+
110
+ @bandwidth_usage_upper_threshold.setter
111
+ def bandwidth_usage_upper_threshold(self, bandwidth_usage_upper_threshold):
112
+ """Sets the bandwidth_usage_upper_threshold of this ShowInstanceBandwidthAutoScalingPolicyResponse.
113
+
114
+ 触发带宽自动扩展的带宽平均使用率阈值,单位:百分比。支持的取值:50、60、70、80、90、95。
115
+
116
+ :param bandwidth_usage_upper_threshold: The bandwidth_usage_upper_threshold of this ShowInstanceBandwidthAutoScalingPolicyResponse.
117
+ :type bandwidth_usage_upper_threshold: int
118
+ """
119
+ self._bandwidth_usage_upper_threshold = bandwidth_usage_upper_threshold
120
+
121
+ @property
122
+ def scale_out_cooldown(self):
123
+ """Gets the scale_out_cooldown of this ShowInstanceBandwidthAutoScalingPolicyResponse.
124
+
125
+ 带宽扩展操作的静默时间(两次带宽扩展操作之间的最小间隔时间),单位:秒。 默认值:0。取值范围:0~86400。
126
+
127
+ :return: The scale_out_cooldown of this ShowInstanceBandwidthAutoScalingPolicyResponse.
128
+ :rtype: int
129
+ """
130
+ return self._scale_out_cooldown
131
+
132
+ @scale_out_cooldown.setter
133
+ def scale_out_cooldown(self, scale_out_cooldown):
134
+ """Sets the scale_out_cooldown of this ShowInstanceBandwidthAutoScalingPolicyResponse.
135
+
136
+ 带宽扩展操作的静默时间(两次带宽扩展操作之间的最小间隔时间),单位:秒。 默认值:0。取值范围:0~86400。
137
+
138
+ :param scale_out_cooldown: The scale_out_cooldown of this ShowInstanceBandwidthAutoScalingPolicyResponse.
139
+ :type scale_out_cooldown: int
140
+ """
141
+ self._scale_out_cooldown = scale_out_cooldown
142
+
143
+ @property
144
+ def scale_in_enabled(self):
145
+ """Gets the scale_in_enabled of this ShowInstanceBandwidthAutoScalingPolicyResponse.
146
+
147
+ 是否启用带宽自动回缩。默认值:false。该参数暂未启用。
148
+
149
+ :return: The scale_in_enabled of this ShowInstanceBandwidthAutoScalingPolicyResponse.
150
+ :rtype: bool
151
+ """
152
+ return self._scale_in_enabled
153
+
154
+ @scale_in_enabled.setter
155
+ def scale_in_enabled(self, scale_in_enabled):
156
+ """Sets the scale_in_enabled of this ShowInstanceBandwidthAutoScalingPolicyResponse.
157
+
158
+ 是否启用带宽自动回缩。默认值:false。该参数暂未启用。
159
+
160
+ :param scale_in_enabled: The scale_in_enabled of this ShowInstanceBandwidthAutoScalingPolicyResponse.
161
+ :type scale_in_enabled: bool
162
+ """
163
+ self._scale_in_enabled = scale_in_enabled
164
+
165
+ @property
166
+ def bandwidth_usage_lower_threshold(self):
167
+ """Gets the bandwidth_usage_lower_threshold of this ShowInstanceBandwidthAutoScalingPolicyResponse.
168
+
169
+ 触发带宽自动回缩的带宽平均使用率阈值,单位:百分比。支持的取值:10、20、30。该参数暂未启用。
170
+
171
+ :return: The bandwidth_usage_lower_threshold of this ShowInstanceBandwidthAutoScalingPolicyResponse.
172
+ :rtype: int
173
+ """
174
+ return self._bandwidth_usage_lower_threshold
175
+
176
+ @bandwidth_usage_lower_threshold.setter
177
+ def bandwidth_usage_lower_threshold(self, bandwidth_usage_lower_threshold):
178
+ """Sets the bandwidth_usage_lower_threshold of this ShowInstanceBandwidthAutoScalingPolicyResponse.
179
+
180
+ 触发带宽自动回缩的带宽平均使用率阈值,单位:百分比。支持的取值:10、20、30。该参数暂未启用。
181
+
182
+ :param bandwidth_usage_lower_threshold: The bandwidth_usage_lower_threshold of this ShowInstanceBandwidthAutoScalingPolicyResponse.
183
+ :type bandwidth_usage_lower_threshold: int
184
+ """
185
+ self._bandwidth_usage_lower_threshold = bandwidth_usage_lower_threshold
186
+
187
+ @property
188
+ def scale_in_cooldown(self):
189
+ """Gets the scale_in_cooldown of this ShowInstanceBandwidthAutoScalingPolicyResponse.
190
+
191
+ 带宽回缩操作的静默时间(两次带宽回缩操作之间的最小间隔时间),单位:秒。该参数暂未启用。 默认值:300。取值范围:0~86400。
192
+
193
+ :return: The scale_in_cooldown of this ShowInstanceBandwidthAutoScalingPolicyResponse.
194
+ :rtype: int
195
+ """
196
+ return self._scale_in_cooldown
197
+
198
+ @scale_in_cooldown.setter
199
+ def scale_in_cooldown(self, scale_in_cooldown):
200
+ """Sets the scale_in_cooldown of this ShowInstanceBandwidthAutoScalingPolicyResponse.
201
+
202
+ 带宽回缩操作的静默时间(两次带宽回缩操作之间的最小间隔时间),单位:秒。该参数暂未启用。 默认值:300。取值范围:0~86400。
203
+
204
+ :param scale_in_cooldown: The scale_in_cooldown of this ShowInstanceBandwidthAutoScalingPolicyResponse.
205
+ :type scale_in_cooldown: int
206
+ """
207
+ self._scale_in_cooldown = scale_in_cooldown
208
+
209
+ def to_dict(self):
210
+ """Returns the model properties as a dict"""
211
+ result = {}
212
+
213
+ for attr, _ in six.iteritems(self.openapi_types):
214
+ value = getattr(self, attr)
215
+ if isinstance(value, list):
216
+ result[attr] = list(map(
217
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
218
+ value
219
+ ))
220
+ elif hasattr(value, "to_dict"):
221
+ result[attr] = value.to_dict()
222
+ elif isinstance(value, dict):
223
+ result[attr] = dict(map(
224
+ lambda item: (item[0], item[1].to_dict())
225
+ if hasattr(item[1], "to_dict") else item,
226
+ value.items()
227
+ ))
228
+ else:
229
+ if attr in self.sensitive_list:
230
+ result[attr] = "****"
231
+ else:
232
+ result[attr] = value
233
+
234
+ return result
235
+
236
+ def to_str(self):
237
+ """Returns the string representation of the model"""
238
+ import simplejson as json
239
+ if six.PY2:
240
+ import sys
241
+ reload(sys)
242
+ sys.setdefaultencoding("utf-8")
243
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
244
+
245
+ def __repr__(self):
246
+ """For `print`"""
247
+ return self.to_str()
248
+
249
+ def __eq__(self, other):
250
+ """Returns true if both objects are equal"""
251
+ if not isinstance(other, ShowInstanceBandwidthAutoScalingPolicyResponse):
252
+ return False
253
+
254
+ return self.__dict__ == other.__dict__
255
+
256
+ def __ne__(self, other):
257
+ """Returns true if both objects are not equal"""
258
+ 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 ShowInstanceVersionRequest:
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
+ 'instance_id': 'str'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'instance_id': 'instance_id'
25
+ }
26
+
27
+ def __init__(self, instance_id=None):
28
+ """ShowInstanceVersionRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param instance_id: 实例ID。
33
+ :type instance_id: str
34
+ """
35
+
36
+
37
+
38
+ self._instance_id = None
39
+ self.discriminator = None
40
+
41
+ self.instance_id = instance_id
42
+
43
+ @property
44
+ def instance_id(self):
45
+ """Gets the instance_id of this ShowInstanceVersionRequest.
46
+
47
+ 实例ID。
48
+
49
+ :return: The instance_id of this ShowInstanceVersionRequest.
50
+ :rtype: str
51
+ """
52
+ return self._instance_id
53
+
54
+ @instance_id.setter
55
+ def instance_id(self, instance_id):
56
+ """Sets the instance_id of this ShowInstanceVersionRequest.
57
+
58
+ 实例ID。
59
+
60
+ :param instance_id: The instance_id of this ShowInstanceVersionRequest.
61
+ :type instance_id: str
62
+ """
63
+ self._instance_id = instance_id
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, ShowInstanceVersionRequest):
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