baiducloud-python-sdk-rds 0.0.5__py3-none-any.whl → 0.0.6__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_rds/__init__.py +1 -1
- baiducloud_python_sdk_rds/api/rds_client.py +31 -1
- baiducloud_python_sdk_rds/models/__init__.py +3 -0
- baiducloud_python_sdk_rds/models/instance.py +8 -8
- baiducloud_python_sdk_rds/models/instance_subnet.py +98 -0
- baiducloud_python_sdk_rds/models/query_the_details_of_the_specified_instance_request.py +58 -0
- baiducloud_python_sdk_rds/models/query_the_details_of_the_specified_instance_response.py +1160 -0
- baiducloud_python_sdk_rds/models/resource_info.py +8 -8
- {baiducloud_python_sdk_rds-0.0.5.dist-info → baiducloud_python_sdk_rds-0.0.6.dist-info}/METADATA +1 -1
- {baiducloud_python_sdk_rds-0.0.5.dist-info → baiducloud_python_sdk_rds-0.0.6.dist-info}/RECORD +13 -10
- {baiducloud_python_sdk_rds-0.0.5.dist-info → baiducloud_python_sdk_rds-0.0.6.dist-info}/LICENSE +0 -0
- {baiducloud_python_sdk_rds-0.0.5.dist-info → baiducloud_python_sdk_rds-0.0.6.dist-info}/WHEEL +0 -0
- {baiducloud_python_sdk_rds-0.0.5.dist-info → baiducloud_python_sdk_rds-0.0.6.dist-info}/top_level.txt +0 -0
|
@@ -25,6 +25,9 @@ from baiducloud_python_sdk_rds.models.does_the_instance_support_enabling_automat
|
|
|
25
25
|
from baiducloud_python_sdk_rds.models.query_instance_list_response import QueryInstanceListResponse
|
|
26
26
|
from baiducloud_python_sdk_rds.models.query_subnet_list_response import QuerySubnetListResponse
|
|
27
27
|
from baiducloud_python_sdk_rds.models.query_task_list_response import QueryTaskListResponse
|
|
28
|
+
from baiducloud_python_sdk_rds.models.query_the_details_of_the_specified_instance_response import (
|
|
29
|
+
QueryTheDetailsOfTheSpecifiedInstanceResponse,
|
|
30
|
+
)
|
|
28
31
|
from baiducloud_python_sdk_rds.models.query_the_list_of_available_zones_response import (
|
|
29
32
|
QueryTheListOfAvailableZonesResponse,
|
|
30
33
|
)
|
|
@@ -400,6 +403,28 @@ class RdsClient(BceBaseClient):
|
|
|
400
403
|
model=QueryTaskListResponse,
|
|
401
404
|
)
|
|
402
405
|
|
|
406
|
+
def query_the_details_of_the_specified_instance(self, request, config=None):
|
|
407
|
+
"""
|
|
408
|
+
query_the_details_of_the_specified_instance
|
|
409
|
+
|
|
410
|
+
:param request: Request entity containing all parameters
|
|
411
|
+
:type request: RdsClientRequest
|
|
412
|
+
:param config: Optional request configuration override
|
|
413
|
+
:type config: baiducloud_python_sdk_core.BceClientConfiguration
|
|
414
|
+
|
|
415
|
+
:return: API response containing QueryTheDetailsOfTheSpecifiedInstanceResponse data
|
|
416
|
+
:rtype: QueryTheDetailsOfTheSpecifiedInstanceResponse
|
|
417
|
+
|
|
418
|
+
:raises BceClientError: Client error (network failure, invalid parameters, etc.)
|
|
419
|
+
:raises BceServerError: Server error (4xx/5xx HTTP status codes)
|
|
420
|
+
"""
|
|
421
|
+
path = utils.append_uri(RdsClient.VERSION_V1, RdsClient.CONSTANT_INSTANCE, request.instance_id)
|
|
422
|
+
headers = None
|
|
423
|
+
merged_config = self._create_request_with_host(request, config)
|
|
424
|
+
return self._send_request(
|
|
425
|
+
http_methods.GET, path=path, config=merged_config, model=QueryTheDetailsOfTheSpecifiedInstanceResponse
|
|
426
|
+
)
|
|
427
|
+
|
|
403
428
|
def query_the_list_of_available_zones(self, config=None):
|
|
404
429
|
"""
|
|
405
430
|
query_the_list_of_available_zones
|
|
@@ -435,8 +460,13 @@ class RdsClient(BceBaseClient):
|
|
|
435
460
|
"""
|
|
436
461
|
path = utils.append_uri(RdsClient.VERSION_V1, RdsClient.CONSTANT_INSTANCE)
|
|
437
462
|
headers = None
|
|
463
|
+
params = {}
|
|
464
|
+
if request.instance_ids is not None:
|
|
465
|
+
params['instanceIds'] = request.instance_ids
|
|
438
466
|
merged_config = self._create_request_with_host(request, config)
|
|
439
|
-
return self._send_request(
|
|
467
|
+
return self._send_request(
|
|
468
|
+
http_methods.DELETE, path=path, params=params, config=merged_config, model=ReleaseInstanceResponse
|
|
469
|
+
)
|
|
440
470
|
|
|
441
471
|
def renewal_example(self, request, config=None):
|
|
442
472
|
"""
|
|
@@ -29,6 +29,7 @@ from .initial_data_reference import InitialDataReference
|
|
|
29
29
|
from .instance import Instance
|
|
30
30
|
from .instance_dict import InstanceDict
|
|
31
31
|
from .instance_enables_automatic_renewal_request import InstanceEnablesAutomaticRenewalRequest
|
|
32
|
+
from .instance_subnet import InstanceSubnet
|
|
32
33
|
from .machine_po import MachinePO
|
|
33
34
|
from .master_id_mapping import MasterIdMapping
|
|
34
35
|
from .progress import Progress
|
|
@@ -36,6 +37,7 @@ from .query_instance_list_response import QueryInstanceListResponse
|
|
|
36
37
|
from .query_subnet_list_response import QuerySubnetListResponse
|
|
37
38
|
from .query_task_list_request import QueryTaskListRequest
|
|
38
39
|
from .query_task_list_response import QueryTaskListResponse
|
|
40
|
+
from .query_the_details_of_the_specified_instance_response import QueryTheDetailsOfTheSpecifiedInstanceResponse
|
|
39
41
|
from .query_the_list_of_available_zones_response import QueryTheListOfAvailableZonesResponse
|
|
40
42
|
from .read_replica_id_mapping import ReadReplicaIdMapping
|
|
41
43
|
from .recovery_to_source_instance_model import RecoveryToSourceInstanceModel
|
|
@@ -74,6 +76,7 @@ from .cluster_status_check_request import ClusterStatusCheckRequest
|
|
|
74
76
|
from .query_instance_list_request import QueryInstanceListRequest
|
|
75
77
|
from .dial_test_interface_request import DialTestInterfaceRequest
|
|
76
78
|
from .release_instance_request import ReleaseInstanceRequest
|
|
79
|
+
from .query_the_details_of_the_specified_instance_request import QueryTheDetailsOfTheSpecifiedInstanceRequest
|
|
77
80
|
from .retrieve_instance_auto_scaling_config_request import RetrieveInstanceAutoScalingConfigRequest
|
|
78
81
|
from .query_subnet_list_request import QuerySubnetListRequest
|
|
79
82
|
from .does_the_instance_support_enabling_automatic_expansion_request import (
|
|
@@ -168,10 +168,10 @@ class Instance(AbstractModel):
|
|
|
168
168
|
:param instance_name: 实例名称
|
|
169
169
|
:type instance_name: str (optional)
|
|
170
170
|
|
|
171
|
-
:param engine:
|
|
171
|
+
:param engine: engine attribute
|
|
172
172
|
:type engine: str (optional)
|
|
173
173
|
|
|
174
|
-
:param engine_version:
|
|
174
|
+
:param engine_version: engine_version attribute
|
|
175
175
|
:type engine_version: str (optional)
|
|
176
176
|
|
|
177
177
|
:param rds_minor_version: 实例小版本
|
|
@@ -189,13 +189,13 @@ class Instance(AbstractModel):
|
|
|
189
189
|
:param allocated_memory_in_mb: 分配内大小(单位:MB)
|
|
190
190
|
:type allocated_memory_in_mb: int (optional)
|
|
191
191
|
|
|
192
|
-
:param allocated_memory_in_gb:
|
|
193
|
-
:type allocated_memory_in_gb:
|
|
192
|
+
:param allocated_memory_in_gb: 分配内存大小(单位:GB)
|
|
193
|
+
:type allocated_memory_in_gb: float (optional)
|
|
194
194
|
|
|
195
195
|
:param memory_capacity: 实例内存(单位:GB)
|
|
196
196
|
:type memory_capacity: float (optional)
|
|
197
197
|
|
|
198
|
-
:param allocated_storage_in_gb:
|
|
198
|
+
:param allocated_storage_in_gb: 分配存储存空间(单位:GB)
|
|
199
199
|
:type allocated_storage_in_gb: int (optional)
|
|
200
200
|
|
|
201
201
|
:param volume_capacity: 存储空间(单位:GB)
|
|
@@ -213,7 +213,7 @@ class Instance(AbstractModel):
|
|
|
213
213
|
:param used_storage: 已用存储空间(单位GB)
|
|
214
214
|
:type used_storage: float (optional)
|
|
215
215
|
|
|
216
|
-
:param cpu_count: CPU
|
|
216
|
+
:param cpu_count: CPU核数
|
|
217
217
|
:type cpu_count: int (optional)
|
|
218
218
|
|
|
219
219
|
:param instance_type: instance_type attribute
|
|
@@ -300,7 +300,7 @@ class Instance(AbstractModel):
|
|
|
300
300
|
:param application_type: 所属系列,single:单机基础版,normal:双机高可用版
|
|
301
301
|
:type application_type: str (optional)
|
|
302
302
|
|
|
303
|
-
:param node_amount:
|
|
303
|
+
:param node_amount: 节点数(代理实例)
|
|
304
304
|
:type node_amount: int (optional)
|
|
305
305
|
|
|
306
306
|
:param old_instance: 旧实例数量
|
|
@@ -477,7 +477,7 @@ class Instance(AbstractModel):
|
|
|
477
477
|
:param dcc_hosts: dcc主机对象
|
|
478
478
|
:type dcc_hosts: List[MachinePO] (optional)
|
|
479
479
|
|
|
480
|
-
:param category:
|
|
480
|
+
:param category: 所属系列。Singleton:单机基础版,null:双机高可用版
|
|
481
481
|
:type category: str (optional)
|
|
482
482
|
|
|
483
483
|
:param name: 实例名称,只给iam的实例列表接口使用,其他接口不要用
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""
|
|
2
|
+
InstanceSubnet information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class InstanceSubnet(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
InstanceSubnet
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, name=None, subnet_id=None, az=None, zone_name=None, cidr=None, short_id=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize InstanceSubnet instance.
|
|
16
|
+
|
|
17
|
+
:param name: 子网名称。
|
|
18
|
+
:type name: str (optional)
|
|
19
|
+
|
|
20
|
+
:param subnet_id: 子网长ID。
|
|
21
|
+
:type subnet_id: str (optional)
|
|
22
|
+
|
|
23
|
+
:param az: 可用区。
|
|
24
|
+
:type az: str (optional)
|
|
25
|
+
|
|
26
|
+
:param zone_name: 可用区名称。
|
|
27
|
+
:type zone_name: str (optional)
|
|
28
|
+
|
|
29
|
+
:param cidr: Ipv4地址及子网掩码。
|
|
30
|
+
:type cidr: str (optional)
|
|
31
|
+
|
|
32
|
+
:param short_id: 子网短ID。
|
|
33
|
+
:type short_id: str (optional)
|
|
34
|
+
"""
|
|
35
|
+
super().__init__()
|
|
36
|
+
self.name = name
|
|
37
|
+
self.subnet_id = subnet_id
|
|
38
|
+
self.az = az
|
|
39
|
+
self.zone_name = zone_name
|
|
40
|
+
self.cidr = cidr
|
|
41
|
+
self.short_id = short_id
|
|
42
|
+
|
|
43
|
+
def to_dict(self):
|
|
44
|
+
"""
|
|
45
|
+
Convert the model instance to a dictionary representation.
|
|
46
|
+
|
|
47
|
+
Nested model objects are recursively converted to dictionaries.
|
|
48
|
+
|
|
49
|
+
:return: Dictionary representation of the model
|
|
50
|
+
:rtype: dict
|
|
51
|
+
"""
|
|
52
|
+
_map = super().to_dict()
|
|
53
|
+
if _map is not None:
|
|
54
|
+
return _map
|
|
55
|
+
result = dict()
|
|
56
|
+
if self.name is not None:
|
|
57
|
+
result['name'] = self.name
|
|
58
|
+
if self.subnet_id is not None:
|
|
59
|
+
result['subnetId'] = self.subnet_id
|
|
60
|
+
if self.az is not None:
|
|
61
|
+
result['az'] = self.az
|
|
62
|
+
if self.zone_name is not None:
|
|
63
|
+
result['zoneName'] = self.zone_name
|
|
64
|
+
if self.cidr is not None:
|
|
65
|
+
result['cidr'] = self.cidr
|
|
66
|
+
if self.short_id is not None:
|
|
67
|
+
result['shortId'] = self.short_id
|
|
68
|
+
return result
|
|
69
|
+
|
|
70
|
+
def from_dict(self, m):
|
|
71
|
+
"""
|
|
72
|
+
Populate the model instance from a dictionary.
|
|
73
|
+
|
|
74
|
+
Nested dictionaries are recursively converted to model objects.
|
|
75
|
+
|
|
76
|
+
:param m: Dictionary containing model data
|
|
77
|
+
:type m: dict
|
|
78
|
+
|
|
79
|
+
:return: Self reference for method chaining
|
|
80
|
+
:rtype: InstanceSubnet
|
|
81
|
+
|
|
82
|
+
:raises TypeError: If input is not a dictionary type
|
|
83
|
+
:raises ValueError: If nested model conversion fails
|
|
84
|
+
"""
|
|
85
|
+
m = m or dict()
|
|
86
|
+
if m.get('name') is not None:
|
|
87
|
+
self.name = m.get('name')
|
|
88
|
+
if m.get('subnetId') is not None:
|
|
89
|
+
self.subnet_id = m.get('subnetId')
|
|
90
|
+
if m.get('az') is not None:
|
|
91
|
+
self.az = m.get('az')
|
|
92
|
+
if m.get('zoneName') is not None:
|
|
93
|
+
self.zone_name = m.get('zoneName')
|
|
94
|
+
if m.get('cidr') is not None:
|
|
95
|
+
self.cidr = m.get('cidr')
|
|
96
|
+
if m.get('shortId') is not None:
|
|
97
|
+
self.short_id = m.get('shortId')
|
|
98
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for QueryTheDetailsOfTheSpecifiedInstanceRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class QueryTheDetailsOfTheSpecifiedInstanceRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for QueryTheDetailsOfTheSpecifiedInstanceRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, instance_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize QueryTheDetailsOfTheSpecifiedInstanceRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param instance_id: instance_id parameter
|
|
20
|
+
:type instance_id: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.instance_id = instance_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: QueryTheDetailsOfTheSpecifiedInstanceRequest
|
|
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('instanceId') is not None:
|
|
57
|
+
self.instance_id = m.get('instanceId')
|
|
58
|
+
return self
|