huaweicloudsdkclouddc 3.1.176__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.
Files changed (143) hide show
  1. huaweicloudsdkclouddc/__init__.py +0 -0
  2. huaweicloudsdkclouddc/v1/__init__.py +140 -0
  3. huaweicloudsdkclouddc/v1/clouddc_async_client.py +2255 -0
  4. huaweicloudsdkclouddc/v1/clouddc_client.py +2252 -0
  5. huaweicloudsdkclouddc/v1/model/__init__.py +137 -0
  6. huaweicloudsdkclouddc/v1/model/alarm_daily_trend.py +166 -0
  7. huaweicloudsdkclouddc/v1/model/alarm_device_info.py +137 -0
  8. huaweicloudsdkclouddc/v1/model/alarm_group.py +166 -0
  9. huaweicloudsdkclouddc/v1/model/alarm_history.py +336 -0
  10. huaweicloudsdkclouddc/v1/model/alarm_host.py +166 -0
  11. huaweicloudsdkclouddc/v1/model/alarm_info.py +166 -0
  12. huaweicloudsdkclouddc/v1/model/alarm_level_info.py +137 -0
  13. huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_request.py +132 -0
  14. huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_response.py +81 -0
  15. huaweicloudsdkclouddc/v1/model/batch_create_tags_request.py +160 -0
  16. huaweicloudsdkclouddc/v1/model/batch_create_tags_response.py +81 -0
  17. huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_request.py +132 -0
  18. huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_response.py +81 -0
  19. huaweicloudsdkclouddc/v1/model/batch_delete_options.py +108 -0
  20. huaweicloudsdkclouddc/v1/model/batch_delete_tags_request.py +160 -0
  21. huaweicloudsdkclouddc/v1/model/batch_delete_tags_response.py +81 -0
  22. huaweicloudsdkclouddc/v1/model/capacity_bytes.py +77 -0
  23. huaweicloudsdkclouddc/v1/model/change_instance_password_options.py +136 -0
  24. huaweicloudsdkclouddc/v1/model/change_instance_password_request.py +104 -0
  25. huaweicloudsdkclouddc/v1/model/change_instance_password_response.py +112 -0
  26. huaweicloudsdkclouddc/v1/model/change_server_power_state_request.py +104 -0
  27. huaweicloudsdkclouddc/v1/model/change_server_power_state_response.py +112 -0
  28. huaweicloudsdkclouddc/v1/model/create_instance_opitons.py +302 -0
  29. huaweicloudsdkclouddc/v1/model/create_instance_opitons_placement.py +108 -0
  30. huaweicloudsdkclouddc/v1/model/create_instance_request.py +104 -0
  31. huaweicloudsdkclouddc/v1/model/create_instance_response.py +112 -0
  32. huaweicloudsdkclouddc/v1/model/delete_instance_request.py +107 -0
  33. huaweicloudsdkclouddc/v1/model/delete_instance_response.py +108 -0
  34. huaweicloudsdkclouddc/v1/model/delete_instances_request.py +104 -0
  35. huaweicloudsdkclouddc/v1/model/delete_instances_response.py +112 -0
  36. huaweicloudsdkclouddc/v1/model/dimension.py +137 -0
  37. huaweicloudsdkclouddc/v1/model/download_server_logs_request.py +135 -0
  38. huaweicloudsdkclouddc/v1/model/download_server_logs_response.py +158 -0
  39. huaweicloudsdkclouddc/v1/model/drive.py +630 -0
  40. huaweicloudsdkclouddc/v1/model/error_status.py +163 -0
  41. huaweicloudsdkclouddc/v1/model/event_info.py +311 -0
  42. huaweicloudsdkclouddc/v1/model/export_server_logs_request.py +107 -0
  43. huaweicloudsdkclouddc/v1/model/export_server_logs_response.py +274 -0
  44. huaweicloudsdkclouddc/v1/model/fan.py +278 -0
  45. huaweicloudsdkclouddc/v1/model/fault_host_info.py +166 -0
  46. huaweicloudsdkclouddc/v1/model/firmware_details.py +195 -0
  47. huaweicloudsdkclouddc/v1/model/hardware_metric.py +137 -0
  48. huaweicloudsdkclouddc/v1/model/hardware_summary.py +221 -0
  49. huaweicloudsdkclouddc/v1/model/health.py +83 -0
  50. huaweicloudsdkclouddc/v1/model/i_dc.py +201 -0
  51. huaweicloudsdkclouddc/v1/model/i_rack.py +514 -0
  52. huaweicloudsdkclouddc/v1/model/i_rack_request.py +108 -0
  53. huaweicloudsdkclouddc/v1/model/image.py +163 -0
  54. huaweicloudsdkclouddc/v1/model/image_id.py +77 -0
  55. huaweicloudsdkclouddc/v1/model/instance.py +273 -0
  56. huaweicloudsdkclouddc/v1/model/instance_id.py +77 -0
  57. huaweicloudsdkclouddc/v1/model/instance_state.py +89 -0
  58. huaweicloudsdkclouddc/v1/model/list_alarms_request.py +340 -0
  59. huaweicloudsdkclouddc/v1/model/list_alarms_response.py +141 -0
  60. huaweicloudsdkclouddc/v1/model/list_events_request.py +251 -0
  61. huaweicloudsdkclouddc/v1/model/list_events_response.py +141 -0
  62. huaweicloudsdkclouddc/v1/model/list_i_dcs_request.py +194 -0
  63. huaweicloudsdkclouddc/v1/model/list_i_dcs_response.py +133 -0
  64. huaweicloudsdkclouddc/v1/model/list_i_racks_request.py +194 -0
  65. huaweicloudsdkclouddc/v1/model/list_i_racks_response.py +133 -0
  66. huaweicloudsdkclouddc/v1/model/list_instances_request.py +224 -0
  67. huaweicloudsdkclouddc/v1/model/list_instances_response.py +166 -0
  68. huaweicloudsdkclouddc/v1/model/list_servers_request.py +166 -0
  69. huaweicloudsdkclouddc/v1/model/list_servers_response.py +166 -0
  70. huaweicloudsdkclouddc/v1/model/location.py +166 -0
  71. huaweicloudsdkclouddc/v1/model/manage_state.py +84 -0
  72. huaweicloudsdkclouddc/v1/model/memory.py +572 -0
  73. huaweicloudsdkclouddc/v1/model/metric.py +137 -0
  74. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request.py +132 -0
  75. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body.py +137 -0
  76. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body_nics.py +136 -0
  77. huaweicloudsdkclouddc/v1/model/modify_instance_ip_response.py +81 -0
  78. huaweicloudsdkclouddc/v1/model/network_adapter.py +485 -0
  79. huaweicloudsdkclouddc/v1/model/network_interface.py +136 -0
  80. huaweicloudsdkclouddc/v1/model/network_port.py +340 -0
  81. huaweicloudsdkclouddc/v1/model/page_info.py +166 -0
  82. huaweicloudsdkclouddc/v1/model/password.py +77 -0
  83. huaweicloudsdkclouddc/v1/model/physical_server.py +395 -0
  84. huaweicloudsdkclouddc/v1/model/power.py +481 -0
  85. huaweicloudsdkclouddc/v1/model/power_action.py +136 -0
  86. huaweicloudsdkclouddc/v1/model/power_state.py +84 -0
  87. huaweicloudsdkclouddc/v1/model/processors.py +630 -0
  88. huaweicloudsdkclouddc/v1/model/query_instance_response_body.py +492 -0
  89. huaweicloudsdkclouddc/v1/model/reinstall_os_options.py +165 -0
  90. huaweicloudsdkclouddc/v1/model/reinstall_os_request.py +104 -0
  91. huaweicloudsdkclouddc/v1/model/reinstall_os_response.py +112 -0
  92. huaweicloudsdkclouddc/v1/model/resource_name.py +77 -0
  93. huaweicloudsdkclouddc/v1/model/resource_tags.py +108 -0
  94. huaweicloudsdkclouddc/v1/model/resource_uuid.py +77 -0
  95. huaweicloudsdkclouddc/v1/model/run_instances_options.py +360 -0
  96. huaweicloudsdkclouddc/v1/model/run_instances_options_network_interfaces.py +107 -0
  97. huaweicloudsdkclouddc/v1/model/run_instances_options_placement.py +108 -0
  98. huaweicloudsdkclouddc/v1/model/run_instances_request.py +104 -0
  99. huaweicloudsdkclouddc/v1/model/run_instances_response.py +112 -0
  100. huaweicloudsdkclouddc/v1/model/sas_address.py +77 -0
  101. huaweicloudsdkclouddc/v1/model/server_instance_id_set.py +108 -0
  102. huaweicloudsdkclouddc/v1/model/server_power_status.py +164 -0
  103. huaweicloudsdkclouddc/v1/model/server_state.py +135 -0
  104. huaweicloudsdkclouddc/v1/model/server_status.py +272 -0
  105. huaweicloudsdkclouddc/v1/model/servers_response_physical_servers.py +108 -0
  106. huaweicloudsdkclouddc/v1/model/show_alarm_summary_request.py +77 -0
  107. huaweicloudsdkclouddc/v1/model/show_alarm_summary_response.py +199 -0
  108. huaweicloudsdkclouddc/v1/model/show_alarm_trend_request.py +135 -0
  109. huaweicloudsdkclouddc/v1/model/show_alarm_trend_response.py +141 -0
  110. huaweicloudsdkclouddc/v1/model/show_event_request.py +107 -0
  111. huaweicloudsdkclouddc/v1/model/show_event_response.py +373 -0
  112. huaweicloudsdkclouddc/v1/model/show_instance_status_request.py +107 -0
  113. huaweicloudsdkclouddc/v1/model/show_instance_status_response.py +133 -0
  114. huaweicloudsdkclouddc/v1/model/show_logs_export_status_request.py +135 -0
  115. huaweicloudsdkclouddc/v1/model/show_logs_export_status_response.py +199 -0
  116. huaweicloudsdkclouddc/v1/model/show_remote_console_request.py +107 -0
  117. huaweicloudsdkclouddc/v1/model/show_remote_console_response.py +112 -0
  118. huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_request.py +107 -0
  119. huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_response.py +112 -0
  120. huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_request.py +107 -0
  121. huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_response.py +311 -0
  122. huaweicloudsdkclouddc/v1/model/show_server_request.py +107 -0
  123. huaweicloudsdkclouddc/v1/model/show_server_response.py +407 -0
  124. huaweicloudsdkclouddc/v1/model/show_server_status_request.py +77 -0
  125. huaweicloudsdkclouddc/v1/model/show_server_status_response.py +133 -0
  126. huaweicloudsdkclouddc/v1/model/state.py +82 -0
  127. huaweicloudsdkclouddc/v1/model/status.py +129 -0
  128. huaweicloudsdkclouddc/v1/model/storage_controller.py +601 -0
  129. huaweicloudsdkclouddc/v1/model/tag.py +136 -0
  130. huaweicloudsdkclouddc/v1/model/update_i_dcs_request.py +104 -0
  131. huaweicloudsdkclouddc/v1/model/update_i_dcs_response.py +108 -0
  132. huaweicloudsdkclouddc/v1/model/update_i_rack_request.py +132 -0
  133. huaweicloudsdkclouddc/v1/model/update_i_rack_response.py +108 -0
  134. huaweicloudsdkclouddc/v1/model/user_data.py +77 -0
  135. huaweicloudsdkclouddc/v1/model/volume.py +452 -0
  136. huaweicloudsdkclouddc/v1/model/volume_status.py +133 -0
  137. huaweicloudsdkclouddc/v1/model/vpc_id.py +77 -0
  138. huaweicloudsdkclouddc/v1/region/__init__.py +0 -0
  139. huaweicloudsdkclouddc/v1/region/clouddc_region.py +40 -0
  140. huaweicloudsdkclouddc-3.1.176.dist-info/METADATA +25 -0
  141. huaweicloudsdkclouddc-3.1.176.dist-info/RECORD +143 -0
  142. huaweicloudsdkclouddc-3.1.176.dist-info/WHEEL +4 -0
  143. huaweicloudsdkclouddc-3.1.176.dist-info/licenses/LICENSE +13 -0
