baiducloud-python-sdk-as 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_as/__init__.py +5 -0
- baiducloud_python_sdk_as/api/__init__.py +0 -0
- baiducloud_python_sdk_as/api/as_client.py +626 -0
- baiducloud_python_sdk_as/models/__init__.py +78 -0
- baiducloud_python_sdk_as/models/action_type.py +20 -0
- baiducloud_python_sdk_as/models/adjust_num_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/adjust_num_v2_response.py +80 -0
- baiducloud_python_sdk_as/models/alarm_rule.py +135 -0
- baiducloud_python_sdk_as/models/as_alarm_rule.py +189 -0
- baiducloud_python_sdk_as/models/as_eip.py +90 -0
- baiducloud_python_sdk_as/models/as_group.py +186 -0
- baiducloud_python_sdk_as/models/as_record.py +202 -0
- baiducloud_python_sdk_as/models/assign_tag_info.py +76 -0
- baiducloud_python_sdk_as/models/attach_node_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/attach_node_v2_response.py +78 -0
- baiducloud_python_sdk_as/models/bcc_name_config.py +82 -0
- baiducloud_python_sdk_as/models/billing_info.py +68 -0
- baiducloud_python_sdk_as/models/blb_info.py +82 -0
- baiducloud_python_sdk_as/models/cds_info.py +82 -0
- baiducloud_python_sdk_as/models/check_detail.py +74 -0
- baiducloud_python_sdk_as/models/check_entity.py +76 -0
- baiducloud_python_sdk_as/models/cmd_config.py +142 -0
- baiducloud_python_sdk_as/models/create_as_group_v2_request.py +245 -0
- baiducloud_python_sdk_as/models/create_as_group_v2_response.py +69 -0
- baiducloud_python_sdk_as/models/create_rule_v2_request.py +172 -0
- baiducloud_python_sdk_as/models/create_rule_v2_response.py +61 -0
- baiducloud_python_sdk_as/models/dag_model.py +58 -0
- baiducloud_python_sdk_as/models/delete_as_group_v2_request.py +60 -0
- baiducloud_python_sdk_as/models/delete_rule_v2_request.py +58 -0
- baiducloud_python_sdk_as/models/detach_node_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/detach_node_v2_response.py +78 -0
- baiducloud_python_sdk_as/models/dimension.py +66 -0
- baiducloud_python_sdk_as/models/eip_config.py +112 -0
- baiducloud_python_sdk_as/models/eip_group_bandwidth.py +74 -0
- baiducloud_python_sdk_as/models/eip_group_decrease.py +58 -0
- baiducloud_python_sdk_as/models/eip_group_increase.py +66 -0
- baiducloud_python_sdk_as/models/eip_info.py +82 -0
- baiducloud_python_sdk_as/models/ephemeral_disk.py +66 -0
- baiducloud_python_sdk_as/models/exec_cmd_strategy_type.py +19 -0
- baiducloud_python_sdk_as/models/exec_rule_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/exec_rule_v2_response.py +80 -0
- baiducloud_python_sdk_as/models/expect_action.py +74 -0
- baiducloud_python_sdk_as/models/get_as_group_v2_request.py +58 -0
- baiducloud_python_sdk_as/models/get_as_group_v2_response.py +279 -0
- baiducloud_python_sdk_as/models/get_rule_v2_request.py +58 -0
- baiducloud_python_sdk_as/models/get_rule_v2_response.py +218 -0
- baiducloud_python_sdk_as/models/group_config.py +90 -0
- baiducloud_python_sdk_as/models/health_check_config.py +66 -0
- baiducloud_python_sdk_as/models/health_check_state.py +102 -0
- baiducloud_python_sdk_as/models/list_as_group_v2_request.py +96 -0
- baiducloud_python_sdk_as/models/list_as_group_v2_response.py +102 -0
- baiducloud_python_sdk_as/models/list_as_node_v2_request.py +94 -0
- baiducloud_python_sdk_as/models/list_as_node_v2_response.py +102 -0
- baiducloud_python_sdk_as/models/list_rule_v2_request.py +94 -0
- baiducloud_python_sdk_as/models/list_rule_v2_response.py +102 -0
- baiducloud_python_sdk_as/models/list_task_v2_request.py +94 -0
- baiducloud_python_sdk_as/models/list_task_v2_response.py +102 -0
- baiducloud_python_sdk_as/models/monitor_object.py +84 -0
- baiducloud_python_sdk_as/models/node.py +245 -0
- baiducloud_python_sdk_as/models/node_info.py +373 -0
- baiducloud_python_sdk_as/models/period_type.py +21 -0
- baiducloud_python_sdk_as/models/policy_resource.py +70 -0
- baiducloud_python_sdk_as/models/reservation.py +58 -0
- baiducloud_python_sdk_as/models/resource.py +66 -0
- baiducloud_python_sdk_as/models/rule.py +216 -0
- baiducloud_python_sdk_as/models/scale_condition.py +160 -0
- baiducloud_python_sdk_as/models/scaling_down_v2_request.py +72 -0
- baiducloud_python_sdk_as/models/scaling_down_v2_response.py +78 -0
- baiducloud_python_sdk_as/models/scaling_up_v2_request.py +88 -0
- baiducloud_python_sdk_as/models/scaling_up_v2_response.py +80 -0
- baiducloud_python_sdk_as/models/state.py +19 -0
- baiducloud_python_sdk_as/models/status.py +41 -0
- baiducloud_python_sdk_as/models/tag_info.py +66 -0
- baiducloud_python_sdk_as/models/type.py +20 -0
- baiducloud_python_sdk_as/models/update_is_managed_v2_request.py +80 -0
- baiducloud_python_sdk_as/models/update_protect_v2_request.py +80 -0
- baiducloud_python_sdk_as/models/vpc_info.py +74 -0
- baiducloud_python_sdk_as/models/zone_info.py +100 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/RECORD +83 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_as-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
EphemeralDisk information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class EphemeralDisk(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
EphemeralDisk
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, storage_type=None, size_in_gb=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize EphemeralDisk instance.
|
|
16
|
+
|
|
17
|
+
:param storage_type: 本地盘类型
|
|
18
|
+
:type storage_type: str (optional)
|
|
19
|
+
|
|
20
|
+
:param size_in_gb: 本地盘大小
|
|
21
|
+
:type size_in_gb: int (optional)
|
|
22
|
+
"""
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.storage_type = storage_type
|
|
25
|
+
self.size_in_gb = size_in_gb
|
|
26
|
+
|
|
27
|
+
def to_dict(self):
|
|
28
|
+
"""
|
|
29
|
+
Convert the model instance to a dictionary representation.
|
|
30
|
+
|
|
31
|
+
Nested model objects are recursively converted to dictionaries.
|
|
32
|
+
|
|
33
|
+
:return: Dictionary representation of the model
|
|
34
|
+
:rtype: dict
|
|
35
|
+
"""
|
|
36
|
+
_map = super().to_dict()
|
|
37
|
+
if _map is not None:
|
|
38
|
+
return _map
|
|
39
|
+
result = dict()
|
|
40
|
+
if self.storage_type is not None:
|
|
41
|
+
result['storageType'] = self.storage_type
|
|
42
|
+
if self.size_in_gb is not None:
|
|
43
|
+
result['sizeInGB'] = self.size_in_gb
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
def from_dict(self, m):
|
|
47
|
+
"""
|
|
48
|
+
Populate the model instance from a dictionary.
|
|
49
|
+
|
|
50
|
+
Nested dictionaries are recursively converted to model objects.
|
|
51
|
+
|
|
52
|
+
:param m: Dictionary containing model data
|
|
53
|
+
:type m: dict
|
|
54
|
+
|
|
55
|
+
:return: Self reference for method chaining
|
|
56
|
+
:rtype: EphemeralDisk
|
|
57
|
+
|
|
58
|
+
:raises TypeError: If input is not a dictionary type
|
|
59
|
+
:raises ValueError: If nested model conversion fails
|
|
60
|
+
"""
|
|
61
|
+
m = m or dict()
|
|
62
|
+
if m.get('storageType') is not None:
|
|
63
|
+
self.storage_type = m.get('storageType')
|
|
64
|
+
if m.get('sizeInGB') is not None:
|
|
65
|
+
self.size_in_gb = m.get('sizeInGB')
|
|
66
|
+
return self
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ExecCmdStrategyType information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ExecCmdStrategyType:
|
|
7
|
+
"""
|
|
8
|
+
Enum class for ExecCmdStrategyType
|
|
9
|
+
Allowed values: PROCEED, PAUSE
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
PROCEED = 'Proceed'
|
|
13
|
+
PAUSE = 'Pause'
|
|
14
|
+
|
|
15
|
+
@staticmethod
|
|
16
|
+
def is_valid(value):
|
|
17
|
+
"""Check if the value is valid for this enum"""
|
|
18
|
+
valid_values = ['Proceed', 'Pause']
|
|
19
|
+
return value in valid_values
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ExecRuleV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ExecRuleV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ExecRuleV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, group_id, exec_rule, rule_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ExecRuleV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param group_id: group_id parameter
|
|
20
|
+
:type group_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param exec_rule: exec_rule parameter
|
|
23
|
+
:type exec_rule: str (required)
|
|
24
|
+
|
|
25
|
+
:param rule_id: 伸缩组规则的 ID
|
|
26
|
+
:type rule_id: str (required)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.group_id = group_id
|
|
30
|
+
self.exec_rule = exec_rule
|
|
31
|
+
self.rule_id = rule_id
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
"""
|
|
35
|
+
Convert the request entity to a dictionary representation.
|
|
36
|
+
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the request
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
if self.rule_id is not None:
|
|
47
|
+
result['ruleId'] = self.rule_id
|
|
48
|
+
return result
|
|
49
|
+
|
|
50
|
+
def from_dict(self, m):
|
|
51
|
+
"""
|
|
52
|
+
Populate the request entity from a dictionary.
|
|
53
|
+
|
|
54
|
+
Nested dictionaries are recursively converted to model objects.
|
|
55
|
+
|
|
56
|
+
:param m: Dictionary containing request data
|
|
57
|
+
:type m: dict
|
|
58
|
+
|
|
59
|
+
:return: Self reference for method chaining
|
|
60
|
+
:rtype: ExecRuleV2Request
|
|
61
|
+
|
|
62
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
63
|
+
:raises ValueError: If nested model conversion fails
|
|
64
|
+
"""
|
|
65
|
+
m = m or dict()
|
|
66
|
+
if m.get('groupId') is not None:
|
|
67
|
+
self.group_id = m.get('groupId')
|
|
68
|
+
if m.get('execRule') is not None:
|
|
69
|
+
self.exec_rule = m.get('execRule')
|
|
70
|
+
if m.get('ruleId') is not None:
|
|
71
|
+
self.rule_id = m.get('ruleId')
|
|
72
|
+
return self
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ExecRuleV2Response information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_as.models.dag_model import DagModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ExecRuleV2Response(BceResponse):
|
|
11
|
+
"""
|
|
12
|
+
ExecRuleV2Response
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, success=None, msg=None, result=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ExecRuleV2Response instance.
|
|
18
|
+
|
|
19
|
+
:param success: 请求是否成功
|
|
20
|
+
:type success: bool (optional)
|
|
21
|
+
|
|
22
|
+
:param msg: 响应消息
|
|
23
|
+
:type msg: str (optional)
|
|
24
|
+
|
|
25
|
+
:param result: result attribute
|
|
26
|
+
:type result: DagModel (optional)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.success = success
|
|
30
|
+
self.msg = msg
|
|
31
|
+
self.result = result
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
"""
|
|
35
|
+
Convert the model instance to a dictionary representation.
|
|
36
|
+
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
Includes metadata from the parent BceResponse class.
|
|
40
|
+
|
|
41
|
+
:return: Dictionary representation of the model
|
|
42
|
+
:rtype: dict
|
|
43
|
+
"""
|
|
44
|
+
_map = super().to_dict()
|
|
45
|
+
if _map is not None:
|
|
46
|
+
return _map
|
|
47
|
+
result = dict()
|
|
48
|
+
if self.metadata is not None:
|
|
49
|
+
result['metadata'] = dict(self.metadata)
|
|
50
|
+
if self.success is not None:
|
|
51
|
+
result['success'] = self.success
|
|
52
|
+
if self.msg is not None:
|
|
53
|
+
result['msg'] = self.msg
|
|
54
|
+
if self.result is not None:
|
|
55
|
+
result['result'] = self.result.to_dict()
|
|
56
|
+
return result
|
|
57
|
+
|
|
58
|
+
def from_dict(self, m):
|
|
59
|
+
"""
|
|
60
|
+
Populate the model instance from a dictionary.
|
|
61
|
+
|
|
62
|
+
Nested dictionaries are recursively converted to model objects.
|
|
63
|
+
|
|
64
|
+
:param m: Dictionary containing model data
|
|
65
|
+
:type m: dict
|
|
66
|
+
|
|
67
|
+
:return: Self reference for method chaining
|
|
68
|
+
:rtype: ExecRuleV2Response
|
|
69
|
+
|
|
70
|
+
:raises TypeError: If input is not a dictionary type
|
|
71
|
+
:raises ValueError: If nested model conversion fails
|
|
72
|
+
"""
|
|
73
|
+
m = m or dict()
|
|
74
|
+
if m.get('success') is not None:
|
|
75
|
+
self.success = m.get('success')
|
|
76
|
+
if m.get('msg') is not None:
|
|
77
|
+
self.msg = m.get('msg')
|
|
78
|
+
if m.get('result') is not None:
|
|
79
|
+
self.result = DagModel().from_dict(m.get('result'))
|
|
80
|
+
return self
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ExpectAction information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ExpectAction(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
ExpectAction
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, action_type=None, action_num=None, adjust_to_num=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize ExpectAction instance.
|
|
16
|
+
|
|
17
|
+
:param action_type: 动作类型。包括:INCREASE(扩容),DECREASE(缩容),ADJUST(调整至)
|
|
18
|
+
:type action_type: str (optional)
|
|
19
|
+
|
|
20
|
+
:param action_num: 动作数量
|
|
21
|
+
:type action_num: int (optional)
|
|
22
|
+
|
|
23
|
+
:param adjust_to_num: 调整到的数量
|
|
24
|
+
:type adjust_to_num: int (optional)
|
|
25
|
+
"""
|
|
26
|
+
super().__init__()
|
|
27
|
+
self.action_type = action_type
|
|
28
|
+
self.action_num = action_num
|
|
29
|
+
self.adjust_to_num = adjust_to_num
|
|
30
|
+
|
|
31
|
+
def to_dict(self):
|
|
32
|
+
"""
|
|
33
|
+
Convert the model instance to a dictionary representation.
|
|
34
|
+
|
|
35
|
+
Nested model objects are recursively converted to dictionaries.
|
|
36
|
+
|
|
37
|
+
:return: Dictionary representation of the model
|
|
38
|
+
:rtype: dict
|
|
39
|
+
"""
|
|
40
|
+
_map = super().to_dict()
|
|
41
|
+
if _map is not None:
|
|
42
|
+
return _map
|
|
43
|
+
result = dict()
|
|
44
|
+
if self.action_type is not None:
|
|
45
|
+
result['actionType'] = self.action_type
|
|
46
|
+
if self.action_num is not None:
|
|
47
|
+
result['actionNum'] = self.action_num
|
|
48
|
+
if self.adjust_to_num is not None:
|
|
49
|
+
result['adjustToNum'] = self.adjust_to_num
|
|
50
|
+
return result
|
|
51
|
+
|
|
52
|
+
def from_dict(self, m):
|
|
53
|
+
"""
|
|
54
|
+
Populate the model instance from a dictionary.
|
|
55
|
+
|
|
56
|
+
Nested dictionaries are recursively converted to model objects.
|
|
57
|
+
|
|
58
|
+
:param m: Dictionary containing model data
|
|
59
|
+
:type m: dict
|
|
60
|
+
|
|
61
|
+
:return: Self reference for method chaining
|
|
62
|
+
:rtype: ExpectAction
|
|
63
|
+
|
|
64
|
+
:raises TypeError: If input is not a dictionary type
|
|
65
|
+
:raises ValueError: If nested model conversion fails
|
|
66
|
+
"""
|
|
67
|
+
m = m or dict()
|
|
68
|
+
if m.get('actionType') is not None:
|
|
69
|
+
self.action_type = m.get('actionType')
|
|
70
|
+
if m.get('actionNum') is not None:
|
|
71
|
+
self.action_num = m.get('actionNum')
|
|
72
|
+
if m.get('adjustToNum') is not None:
|
|
73
|
+
self.adjust_to_num = m.get('adjustToNum')
|
|
74
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for GetAsGroupV2Request information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GetAsGroupV2Request(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for GetAsGroupV2Request operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, group_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize GetAsGroupV2Request request entity.
|
|
18
|
+
|
|
19
|
+
:param group_id: group_id parameter
|
|
20
|
+
:type group_id: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.group_id = group_id
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: GetAsGroupV2Request
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('groupId') is not None:
|
|
57
|
+
self.group_id = m.get('groupId')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for GetAsGroupV2Response information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_as.models.vpc_info import VpcInfo
|
|
7
|
+
from baiducloud_python_sdk_as.models.group_config import GroupConfig
|
|
8
|
+
from baiducloud_python_sdk_as.models.blb_info import BlbInfo
|
|
9
|
+
from baiducloud_python_sdk_as.models.tag_info import TagInfo
|
|
10
|
+
from baiducloud_python_sdk_as.models.cmd_config import CmdConfig
|
|
11
|
+
from baiducloud_python_sdk_as.models.bcc_name_config import BccNameConfig
|
|
12
|
+
from baiducloud_python_sdk_as.models.eip_config import EipConfig
|
|
13
|
+
from baiducloud_python_sdk_as.models.health_check_config import HealthCheckConfig
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class GetAsGroupV2Response(BceResponse):
|
|
17
|
+
"""
|
|
18
|
+
GetAsGroupV2Response
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def __init__(
|
|
22
|
+
self,
|
|
23
|
+
group_id=None,
|
|
24
|
+
group_name=None,
|
|
25
|
+
region=None,
|
|
26
|
+
status=None,
|
|
27
|
+
vpc_info=None,
|
|
28
|
+
zone_info=None,
|
|
29
|
+
config=None,
|
|
30
|
+
keypair_id=None,
|
|
31
|
+
keypair_name=None,
|
|
32
|
+
keep_image_login=None,
|
|
33
|
+
blb=None,
|
|
34
|
+
blb_unbind_wait_time=None,
|
|
35
|
+
node_num=None,
|
|
36
|
+
create_time=None,
|
|
37
|
+
rds_ids=None,
|
|
38
|
+
scs_ids=None,
|
|
39
|
+
expansion_strategy=None,
|
|
40
|
+
shrinkage_strategy=None,
|
|
41
|
+
relation_tag=None,
|
|
42
|
+
tags=None,
|
|
43
|
+
cmd_config=None,
|
|
44
|
+
bcc_name_config=None,
|
|
45
|
+
eip_config=None,
|
|
46
|
+
health_check=None,
|
|
47
|
+
):
|
|
48
|
+
"""
|
|
49
|
+
Initialize GetAsGroupV2Response response.
|
|
50
|
+
|
|
51
|
+
:param group_id: 伸缩组ID
|
|
52
|
+
:type group_id: str (optional)
|
|
53
|
+
|
|
54
|
+
:param group_name: 伸缩组名称
|
|
55
|
+
:type group_name: str (optional)
|
|
56
|
+
|
|
57
|
+
:param region: 伸缩组Region
|
|
58
|
+
:type region: str (optional)
|
|
59
|
+
|
|
60
|
+
:param status: 伸缩组状态
|
|
61
|
+
:type status: str (optional)
|
|
62
|
+
|
|
63
|
+
:param vpc_info: vpc_info field
|
|
64
|
+
:type vpc_info: VpcInfo (optional)
|
|
65
|
+
|
|
66
|
+
:param zone_info: 伸缩组可用区信息
|
|
67
|
+
:type zone_info: List[object] (optional)
|
|
68
|
+
|
|
69
|
+
:param config: config field
|
|
70
|
+
:type config: GroupConfig (optional)
|
|
71
|
+
|
|
72
|
+
:param keypair_id: 创建实例时使用的密钥对ID,非必填
|
|
73
|
+
:type keypair_id: str (optional)
|
|
74
|
+
|
|
75
|
+
:param keypair_name: 创建实例时使用的密钥对名称,非必填
|
|
76
|
+
:type keypair_name: str (optional)
|
|
77
|
+
|
|
78
|
+
:param keep_image_login: 是否使用镜像预置密码
|
|
79
|
+
:type keep_image_login: bool (optional)
|
|
80
|
+
|
|
81
|
+
:param blb: 伸缩组绑定BLB,可绑定多个
|
|
82
|
+
:type blb: List[BlbInfo] (optional)
|
|
83
|
+
|
|
84
|
+
:param blb_unbind_wait_time: BLB等待时间
|
|
85
|
+
:type blb_unbind_wait_time: int (optional)
|
|
86
|
+
|
|
87
|
+
:param node_num: 伸缩组节点
|
|
88
|
+
:type node_num: int (optional)
|
|
89
|
+
|
|
90
|
+
:param create_time: 创建时间
|
|
91
|
+
:type create_time: str (optional)
|
|
92
|
+
|
|
93
|
+
:param rds_ids: rds的id
|
|
94
|
+
:type rds_ids: str (optional)
|
|
95
|
+
|
|
96
|
+
:param scs_ids: scs的id
|
|
97
|
+
:type scs_ids: str (optional)
|
|
98
|
+
|
|
99
|
+
:param expansion_strategy: 伸缩组扩容策略
|
|
100
|
+
:type expansion_strategy: str (optional)
|
|
101
|
+
|
|
102
|
+
:param shrinkage_strategy: 伸缩组缩容策略
|
|
103
|
+
:type shrinkage_strategy: str (optional)
|
|
104
|
+
|
|
105
|
+
:param relation_tag: 是否绑定标签
|
|
106
|
+
:type relation_tag: bool (optional)
|
|
107
|
+
|
|
108
|
+
:param tags: 伸缩组绑定标签
|
|
109
|
+
:type tags: List[TagInfo] (optional)
|
|
110
|
+
|
|
111
|
+
:param cmd_config: cmd_config field
|
|
112
|
+
:type cmd_config: CmdConfig (optional)
|
|
113
|
+
|
|
114
|
+
:param bcc_name_config: bcc_name_config field
|
|
115
|
+
:type bcc_name_config: BccNameConfig (optional)
|
|
116
|
+
|
|
117
|
+
:param eip_config: eip_config field
|
|
118
|
+
:type eip_config: EipConfig (optional)
|
|
119
|
+
|
|
120
|
+
:param health_check: health_check field
|
|
121
|
+
:type health_check: HealthCheckConfig (optional)
|
|
122
|
+
"""
|
|
123
|
+
super().__init__()
|
|
124
|
+
self.group_id = group_id
|
|
125
|
+
self.group_name = group_name
|
|
126
|
+
self.region = region
|
|
127
|
+
self.status = status
|
|
128
|
+
self.vpc_info = vpc_info
|
|
129
|
+
self.zone_info = zone_info
|
|
130
|
+
self.config = config
|
|
131
|
+
self.keypair_id = keypair_id
|
|
132
|
+
self.keypair_name = keypair_name
|
|
133
|
+
self.keep_image_login = keep_image_login
|
|
134
|
+
self.blb = blb
|
|
135
|
+
self.blb_unbind_wait_time = blb_unbind_wait_time
|
|
136
|
+
self.node_num = node_num
|
|
137
|
+
self.create_time = create_time
|
|
138
|
+
self.rds_ids = rds_ids
|
|
139
|
+
self.scs_ids = scs_ids
|
|
140
|
+
self.expansion_strategy = expansion_strategy
|
|
141
|
+
self.shrinkage_strategy = shrinkage_strategy
|
|
142
|
+
self.relation_tag = relation_tag
|
|
143
|
+
self.tags = tags
|
|
144
|
+
self.cmd_config = cmd_config
|
|
145
|
+
self.bcc_name_config = bcc_name_config
|
|
146
|
+
self.eip_config = eip_config
|
|
147
|
+
self.health_check = health_check
|
|
148
|
+
|
|
149
|
+
def to_dict(self):
|
|
150
|
+
"""
|
|
151
|
+
Convert the response instance to a dictionary representation.
|
|
152
|
+
|
|
153
|
+
Includes metadata from the parent BceResponse class.
|
|
154
|
+
Nested model objects are recursively converted to dictionaries.
|
|
155
|
+
|
|
156
|
+
:return: Dictionary representation of the response
|
|
157
|
+
:rtype: dict
|
|
158
|
+
"""
|
|
159
|
+
_map = super().to_dict()
|
|
160
|
+
if _map is not None:
|
|
161
|
+
return _map
|
|
162
|
+
result = dict()
|
|
163
|
+
if self.metadata is not None:
|
|
164
|
+
result['metadata'] = dict(self.metadata)
|
|
165
|
+
if self.group_id is not None:
|
|
166
|
+
result['groupId'] = self.group_id
|
|
167
|
+
if self.group_name is not None:
|
|
168
|
+
result['groupName'] = self.group_name
|
|
169
|
+
if self.region is not None:
|
|
170
|
+
result['region'] = self.region
|
|
171
|
+
if self.status is not None:
|
|
172
|
+
result['status'] = self.status
|
|
173
|
+
if self.vpc_info is not None:
|
|
174
|
+
result['vpcInfo'] = self.vpc_info.to_dict()
|
|
175
|
+
if self.zone_info is not None:
|
|
176
|
+
result['zoneInfo'] = self.zone_info
|
|
177
|
+
if self.config is not None:
|
|
178
|
+
result['config'] = self.config.to_dict()
|
|
179
|
+
if self.keypair_id is not None:
|
|
180
|
+
result['keypairId'] = self.keypair_id
|
|
181
|
+
if self.keypair_name is not None:
|
|
182
|
+
result['keypairName'] = self.keypair_name
|
|
183
|
+
if self.keep_image_login is not None:
|
|
184
|
+
result['keepImageLogin'] = self.keep_image_login
|
|
185
|
+
if self.blb is not None:
|
|
186
|
+
result['blb'] = [i.to_dict() for i in self.blb]
|
|
187
|
+
if self.blb_unbind_wait_time is not None:
|
|
188
|
+
result['blbUnbindWaitTime'] = self.blb_unbind_wait_time
|
|
189
|
+
if self.node_num is not None:
|
|
190
|
+
result['nodeNum'] = self.node_num
|
|
191
|
+
if self.create_time is not None:
|
|
192
|
+
result['createTime'] = self.create_time
|
|
193
|
+
if self.rds_ids is not None:
|
|
194
|
+
result['rdsIds'] = self.rds_ids
|
|
195
|
+
if self.scs_ids is not None:
|
|
196
|
+
result['scsIds'] = self.scs_ids
|
|
197
|
+
if self.expansion_strategy is not None:
|
|
198
|
+
result['expansionStrategy'] = self.expansion_strategy
|
|
199
|
+
if self.shrinkage_strategy is not None:
|
|
200
|
+
result['shrinkageStrategy'] = self.shrinkage_strategy
|
|
201
|
+
if self.relation_tag is not None:
|
|
202
|
+
result['relationTag'] = self.relation_tag
|
|
203
|
+
if self.tags is not None:
|
|
204
|
+
result['tags'] = [i.to_dict() for i in self.tags]
|
|
205
|
+
if self.cmd_config is not None:
|
|
206
|
+
result['cmdConfig'] = self.cmd_config.to_dict()
|
|
207
|
+
if self.bcc_name_config is not None:
|
|
208
|
+
result['bccNameConfig'] = self.bcc_name_config.to_dict()
|
|
209
|
+
if self.eip_config is not None:
|
|
210
|
+
result['eipConfig'] = self.eip_config.to_dict()
|
|
211
|
+
if self.health_check is not None:
|
|
212
|
+
result['healthCheck'] = self.health_check.to_dict()
|
|
213
|
+
return result
|
|
214
|
+
|
|
215
|
+
def from_dict(self, m):
|
|
216
|
+
"""
|
|
217
|
+
Populate the response instance from a dictionary.
|
|
218
|
+
|
|
219
|
+
Nested dictionaries are recursively converted to model objects.
|
|
220
|
+
|
|
221
|
+
:param m: Dictionary containing response data
|
|
222
|
+
:type m: dict
|
|
223
|
+
|
|
224
|
+
:return: Self reference for method chaining
|
|
225
|
+
:rtype: GetAsGroupV2Response
|
|
226
|
+
|
|
227
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
228
|
+
:raises ValueError: If nested model conversion fails
|
|
229
|
+
"""
|
|
230
|
+
m = m or dict()
|
|
231
|
+
if m.get('groupId') is not None:
|
|
232
|
+
self.group_id = m.get('groupId')
|
|
233
|
+
if m.get('groupName') is not None:
|
|
234
|
+
self.group_name = m.get('groupName')
|
|
235
|
+
if m.get('region') is not None:
|
|
236
|
+
self.region = m.get('region')
|
|
237
|
+
if m.get('status') is not None:
|
|
238
|
+
self.status = m.get('status')
|
|
239
|
+
if m.get('vpcInfo') is not None:
|
|
240
|
+
self.vpc_info = VpcInfo().from_dict(m.get('vpcInfo'))
|
|
241
|
+
if m.get('zoneInfo') is not None:
|
|
242
|
+
self.zone_info = m.get('zoneInfo')
|
|
243
|
+
if m.get('config') is not None:
|
|
244
|
+
self.config = GroupConfig().from_dict(m.get('config'))
|
|
245
|
+
if m.get('keypairId') is not None:
|
|
246
|
+
self.keypair_id = m.get('keypairId')
|
|
247
|
+
if m.get('keypairName') is not None:
|
|
248
|
+
self.keypair_name = m.get('keypairName')
|
|
249
|
+
if m.get('keepImageLogin') is not None:
|
|
250
|
+
self.keep_image_login = m.get('keepImageLogin')
|
|
251
|
+
if m.get('blb') is not None:
|
|
252
|
+
self.blb = [BlbInfo().from_dict(i) for i in m.get('blb')]
|
|
253
|
+
if m.get('blbUnbindWaitTime') is not None:
|
|
254
|
+
self.blb_unbind_wait_time = m.get('blbUnbindWaitTime')
|
|
255
|
+
if m.get('nodeNum') is not None:
|
|
256
|
+
self.node_num = m.get('nodeNum')
|
|
257
|
+
if m.get('createTime') is not None:
|
|
258
|
+
self.create_time = m.get('createTime')
|
|
259
|
+
if m.get('rdsIds') is not None:
|
|
260
|
+
self.rds_ids = m.get('rdsIds')
|
|
261
|
+
if m.get('scsIds') is not None:
|
|
262
|
+
self.scs_ids = m.get('scsIds')
|
|
263
|
+
if m.get('expansionStrategy') is not None:
|
|
264
|
+
self.expansion_strategy = m.get('expansionStrategy')
|
|
265
|
+
if m.get('shrinkageStrategy') is not None:
|
|
266
|
+
self.shrinkage_strategy = m.get('shrinkageStrategy')
|
|
267
|
+
if m.get('relationTag') is not None:
|
|
268
|
+
self.relation_tag = m.get('relationTag')
|
|
269
|
+
if m.get('tags') is not None:
|
|
270
|
+
self.tags = [TagInfo().from_dict(i) for i in m.get('tags')]
|
|
271
|
+
if m.get('cmdConfig') is not None:
|
|
272
|
+
self.cmd_config = CmdConfig().from_dict(m.get('cmdConfig'))
|
|
273
|
+
if m.get('bccNameConfig') is not None:
|
|
274
|
+
self.bcc_name_config = BccNameConfig().from_dict(m.get('bccNameConfig'))
|
|
275
|
+
if m.get('eipConfig') is not None:
|
|
276
|
+
self.eip_config = EipConfig().from_dict(m.get('eipConfig'))
|
|
277
|
+
if m.get('healthCheck') is not None:
|
|
278
|
+
self.health_check = HealthCheckConfig().from_dict(m.get('healthCheck'))
|
|
279
|
+
return self
|