bce-python-sdk 0.9.19__py3-none-any.whl → 0.9.21__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.
- baidubce/__init__.py +1 -1
- baidubce/services/bbc/bbc_client.py +39 -1
- baidubce/services/rds/rds_client.py +2902 -0
- baidubce/services/rds/rds_model.py +269 -0
- {bce_python_sdk-0.9.19.dist-info → bce_python_sdk-0.9.21.dist-info}/METADATA +1 -1
- {bce_python_sdk-0.9.19.dist-info → bce_python_sdk-0.9.21.dist-info}/RECORD +8 -18
- {bce_python_sdk-0.9.19.dist-info → bce_python_sdk-0.9.21.dist-info}/WHEEL +1 -1
- baidubce/services/rds/rds_backup_manager.py +0 -381
- baidubce/services/rds/rds_database_manager.py +0 -172
- baidubce/services/rds/rds_hot_active_instance_group_manager.py +0 -520
- baidubce/services/rds/rds_http.py +0 -288
- baidubce/services/rds/rds_instance_manager.py +0 -1009
- baidubce/services/rds/rds_log_manager.py +0 -284
- baidubce/services/rds/rds_parameter_manager.py +0 -530
- baidubce/services/rds/rds_readonly_group_manager.py +0 -481
- baidubce/services/rds/rds_recycler_manager.py +0 -131
- baidubce/services/rds/rds_security_manager.py +0 -158
- baidubce/services/rds/rds_task_manager.py +0 -106
- baidubce/services/rds/rds_users_manager.py +0 -306
- {bce_python_sdk-0.9.19.dist-info → bce_python_sdk-0.9.21.dist-info}/top_level.txt +0 -0
baidubce/__init__.py
CHANGED
|
@@ -70,7 +70,7 @@ class BbcClient(bce_base_client.BceBaseClient):
|
|
|
70
70
|
def create_instance(self, flavor_id, image_id, raid_id, root_disk_size_in_gb=20, purchase_count=1,
|
|
71
71
|
zone_name=None, subnet_id=None, billing=None, name=None, admin_pass=None,
|
|
72
72
|
auto_renew_time_unit=None, auto_renew_time=0, deploy_set_id=None, enable_ht=False,
|
|
73
|
-
security_group_id=None, client_token=None, config=None):
|
|
73
|
+
security_group_id=None, client_token=None, config=None, tags=None):
|
|
74
74
|
|
|
75
75
|
"""
|
|
76
76
|
Create a bbc instance with the specified options.
|
|
@@ -159,6 +159,10 @@ class BbcClient(bce_base_client.BceBaseClient):
|
|
|
159
159
|
https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
|
|
160
160
|
:type client_token: string
|
|
161
161
|
|
|
162
|
+
:param tags:
|
|
163
|
+
List of tags to be bind
|
|
164
|
+
:type tags: list
|
|
165
|
+
|
|
162
166
|
:return:
|
|
163
167
|
:rtype baidubce.bce_response.BceResponse
|
|
164
168
|
"""
|
|
@@ -208,6 +212,8 @@ class BbcClient(bce_base_client.BceBaseClient):
|
|
|
208
212
|
body['autoRenewTimeUnit'] = auto_renew_time_unit
|
|
209
213
|
if auto_renew_time != 0:
|
|
210
214
|
body['autoRenewTime'] = auto_renew_time
|
|
215
|
+
if tags is not None:
|
|
216
|
+
body['tags'] = tags
|
|
211
217
|
return self._send_request(http_methods.POST, path, json.dumps(body),
|
|
212
218
|
params=params, config=config)
|
|
213
219
|
|
|
@@ -707,6 +713,38 @@ class BbcClient(bce_base_client.BceBaseClient):
|
|
|
707
713
|
return self._send_request(http_methods.PUT, path, body=json.dumps(body),
|
|
708
714
|
params=params, config=config)
|
|
709
715
|
|
|
716
|
+
@required(instance_id=(bytes, str), change_tags = list)
|
|
717
|
+
def bind_tags(self, instance_id, change_tags, config=None):
|
|
718
|
+
"""
|
|
719
|
+
bind the tags of existing instances
|
|
720
|
+
|
|
721
|
+
:param instance_id:
|
|
722
|
+
The id of instance.
|
|
723
|
+
:type instance_id: string
|
|
724
|
+
|
|
725
|
+
:param change_tags:
|
|
726
|
+
List of tags to be bind
|
|
727
|
+
:type change_tags: list
|
|
728
|
+
|
|
729
|
+
:return:
|
|
730
|
+
:rtype baidubce.bce_response.BceResponse
|
|
731
|
+
|
|
732
|
+
"""
|
|
733
|
+
instance_id = compat.convert_to_bytes(instance_id)
|
|
734
|
+
path = b'/instance/%s/tag' % instance_id
|
|
735
|
+
|
|
736
|
+
params = {
|
|
737
|
+
'bind': None
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
body = {
|
|
741
|
+
'changeTags': change_tags
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
return self._send_request(http_methods.PUT, path, body=json.dumps(body),
|
|
745
|
+
params=params, config=config)
|
|
746
|
+
|
|
747
|
+
|
|
710
748
|
@required(reserved_instance_ids=list,
|
|
711
749
|
tags=list)
|
|
712
750
|
def bind_reserved_instance_to_tags(self, reserved_instance_ids, tags, config=None):
|