baiducloud-python-sdk-cloudassistant 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.
Files changed (59) hide show
  1. baiducloud_python_sdk_cloudassistant/__init__.py +5 -0
  2. baiducloud_python_sdk_cloudassistant/api/__init__.py +0 -0
  3. baiducloud_python_sdk_cloudassistant/api/cloudassistant_client.py +418 -0
  4. baiducloud_python_sdk_cloudassistant/models/__init__.py +54 -0
  5. baiducloud_python_sdk_cloudassistant/models/action.py +164 -0
  6. baiducloud_python_sdk_cloudassistant/models/action_filter.py +100 -0
  7. baiducloud_python_sdk_cloudassistant/models/action_index.py +74 -0
  8. baiducloud_python_sdk_cloudassistant/models/action_list_request.py +99 -0
  9. baiducloud_python_sdk_cloudassistant/models/action_list_response.py +94 -0
  10. baiducloud_python_sdk_cloudassistant/models/action_log_request.py +76 -0
  11. baiducloud_python_sdk_cloudassistant/models/action_log_response.py +94 -0
  12. baiducloud_python_sdk_cloudassistant/models/action_page.py +84 -0
  13. baiducloud_python_sdk_cloudassistant/models/action_run.py +130 -0
  14. baiducloud_python_sdk_cloudassistant/models/action_run_list_request.py +143 -0
  15. baiducloud_python_sdk_cloudassistant/models/action_run_list_response.py +94 -0
  16. baiducloud_python_sdk_cloudassistant/models/action_run_page.py +84 -0
  17. baiducloud_python_sdk_cloudassistant/models/action_run_request.py +101 -0
  18. baiducloud_python_sdk_cloudassistant/models/action_run_response.py +93 -0
  19. baiducloud_python_sdk_cloudassistant/models/agent.py +76 -0
  20. baiducloud_python_sdk_cloudassistant/models/batch_get_agent_request.py +61 -0
  21. baiducloud_python_sdk_cloudassistant/models/batch_get_agent_response.py +94 -0
  22. baiducloud_python_sdk_cloudassistant/models/child_run.py +135 -0
  23. baiducloud_python_sdk_cloudassistant/models/command.py +135 -0
  24. baiducloud_python_sdk_cloudassistant/models/command_filter.py +74 -0
  25. baiducloud_python_sdk_cloudassistant/models/create_action_request.py +105 -0
  26. baiducloud_python_sdk_cloudassistant/models/create_action_response.py +94 -0
  27. baiducloud_python_sdk_cloudassistant/models/delete_action_request.py +58 -0
  28. baiducloud_python_sdk_cloudassistant/models/delete_action_response.py +85 -0
  29. baiducloud_python_sdk_cloudassistant/models/execution.py +20 -0
  30. baiducloud_python_sdk_cloudassistant/models/file_upload.py +151 -0
  31. baiducloud_python_sdk_cloudassistant/models/get_action_request.py +64 -0
  32. baiducloud_python_sdk_cloudassistant/models/get_action_response.py +94 -0
  33. baiducloud_python_sdk_cloudassistant/models/get_action_run_request.py +88 -0
  34. baiducloud_python_sdk_cloudassistant/models/get_action_run_response.py +94 -0
  35. baiducloud_python_sdk_cloudassistant/models/host.py +58 -0
  36. baiducloud_python_sdk_cloudassistant/models/id.py +19 -0
  37. baiducloud_python_sdk_cloudassistant/models/instance_type.py +19 -0
  38. baiducloud_python_sdk_cloudassistant/models/keyword_type.py +19 -0
  39. baiducloud_python_sdk_cloudassistant/models/log.py +58 -0
  40. baiducloud_python_sdk_cloudassistant/models/log_result.py +84 -0
  41. baiducloud_python_sdk_cloudassistant/models/os.py +19 -0
  42. baiducloud_python_sdk_cloudassistant/models/output.py +82 -0
  43. baiducloud_python_sdk_cloudassistant/models/parameter.py +82 -0
  44. baiducloud_python_sdk_cloudassistant/models/scope.py +19 -0
  45. baiducloud_python_sdk_cloudassistant/models/state.py +20 -0
  46. baiducloud_python_sdk_cloudassistant/models/statistics.py +66 -0
  47. baiducloud_python_sdk_cloudassistant/models/tag.py +66 -0
  48. baiducloud_python_sdk_cloudassistant/models/target.py +106 -0
  49. baiducloud_python_sdk_cloudassistant/models/target_import.py +66 -0
  50. baiducloud_python_sdk_cloudassistant/models/target_selector.py +78 -0
  51. baiducloud_python_sdk_cloudassistant/models/target_selector_type.py +21 -0
  52. baiducloud_python_sdk_cloudassistant/models/type.py +19 -0
  53. baiducloud_python_sdk_cloudassistant/models/update_action_request.py +105 -0
  54. baiducloud_python_sdk_cloudassistant/models/update_action_response.py +85 -0
  55. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/LICENSE +177 -0
  56. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/METADATA +76 -0
  57. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/RECORD +59 -0
  58. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/WHEEL +5 -0
  59. baiducloud_python_sdk_cloudassistant-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,66 @@