@@ -0,0 +1,137 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class Metric:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'metric_name': 'str',
19
+ 'dimensions': 'list[Dimension]'
20
+ }
21
+
22
+ attribute_map = {
23
+ 'metric_name': 'metric_name',
24
+ 'dimensions': 'dimensions'
25
+ }
26
+
27
+ def __init__(self, metric_name=None, dimensions=None):
28
+ r"""Metric
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param metric_name: 资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)。
33
+ :type metric_name: str
34
+ :param dimensions: 资源维度
35
+ :type dimensions: list[:class:`huaweicloudsdkclouddc.v1.Dimension`]
36
+ """
37
+
38
+
39
+
40
+ self._metric_name = None
41
+ self._dimensions = None
42
+ self.discriminator = None
43
+
44
+ if metric_name is not None:
45
+ self.metric_name = metric_name
46
+ if dimensions is not None:
47
+ self.dimensions = dimensions
48
+
49
+ @property
50
+ def metric_name(self):
51
+ r"""Gets the metric_name of this Metric.
52
+
53
+ 资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)。
54
+
55
+ :return: The metric_name of this Metric.
56
+ :rtype: str
57
+ """
58
+ return self._metric_name
59
+
60
+ @metric_name.setter
61
+ def metric_name(self, metric_name):
62
+ r"""Sets the metric_name of this Metric.
63
+
64
+ 资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)。
65
+
66
+ :param metric_name: The metric_name of this Metric.
67
+ :type metric_name: str
68
+ """
69
+ self._metric_name = metric_name
70
+
71
+ @property
72
+ def dimensions(self):
73
+ r"""Gets the dimensions of this Metric.
74
+
75
+ 资源维度
76
+
77
+ :return: The dimensions of this Metric.
78
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.Dimension`]
79
+ """
80
+ return self._dimensions
81
+
82
+ @dimensions.setter
83
+ def dimensions(self, dimensions):
84
+ r"""Sets the dimensions of this Metric.
85
+
86
+ 资源维度
87
+
88
+ :param dimensions: The dimensions of this Metric.
89
+ :type dimensions: list[:class:`huaweicloudsdkclouddc.v1.Dimension`]
90
+ """
91
+ self._dimensions = dimensions
92
+
93
+ def to_dict(self):
94
+ result = {}
95
+
96
+ for attr, _ in self.openapi_types.items():
97
+ value = getattr(self, attr)
98
+ if isinstance(value, list):
99
+ result[attr] = list(map(
100
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
101
+ value
102
+ ))
103
+ elif hasattr(value, "to_dict"):
104
+ result[attr] = value.to_dict()
105
+ elif isinstance(value, dict):
106
+ result[attr] = dict(map(
107
+ lambda item: (item[0], item[1].to_dict())
108
+ if hasattr(item[1], "to_dict") else item,
109
+ value.items()
110
+ ))
111
+ else:
112
+ if attr in self.sensitive_list:
113
+ result[attr] = "****"
114
+ else:
115
+ result[attr] = value
116
+
117
+ return result
118
+
119
+ def to_str(self):
120
+ """Returns the string representation of the model"""
121
+ import simplejson as json
122
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
123
+
124
+ def __repr__(self):
125
+ """For `print`"""
126
+ return self.to_str()
127
+
128
+ def __eq__(self, other):
129
+ """Returns true if both objects are equal"""
130
+ if not isinstance(other, Metric):
131
+ return False
132
+
133
+ return self.__dict__ == other.__dict__
134
+
135
+ def __ne__(self, other):
136
+ """Returns true if both objects are not equal"""
137
+ return not self == other
@@ -0,0 +1,132 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class ModifyInstanceIpRequest:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'id': 'str',
19
+ 'body': 'ModifyInstanceIpRequestBody'
20
+ }
21
+
22
+ attribute_map = {
23
+ 'id': 'id',
24
+ 'body': 'body'
25
+ }
26
+
27
+ def __init__(self, id=None, body=None):
28
+ r"""ModifyInstanceIpRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param id: imetal instance id
33
+ :type id: str
34
+ :param body: Body of the ModifyInstanceIpRequest
35
+ :type body: :class:`huaweicloudsdkclouddc.v1.ModifyInstanceIpRequestBody`
36
+ """
37
+
38
+
39
+
40
+ self._id = None
41
+ self._body = None
42
+ self.discriminator = None
43
+
44
+ self.id = id
45
+ if body is not None:
46
+ self.body = body
47
+
48
+ @property
49
+ def id(self):
50
+ r"""Gets the id of this ModifyInstanceIpRequest.
51
+
52
+ imetal instance id
53
+
54
+ :return: The id of this ModifyInstanceIpRequest.
55
+ :rtype: str
56
+ """
57
+ return self._id
58
+
59
+ @id.setter
60
+ def id(self, id):
61
+ r"""Sets the id of this ModifyInstanceIpRequest.
62
+
63
+ imetal instance id
64
+
65
+ :param id: The id of this ModifyInstanceIpRequest.
66
+ :type id: str
67
+ """
68
+ self._id = id
69
+
70
+ @property
71
+ def body(self):
72
+ r"""Gets the body of this ModifyInstanceIpRequest.
73
+
74
+ :return: The body of this ModifyInstanceIpRequest.
75
+ :rtype: :class:`huaweicloudsdkclouddc.v1.ModifyInstanceIpRequestBody`
76
+ """
77
+ return self._body
78
+
79
+ @body.setter
80
+ def body(self, body):
81
+ r"""Sets the body of this ModifyInstanceIpRequest.
82
+
83
+ :param body: The body of this ModifyInstanceIpRequest.
84
+ :type body: :class:`huaweicloudsdkclouddc.v1.ModifyInstanceIpRequestBody`
85
+ """
86
+ self._body = body
87
+
88
+ def to_dict(self):
89
+ result = {}
90
+
91
+ for attr, _ in self.openapi_types.items():
92
+ value = getattr(self, attr)
93
+ if isinstance(value, list):
94
+ result[attr] = list(map(
95
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
96
+ value
97
+ ))
98
+ elif hasattr(value, "to_dict"):
99
+ result[attr] = value.to_dict()
100
+ elif isinstance(value, dict):
101
+ result[attr] = dict(map(
102
+ lambda item: (item[0], item[1].to_dict())
103
+ if hasattr(item[1], "to_dict") else item,
104
+ value.items()
105
+ ))
106
+ else:
107
+ if attr in self.sensitive_list:
108
+ result[attr] = "****"
109
+ else:
110
+ result[attr] = value
111
+
112
+ return result
113
+
114
+ def to_str(self):
115
+ """Returns the string representation of the model"""
116
+ import simplejson as json
117
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
118
+
119
+ def __repr__(self):
120
+ """For `print`"""
121
+ return self.to_str()
122
+
123
+ def __eq__(self, other):
124
+ """Returns true if both objects are equal"""
125
+ if not isinstance(other, ModifyInstanceIpRequest):
126
+ return False
127
+
128
+ return self.__dict__ == other.__dict__
129
+
130
+ def __ne__(self, other):
131
+ """Returns true if both objects are not equal"""
132
+ return not self == other
@@ -0,0 +1,137 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class ModifyInstanceIpRequestBody:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'vpc_id': 'str',
19
+ 'nics': 'list[ModifyInstanceIpRequestBodyNics]'
20
+ }
21
+
22
+ attribute_map = {
23
+ 'vpc_id': 'vpc_id',
24
+ 'nics': 'nics'
25
+ }
26
+
27
+ def __init__(self, vpc_id=None, nics=None):
28
+ r"""ModifyInstanceIpRequestBody
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param vpc_id: 创建网卡所属的 VPC ID,可通过 VPC API 查询:https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html。
33
+ :type vpc_id: str
34
+ :param nics: 网卡信息
35
+ :type nics: list[:class:`huaweicloudsdkclouddc.v1.ModifyInstanceIpRequestBodyNics`]
36
+ """
37
+
38
+
39
+
40
+ self._vpc_id = None
41
+ self._nics = None
42
+ self.discriminator = None
43
+
44
+ if vpc_id is not None:
45
+ self.vpc_id = vpc_id
46
+ if nics is not None:
47
+ self.nics = nics
48
+
49
+ @property
50
+ def vpc_id(self):
51
+ r"""Gets the vpc_id of this ModifyInstanceIpRequestBody.
52
+
53
+ 创建网卡所属的 VPC ID,可通过 VPC API 查询:https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html。
54
+
55
+ :return: The vpc_id of this ModifyInstanceIpRequestBody.
56
+ :rtype: str
57
+ """
58
+ return self._vpc_id
59
+
60
+ @vpc_id.setter
61
+ def vpc_id(self, vpc_id):
62
+ r"""Sets the vpc_id of this ModifyInstanceIpRequestBody.
63
+
64
+ 创建网卡所属的 VPC ID,可通过 VPC API 查询:https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html。
65
+
66
+ :param vpc_id: The vpc_id of this ModifyInstanceIpRequestBody.
67
+ :type vpc_id: str
68
+ """
69
+ self._vpc_id = vpc_id
70
+
71
+ @property
72
+ def nics(self):
73
+ r"""Gets the nics of this ModifyInstanceIpRequestBody.
74
+
75
+ 网卡信息
76
+
77
+ :return: The nics of this ModifyInstanceIpRequestBody.
78
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.ModifyInstanceIpRequestBodyNics`]
79
+ """
80
+ return self._nics
81
+
82
+ @nics.setter
83
+ def nics(self, nics):
84
+ r"""Sets the nics of this ModifyInstanceIpRequestBody.
85
+
86
+ 网卡信息
87
+
88
+ :param nics: The nics of this ModifyInstanceIpRequestBody.
89
+ :type nics: list[:class:`huaweicloudsdkclouddc.v1.ModifyInstanceIpRequestBodyNics`]
90
+ """
91
+ self._nics = nics
92
+
93
+ def to_dict(self):
94
+ result = {}
95
+
96
+ for attr, _ in self.openapi_types.items():
97
+ value = getattr(self, attr)
98
+ if isinstance(value, list):
99
+ result[attr] = list(map(
100
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
101
+ value
102
+ ))
103
+ elif hasattr(value, "to_dict"):
104
+ result[attr] = value.to_dict()
105
+ elif isinstance(value, dict):
106
+ result[attr] = dict(map(
107
+ lambda item: (item[0], item[1].to_dict())
108
+ if hasattr(item[1], "to_dict") else item,
109
+ value.items()
110
+ ))
111
+ else:
112
+ if attr in self.sensitive_list:
113
+ result[attr] = "****"
114
+ else:
115
+ result[attr] = value
116
+
117
+ return result
118
+
119
+ def to_str(self):
120
+ """Returns the string representation of the model"""
121
+ import simplejson as json
122
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
123
+
124
+ def __repr__(self):
125
+ """For `print`"""
126
+ return self.to_str()
127
+
128
+ def __eq__(self, other):
129
+ """Returns true if both objects are equal"""
130
+ if not isinstance(other, ModifyInstanceIpRequestBody):
131
+ return False
132
+
133
+ return self.__dict__ == other.__dict__
134
+
135
+ def __ne__(self, other):
136
+ """Returns true if both objects are not equal"""
137
+ return not self == other
@@ -0,0 +1,136 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class ModifyInstanceIpRequestBodyNics:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'subnet_id': 'str',
19
+ 'ip_address': 'str'
20
+ }
21
+
22
+ attribute_map = {
23
+ 'subnet_id': 'subnet_id',
24
+ 'ip_address': 'ip_address'
25
+ }
26
+
27
+ def __init__(self, subnet_id=None, ip_address=None):
28
+ r"""ModifyInstanceIpRequestBodyNics
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param subnet_id: 创建网卡所属 CloudDCN 子网 ID,可通过 CloudDCN API 查询:https://support.huaweicloud.com/api-vpc/vpc_subnet01_0003.html。
33
+ :type subnet_id: str
34
+ :param ip_address: 创建网卡指定静态IP,批量安装时,该参数不生效。不填或空字符串,默认在子网(subnet)中自动分配一个未使用的IP作网卡的IP地址。若指定IP地址,该IP地址必须在子网(subnet)对应的网段内,且未被使用。
35
+ :type ip_address: str
36
+ """
37
+
38
+
39
+
40
+ self._subnet_id = None
41
+ self._ip_address = None
42
+ self.discriminator = None
43
+
44
+ self.subnet_id = subnet_id
45
+ if ip_address is not None:
46
+ self.ip_address = ip_address
47
+
48
+ @property
49
+ def subnet_id(self):
50
+ r"""Gets the subnet_id of this ModifyInstanceIpRequestBodyNics.
51
+
52
+ 创建网卡所属 CloudDCN 子网 ID,可通过 CloudDCN API 查询:https://support.huaweicloud.com/api-vpc/vpc_subnet01_0003.html。
53
+
54
+ :return: The subnet_id of this ModifyInstanceIpRequestBodyNics.
55
+ :rtype: str
56
+ """
57
+ return self._subnet_id
58
+
59
+ @subnet_id.setter
60
+ def subnet_id(self, subnet_id):
61
+ r"""Sets the subnet_id of this ModifyInstanceIpRequestBodyNics.
62
+
63
+ 创建网卡所属 CloudDCN 子网 ID,可通过 CloudDCN API 查询:https://support.huaweicloud.com/api-vpc/vpc_subnet01_0003.html。
64
+
65
+ :param subnet_id: The subnet_id of this ModifyInstanceIpRequestBodyNics.
66
+ :type subnet_id: str
67
+ """
68
+ self._subnet_id = subnet_id
69
+
70
+ @property
71
+ def ip_address(self):
72
+ r"""Gets the ip_address of this ModifyInstanceIpRequestBodyNics.
73
+
74
+ 创建网卡指定静态IP,批量安装时,该参数不生效。不填或空字符串,默认在子网(subnet)中自动分配一个未使用的IP作网卡的IP地址。若指定IP地址,该IP地址必须在子网(subnet)对应的网段内,且未被使用。
75
+
76
+ :return: The ip_address of this ModifyInstanceIpRequestBodyNics.
77
+ :rtype: str
78
+ """
79
+ return self._ip_address
80
+
81
+ @ip_address.setter
82
+ def ip_address(self, ip_address):
83
+ r"""Sets the ip_address of this ModifyInstanceIpRequestBodyNics.
84
+
85
+ 创建网卡指定静态IP,批量安装时,该参数不生效。不填或空字符串,默认在子网(subnet)中自动分配一个未使用的IP作网卡的IP地址。若指定IP地址,该IP地址必须在子网(subnet)对应的网段内,且未被使用。
86
+
87
+ :param ip_address: The ip_address of this ModifyInstanceIpRequestBodyNics.
88
+ :type ip_address: str
89
+ """
90
+ self._ip_address = ip_address
91
+
92
+ def to_dict(self):
93
+ result = {}
94
+
95
+ for attr, _ in self.openapi_types.items():
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
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
122
+
123
+ def __repr__(self):
124
+ """For `print`"""
125
+ return self.to_str()
126
+
127
+ def __eq__(self, other):
128
+ """Returns true if both objects are equal"""
129
+ if not isinstance(other, ModifyInstanceIpRequestBodyNics):
130
+ return False
131
+
132
+ return self.__dict__ == other.__dict__
133
+
134
+ def __ne__(self, other):
135
+ """Returns true if both objects are not equal"""
136
+ return not self == other
@@ -0,0 +1,81 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.sdk_response import SdkResponse
4
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
5
+
6
+
7
+ class ModifyInstanceIpResponse(SdkResponse):
8
+
9
+ """
10
+ Attributes:
11
+ openapi_types (dict): The key is attribute name
12
+ and the value is attribute type.
13
+ attribute_map (dict): The key is attribute name
14
+ and the value is json key in definition.
15
+ """
16
+ sensitive_list = []
17
+
18
+ openapi_types = {
19
+ }
20
+
21
+ attribute_map = {
22
+ }
23
+
24
+ def __init__(self):
25
+ r"""ModifyInstanceIpResponse
26
+
27
+ The model defined in huaweicloud sdk
28
+
29
+ """
30
+
31
+ super().__init__()
32
+ self.discriminator = None
33
+
34
+ def to_dict(self):
35
+ import warnings
36
+ warnings.warn("ModifyInstanceIpResponse.to_dict() is deprecated and no longer maintained, "
37
+ "use to_json_object() to get the response content.", DeprecationWarning)
38
+ result = {}
39
+
40
+ for attr, _ in self.openapi_types.items():
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
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
67
+
68
+ def __repr__(self):
69
+ """For `print`"""
70
+ return self.to_str()
71
+
72
+ def __eq__(self, other):
73
+ """Returns true if both objects are equal"""
74
+ if not isinstance(other, ModifyInstanceIpResponse):
75
+ return False
76
+
77
+ return self.__dict__ == other.__dict__
78
+
79
+ def __ne__(self, other):
80
+ """Returns true if both objects are not equal"""
81
+ return not self == other