baiducloud-python-sdk-cce 0.0.1__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.
- baiducloud_python_sdk_cce/__init__.py +5 -0
- baiducloud_python_sdk_cce/api/__init__.py +0 -0
- baiducloud_python_sdk_cce/api/cce_client.py +931 -0
- baiducloud_python_sdk_cce/models/__init__.py +77 -0
- baiducloud_python_sdk_cce/models/autoscaler.py +76 -0
- baiducloud_python_sdk_cce/models/ca_config.py +151 -0
- baiducloud_python_sdk_cce/models/cluster_autoscaler_spec.py +82 -0
- baiducloud_python_sdk_cce/models/create_a_shrinking_node_group_task_v2_request.py +105 -0
- baiducloud_python_sdk_cce/models/create_a_shrinking_node_group_task_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/create_an_autoscaler_v2_request.py +58 -0
- baiducloud_python_sdk_cce/models/create_an_autoscaler_v2_response.py +62 -0
- baiducloud_python_sdk_cce/models/create_expansion_node_group_task_v2_request.py +76 -0
- baiducloud_python_sdk_cce/models/create_expansion_node_group_task_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/create_node_group_v2_request.py +135 -0
- baiducloud_python_sdk_cce/models/create_node_group_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/create_nodes_cluster_expansion_v2_request.py +67 -0
- baiducloud_python_sdk_cce/models/create_nodes_cluster_expansion_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/delete_node_group_v2_request.py +76 -0
- baiducloud_python_sdk_cce/models/delete_node_group_v2_response.py +62 -0
- baiducloud_python_sdk_cce/models/delete_nodes_cluster_scaling_v2_request.py +83 -0
- baiducloud_python_sdk_cce/models/delete_nodes_cluster_scaling_v2_response.py +61 -0
- baiducloud_python_sdk_cce/models/delete_option.py +74 -0
- baiducloud_python_sdk_cce/models/existed_instance_in_cluster.py +58 -0
- baiducloud_python_sdk_cce/models/get_node_details_v2_request.py +64 -0
- baiducloud_python_sdk_cce/models/get_node_details_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/get_node_group_details_v2_request.py +64 -0
- baiducloud_python_sdk_cce/models/get_node_group_details_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/get_package_list_v2_request.py +66 -0
- baiducloud_python_sdk_cce/models/get_package_list_v2_response.py +62 -0
- baiducloud_python_sdk_cce/models/get_task_list_v2_request.py +110 -0
- baiducloud_python_sdk_cce/models/get_task_list_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/get_the_list_of_cluster_node_groups_v2_request.py +103 -0
- baiducloud_python_sdk_cce/models/get_the_list_of_cluster_node_groups_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/get_the_list_of_cluster_nodes_v2_request.py +96 -0
- baiducloud_python_sdk_cce/models/get_the_list_of_cluster_nodes_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/instance.py +82 -0
- baiducloud_python_sdk_cce/models/instance_group.py +74 -0
- baiducloud_python_sdk_cce/models/instance_page.py +133 -0
- baiducloud_python_sdk_cce/models/instance_set.py +66 -0
- baiducloud_python_sdk_cce/models/instance_template.py +268 -0
- baiducloud_python_sdk_cce/models/list_instance_group_page.py +82 -0
- baiducloud_python_sdk_cce/models/list_instances_by_instance_group_id_page.py +82 -0
- baiducloud_python_sdk_cce/models/list_task_page.py +82 -0
- baiducloud_python_sdk_cce/models/machine_spec_status.py +66 -0
- baiducloud_python_sdk_cce/models/modify_ig_auto_scaler_request.py +98 -0
- baiducloud_python_sdk_cce/models/modify_ig_auto_scaler_response.py +61 -0
- baiducloud_python_sdk_cce/models/modify_node_group_node_shrink_protection_status_v2_request.py +74 -0
- baiducloud_python_sdk_cce/models/modify_node_group_node_shrink_protection_status_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/modify_the_number_of_node_replicas_in_a_node_group_v2_request.py +99 -0
- baiducloud_python_sdk_cce/models/modify_the_number_of_node_replicas_in_a_node_group_v2_response.py +62 -0
- baiducloud_python_sdk_cce/models/move_into_an_existing_node_v2_request.py +126 -0
- baiducloud_python_sdk_cce/models/move_into_an_existing_node_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/query_the_configuration_of_autoscaler_v2_request.py +58 -0
- baiducloud_python_sdk_cce/models/query_the_configuration_of_autoscaler_v2_response.py +70 -0
- baiducloud_python_sdk_cce/models/retrieve_the_node_group_node_list_v2_request.py +76 -0
- baiducloud_python_sdk_cce/models/retrieve_the_node_group_node_list_v2_response.py +72 -0
- baiducloud_python_sdk_cce/models/step.py +124 -0
- baiducloud_python_sdk_cce/models/steps_to_obtain_node_events_v2_request.py +58 -0
- baiducloud_python_sdk_cce/models/steps_to_obtain_node_events_v2_response.py +78 -0
- baiducloud_python_sdk_cce/models/synchronize_node_metadata_v2_request.py +58 -0
- baiducloud_python_sdk_cce/models/synchronize_node_metadata_v2_response.py +69 -0
- baiducloud_python_sdk_cce/models/taint.py +74 -0
- baiducloud_python_sdk_cce/models/task.py +108 -0
- baiducloud_python_sdk_cce/models/update_autoscaler_configuration_v2_request.py +169 -0
- baiducloud_python_sdk_cce/models/update_autoscaler_configuration_v2_response.py +61 -0
- baiducloud_python_sdk_cce/models/update_node_attributes_v2_request.py +97 -0
- baiducloud_python_sdk_cce/models/update_node_attributes_v2_response.py +72 -0
- baiducloud_python_sdk_cce/models/view_task_details_v2_request.py +64 -0
- baiducloud_python_sdk_cce/models/view_task_details_v2_response.py +70 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/RECORD +74 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_cce-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateExpansionNodeGroupTaskV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateExpansionNodeGroupTaskV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for CreateExpansionNodeGroupTaskV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, cluster_id, instance_group_id, up_to_replicas=None, up_replicas=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize CreateExpansionNodeGroupTaskV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param cluster_id: cluster_id parameter
|
|
20
|
+
:type cluster_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param instance_group_id: instance_group_id parameter
|
|
23
|
+
:type instance_group_id: str (required)
|
|
24
|
+
|
|
25
|
+
:param up_to_replicas: up_to_replicas parameter
|
|
26
|
+
:type up_to_replicas: int (optional)
|
|
27
|
+
|
|
28
|
+
:param up_replicas: up_replicas parameter
|
|
29
|
+
:type up_replicas: int (optional)
|
|
30
|
+
"""
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.cluster_id = cluster_id
|
|
33
|
+
self.instance_group_id = instance_group_id
|
|
34
|
+
self.up_to_replicas = up_to_replicas
|
|
35
|
+
self.up_replicas = up_replicas
|
|
36
|
+
|
|
37
|
+
def to_dict(self):
|
|
38
|
+
"""
|
|
39
|
+
Convert the request entity to a dictionary representation.
|
|
40
|
+
|
|
41
|
+
Nested model objects are recursively converted to dictionaries.
|
|
42
|
+
|
|
43
|
+
:return: Dictionary representation of the request
|
|
44
|
+
:rtype: dict
|
|
45
|
+
"""
|
|
46
|
+
_map = super().to_dict()
|
|
47
|
+
if _map is not None:
|
|
48
|
+
return _map
|
|
49
|
+
result = dict()
|
|
50
|
+
return result
|
|
51
|
+
|
|
52
|
+
def from_dict(self, m):
|
|
53
|
+
"""
|
|
54
|
+
Populate the request entity from a dictionary.
|
|
55
|
+
|
|
56
|
+
Nested dictionaries are recursively converted to model objects.
|
|
57
|
+
|
|
58
|
+
:param m: Dictionary containing request data
|
|
59
|
+
:type m: dict
|
|
60
|
+
|
|
61
|
+
:return: Self reference for method chaining
|
|
62
|
+
:rtype: CreateExpansionNodeGroupTaskV2Request
|
|
63
|
+
|
|
64
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
65
|
+
:raises ValueError: If nested model conversion fails
|
|
66
|
+
"""
|
|
67
|
+
m = m or dict()
|
|
68
|
+
if m.get('clusterID') is not None:
|
|
69
|
+
self.cluster_id = m.get('clusterID')
|
|
70
|
+
if m.get('instanceGroupID') is not None:
|
|
71
|
+
self.instance_group_id = m.get('instanceGroupID')
|
|
72
|
+
if m.get('upToReplicas') is not None:
|
|
73
|
+
self.up_to_replicas = m.get('upToReplicas')
|
|
74
|
+
if m.get('upReplicas') is not None:
|
|
75
|
+
self.up_replicas = m.get('upReplicas')
|
|
76
|
+
return self
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateExpansionNodeGroupTaskV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateExpansionNodeGroupTaskV2Response(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
CreateExpansionNodeGroupTaskV2Response
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, task_id=None, request_id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize CreateExpansionNodeGroupTaskV2Response response.
|
|
16
|
+
|
|
17
|
+
:param task_id: 节点组扩容任务 ID
|
|
18
|
+
:type task_id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param request_id: 请求 ID, 问题定位提供该 ID
|
|
21
|
+
:type request_id: str (optional)
|
|
22
|
+
"""
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.task_id = task_id
|
|
25
|
+
self.request_id = request_id
|
|
26
|
+
|
|
27
|
+
def to_dict(self):
|
|
28
|
+
"""
|
|
29
|
+
Convert the response instance to a dictionary representation.
|
|
30
|
+
|
|
31
|
+
Includes metadata from the parent BceResponse class.
|
|
32
|
+
Nested model objects are recursively converted to dictionaries.
|
|
33
|
+
|
|
34
|
+
:return: Dictionary representation of the response
|
|
35
|
+
:rtype: dict
|
|
36
|
+
"""
|
|
37
|
+
_map = super().to_dict()
|
|
38
|
+
if _map is not None:
|
|
39
|
+
return _map
|
|
40
|
+
result = dict()
|
|
41
|
+
if self.metadata is not None:
|
|
42
|
+
result['metadata'] = dict(self.metadata)
|
|
43
|
+
if self.task_id is not None:
|
|
44
|
+
result['taskID'] = self.task_id
|
|
45
|
+
if self.request_id is not None:
|
|
46
|
+
result['requestID'] = self.request_id
|
|
47
|
+
return result
|
|
48
|
+
|
|
49
|
+
def from_dict(self, m):
|
|
50
|
+
"""
|
|
51
|
+
Populate the response instance from a dictionary.
|
|
52
|
+
|
|
53
|
+
Nested dictionaries are recursively converted to model objects.
|
|
54
|
+
|
|
55
|
+
:param m: Dictionary containing response data
|
|
56
|
+
:type m: dict
|
|
57
|
+
|
|
58
|
+
:return: Self reference for method chaining
|
|
59
|
+
:rtype: CreateExpansionNodeGroupTaskV2Response
|
|
60
|
+
|
|
61
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
62
|
+
:raises ValueError: If nested model conversion fails
|
|
63
|
+
"""
|
|
64
|
+
m = m or dict()
|
|
65
|
+
if m.get('taskID') is not None:
|
|
66
|
+
self.task_id = m.get('taskID')
|
|
67
|
+
if m.get('requestID') is not None:
|
|
68
|
+
self.request_id = m.get('requestID')
|
|
69
|
+
return self
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateNodeGroupV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
from baiducloud_python_sdk_cce.models.instance_template import InstanceTemplate
|
|
7
|
+
from baiducloud_python_sdk_cce.models.cluster_autoscaler_spec import ClusterAutoscalerSpec
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CreateNodeGroupV2Request(AbstractModel):
|
|
11
|
+
"""
|
|
12
|
+
Request entity for CreateNodeGroupV2Request operation.
|
|
13
|
+
|
|
14
|
+
This class encapsulates all parameters for the API request.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def __init__(
|
|
18
|
+
self,
|
|
19
|
+
cluster_id,
|
|
20
|
+
instance_group_name,
|
|
21
|
+
instance_template,
|
|
22
|
+
replicas,
|
|
23
|
+
cluster_role=None,
|
|
24
|
+
shrink_policy=None,
|
|
25
|
+
update_policy=None,
|
|
26
|
+
clean_policy=None,
|
|
27
|
+
cluster_autoscaler_spec=None,
|
|
28
|
+
):
|
|
29
|
+
"""
|
|
30
|
+
Initialize CreateNodeGroupV2Request request entity.
|
|
31
|
+
|
|
32
|
+
:param cluster_id: cluster_id parameter
|
|
33
|
+
:type cluster_id: str (required)
|
|
34
|
+
|
|
35
|
+
:param instance_group_name: 节点组名称,不可为空
|
|
36
|
+
:type instance_group_name: str (required)
|
|
37
|
+
|
|
38
|
+
:param cluster_role: 节点在集群中的角色. 目前仅支持Node类型阶段组, 默认值为node
|
|
39
|
+
:type cluster_role: str (optional)
|
|
40
|
+
|
|
41
|
+
:param shrink_policy: shrink_policy parameter
|
|
42
|
+
:type shrink_policy: str (optional)
|
|
43
|
+
|
|
44
|
+
:param update_policy: update_policy parameter
|
|
45
|
+
:type update_policy: str (optional)
|
|
46
|
+
|
|
47
|
+
:param clean_policy: 节点清理规则. 可选 [ Remain, Delete ]. 默认为 Delete.
|
|
48
|
+
:type clean_policy: str (optional)
|
|
49
|
+
|
|
50
|
+
:param instance_template: instance_template parameter
|
|
51
|
+
:type instance_template: InstanceTemplate (required)
|
|
52
|
+
|
|
53
|
+
:param replicas: 节点组节点要求的副本数. 取值范围是自然数集
|
|
54
|
+
:type replicas: int (required)
|
|
55
|
+
|
|
56
|
+
:param cluster_autoscaler_spec: cluster_autoscaler_spec parameter
|
|
57
|
+
:type cluster_autoscaler_spec: ClusterAutoscalerSpec (optional)
|
|
58
|
+
"""
|
|
59
|
+
super().__init__()
|
|
60
|
+
self.cluster_id = cluster_id
|
|
61
|
+
self.instance_group_name = instance_group_name
|
|
62
|
+
self.cluster_role = cluster_role
|
|
63
|
+
self.shrink_policy = shrink_policy
|
|
64
|
+
self.update_policy = update_policy
|
|
65
|
+
self.clean_policy = clean_policy
|
|
66
|
+
self.instance_template = instance_template
|
|
67
|
+
self.replicas = replicas
|
|
68
|
+
self.cluster_autoscaler_spec = cluster_autoscaler_spec
|
|
69
|
+
|
|
70
|
+
def to_dict(self):
|
|
71
|
+
"""
|
|
72
|
+
Convert the request entity to a dictionary representation.
|
|
73
|
+
|
|
74
|
+
Nested model objects are recursively converted to dictionaries.
|
|
75
|
+
|
|
76
|
+
:return: Dictionary representation of the request
|
|
77
|
+
:rtype: dict
|
|
78
|
+
"""
|
|
79
|
+
_map = super().to_dict()
|
|
80
|
+
if _map is not None:
|
|
81
|
+
return _map
|
|
82
|
+
result = dict()
|
|
83
|
+
if self.instance_group_name is not None:
|
|
84
|
+
result['instanceGroupName'] = self.instance_group_name
|
|
85
|
+
if self.cluster_role is not None:
|
|
86
|
+
result['clusterRole'] = self.cluster_role
|
|
87
|
+
if self.shrink_policy is not None:
|
|
88
|
+
result['shrinkPolicy'] = self.shrink_policy
|
|
89
|
+
if self.update_policy is not None:
|
|
90
|
+
result['updatePolicy'] = self.update_policy
|
|
91
|
+
if self.clean_policy is not None:
|
|
92
|
+
result['cleanPolicy'] = self.clean_policy
|
|
93
|
+
if self.instance_template is not None:
|
|
94
|
+
result['instanceTemplate'] = self.instance_template.to_dict()
|
|
95
|
+
if self.replicas is not None:
|
|
96
|
+
result['replicas'] = self.replicas
|
|
97
|
+
if self.cluster_autoscaler_spec is not None:
|
|
98
|
+
result['clusterAutoscalerSpec'] = self.cluster_autoscaler_spec.to_dict()
|
|
99
|
+
return result
|
|
100
|
+
|
|
101
|
+
def from_dict(self, m):
|
|
102
|
+
"""
|
|
103
|
+
Populate the request entity from a dictionary.
|
|
104
|
+
|
|
105
|
+
Nested dictionaries are recursively converted to model objects.
|
|
106
|
+
|
|
107
|
+
:param m: Dictionary containing request data
|
|
108
|
+
:type m: dict
|
|
109
|
+
|
|
110
|
+
:return: Self reference for method chaining
|
|
111
|
+
:rtype: CreateNodeGroupV2Request
|
|
112
|
+
|
|
113
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
114
|
+
:raises ValueError: If nested model conversion fails
|
|
115
|
+
"""
|
|
116
|
+
m = m or dict()
|
|
117
|
+
if m.get('clusterID') is not None:
|
|
118
|
+
self.cluster_id = m.get('clusterID')
|
|
119
|
+
if m.get('instanceGroupName') is not None:
|
|
120
|
+
self.instance_group_name = m.get('instanceGroupName')
|
|
121
|
+
if m.get('clusterRole') is not None:
|
|
122
|
+
self.cluster_role = m.get('clusterRole')
|
|
123
|
+
if m.get('shrinkPolicy') is not None:
|
|
124
|
+
self.shrink_policy = m.get('shrinkPolicy')
|
|
125
|
+
if m.get('updatePolicy') is not None:
|
|
126
|
+
self.update_policy = m.get('updatePolicy')
|
|
127
|
+
if m.get('cleanPolicy') is not None:
|
|
128
|
+
self.clean_policy = m.get('cleanPolicy')
|
|
129
|
+
if m.get('instanceTemplate') is not None:
|
|
130
|
+
self.instance_template = InstanceTemplate().from_dict(m.get('instanceTemplate'))
|
|
131
|
+
if m.get('replicas') is not None:
|
|
132
|
+
self.replicas = m.get('replicas')
|
|
133
|
+
if m.get('clusterAutoscalerSpec') is not None:
|
|
134
|
+
self.cluster_autoscaler_spec = ClusterAutoscalerSpec().from_dict(m.get('clusterAutoscalerSpec'))
|
|
135
|
+
return self
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateNodeGroupV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateNodeGroupV2Response(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
CreateNodeGroupV2Response
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, instance_group_id=None, request_id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize CreateNodeGroupV2Response response.
|
|
16
|
+
|
|
17
|
+
:param instance_group_id: 节点组 ID
|
|
18
|
+
:type instance_group_id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param request_id: 请求 ID, 问题定位提供该 ID
|
|
21
|
+
:type request_id: str (optional)
|
|
22
|
+
"""
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.instance_group_id = instance_group_id
|
|
25
|
+
self.request_id = request_id
|
|
26
|
+
|
|
27
|
+
def to_dict(self):
|
|
28
|
+
"""
|
|
29
|
+
Convert the response instance to a dictionary representation.
|
|
30
|
+
|
|
31
|
+
Includes metadata from the parent BceResponse class.
|
|
32
|
+
Nested model objects are recursively converted to dictionaries.
|
|
33
|
+
|
|
34
|
+
:return: Dictionary representation of the response
|
|
35
|
+
:rtype: dict
|
|
36
|
+
"""
|
|
37
|
+
_map = super().to_dict()
|
|
38
|
+
if _map is not None:
|
|
39
|
+
return _map
|
|
40
|
+
result = dict()
|
|
41
|
+
if self.metadata is not None:
|
|
42
|
+
result['metadata'] = dict(self.metadata)
|
|
43
|
+
if self.instance_group_id is not None:
|
|
44
|
+
result['instanceGroupID'] = self.instance_group_id
|
|
45
|
+
if self.request_id is not None:
|
|
46
|
+
result['requestID'] = self.request_id
|
|
47
|
+
return result
|
|
48
|
+
|
|
49
|
+
def from_dict(self, m):
|
|
50
|
+
"""
|
|
51
|
+
Populate the response instance from a dictionary.
|
|
52
|
+
|
|
53
|
+
Nested dictionaries are recursively converted to model objects.
|
|
54
|
+
|
|
55
|
+
:param m: Dictionary containing response data
|
|
56
|
+
:type m: dict
|
|
57
|
+
|
|
58
|
+
:return: Self reference for method chaining
|
|
59
|
+
:rtype: CreateNodeGroupV2Response
|
|
60
|
+
|
|
61
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
62
|
+
:raises ValueError: If nested model conversion fails
|
|
63
|
+
"""
|
|
64
|
+
m = m or dict()
|
|
65
|
+
if m.get('instanceGroupID') is not None:
|
|
66
|
+
self.instance_group_id = m.get('instanceGroupID')
|
|
67
|
+
if m.get('requestID') is not None:
|
|
68
|
+
self.request_id = m.get('requestID')
|
|
69
|
+
return self
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateNodesClusterExpansionV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
from baiducloud_python_sdk_cce.models.instance_set import InstanceSet
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CreateNodesClusterExpansionV2Request(AbstractModel):
|
|
10
|
+
"""
|
|
11
|
+
Request entity for CreateNodesClusterExpansionV2Request operation.
|
|
12
|
+
|
|
13
|
+
This class encapsulates all parameters for the API request.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def __init__(self, cluster_id, request_body_):
|
|
17
|
+
"""
|
|
18
|
+
Initialize CreateNodesClusterExpansionV2Request request entity.
|
|
19
|
+
|
|
20
|
+
:param cluster_id: cluster_id parameter
|
|
21
|
+
:type cluster_id: str (required)
|
|
22
|
+
|
|
23
|
+
:param request_body_: 为集群增加的节点列表
|
|
24
|
+
:type request_body_: List[InstanceSet] (required)
|
|
25
|
+
"""
|
|
26
|
+
super().__init__()
|
|
27
|
+
self.cluster_id = cluster_id
|
|
28
|
+
self.request_body_ = request_body_
|
|
29
|
+
|
|
30
|
+
def to_dict(self):
|
|
31
|
+
"""
|
|
32
|
+
Convert the request entity to a dictionary representation.
|
|
33
|
+
|
|
34
|
+
Nested model objects are recursively converted to dictionaries.
|
|
35
|
+
|
|
36
|
+
:return: Dictionary representation of the request
|
|
37
|
+
:rtype: dict
|
|
38
|
+
"""
|
|
39
|
+
_map = super().to_dict()
|
|
40
|
+
if _map is not None:
|
|
41
|
+
return _map
|
|
42
|
+
result = dict()
|
|
43
|
+
if self.request_body_ is not None:
|
|
44
|
+
result['无(RequestBody 为数组)'] = [i.to_dict() for i in self.request_body_]
|
|
45
|
+
return result
|
|
46
|
+
|
|
47
|
+
def from_dict(self, m):
|
|
48
|
+
"""
|
|
49
|
+
Populate the request entity from a dictionary.
|
|
50
|
+
|
|
51
|
+
Nested dictionaries are recursively converted to model objects.
|
|
52
|
+
|
|
53
|
+
:param m: Dictionary containing request data
|
|
54
|
+
:type m: dict
|
|
55
|
+
|
|
56
|
+
:return: Self reference for method chaining
|
|
57
|
+
:rtype: CreateNodesClusterExpansionV2Request
|
|
58
|
+
|
|
59
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
60
|
+
:raises ValueError: If nested model conversion fails
|
|
61
|
+
"""
|
|
62
|
+
m = m or dict()
|
|
63
|
+
if m.get('clusterID') is not None:
|
|
64
|
+
self.cluster_id = m.get('clusterID')
|
|
65
|
+
if m.get('无(RequestBody 为数组)') is not None:
|
|
66
|
+
self.request_body_ = [InstanceSet().from_dict(i) for i in m.get('无(RequestBody 为数组)')]
|
|
67
|
+
return self
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for CreateNodesClusterExpansionV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CreateNodesClusterExpansionV2Response(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
CreateNodesClusterExpansionV2Response
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, cce_instance_ids=None, request_id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize CreateNodesClusterExpansionV2Response response.
|
|
16
|
+
|
|
17
|
+
:param cce_instance_ids: 新增节点的 ID 列表
|
|
18
|
+
:type cce_instance_ids: List[str] (optional)
|
|
19
|
+
|
|
20
|
+
:param request_id: 请求 ID, 问题定位提供该 ID
|
|
21
|
+
:type request_id: str (optional)
|
|
22
|
+
"""
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.cce_instance_ids = cce_instance_ids
|
|
25
|
+
self.request_id = request_id
|
|
26
|
+
|
|
27
|
+
def to_dict(self):
|
|
28
|
+
"""
|
|
29
|
+
Convert the response instance to a dictionary representation.
|
|
30
|
+
|
|
31
|
+
Includes metadata from the parent BceResponse class.
|
|
32
|
+
Nested model objects are recursively converted to dictionaries.
|
|
33
|
+
|
|
34
|
+
:return: Dictionary representation of the response
|
|
35
|
+
:rtype: dict
|
|
36
|
+
"""
|
|
37
|
+
_map = super().to_dict()
|
|
38
|
+
if _map is not None:
|
|
39
|
+
return _map
|
|
40
|
+
result = dict()
|
|
41
|
+
if self.metadata is not None:
|
|
42
|
+
result['metadata'] = dict(self.metadata)
|
|
43
|
+
if self.cce_instance_ids is not None:
|
|
44
|
+
result['cceInstanceIDs'] = self.cce_instance_ids
|
|
45
|
+
if self.request_id is not None:
|
|
46
|
+
result['requestID'] = self.request_id
|
|
47
|
+
return result
|
|
48
|
+
|
|
49
|
+
def from_dict(self, m):
|
|
50
|
+
"""
|
|
51
|
+
Populate the response instance from a dictionary.
|
|
52
|
+
|
|
53
|
+
Nested dictionaries are recursively converted to model objects.
|
|
54
|
+
|
|
55
|
+
:param m: Dictionary containing response data
|
|
56
|
+
:type m: dict
|
|
57
|
+
|
|
58
|
+
:return: Self reference for method chaining
|
|
59
|
+
:rtype: CreateNodesClusterExpansionV2Response
|
|
60
|
+
|
|
61
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
62
|
+
:raises ValueError: If nested model conversion fails
|
|
63
|
+
"""
|
|
64
|
+
m = m or dict()
|
|
65
|
+
if m.get('cceInstanceIDs') is not None:
|
|
66
|
+
self.cce_instance_ids = m.get('cceInstanceIDs')
|
|
67
|
+
if m.get('requestID') is not None:
|
|
68
|
+
self.request_id = m.get('requestID')
|
|
69
|
+
return self
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for DeleteNodeGroupV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteNodeGroupV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for DeleteNodeGroupV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, cluster_id, instance_group_id, delete_instances=None, release_all_resource=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize DeleteNodeGroupV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param cluster_id: cluster_id parameter
|
|
20
|
+
:type cluster_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param instance_group_id: instance_group_id parameter
|
|
23
|
+
:type instance_group_id: str (required)
|
|
24
|
+
|
|
25
|
+
:param delete_instances: delete_instances parameter
|
|
26
|
+
:type delete_instances: bool (optional)
|
|
27
|
+
|
|
28
|
+
:param release_all_resource: release_all_resource parameter
|
|
29
|
+
:type release_all_resource: bool (optional)
|
|
30
|
+
"""
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.cluster_id = cluster_id
|
|
33
|
+
self.instance_group_id = instance_group_id
|
|
34
|
+
self.delete_instances = delete_instances
|
|
35
|
+
self.release_all_resource = release_all_resource
|
|
36
|
+
|
|
37
|
+
def to_dict(self):
|
|
38
|
+
"""
|
|
39
|
+
Convert the request entity to a dictionary representation.
|
|
40
|
+
|
|
41
|
+
Nested model objects are recursively converted to dictionaries.
|
|
42
|
+
|
|
43
|
+
:return: Dictionary representation of the request
|
|
44
|
+
:rtype: dict
|
|
45
|
+
"""
|
|
46
|
+
_map = super().to_dict()
|
|
47
|
+
if _map is not None:
|
|
48
|
+
return _map
|
|
49
|
+
result = dict()
|
|
50
|
+
return result
|
|
51
|
+
|
|
52
|
+
def from_dict(self, m):
|
|
53
|
+
"""
|
|
54
|
+
Populate the request entity from a dictionary.
|
|
55
|
+
|
|
56
|
+
Nested dictionaries are recursively converted to model objects.
|
|
57
|
+
|
|
58
|
+
:param m: Dictionary containing request data
|
|
59
|
+
:type m: dict
|
|
60
|
+
|
|
61
|
+
:return: Self reference for method chaining
|
|
62
|
+
:rtype: DeleteNodeGroupV2Request
|
|
63
|
+
|
|
64
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
65
|
+
:raises ValueError: If nested model conversion fails
|
|
66
|
+
"""
|
|
67
|
+
m = m or dict()
|
|
68
|
+
if m.get('clusterID') is not None:
|
|
69
|
+
self.cluster_id = m.get('clusterID')
|
|
70
|
+
if m.get('instanceGroupID') is not None:
|
|
71
|
+
self.instance_group_id = m.get('instanceGroupID')
|
|
72
|
+
if m.get('deleteInstances') is not None:
|
|
73
|
+
self.delete_instances = m.get('deleteInstances')
|
|
74
|
+
if m.get('releaseAllResource') is not None:
|
|
75
|
+
self.release_all_resource = m.get('releaseAllResource')
|
|
76
|
+
return self
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DeleteNodeGroupV2Response information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeleteNodeGroupV2Response(BceResponse):
|
|
9
|
+
"""
|
|
10
|
+
DeleteNodeGroupV2Response
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, request_id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize DeleteNodeGroupV2Response instance.
|
|
16
|
+
|
|
17
|
+
:param request_id: 请求 ID, 问题定位提供该 ID
|
|
18
|
+
:type request_id: str (optional)
|
|
19
|
+
"""
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.request_id = request_id
|
|
22
|
+
|
|
23
|
+
def to_dict(self):
|
|
24
|
+
"""
|
|
25
|
+
Convert the model instance to a dictionary representation.
|
|
26
|
+
|
|
27
|
+
Nested model objects are recursively converted to dictionaries.
|
|
28
|
+
|
|
29
|
+
Includes metadata from the parent BceResponse class.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the model
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
if self.metadata is not None:
|
|
39
|
+
result['metadata'] = dict(self.metadata)
|
|
40
|
+
if self.request_id is not None:
|
|
41
|
+
result['requestID'] = self.request_id
|
|
42
|
+
return result
|
|
43
|
+
|
|
44
|
+
def from_dict(self, m):
|
|
45
|
+
"""
|
|
46
|
+
Populate the model instance from a dictionary.
|
|
47
|
+
|
|
48
|
+
Nested dictionaries are recursively converted to model objects.
|
|
49
|
+
|
|
50
|
+
:param m: Dictionary containing model data
|
|
51
|
+
:type m: dict
|
|
52
|
+
|
|
53
|
+
:return: Self reference for method chaining
|
|
54
|
+
:rtype: DeleteNodeGroupV2Response
|
|
55
|
+
|
|
56
|
+
:raises TypeError: If input is not a dictionary type
|
|
57
|
+
:raises ValueError: If nested model conversion fails
|
|
58
|
+
"""
|
|
59
|
+
m = m or dict()
|
|
60
|
+
if m.get('requestID') is not None:
|
|
61
|
+
self.request_id = m.get('requestID')
|
|
62
|
+
return self
|