bce-python-sdk 0.9.11__py3-none-any.whl → 0.9.17__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 +21 -0
- baidubce/services/bcc/bcc_client.py +235 -11
- baidubce/services/sms/sms_client.py +14 -4
- baidubce/services/vca/vca_client.py +10 -0
- {bce_python_sdk-0.9.11.dist-info → bce_python_sdk-0.9.17.dist-info}/METADATA +1 -1
- {bce_python_sdk-0.9.11.dist-info → bce_python_sdk-0.9.17.dist-info}/RECORD +9 -9
- {bce_python_sdk-0.9.11.dist-info → bce_python_sdk-0.9.17.dist-info}/WHEEL +1 -1
- {bce_python_sdk-0.9.11.dist-info → bce_python_sdk-0.9.17.dist-info}/top_level.txt +0 -0
baidubce/__init__.py
CHANGED
|
@@ -457,6 +457,27 @@ class BbcClient(bce_base_client.BceBaseClient):
|
|
|
457
457
|
return self._send_request(http_methods.POST, path, json.dumps(body),
|
|
458
458
|
params=params, config=config)
|
|
459
459
|
|
|
460
|
+
def describe_regions(self, region, config=None):
|
|
461
|
+
"""
|
|
462
|
+
List all region's endpoint information with the specific parameters.
|
|
463
|
+
Use global endpoint bbc.baidubce.com to get BBC's endpoint.
|
|
464
|
+
|
|
465
|
+
:param region:
|
|
466
|
+
The id of region.
|
|
467
|
+
:type region: string
|
|
468
|
+
|
|
469
|
+
:return:
|
|
470
|
+
:rtype baidubce.bce_response.BceResponse
|
|
471
|
+
"""
|
|
472
|
+
|
|
473
|
+
path = b'/region/describeRegions'
|
|
474
|
+
body = {
|
|
475
|
+
'region': region
|
|
476
|
+
}
|
|
477
|
+
params = {}
|
|
478
|
+
return self._send_request(http_methods.POST, path, json.dumps(body),
|
|
479
|
+
params=params, config=config, api_version=self.prefix_v2)
|
|
480
|
+
|
|
460
481
|
@required(instance_id=(bytes, str),
|
|
461
482
|
name=(bytes, str))
|
|
462
483
|
def modify_instance_name(self, instance_id, name, config=None):
|
|
@@ -88,7 +88,7 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
88
88
|
zone_name=None, subnet_id=None, security_group_id=None, gpuCard=None, fpgaCard=None,
|
|
89
89
|
spec=None, eip_name=None, hostname=None, auto_seq_suffix=False, is_open_hostname_domain=False,
|
|
90
90
|
relation_tag=None, is_open_ipv6=None, enterprise_security_group_id=None,
|
|
91
|
-
security_group_ids=None, enterprise_security_group_ids=None,
|
|
91
|
+
security_group_ids=None, enterprise_security_group_ids=None, ehc_cluster_id=None,
|
|
92
92
|
kunlunCard=None, isomerismCard=None, file_systems=None, user_data=None, is_open_hosteye=False,
|
|
93
93
|
deletion_protection=None, res_group_id=None,
|
|
94
94
|
client_token=None, config=None, card_count=1, isomerism_card=None):
|
|
@@ -315,6 +315,10 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
315
315
|
enterprise_security_group_ids
|
|
316
316
|
:type enterprise_security_group_ids: list<string>
|
|
317
317
|
|
|
318
|
+
:param ehc_cluster_id:
|
|
319
|
+
The id of ehcCluster.
|
|
320
|
+
:type ehc_cluster_id: string
|
|
321
|
+
|
|
318
322
|
:param kunlunCard:
|
|
319
323
|
This parameter is obsolete. Use parameter isomerism_card instead.
|
|
320
324
|
:type kunlunCard: string
|
|
@@ -418,6 +422,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
418
422
|
body['securityGroupIds'] = security_group_ids
|
|
419
423
|
if enterprise_security_group_ids is not None:
|
|
420
424
|
body['enterpriseSecurityGroupIds'] = enterprise_security_group_ids
|
|
425
|
+
if ehc_cluster_id is not None:
|
|
426
|
+
body['ehcClusterId'] = ehc_cluster_id
|
|
421
427
|
if gpuCard is not None:
|
|
422
428
|
body['gpuCard'] = gpuCard
|
|
423
429
|
body['cardCount'] = card_count if card_count > 1 else 1
|
|
@@ -1069,7 +1075,7 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1069
1075
|
params=params, config=config)
|
|
1070
1076
|
|
|
1071
1077
|
def list_instances(self, marker=None, max_keys=None, internal_ip=None, dedicated_host_id=None,
|
|
1072
|
-
zone_name=None, instance_ids=None, instance_names=None, cds_ids=None,
|
|
1078
|
+
zone_name=None, instance_ids=None, instance_names=None, cds_ids=None, ehc_cluster_id=None,
|
|
1073
1079
|
deployset_ids=None, security_group_ids=None, payment_timing=None, status=None, tags=None,
|
|
1074
1080
|
vpc_id=None, private_ips=None, ipv6_addresses=None, auto_renew=None, config=None):
|
|
1075
1081
|
"""
|
|
@@ -1111,6 +1117,10 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1111
1117
|
filter instance list with multiple cds ids join by ','
|
|
1112
1118
|
:type cds_ids: string
|
|
1113
1119
|
|
|
1120
|
+
:param ehc_cluster_id:
|
|
1121
|
+
get instance list filtered by id of ehc cluster
|
|
1122
|
+
:type ehc_cluster_id: string
|
|
1123
|
+
|
|
1114
1124
|
:param deployset_ids:
|
|
1115
1125
|
filter instance list with multiple deployset ids join by ','
|
|
1116
1126
|
:type deployset_ids: string
|
|
@@ -1171,8 +1181,10 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1171
1181
|
params['instanceNames'] = instance_names
|
|
1172
1182
|
if cds_ids is not None:
|
|
1173
1183
|
params['cdsIds'] = cds_ids
|
|
1184
|
+
if ehc_cluster_id is not None:
|
|
1185
|
+
params['ehcClusterId'] = ehc_cluster_id
|
|
1174
1186
|
if deployset_ids is not None:
|
|
1175
|
-
params['
|
|
1187
|
+
params['deploySetIds'] = deployset_ids
|
|
1176
1188
|
if security_group_ids is not None:
|
|
1177
1189
|
params['securityGroupIds'] = security_group_ids
|
|
1178
1190
|
if payment_timing is not None:
|
|
@@ -1306,13 +1318,28 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1306
1318
|
params=params, config=config)
|
|
1307
1319
|
|
|
1308
1320
|
@required(instance_id=str)
|
|
1309
|
-
def batch_add_ip(self, instance_id, private_ips=None, secondary_private_ip_address_count=None,
|
|
1321
|
+
def batch_add_ip(self, instance_id, private_ips=None, secondary_private_ip_address_count=None,
|
|
1322
|
+
allocate_multi_ipv6_addr=None, config=None):
|
|
1310
1323
|
"""
|
|
1311
1324
|
batch_add_ip
|
|
1325
|
+
|
|
1312
1326
|
:param instance_id:
|
|
1327
|
+
The id of instance.
|
|
1328
|
+
:type instance_id: string
|
|
1329
|
+
|
|
1313
1330
|
:param private_ips:
|
|
1331
|
+
The IPV6/IPV4 address that needs to be added must exist with secondary_private_ip_address_count.
|
|
1332
|
+
:type private_ips: list
|
|
1333
|
+
|
|
1314
1334
|
:param secondary_private_ip_address_count:
|
|
1315
|
-
|
|
1335
|
+
The number of IPV6/IPV4 needs to be increased, and one with private_ips must exist.
|
|
1336
|
+
:type secondary_private_ip_address_count: list
|
|
1337
|
+
|
|
1338
|
+
:param allocate_multi_ipv6_addr:
|
|
1339
|
+
The parameter indicates whether to support multiple IPV6.
|
|
1340
|
+
It must be true to create IPV6.
|
|
1341
|
+
:type allocate_multi_ipv6_addr: bool
|
|
1342
|
+
|
|
1316
1343
|
:return:
|
|
1317
1344
|
:rtype baidubce.bce_response.BceResponse
|
|
1318
1345
|
"""
|
|
@@ -1324,6 +1351,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1324
1351
|
body['privateIps'] = private_ips
|
|
1325
1352
|
if secondary_private_ip_address_count is not None:
|
|
1326
1353
|
body['secondaryPrivateIpAddressCount'] = secondary_private_ip_address_count
|
|
1354
|
+
if allocate_multi_ipv6_addr is not None:
|
|
1355
|
+
body['allocateMultiIpv6Addr'] = allocate_multi_ipv6_addr
|
|
1327
1356
|
params = {
|
|
1328
1357
|
|
|
1329
1358
|
}
|
|
@@ -1387,7 +1416,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1387
1416
|
|
|
1388
1417
|
@required(instance_id=(bytes, str), # ***Unicode***
|
|
1389
1418
|
name=(bytes, str)) # ***Unicode***
|
|
1390
|
-
def modify_instance_attributes(self, instance_id, name=None, neteth_queuecount=None,
|
|
1419
|
+
def modify_instance_attributes(self, instance_id, name=None, neteth_queuecount=None,
|
|
1420
|
+
enable_jumbo_frame=None, config=None):
|
|
1391
1421
|
"""
|
|
1392
1422
|
Modifying the special attribute to new value of the instance.
|
|
1393
1423
|
You can reboot the instance only when the instance is Running or Stopped ,
|
|
@@ -1405,6 +1435,13 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1405
1435
|
The new value for instance's neteth_queuecount.
|
|
1406
1436
|
:type neteth_queuecount: string
|
|
1407
1437
|
|
|
1438
|
+
:param enable_jumbo_frame:
|
|
1439
|
+
The parameter indicates whether the instance is enabled for JumboFrame.
|
|
1440
|
+
It can only be enabled when the flavor support JumboFrame.
|
|
1441
|
+
True indicates enabled, false indicates disabled,
|
|
1442
|
+
:type enable_jumbo_frame: bool
|
|
1443
|
+
|
|
1444
|
+
|
|
1408
1445
|
:return:
|
|
1409
1446
|
:rtype baidubce.bce_response.BceResponse
|
|
1410
1447
|
"""
|
|
@@ -1414,6 +1451,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
1414
1451
|
'name': name,
|
|
1415
1452
|
'netEthQueueCount': neteth_queuecount
|
|
1416
1453
|
}
|
|
1454
|
+
if enable_jumbo_frame is not None:
|
|
1455
|
+
body['enableJumboFrame'] = enable_jumbo_frame
|
|
1417
1456
|
params = {
|
|
1418
1457
|
'modifyAttribute': None
|
|
1419
1458
|
}
|
|
@@ -2279,6 +2318,27 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
2279
2318
|
return self._send_request(http_methods.PUT, path, json.dumps(body),
|
|
2280
2319
|
params=params, config=config)
|
|
2281
2320
|
|
|
2321
|
+
def describe_regions(self, region, config=None):
|
|
2322
|
+
"""
|
|
2323
|
+
List all region's endpoint information with the specific parameters.
|
|
2324
|
+
Use global endpoint bcc.baidubce.com to get BCC,CDS,ReservedInstance's endpoint.
|
|
2325
|
+
|
|
2326
|
+
:param region:
|
|
2327
|
+
The id of region.
|
|
2328
|
+
:type region: string
|
|
2329
|
+
|
|
2330
|
+
:return:
|
|
2331
|
+
:rtype baidubce.bce_response.BceResponse
|
|
2332
|
+
"""
|
|
2333
|
+
|
|
2334
|
+
path = b'/region/describeRegions'
|
|
2335
|
+
body = {
|
|
2336
|
+
'region': region
|
|
2337
|
+
}
|
|
2338
|
+
params = {}
|
|
2339
|
+
return self._send_request(http_methods.POST, path, json.dumps(body),
|
|
2340
|
+
params=params, config=config)
|
|
2341
|
+
|
|
2282
2342
|
@required(volume_id=(bytes, str)) # ***Unicode***
|
|
2283
2343
|
def release_volume(self, volume_id, config=None):
|
|
2284
2344
|
"""
|
|
@@ -3842,10 +3902,10 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
3842
3902
|
auto_seq_suffix=None, is_open_hostname_domain=None, admin_pass=None, billing=None,
|
|
3843
3903
|
zone_name=None, subnet_id=None, security_group_id=None,
|
|
3844
3904
|
enterprise_security_group_id=None, security_group_ids=None,
|
|
3845
|
-
enterprise_security_group_ids=None, relation_tag=None,
|
|
3905
|
+
enterprise_security_group_ids=None, relation_tag=None, ehc_cluster_id=None,
|
|
3846
3906
|
is_open_ipv6=None, tags=None, key_pair_id=None, auto_renew_time_unit=None,
|
|
3847
3907
|
auto_renew_time=0, cds_auto_renew=None, asp_id=None, bid_model=None, bid_price=None,
|
|
3848
|
-
dedicate_host_id=None, deploy_id=None, deploy_id_list=None,
|
|
3908
|
+
dedicate_host_id=None, deploy_id=None, deploy_id_list=None, enable_jumbo_frame=None,
|
|
3849
3909
|
client_token=None, config=None):
|
|
3850
3910
|
"""
|
|
3851
3911
|
Create a bcc Instance with the specified options.
|
|
@@ -3954,6 +4014,10 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
3954
4014
|
The parameter to specify whether the instance related to existing tags
|
|
3955
4015
|
:type relation_tag: boolean
|
|
3956
4016
|
|
|
4017
|
+
:param ehc_cluster_id:
|
|
4018
|
+
The id of ehcCluster.
|
|
4019
|
+
:type ehc_cluster_id: string
|
|
4020
|
+
|
|
3957
4021
|
:param is_open_ipv6:
|
|
3958
4022
|
The parameter indicates whether the instance to be created is enabled for IPv6.
|
|
3959
4023
|
It can only be enabled when both the image and subnet support IPv6.
|
|
@@ -4039,6 +4103,12 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
4039
4103
|
The default value is false.
|
|
4040
4104
|
:type cds_auto_renew: boolean
|
|
4041
4105
|
|
|
4106
|
+
:param enable_jumbo_frame:
|
|
4107
|
+
The parameter indicates whether the instance is enabled for JumboFrame.
|
|
4108
|
+
It can only be enabled when the flavor support JumboFrame.
|
|
4109
|
+
True indicates enabled, false indicates disabled,
|
|
4110
|
+
:type enable_jumbo_frame: bool
|
|
4111
|
+
|
|
4042
4112
|
:return:
|
|
4043
4113
|
:rtype baidubce.bce_response.BceResponse
|
|
4044
4114
|
"""
|
|
@@ -4117,11 +4187,15 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
4117
4187
|
body['aspId'] = asp_id
|
|
4118
4188
|
if relation_tag is not None:
|
|
4119
4189
|
body['relationTag'] = relation_tag
|
|
4190
|
+
if ehc_cluster_id is not None:
|
|
4191
|
+
body['ehcClusterId'] = ehc_cluster_id
|
|
4120
4192
|
if is_open_ipv6 is not None:
|
|
4121
4193
|
body['isOpenIpv6'] = is_open_ipv6
|
|
4122
4194
|
if tags is not None:
|
|
4123
4195
|
tag_list = [tag.__dict__ for tag in tags]
|
|
4124
4196
|
body['tags'] = tag_list
|
|
4197
|
+
if enable_jumbo_frame is not None:
|
|
4198
|
+
body['enableJumboFrame'] = enable_jumbo_frame
|
|
4125
4199
|
body['cdsAutoRenew'] = cds_auto_renew
|
|
4126
4200
|
|
|
4127
4201
|
return self._send_request(http_methods.POST, path, json.dumps(body),
|
|
@@ -5197,7 +5271,8 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
5197
5271
|
return self._send_request(http_methods.PUT, path, body=json.dumps(body), params=params, config=config)
|
|
5198
5272
|
|
|
5199
5273
|
def instance_change_vpc(self, instance_id, subnet_id=None,
|
|
5200
|
-
internal_ip=None, reboot=None,
|
|
5274
|
+
internal_ip=None, reboot=None, security_group_ids=None, enterprise_security_group_ids=None,
|
|
5275
|
+
client_token=None, config=None):
|
|
5201
5276
|
"""
|
|
5202
5277
|
Change instance vpc by id.
|
|
5203
5278
|
|
|
@@ -5236,6 +5311,10 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
5236
5311
|
body['internalIp'] = internal_ip
|
|
5237
5312
|
if reboot is not None:
|
|
5238
5313
|
body['reboot'] = reboot
|
|
5314
|
+
if security_group_ids is not None:
|
|
5315
|
+
body['securityGroupIds'] = security_group_ids
|
|
5316
|
+
if enterprise_security_group_ids is not None:
|
|
5317
|
+
body['enterpriseSecurityGroupIds'] = enterprise_security_group_ids
|
|
5239
5318
|
|
|
5240
5319
|
return self._send_request(http_methods.PUT, path, body=json.dumps(body), params=params, config=config)
|
|
5241
5320
|
|
|
@@ -5827,8 +5906,6 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
5827
5906
|
body['specId'] = spec_id
|
|
5828
5907
|
if logical_zone is not None:
|
|
5829
5908
|
body['zone'] = logical_zone
|
|
5830
|
-
if spec is not None:
|
|
5831
|
-
body['internalIpV4'] = spec
|
|
5832
5909
|
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
|
|
5833
5910
|
|
|
5834
5911
|
def batch_change_instance_to_prepay(self, change_pay_timing_req_list, client_token=None, config=None):
|
|
@@ -6340,6 +6417,128 @@ class BccClient(bce_base_client.BceBaseClient):
|
|
|
6340
6417
|
}
|
|
6341
6418
|
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
|
|
6342
6419
|
|
|
6420
|
+
def create_ehc_cluster(self, name, zone_name, description=None, client_token=None, config=None):
|
|
6421
|
+
"""
|
|
6422
|
+
create ehc cluster
|
|
6423
|
+
|
|
6424
|
+
:param name:
|
|
6425
|
+
The name of the EHC cluster. This parameter is required.
|
|
6426
|
+
:type name: string
|
|
6427
|
+
|
|
6428
|
+
:param zone_name:
|
|
6429
|
+
The availability zone name where the EHC cluster will be created.
|
|
6430
|
+
:type zone_name: string
|
|
6431
|
+
|
|
6432
|
+
:param description:
|
|
6433
|
+
Optional. A brief description of the EHC cluster. Default is an empty string.
|
|
6434
|
+
:type description: string
|
|
6435
|
+
|
|
6436
|
+
:return:
|
|
6437
|
+
:rtype baidubce.bce_response.BceResponse
|
|
6438
|
+
"""
|
|
6439
|
+
path = b'/instance/ehc/cluster/create'
|
|
6440
|
+
params = {}
|
|
6441
|
+
if client_token is None:
|
|
6442
|
+
params['clientToken'] = generate_client_token()
|
|
6443
|
+
else:
|
|
6444
|
+
params['clientToken'] = client_token
|
|
6445
|
+
body = {
|
|
6446
|
+
'name': name,
|
|
6447
|
+
'zoneName': zone_name
|
|
6448
|
+
}
|
|
6449
|
+
if description is not None:
|
|
6450
|
+
body['description'] = description
|
|
6451
|
+
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
|
|
6452
|
+
|
|
6453
|
+
def modify_ehc_cluster(self, ehc_cluster_id, name=None, description=None, client_token=None, config=None):
|
|
6454
|
+
"""
|
|
6455
|
+
Modifies the name and description of an EHC cluster.
|
|
6456
|
+
|
|
6457
|
+
:param ehc_cluster_id:
|
|
6458
|
+
The ID of the EHC cluster to be modified. This parameter is required.
|
|
6459
|
+
:type ehc_cluster_id: string
|
|
6460
|
+
|
|
6461
|
+
:param name:
|
|
6462
|
+
Optional. The new name for the EHC cluster. If not specified, the name will not be changed.
|
|
6463
|
+
:type name: string
|
|
6464
|
+
|
|
6465
|
+
:param description:
|
|
6466
|
+
Optional. The new description for the EHC cluster. If not specified, the description will not be changed.
|
|
6467
|
+
:type description: string
|
|
6468
|
+
|
|
6469
|
+
:return:
|
|
6470
|
+
:rtype baidubce.bce_response.BceResponse
|
|
6471
|
+
"""
|
|
6472
|
+
path = b'/instance/ehc/cluster/modify'
|
|
6473
|
+
params = {}
|
|
6474
|
+
if client_token is None:
|
|
6475
|
+
params['clientToken'] = generate_client_token()
|
|
6476
|
+
else:
|
|
6477
|
+
params['clientToken'] = client_token
|
|
6478
|
+
body = {
|
|
6479
|
+
'ehcClusterId': ehc_cluster_id
|
|
6480
|
+
}
|
|
6481
|
+
if name is not None:
|
|
6482
|
+
body['name'] = name
|
|
6483
|
+
if description is not None:
|
|
6484
|
+
body['description'] = description
|
|
6485
|
+
|
|
6486
|
+
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
|
|
6487
|
+
|
|
6488
|
+
def get_ehc_cluster_list(self, ehc_cluster_id_list=None, name_list=None, zone_name=None, config=None):
|
|
6489
|
+
"""
|
|
6490
|
+
get ehc cluster list
|
|
6491
|
+
|
|
6492
|
+
:param ehc_cluster_id_list:
|
|
6493
|
+
Optional. List of EHC cluster IDs to filter the results. If not specified, retrieves all clusters.
|
|
6494
|
+
:type ehc_cluster_id_list: list<string>
|
|
6495
|
+
|
|
6496
|
+
:param name_list:
|
|
6497
|
+
Optional. List of EHC cluster names to filter the results. If not specified, retrieves all clusters.
|
|
6498
|
+
:type name_list: list<string>
|
|
6499
|
+
|
|
6500
|
+
:param zone_name:
|
|
6501
|
+
Optional. The name of the availability zone to filter the results.
|
|
6502
|
+
:type zone_name: string
|
|
6503
|
+
|
|
6504
|
+
:return:
|
|
6505
|
+
:rtype baidubce.bce_response.BceResponse
|
|
6506
|
+
"""
|
|
6507
|
+
path = b'/instance/ehc/cluster/list'
|
|
6508
|
+
params = {}
|
|
6509
|
+
body = {}
|
|
6510
|
+
if ehc_cluster_id_list is not None:
|
|
6511
|
+
body['ehcClusterIdList'] = ehc_cluster_id_list
|
|
6512
|
+
if name_list is not None:
|
|
6513
|
+
body['nameList'] = name_list
|
|
6514
|
+
if zone_name is not None:
|
|
6515
|
+
body['zoneName'] = zone_name
|
|
6516
|
+
|
|
6517
|
+
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
|
|
6518
|
+
|
|
6519
|
+
def delete_ehc_cluster(self, ehc_cluster_id_list, client_token=None, config=None):
|
|
6520
|
+
"""
|
|
6521
|
+
Modifies the name and description of an EHC cluster.
|
|
6522
|
+
|
|
6523
|
+
:param ehc_cluster_id_list:
|
|
6524
|
+
A list of IDs of the EHC clusters to be deleted. This parameter is required.
|
|
6525
|
+
:type ehc_cluster_id_list: string
|
|
6526
|
+
|
|
6527
|
+
:return:
|
|
6528
|
+
:rtype baidubce.bce_response.BceResponse
|
|
6529
|
+
"""
|
|
6530
|
+
path = b'/instance/ehc/cluster/delete'
|
|
6531
|
+
params = {}
|
|
6532
|
+
if client_token is None:
|
|
6533
|
+
params['clientToken'] = generate_client_token()
|
|
6534
|
+
else:
|
|
6535
|
+
params['clientToken'] = client_token
|
|
6536
|
+
body = {
|
|
6537
|
+
'ehcClusterIdList': ehc_cluster_id_list
|
|
6538
|
+
}
|
|
6539
|
+
|
|
6540
|
+
return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
|
|
6541
|
+
|
|
6343
6542
|
def get_available_images_by_spec(self, marker=None, max_keys=None, spec=None, os_name=None, config=None):
|
|
6344
6543
|
"""
|
|
6345
6544
|
:param marker:
|
|
@@ -6400,4 +6599,29 @@ def generate_client_token_by_random():
|
|
|
6400
6599
|
return client_token
|
|
6401
6600
|
|
|
6402
6601
|
|
|
6602
|
+
def get_cds_price(self, purchase_length, payment_timing, storage_type, cds_size_in_gb, purchase_count, zone_name,
|
|
6603
|
+
encrypt_key=None, client_token=None, config=None):
|
|
6604
|
+
"""
|
|
6605
|
+
get_deploy_set
|
|
6606
|
+
"""
|
|
6607
|
+
path = b'/volume/getPrice'
|
|
6608
|
+
params = {}
|
|
6609
|
+
if client_token is None:
|
|
6610
|
+
params['clientToken'] = generate_client_token()
|
|
6611
|
+
else:
|
|
6612
|
+
params['clientToken'] = client_token
|
|
6613
|
+
body = {
|
|
6614
|
+
'purchaseLength': purchase_length,
|
|
6615
|
+
'paymentTiming': payment_timing,
|
|
6616
|
+
'storageType': storage_type,
|
|
6617
|
+
'cdsSizeInGB': cds_size_in_gb,
|
|
6618
|
+
'purchaseCount': purchase_count,
|
|
6619
|
+
'zoneName': zone_name
|
|
6620
|
+
}
|
|
6621
|
+
if encrypt_key is not None:
|
|
6622
|
+
body['encryptKey'] = encrypt_key
|
|
6623
|
+
return self._send_request(http_methods.POST, path, json.dumps(body),
|
|
6624
|
+
params=params, config=config)
|
|
6625
|
+
|
|
6626
|
+
|
|
6403
6627
|
generate_client_token = generate_client_token_by_uuid
|
|
@@ -549,12 +549,15 @@ class SmsClient(BceBaseClient):
|
|
|
549
549
|
headers, params)
|
|
550
550
|
|
|
551
551
|
@required(type=str, phone=str)
|
|
552
|
-
def create_mobile_black(self, type, phone, sms_type=None, signature_id_str=None, config=None):
|
|
552
|
+
def create_mobile_black(self, type, phone, country_type, sms_type=None, signature_id_str=None, config=None):
|
|
553
553
|
"""
|
|
554
554
|
|
|
555
555
|
:param type: The value of type could be MerchantBlack or SignatureBlack
|
|
556
556
|
:type type: str
|
|
557
557
|
|
|
558
|
+
:param country_type: The value of countryType could be DOMESTIC or INTERNATIONAL
|
|
559
|
+
:type country_type: str
|
|
560
|
+
|
|
558
561
|
:param sms_type: Mobile of black, Support multiple mobile phone numbers, up to 200 maximum, separated by comma.
|
|
559
562
|
:type sms_type: str
|
|
560
563
|
|
|
@@ -570,7 +573,8 @@ class SmsClient(BceBaseClient):
|
|
|
570
573
|
"""
|
|
571
574
|
data = {
|
|
572
575
|
"type": type,
|
|
573
|
-
"phone": phone
|
|
576
|
+
"phone": phone,
|
|
577
|
+
"countryType": country_type
|
|
574
578
|
}
|
|
575
579
|
if sms_type:
|
|
576
580
|
data["smsType"] = sms_type
|
|
@@ -581,13 +585,16 @@ class SmsClient(BceBaseClient):
|
|
|
581
585
|
return self._send_request(http_methods.POST, function_name="blacklist", body=json.dumps(data),
|
|
582
586
|
config=config, api_version=2)
|
|
583
587
|
|
|
584
|
-
def get_mobile_black(self, phone=None,
|
|
585
|
-
page_no=None, page_size=None, config=None):
|
|
588
|
+
def get_mobile_black(self, phone=None, country_type=None, sms_type=None, signature_id_str=None, start_time=None,
|
|
589
|
+
end_time=None, page_no=None, page_size=None, config=None):
|
|
586
590
|
"""
|
|
587
591
|
Get mobile black
|
|
588
592
|
:param phone: Support multiple mobile phone numbers, up to 200 maximum, separated by comma.
|
|
589
593
|
:type phone: str
|
|
590
594
|
|
|
595
|
+
:param country_type: The value of countryType could be DOMESTIC or INTERNATIONAL
|
|
596
|
+
:type country_type: str
|
|
597
|
+
|
|
591
598
|
:param sms_type: smsType
|
|
592
599
|
:type sms_type: str
|
|
593
600
|
|
|
@@ -630,6 +637,9 @@ class SmsClient(BceBaseClient):
|
|
|
630
637
|
if phone:
|
|
631
638
|
req_params["phone"] = phone
|
|
632
639
|
|
|
640
|
+
if country_type:
|
|
641
|
+
req_params["countryType"] = country_type
|
|
642
|
+
|
|
633
643
|
if sms_type:
|
|
634
644
|
req_params["smsType"] = sms_type
|
|
635
645
|
|
|
@@ -56,6 +56,16 @@ class VcaClient(BceBaseClient):
|
|
|
56
56
|
body['preset'] = preset
|
|
57
57
|
return self._send_request(http_methods.PUT, b'/v2/image', body=json.dumps(body), params={b'sync': ''})
|
|
58
58
|
|
|
59
|
+
@required(source=(bytes, str))
|
|
60
|
+
def cancel(self, source):
|
|
61
|
+
"""
|
|
62
|
+
cancel a media analyze by source
|
|
63
|
+
:param source: media source
|
|
64
|
+
:type source: string or unicode
|
|
65
|
+
:return: **Http Response**
|
|
66
|
+
"""
|
|
67
|
+
return self._send_request(http_methods.PUT, b'/v2/media', params={b'source': source, b'cancel': ''})
|
|
68
|
+
|
|
59
69
|
@required(source=(bytes, str))
|
|
60
70
|
def put_media(self, source, preset=None, notification=None, priority=None,
|
|
61
71
|
title=None, sub_title=None, category=None,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
baidubce/__init__.py,sha256=
|
|
1
|
+
baidubce/__init__.py,sha256=IiAUnCN3aPcgGEmH4gmPnUzzxhvnXo8uzgoifTgna_g,813
|
|
2
2
|
baidubce/bce_base_client.py,sha256=7gjkRy_YlTTb6TXHYHyZRYMjdVO7FTtHMdwXx8bPgsE,3428
|
|
3
3
|
baidubce/bce_client_configuration.py,sha256=Wzuu9JR11hcHxgcKQIP63qIChEzVrT9ZA_fyqIfqqP4,3055
|
|
4
4
|
baidubce/bce_response.py,sha256=V5a3bgRj04cM3Ml3s1OByLyZZSGDUy9PL52JSugmCgM,1655
|
|
@@ -24,10 +24,10 @@ baidubce/services/autoscaling/as_client.py,sha256=X4eiHV71qqz6BwXGNmEx43O7aM2qcM
|
|
|
24
24
|
baidubce/services/autoscaling/as_handler.py,sha256=UXzfERwnVJETsQi8pIrzpxY_DX2U4rm1zXyrZ--umJQ,3332
|
|
25
25
|
baidubce/services/autoscaling/as_model.py,sha256=5MBy7xgRMZWzSjDT34SSwM9kYYj7HuQWjBCG1nyjhd0,8501
|
|
26
26
|
baidubce/services/bbc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
-
baidubce/services/bbc/bbc_client.py,sha256=
|
|
27
|
+
baidubce/services/bbc/bbc_client.py,sha256=OSDBnJK3b1TFLQJ8YALK-qEkzolFE1-J81mZy5512OE,37967
|
|
28
28
|
baidubce/services/bbc/bbc_model.py,sha256=Dy80LZ4ro_iS3UejJ_CL9kI7OyMSBoDitTE4J1XAC_g,1790
|
|
29
29
|
baidubce/services/bcc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
baidubce/services/bcc/bcc_client.py,sha256=
|
|
30
|
+
baidubce/services/bcc/bcc_client.py,sha256=WiepqJGVPs520164YiXsmIIHebMDEvW3-km_4n5906Q,248962
|
|
31
31
|
baidubce/services/bcc/bcc_model.py,sha256=7v5WzqDDhl7MmI3vDdOuyM5S9isxkKoaIv5RAqzzTRI,5919
|
|
32
32
|
baidubce/services/bcc/fpga_card_type.py,sha256=n6goqnapIgAC9_sciA_2he5HFqPRbRv109qitO7qpd8,948
|
|
33
33
|
baidubce/services/bcc/gpu_card_type.py,sha256=HEfMzne-UC5F295JPrPUu7V9F5g-hbXF2TNBontEFes,1054
|
|
@@ -150,7 +150,7 @@ baidubce/services/scs/model.py,sha256=LApCKftzzifOHyor1rQPaPdIE9LyuN7DRWQyVwwrxz
|
|
|
150
150
|
baidubce/services/scs/scs_client.py,sha256=_b4YZ85kVrmoy8iMjUnOVJ05KVFzy2YhvKxpsdDsWjg,27357
|
|
151
151
|
baidubce/services/sms/__init__.py,sha256=_Z3YtctK4-2S9JzTrNtZ35Gg1hKVhcJp1YgoREkGStg,676
|
|
152
152
|
baidubce/services/sms/model.py,sha256=3nRxL2j0KAIpF6gc9nsAHcCHNPEyn5Nlxi8sw1nZUxc,6592
|
|
153
|
-
baidubce/services/sms/sms_client.py,sha256=
|
|
153
|
+
baidubce/services/sms/sms_client.py,sha256=Dgdrlz8fQDp5CRTOyoZc8Kc8Hak4Pn090ZRV_pNqKJQ,31516
|
|
154
154
|
baidubce/services/sts/__init__.py,sha256=EZmfLCCKOijC7YePDGTzWy9Qzn9OVh5et5klAffza_g,669
|
|
155
155
|
baidubce/services/sts/sts_client.py,sha256=kyJZPQTx48aCeeQqNZsSgd3TqSNk0hgMILG_HuF-BGs,3687
|
|
156
156
|
baidubce/services/subnet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -160,7 +160,7 @@ baidubce/services/tsdb/tsdb_admin_client.py,sha256=Gs4ltGvtm17jhc02xmVTNLghj6iQc
|
|
|
160
160
|
baidubce/services/tsdb/tsdb_client.py,sha256=Meg0mko2E5KgkZCd8vJWH7NAoMGWst3XqlxeiGIYZK4,9337
|
|
161
161
|
baidubce/services/tsdb/tsdb_handler.py,sha256=N3_4d0n_shI1AqXI7E5vVbieoPH_afFVD479Rxsi5us,1744
|
|
162
162
|
baidubce/services/vca/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
163
|
-
baidubce/services/vca/vca_client.py,sha256=
|
|
163
|
+
baidubce/services/vca/vca_client.py,sha256=5PpG6VJLnrJtDFiYV2kiGYw8YkujyP7AQFlJnmgM0Xw,5624
|
|
164
164
|
baidubce/services/vcr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
165
165
|
baidubce/services/vcr/vcr_client.py,sha256=nOyjO-UIAz8xxoMVTEhaWhmBnRHWfrArynMVmNoJkwY,13004
|
|
166
166
|
baidubce/services/vpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -173,7 +173,7 @@ baidubce/services/vpc/vpc_client.py,sha256=6HD-TIxmNPujzIVc37Z9OOp_JUOoITUPzTwjm
|
|
|
173
173
|
baidubce/services/vpn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
174
174
|
baidubce/services/vpn/vpn_client.py,sha256=VGmPmnl7Il_NcbGMAgASmVK_1IF9HQ8PJ-WLij-7Axc,28554
|
|
175
175
|
baidubce/services/vpn/vpn_model.py,sha256=r9V2At9ll9cZTOryGflS9tH9DlHdeelKYuGXvTNyTgg,3364
|
|
176
|
-
bce_python_sdk-0.9.
|
|
177
|
-
bce_python_sdk-0.9.
|
|
178
|
-
bce_python_sdk-0.9.
|
|
179
|
-
bce_python_sdk-0.9.
|
|
176
|
+
bce_python_sdk-0.9.17.dist-info/METADATA,sha256=fuspq3e587v5i3rzX0OM6KWhyEVJ2NpN8kSJIuIx4gI,319
|
|
177
|
+
bce_python_sdk-0.9.17.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
|
178
|
+
bce_python_sdk-0.9.17.dist-info/top_level.txt,sha256=Oh6eo_-T_AuEDpIaR54biUUPThxsoQiYMVHLBTaweQs,9
|
|
179
|
+
bce_python_sdk-0.9.17.dist-info/RECORD,,
|
|
File without changes
|