1
+ """
2
+ Tag information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Tag(AbstractModel):
9
+ """
10
+ Tag
11
+ """
12
+
13
+ def __init__(self, tag_key=None, tag_value=None):
14
+ """
15
+ Initialize Tag instance.
16
+
17
+ :param tag_key: 标签 key
18
+ :type tag_key: str (optional)
19
+
20
+ :param tag_value: 标签 value
21
+ :type tag_value: str (optional)
22
+ """
23
+ super().__init__()
24
+ self.tag_key = tag_key
25
+ self.tag_value = tag_value
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.tag_key is not None:
41
+ result['tagKey'] = self.tag_key
42
+ if self.tag_value is not None:
43
+ result['tagValue'] = self.tag_value
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: Tag
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('tagKey') is not None:
63
+ self.tag_key = m.get('tagKey')
64
+ if m.get('tagValue') is not None:
65
+ self.tag_value = m.get('tagValue')
66
+ return self
@@ -0,0 +1,106 @@
1
+ """
2
+ Target information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Target(AbstractModel):
9
+ """
10
+ Target
11
+ """
12
+
13
+ def __init__(
14
+ self,
15
+ instance_type=None,
16
+ instance_id=None,
17
+ instance_name=None,
18
+ internal_ip=None,
19
+ external_ip=None,
20
+ bandwidth=None,
21
+ ):
22
+ """
23
+ Initialize Target instance.
24
+
25
+ :param instance_type: 实例类型。枚举值:BCC,BBC
26
+ :type instance_type: str (optional)
27
+
28
+ :param instance_id: 实例ID
29
+ :type instance_id: str (optional)
30
+
31
+ :param instance_name: 实例名称
32
+ :type instance_name: str (optional)
33
+
34
+ :param internal_ip: 内网IP
35
+ :type internal_ip: str (optional)
36
+
37
+ :param external_ip: 外网IP
38
+ :type external_ip: str (optional)
39
+
40
+ :param bandwidth: 带宽
41
+ :type bandwidth: str (optional)
42
+ """
43
+ super().__init__()
44
+ self.instance_type = instance_type
45
+ self.instance_id = instance_id
46
+ self.instance_name = instance_name
47
+ self.internal_ip = internal_ip
48
+ self.external_ip = external_ip
49
+ self.bandwidth = bandwidth
50
+
51
+ def to_dict(self):
52
+ """
53
+ Convert the model instance to a dictionary representation.
54
+
55
+ Nested model objects are recursively converted to dictionaries.
56
+
57
+ :return: Dictionary representation of the model
58
+ :rtype: dict
59
+ """
60
+ _map = super().to_dict()
61
+ if _map is not None:
62
+ return _map
63
+ result = dict()
64
+ if self.instance_type is not None:
65
+ result['instanceType'] = self.instance_type
66
+ if self.instance_id is not None:
67
+ result['instanceId'] = self.instance_id
68
+ if self.instance_name is not None:
69
+ result['instanceName'] = self.instance_name
70
+ if self.internal_ip is not None:
71
+ result['internalIp'] = self.internal_ip
72
+ if self.external_ip is not None:
73
+ result['externalIp'] = self.external_ip
74
+ if self.bandwidth is not None:
75
+ result['bandwidth'] = self.bandwidth
76
+ return result
77
+
78
+ def from_dict(self, m):
79
+ """
80
+ Populate the model instance from a dictionary.
81
+
82
+ Nested dictionaries are recursively converted to model objects.
83
+
84
+ :param m: Dictionary containing model data
85
+ :type m: dict
86
+
87
+ :return: Self reference for method chaining
88
+ :rtype: Target
89
+
90
+ :raises TypeError: If input is not a dictionary type
91
+ :raises ValueError: If nested model conversion fails
92
+ """
93
+ m = m or dict()
94
+ if m.get('instanceType') is not None:
95
+ self.instance_type = m.get('instanceType')
96
+ if m.get('instanceId') is not None:
97
+ self.instance_id = m.get('instanceId')
98
+ if m.get('instanceName') is not None:
99
+ self.instance_name = m.get('instanceName')
100
+ if m.get('internalIp') is not None:
101
+ self.internal_ip = m.get('internalIp')
102
+ if m.get('externalIp') is not None:
103
+ self.external_ip = m.get('externalIp')
104
+ if m.get('bandwidth') is not None:
105
+ self.bandwidth = m.get('bandwidth')
106
+ return self
@@ -0,0 +1,66 @@
1
+ """
2
+ TargetImport information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class TargetImport(AbstractModel):
9
+ """
10
+ TargetImport
11
+ """
12
+
13
+ def __init__(self, keyword_type=None, instances=None):
14
+ """
15
+ Initialize TargetImport instance.
16
+
17
+ :param keyword_type: 实例列表导入类型。枚举值:instanceId(通过实例ID导入),internalIp表示(通过实例内网导入)
18
+ :type keyword_type: str (optional)
19
+
20
+ :param instances: 实例清单列表
21
+ :type instances: List[str] (optional)
22
+ """
23
+ super().__init__()
24
+ self.keyword_type = keyword_type
25
+ self.instances = instances
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.keyword_type is not None:
41
+ result['keywordType'] = self.keyword_type
42
+ if self.instances is not None:
43
+ result['instances'] = self.instances
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: TargetImport
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('keywordType') is not None:
63
+ self.keyword_type = m.get('keywordType')
64
+ if m.get('instances') is not None:
65
+ self.instances = m.get('instances')
66
+ return self
@@ -0,0 +1,78 @@
1
+ """
2
+ TargetSelector information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+ from baiducloud_python_sdk_cloudassistant.models.tag import Tag
8
+
9
+ from baiducloud_python_sdk_cloudassistant.models.target_import import TargetImport
10
+
11
+
12
+ class TargetSelector(AbstractModel):
13
+ """
14
+ TargetSelector
15
+ """
16
+
17
+ def __init__(self, instance_type=None, tags=None, import_instances=None):
18
+ """
19
+ Initialize TargetSelector instance.
20
+
21
+ :param instance_type: 实例类型。枚举值:BCC,BBC
22
+ :type instance_type: str (optional)
23
+
24
+ :param tags: 实例标签列表
25
+ :type tags: List[Tag] (optional)
26
+
27
+ :param import_instances: import_instances attribute
28
+ :type import_instances: TargetImport (optional)
29
+ """
30
+ super().__init__()
31
+ self.instance_type = instance_type
32
+ self.tags = tags
33
+ self.import_instances = import_instances
34
+
35
+ def to_dict(self):
36
+ """
37
+ Convert the model instance to a dictionary representation.
38
+
39
+ Nested model objects are recursively converted to dictionaries.
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.instance_type is not None:
49
+ result['instanceType'] = self.instance_type
50
+ if self.tags is not None:
51
+ result['tags'] = [i.to_dict() for i in self.tags]
52
+ if self.import_instances is not None:
53
+ result['importInstances'] = self.import_instances.to_dict()
54
+ return result
55
+
56
+ def from_dict(self, m):
57
+ """
58
+ Populate the model instance from a dictionary.
59
+
60
+ Nested dictionaries are recursively converted to model objects.
61
+
62
+ :param m: Dictionary containing model data
63
+ :type m: dict
64
+
65
+ :return: Self reference for method chaining
66
+ :rtype: TargetSelector
67
+
68
+ :raises TypeError: If input is not a dictionary type
69
+ :raises ValueError: If nested model conversion fails
70
+ """
71
+ m = m or dict()
72
+ if m.get('instanceType') is not None:
73
+ self.instance_type = m.get('instanceType')
74
+ if m.get('tags') is not None:
75
+ self.tags = [Tag().from_dict(i) for i in m.get('tags')]
76
+ if m.get('importInstances') is not None:
77
+ self.import_instances = TargetImport().from_dict(m.get('importInstances'))
78
+ return self
@@ -0,0 +1,21 @@
1
+ """
2
+ TargetSelectorType information
3
+ """
4
+
5
+
6
+ class TargetSelectorType:
7
+ """
8
+ Enum class for TargetSelectorType
9
+ Allowed values: INSTANCES_LIST, ALL_INSTANCES, TAG_INSTANCES, INSTANCES_IMPORT
10
+ """
11
+
12
+ INSTANCES_LIST = 'INSTANCES_LIST'
13
+ ALL_INSTANCES = 'ALL_INSTANCES'
14
+ TAG_INSTANCES = 'TAG_INSTANCES'
15
+ INSTANCES_IMPORT = 'INSTANCES_IMPORT'
16
+
17
+ @staticmethod
18
+ def is_valid(value):
19
+ """Check if the value is valid for this enum"""
20
+ valid_values = ['INSTANCES_LIST', 'ALL_INSTANCES', 'TAG_INSTANCES', 'INSTANCES_IMPORT']
21
+ return value in valid_values
@@ -0,0 +1,19 @@
1
+ """
2
+ Type information
3
+ """
4
+
5
+
6
+ class Type:
7
+ """
8
+ Enum class for Type
9
+ Allowed values: SHELL, POWERSHELL
10
+ """
11
+
12
+ SHELL = 'SHELL'
13
+ POWERSHELL = 'POWERSHELL'
14
+
15
+ @staticmethod
16
+ def is_valid(value):
17
+ """Check if the value is valid for this enum"""
18
+ valid_values = ['SHELL', 'POWERSHELL']
19
+ return value in valid_values
@@ -0,0 +1,105 @@
1
+ """
2
+ Request entity for UpdateActionRequest information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+ from baiducloud_python_sdk_cloudassistant.models.action import Action
7
+ from baiducloud_python_sdk_cloudassistant.models.target import Target
8
+ from baiducloud_python_sdk_cloudassistant.models.target_selector import TargetSelector
9
+
10
+
11
+ class UpdateActionRequest(AbstractModel):
12
+ """
13
+ Request entity for UpdateActionRequest operation.
14
+
15
+ This class encapsulates all parameters for the API request.
16
+ """
17
+
18
+ def __init__(
19
+ self, execution, action, parameters=None, target_selector_type=None, targets=None, target_selector=None
20
+ ):
21
+ """
22
+ Initialize UpdateActionRequest request entity.
23
+
24
+ :param execution: 执行动作。SAVE(仅保存),RUN(仅执行),SAVE_AND_RUN(保存并执行)
25
+ :type execution: str (required)
26
+
27
+ :param action: action parameter
28
+ :type action: Action (required)
29
+
30
+ :param parameters: 执行命令时的参数值,仅在命令有参数且需要执行时需要
31
+ :type parameters: object (optional)
32
+
33
+ :param target_selector_type: target_selector_type parameter
34
+ :type target_selector_type: str (optional)
35
+
36
+ :param targets: 实例ID列表,仅在targetSelectorType为INSTANCES_LIST时需要
37
+ :type targets: List[Target] (optional)
38
+
39
+ :param target_selector: target_selector parameter
40
+ :type target_selector: TargetSelector (optional)
41
+ """
42
+ super().__init__()
43
+ self.execution = execution
44
+ self.action = action
45
+ self.parameters = parameters
46
+ self.target_selector_type = target_selector_type
47
+ self.targets = targets
48
+ self.target_selector = target_selector
49
+
50
+ def to_dict(self):
51
+ """
52
+ Convert the request entity to a dictionary representation.
53
+
54
+ Nested model objects are recursively converted to dictionaries.
55
+
56
+ :return: Dictionary representation of the request
57
+ :rtype: dict
58
+ """
59
+ _map = super().to_dict()
60
+ if _map is not None:
61
+ return _map
62
+ result = dict()
63
+ if self.execution is not None:
64
+ result['execution'] = self.execution
65
+ if self.action is not None:
66
+ result['action'] = self.action.to_dict()
67
+ if self.parameters is not None:
68
+ result['parameters'] = self.parameters
69
+ if self.target_selector_type is not None:
70
+ result['targetSelectorType'] = self.target_selector_type
71
+ if self.targets is not None:
72
+ result['targets'] = [i.to_dict() for i in self.targets]
73
+ if self.target_selector is not None:
74
+ result['targetSelector'] = self.target_selector.to_dict()
75
+ return result
76
+
77
+ def from_dict(self, m):
78
+ """
79
+ Populate the request entity from a dictionary.
80
+
81
+ Nested dictionaries are recursively converted to model objects.
82
+
83
+ :param m: Dictionary containing request data
84
+ :type m: dict
85
+
86
+ :return: Self reference for method chaining
87
+ :rtype: UpdateActionRequest
88
+
89
+ :raises TypeError: If input is not a dictionary or field type mismatch
90
+ :raises ValueError: If nested model conversion fails
91
+ """
92
+ m = m or dict()
93
+ if m.get('execution') is not None:
94
+ self.execution = m.get('execution')
95
+ if m.get('action') is not None:
96
+ self.action = Action().from_dict(m.get('action'))
97
+ if m.get('parameters') is not None:
98
+ self.parameters = m.get('parameters')
99
+ if m.get('targetSelectorType') is not None:
100
+ self.target_selector_type = m.get('targetSelectorType')
101
+ if m.get('targets') is not None:
102
+ self.targets = [Target().from_dict(i) for i in m.get('targets')]
103
+ if m.get('targetSelector') is not None:
104
+ self.target_selector = TargetSelector().from_dict(m.get('targetSelector'))
105
+ return self
@@ -0,0 +1,85 @@
1
+ """
2
+ Request entity for UpdateActionResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+
7
+
8
+ class UpdateActionResponse(BceResponse):
9
+ """
10
+ UpdateActionResponse
11
+ """
12
+
13
+ def __init__(self, request_id=None, code=None, message=None, success=None):
14
+ """
15
+ Initialize UpdateActionResponse response.
16
+
17
+ :param request_id: 请求id
18
+ :type request_id: str (optional)
19
+
20
+ :param code: 响应状态,成功为success
21
+ :type code: str (optional)
22
+
23
+ :param message: 错误信息
24
+ :type message: str (optional)
25
+
26
+ :param success: 请求是否处理成功
27
+ :type success: bool (optional)
28
+ """
29
+ super().__init__()
30
+ self.request_id = request_id
31
+ self.code = code
32
+ self.message = message
33
+ self.success = success
34
+
35
+ def to_dict(self):
36
+ """
37
+ Convert the response instance to a dictionary representation.
38
+
39
+ Includes metadata from the parent BceResponse class.
40
+ Nested model objects are recursively converted to dictionaries.
41
+
42
+ :return: Dictionary representation of the response
43
+ :rtype: dict
44
+ """
45
+ _map = super().to_dict()
46
+ if _map is not None:
47
+ return _map
48
+ result = dict()
49
+ if self.metadata is not None:
50
+ result['metadata'] = dict(self.metadata)
51
+ if self.request_id is not None:
52
+ result['requestId'] = self.request_id
53
+ if self.code is not None:
54
+ result['code'] = self.code
55
+ if self.message is not None:
56
+ result['message'] = self.message
57
+ if self.success is not None:
58
+ result['success'] = self.success
59
+ return result
60
+
61
+ def from_dict(self, m):
62
+ """
63
+ Populate the response instance from a dictionary.
64
+
65
+ Nested dictionaries are recursively converted to model objects.
66
+
67
+ :param m: Dictionary containing response data
68
+ :type m: dict
69
+
70
+ :return: Self reference for method chaining
71
+ :rtype: UpdateActionResponse
72
+
73
+ :raises TypeError: If input is not a dictionary or field type mismatch
74
+ :raises ValueError: If nested model conversion fails
75
+ """
76
+ m = m or dict()
77
+ if m.get('requestId') is not None:
78
+ self.request_id = m.get('requestId')
79
+ if m.get('code') is not None:
80
+ self.code = m.get('code')
81
+ if m.get('message') is not None:
82
+ self.message = m.get('message')
83
+ if m.get('success') is not None:
84
+ self.success = m.get('success')
85
+ return self