bce-python-sdk 0.9.59__py3-none-any.whl → 0.9.60__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 CHANGED
@@ -18,7 +18,7 @@ from builtins import bytes
18
18
  from . import protocol
19
19
 
20
20
 
21
- SDK_VERSION = b'0.9.59'
21
+ SDK_VERSION = b'0.9.60'
22
22
  DEFAULT_SERVICE_DOMAIN = b'bcebos.com'
23
23
  URL_PREFIX = b'/v1'
24
24
  DEFAULT_ENCODING = 'UTF-8'
@@ -41,7 +41,7 @@ class JobClient(AIHCBaseClient):
41
41
  参考文档:https://cloud.baidu.com/doc/AIHC/s/xmayvctia
42
42
 
43
43
  Args:
44
- resourcePoolId: 资源池唯一标识符(必填)
44
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
45
45
  queueID: 托管资源池需传入该参数,为队列Id(可选,Query参数)
46
46
  queue: 训练任务所属队列,通用资源池须填入队列名称,不填时返回所有。托管资源池须填入队列Id(可选,Body参数)
47
47
  status: 基于状态筛选任务(可选,Body参数)
@@ -105,7 +105,7 @@ class JobClient(AIHCBaseClient):
105
105
  参考文档:https://cloud.baidu.com/doc/AIHC/s/Kmayvejf0
106
106
 
107
107
  Args:
108
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
108
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
109
109
  queueID: 训练任务所属队列,自运维资源池须填入队列名称,托管资源池须填入队列Id(必填,Query参数)
110
110
  jobId: 任务ID(必填,Body参数)
111
111
  needDetail: 是否需要详细信息(可选)
@@ -137,8 +137,7 @@ class JobClient(AIHCBaseClient):
137
137
  参考文档:https://cloud.baidu.com/doc/AIHC/s/rmayvfzxj
138
138
 
139
139
  Args:
140
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
141
- resourcePoolId: string
140
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
142
141
  jobId: 训练任务ID(必填,Body参数)
143
142
  jobId: string
144
143
 
@@ -166,7 +165,7 @@ class JobClient(AIHCBaseClient):
166
165
  参考文档:https://cloud.baidu.com/doc/AIHC/s/Smayvhq0w
167
166
 
168
167
  Args:
169
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
168
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
170
169
  jobId: 训练任务ID(必填,Body参数)
171
170
  priority: 优先级(必填,Body参数),如 "normal"
172
171
 
@@ -201,7 +200,7 @@ class JobClient(AIHCBaseClient):
201
200
  参考文档:https://cloud.baidu.com/doc/AIHC/s/fmayvjaeq
202
201
 
203
202
  Args:
204
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
203
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
205
204
  jobId: 训练任务ID(必填,Body参数)
206
205
  startTime: 获取任务事件的起始时间(可选,Body参数)
207
206
  endTime: 获取任务事件的结束时间(可选,Body参数)
@@ -245,7 +244,7 @@ class JobClient(AIHCBaseClient):
245
244
  参考文档:https://cloud.baidu.com/doc/AIHC/s/Hmayvkw26
246
245
 
247
246
  Args:
248
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
247
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
249
248
  jobId: 训练任务ID(必填,Body参数)
250
249
  podName: Pod名称(必填,Body参数)
251
250
  keywords: 日志查询关键字(可选,Body参数)
@@ -306,7 +305,7 @@ class JobClient(AIHCBaseClient):
306
305
  参考文档:https://cloud.baidu.com/doc/AIHC/s/mmayvm8tb
307
306
 
308
307
  Args:
309
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
308
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
310
309
  jobId: 训练任务ID(必填,Body参数)
311
310
  podName: 训练任务节点名称(必填,Body参数)
312
311
  startTime: 事件起始时间,Unix时间格式(可选,Body参数)
@@ -347,7 +346,7 @@ class JobClient(AIHCBaseClient):
347
346
  参考文档:https://cloud.baidu.com/doc/AIHC/s/0mayvnkik
348
347
 
349
348
  Args:
350
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
349
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
351
350
  jobId: 训练任务ID(必填,Body参数)
352
351
 
353
352
  Returns:
@@ -379,7 +378,7 @@ class JobClient(AIHCBaseClient):
379
378
  参考文档:https://cloud.baidu.com/doc/AIHC/s/2mayvq994
380
379
 
381
380
  Args:
382
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
381
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
383
382
  jobId: 训练任务ID(必填,Body参数)
384
383
 
385
384
  Returns:
@@ -418,7 +417,7 @@ class JobClient(AIHCBaseClient):
418
417
  参考文档:https://cloud.baidu.com/doc/AIHC/s/9mayvri1t
419
418
 
420
419
  Args:
421
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
420
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
422
421
  jobId: 训练任务ID(必填,Body参数)
423
422
  podName: 训练任务节点名称(必填,Body参数)
424
423
  handshakeTimeoutSecond: 连接超时参数,单位秒(可选,Body参数)
@@ -475,7 +474,7 @@ class JobClient(AIHCBaseClient):
475
474
  参考文档:https://cloud.baidu.com/doc/AIHC/s/Hmayv96tj
476
475
 
477
476
  Args:
478
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
477
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
479
478
  queueID: 训练任务所属队列,通用资源池须填入队列名称,托管资源池须填入队列Id(必填,Query参数)
480
479
  name: 训练任务名称(必填,Body参数)
481
480
  command: 启动命令(必填,Body参数)
@@ -550,7 +549,7 @@ class JobClient(AIHCBaseClient):
550
549
  参考文档:https://cloud.baidu.com/doc/AIHC/s/fmayvjaeq
551
550
 
552
551
  Args:
553
- resourcePoolId: 资源池唯一标识符(必填,Query参数)
552
+ resourcePoolId: 注意区分资源池类型,自运维资源池传递资源池唯一标识(示例:cce-1uji3ib5),托管资源池固定传递 aihc-serverless(必填)
554
553
  jobId: 任务ID(必填,Body参数)
555
554
  metricType: 查询监控数据的指标类型(必填,Body参数)
556
555
  startTime: 开始时间,Unix时间格式(可选,Body参数)
@@ -587,4 +586,4 @@ class JobClient(AIHCBaseClient):
587
586
  path,
588
587
  body=json.dumps(body),
589
588
  params=params
590
- )
589
+ )
@@ -4058,7 +4058,7 @@ class BccClient(bce_base_client.BceBaseClient):
4058
4058
  hosteye_type=None, res_group_id=None, enable_ht=None, data_partition_type=None,
4059
4059
  root_partition_type=None, file_systems=None, disable_root_disk_serial=None,
4060
4060
  internal_ips=None, network_purchase_type=None, is_keep_image_login=None,
4061
- reserved_instance=None):
4061
+ reserved_instance=None, is_eip_auto_related_delete=None):
4062
4062
  """
4063
4063
  Create a bcc Instance with the specified options.
4064
4064
  You must fill the field of clientToken,which is especially for keeping idempotent.
@@ -4321,6 +4321,11 @@ class BccClient(bce_base_client.BceBaseClient):
4321
4321
  EIP line type, including Standard BGP (BGP) and Enhanced BGP (BGP_S).The default value is Standard BGP.
4322
4322
  :type network_purchase_type: string
4323
4323
 
4324
+ :param is_eip_auto_related_delete
4325
+ Whether to automatically delete the EIP associated with the instance after the instance is released.
4326
+ The default value is False.
4327
+ :type is_eip_auto_related_delete: boolean
4328
+
4324
4329
  :return:
4325
4330
  :rtype baidubce.bce_response.BceResponse
4326
4331
  """
@@ -4357,6 +4362,8 @@ class BccClient(bce_base_client.BceBaseClient):
4357
4362
  body['autoSeqSuffix'] = auto_seq_suffix
4358
4363
  if is_open_hostname_domain is not None:
4359
4364
  body['isOpenHostnameDomain'] = is_open_hostname_domain
4365
+ if is_eip_auto_related_delete is not None:
4366
+ body['isEipAutoRelatedDelete'] = is_eip_auto_related_delete
4360
4367
  if admin_pass is not None:
4361
4368
  secret_access_key = self.config.credentials.secret_access_key
4362
4369
  cipher_admin_pass = aes128_encrypt_16char_key(admin_pass, secret_access_key)
@@ -4450,7 +4457,8 @@ class BccClient(bce_base_client.BceBaseClient):
4450
4457
  params=params, config=config)
4451
4458
 
4452
4459
  @required(instance_id=(bytes, str))
4453
- def auto_release_instance(self, instance_id, release_time=None, client_token=None, config=None):
4460
+ def auto_release_instance(self, instance_id, release_time=None, client_token=None, config=None,
4461
+ is_eip_auto_related_delete=None):
4454
4462
  """
4455
4463
  set instance auto release.
4456
4464
 
@@ -4462,6 +4470,9 @@ class BccClient(bce_base_client.BceBaseClient):
4462
4470
  The new value for instance's name.
4463
4471
  :type release_time: string in format yyyy-MM-dd'T'HH:mm:ss'Z'.
4464
4472
 
4473
+ :param is_eip_auto_related_delete:
4474
+ Auto delete eip when instance is released.
4475
+
4465
4476
  :param client_token:
4466
4477
  An ASCII string whose length is less than 64.
4467
4478
  The request will be idempotent if client token is provided.
@@ -4485,7 +4496,8 @@ class BccClient(bce_base_client.BceBaseClient):
4485
4496
  # instance_id = instance_id.encode(encoding='utf-8')
4486
4497
  path = b'/instance/%s' % instance_id
4487
4498
  body = {
4488
- 'releaseTime': release_time
4499
+ 'releaseTime': release_time,
4500
+ 'isEipAutoRelatedDelete': is_eip_auto_related_delete
4489
4501
  }
4490
4502
  return self._send_request(http_methods.PUT, path, body=json.dumps(body), params=params, config=config)
4491
4503
 
@@ -40,6 +40,7 @@ class EtClient(bce_base_client.BceBaseClient):
40
40
  channel = 'channel'
41
41
  route = 'route'
42
42
  rule = 'rule'
43
+ bfd = 'bfd'
43
44
 
44
45
  def __init__(self, config=None):
45
46
  """
@@ -85,40 +86,46 @@ class EtClient(bce_base_client.BceBaseClient):
85
86
  http_method, path, body, headers, params)
86
87
 
87
88
  def create_et_dcphy(self, name, isp, intf_type, ap_type, ap_addr, user_name, user_phone, user_email,
88
- user_idc, client_token=None, description=None, config=None):
89
+ user_idc, client_token=None, description=None, billing=None, tags=None, config=None):
89
90
  """
90
91
  Create new ET
91
-
92
+
92
93
  :param name: the name of ET
93
94
  :type name: string
94
-
95
+
95
96
  :param description: description of ET
96
97
  :type description: string
97
-
98
+
98
99
  :param isp: the type of isp
99
100
  :type isp: string
100
-
101
+
101
102
  :param intf_type: the type of interface
102
103
  :type intf_type: string
103
-
104
+
104
105
  :param ap_type: the type of ap
105
106
  :type ap_type: string
106
-
107
+
107
108
  :param ap_addr: the type of ap Address
108
109
  :type ap_addr: string
109
-
110
+
110
111
  :param user_name: the name of user
111
112
  :type user_name: string
112
-
113
+
113
114
  :param user_phone: phone number of user
114
115
  :type user_phone: string
115
-
116
+
116
117
  :param user_email: email of user
117
118
  :type user_email: string
118
-
119
+
119
120
  :param user_idc: Idc of user
120
121
  :type user_idc: string
121
-
122
+
123
+ :param billing: billing information, currently only supports prepaid
124
+ :type billing: dict
125
+
126
+ :param tags: list of tag key-value pairs to be created
127
+ :type tags: list<dict>
128
+
122
129
  :param client_token:
123
130
  If the clientToken is not specified by the user, a random String
124
131
  generated by default algorithm will be used.
@@ -135,10 +142,9 @@ class EtClient(bce_base_client.BceBaseClient):
135
142
  params[b'clientToken'] = generate_client_token()
136
143
  else:
137
144
  params[b'clientToken'] = client_token
138
-
145
+
139
146
  body = {
140
147
  'name': name,
141
- 'description': description,
142
148
  'isp': isp,
143
149
  'intfType': intf_type,
144
150
  'apType': ap_type,
@@ -149,31 +155,40 @@ class EtClient(bce_base_client.BceBaseClient):
149
155
  'userIdc': user_idc,
150
156
  }
151
157
 
158
+ if description is not None:
159
+ body['description'] = description
160
+
161
+ if billing is not None:
162
+ body['billing'] = billing
163
+
164
+ if tags is not None:
165
+ body['tags'] = tags
166
+
152
167
  return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
153
168
 
154
169
  def update_et_dcphy(self, et_id, name=None, description=None, user_name=None,
155
170
  user_phone=None, user_email=None, client_token=None, config=None):
156
171
  """
157
172
  Update existed Et
158
-
173
+
159
174
  :param et_id: ET ID
160
175
  :type et_id: string
161
-
176
+
162
177
  :param user_name: the name of user
163
178
  :type user_name: string
164
-
179
+
165
180
  :param user_phone: phone number of user
166
181
  :type user_phone: string
167
-
182
+
168
183
  :param user_email: email of user
169
184
  :type user_email: string
170
-
185
+
171
186
  :param user_idc: Idc of user
172
187
  :type user_idc: string
173
-
188
+
174
189
  :param description: description of ET
175
190
  :type description: string
176
-
191
+
177
192
  :param client_token:
178
193
  If the clientToken is not specified by the user, a random String
179
194
  generated by default algorithm will be used.
@@ -258,10 +273,10 @@ class EtClient(bce_base_client.BceBaseClient):
258
273
  def list_et_dcphy_detail(self, et_id, config=None):
259
274
  """
260
275
  List specific ET detail
261
-
276
+
262
277
  :param et_id: ET ID
263
278
  :type et_id: string
264
-
279
+
265
280
  :param config:
266
281
  :type config: baidubce.BceClientConfiguration
267
282
 
@@ -292,10 +307,10 @@ class EtClient(bce_base_client.BceBaseClient):
292
307
  remote_ipv6=None, ipv6_networks=None, client_token=None, config=None):
293
308
  """
294
309
  Create new et channel
295
-
310
+
296
311
  :param et_id: et id
297
312
  :type et_id: string
298
-
313
+
299
314
  :param local_ip: baidu IPv4 address of et channel
300
315
  :type local_ip: string
301
316
 
@@ -307,21 +322,21 @@ class EtClient(bce_base_client.BceBaseClient):
307
322
 
308
323
  :param remote_ip: customer IPv4 address of et channel
309
324
  :type remote_ip: string
310
-
325
+
311
326
  :param description: description of channel
312
327
  :type description: string
313
-
328
+
314
329
  :param route_type: et channel route type
315
330
  :value "bgp" or "static"
316
331
  :type route_type: string
317
-
332
+
318
333
  :param vlan_id: et channel vlan id
319
334
  :value 0, 2-4009
320
335
  :type vlan_id: integer
321
-
336
+
322
337
  :param authorized_users: et channel authorized users
323
338
  :type authorized_users: list<string>
324
-
339
+
325
340
  :param enable_ipv6: et channel enable ipv6
326
341
  :value 0 or 1
327
342
  :type enable_ipv6: integer
@@ -334,13 +349,13 @@ class EtClient(bce_base_client.BceBaseClient):
334
349
 
335
350
  :param ipv6_networks: et channel IPv6 routes
336
351
  :type ipv6_networks: list<string>
337
-
352
+
338
353
  :param bgp_asn: BGP ASN
339
354
  :type bgp_asn: string
340
-
355
+
341
356
  :param bgp_key: BGP KEY
342
357
  :type bgp_key: string
343
-
358
+
344
359
  :param client_token:
345
360
  If the clientToken is not specified by the user, a random String
346
361
  generated by default algorithm will be used.
@@ -358,7 +373,7 @@ class EtClient(bce_base_client.BceBaseClient):
358
373
  params[b'clientToken'] = generate_client_token()
359
374
  else:
360
375
  params[b'clientToken'] = client_token
361
-
376
+
362
377
  body = {
363
378
  'etId': et_id,
364
379
  'baiduAddress': local_ip,
@@ -389,17 +404,27 @@ class EtClient(bce_base_client.BceBaseClient):
389
404
  if ipv6_networks is not None:
390
405
  body['ipv6Networks'] = ipv6_networks
391
406
 
407
+ if bgp_asn is not None:
408
+ body['bgpAsn'] = compat.convert_to_string(bgp_asn)
409
+
410
+ if bgp_key is not None:
411
+ body['bgpKey'] = compat.convert_to_string(bgp_key)
412
+
392
413
  return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
393
-
414
+
394
415
  @required(et_id=(bytes, str))
395
- def get_et_channel(self, et_id, client_token=None, config=None):
416
+ def get_et_channel(self, et_id, et_channel_id=None, client_token=None, config=None):
396
417
  """
397
418
  Get et channel.
398
-
419
+
399
420
  :param et_id:
400
421
  et id
401
422
  :type et_id: string
402
423
 
424
+ :param et_channel_id:
425
+ et channel id (optional)
426
+ :type et_channel_id: string
427
+
403
428
  :param client_token:
404
429
  If the clientToken is not specified by the user, a random String
405
430
  generated by default algorithm will be used.
@@ -418,8 +443,11 @@ class EtClient(bce_base_client.BceBaseClient):
418
443
  else:
419
444
  params[b'clientToken'] = client_token
420
445
 
446
+ if et_channel_id is not None:
447
+ params[b'etChannelId'] = et_channel_id
448
+
421
449
  return self._send_request(http_methods.GET, path, params=params, config=config)
422
-
450
+
423
451
  @required(et_id=(bytes, str), et_channel_id=(bytes, str), local_ip=(bytes, str), name=(bytes, str),
424
452
  networks=(list, tuple), remote_ip=(bytes, str), route_type=(bytes, str), vlan_id=int)
425
453
  def recommit_et_channel(self, et_id, et_channel_id, local_ip, name, networks, remote_ip, route_type, vlan_id,
@@ -427,7 +455,7 @@ class EtClient(bce_base_client.BceBaseClient):
427
455
  remote_ipv6=None, ipv6_networks=None, client_token=None, config=None):
428
456
  """
429
457
  Recommit et channel.
430
-
458
+
431
459
  :param et_id:
432
460
  et id
433
461
  :type et_id: string
@@ -505,7 +533,7 @@ class EtClient(bce_base_client.BceBaseClient):
505
533
  params[b'clientToken'] = generate_client_token()
506
534
  else:
507
535
  params[b'clientToken'] = client_token
508
-
536
+
509
537
  body = {
510
538
  'baiduAddress': local_ip,
511
539
  'name': name,
@@ -534,12 +562,12 @@ class EtClient(bce_base_client.BceBaseClient):
534
562
  body['ipv6Networks'] = ipv6_networks
535
563
 
536
564
  return self._send_request(http_methods.PUT, path, params=params, body=json.dumps(body), config=config)
537
-
565
+
538
566
  @required(et_id=(bytes, str), et_channel_id=(bytes, str))
539
567
  def update_et_channel(self, et_id, et_channel_id, name=None, description=None, client_token=None, config=None):
540
568
  """
541
569
  update et channel.
542
-
570
+
543
571
  :param et_id:
544
572
  et id
545
573
  :type et_id: string
@@ -574,7 +602,7 @@ class EtClient(bce_base_client.BceBaseClient):
574
602
  params[b'clientToken'] = generate_client_token()
575
603
  else:
576
604
  params[b'clientToken'] = client_token
577
-
605
+
578
606
  body = {}
579
607
 
580
608
  if name is not None:
@@ -584,12 +612,12 @@ class EtClient(bce_base_client.BceBaseClient):
584
612
  body['description'] = compat.convert_to_string(description)
585
613
 
586
614
  return self._send_request(http_methods.PUT, path, params=params, body=json.dumps(body), config=config)
587
-
615
+
588
616
  @required(et_id=(bytes, str), et_channel_id=(bytes, str))
589
617
  def delete_et_channel(self, et_id, et_channel_id, client_token=None, config=None):
590
618
  """
591
619
  Delete et channel.
592
-
620
+
593
621
  :param et_id:
594
622
  et id
595
623
  :type et_id: string
@@ -618,14 +646,14 @@ class EtClient(bce_base_client.BceBaseClient):
618
646
  params[b'clientToken'] = client_token
619
647
 
620
648
  return self._send_request(http_methods.DELETE, path, params=params, config=config)
621
-
649
+
622
650
  @required(et_id=(bytes, str), et_channel_id=(bytes, str),
623
651
  local_ipv6=(bytes, str), remote_ipv6=(bytes, str))
624
652
  def enable_et_channel_ipv6(self, et_id, et_channel_id, local_ipv6, remote_ipv6,
625
653
  ipv6_networks=None, client_token=None, config=None):
626
654
  """
627
655
  Enable IPv6 of the specific et channel.
628
-
656
+
629
657
  :param et_id:
630
658
  et id
631
659
  :type et_id: string
@@ -664,7 +692,7 @@ class EtClient(bce_base_client.BceBaseClient):
664
692
  params[b'clientToken'] = generate_client_token()
665
693
  else:
666
694
  params[b'clientToken'] = client_token
667
-
695
+
668
696
  body = {
669
697
  'baiduIpv6Address': compat.convert_to_string(local_ipv6),
670
698
  'customerIpv6Address': compat.convert_to_string(remote_ipv6),
@@ -679,7 +707,7 @@ class EtClient(bce_base_client.BceBaseClient):
679
707
  def disable_et_channel_ipv6(self, et_id, et_channel_id, client_token=None, config=None):
680
708
  """
681
709
  Disable IPv6 of the specific et channel.
682
-
710
+
683
711
  :param et_id:
684
712
  The id of et.
685
713
  :type et_id: string
@@ -715,37 +743,37 @@ class EtClient(bce_base_client.BceBaseClient):
715
743
  client_token=None, config=None):
716
744
  """
717
745
  Create a et channel route rule with the specified options.
718
-
746
+
719
747
  :param et_id:
720
748
  The id of et.
721
749
  :type et_id: string
722
-
750
+
723
751
  :param et_channel_id:
724
752
  The id of et channel.
725
753
  :type et_channel_id: string
726
-
754
+
727
755
  :param dest_address:
728
756
  Destination address of the route rule.
729
757
  :type dest_address: string
730
-
758
+
731
759
  :param nexthop_type
732
- The type of nexthop.
760
+ The type of nexthop.
733
761
  Value can be "etGateway" or "etChannel", respectively dedicated gateway, dedicated channel type.
734
762
  :type nexthop_type: string
735
-
763
+
736
764
  :param nexthop_id:
737
765
  The id of nexthop instance.
738
766
  :type nexthop_id: string
739
-
767
+
740
768
  :param description:
741
769
  The description of the route rule.
742
770
  :type description: string
743
-
771
+
744
772
  :param ip_version:
745
773
  The ip version of the route rule.
746
774
  Value can be 4 or 6, default 4.
747
775
  :type ip_version: int
748
-
776
+
749
777
  :param client_token:
750
778
  An ASCII string whose length is less than 64.
751
779
  The request will be idempotent if clientToken is provided.
@@ -773,14 +801,14 @@ class EtClient(bce_base_client.BceBaseClient):
773
801
  'nexthopType': compat.convert_to_string(nexthop_type),
774
802
  'nexthopId': compat.convert_to_string(nexthop_id),
775
803
  }
776
-
804
+
777
805
  if description is not None:
778
806
  body['description'] = compat.convert_to_string(description)
779
807
 
780
808
  return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params,
781
809
  config=config)
782
810
 
783
- @required(et_id=(bytes, str), et_channel_id=(bytes, str),
811
+ @required(et_id=(bytes, str), et_channel_id=(bytes, str),
784
812
  marker=(bytes, str), max_Keys=int, dest_address=(bytes, str))
785
813
  def list_et_channel_route_rules(self, et_id, et_channel_id, marker=None,
786
814
  max_Keys=None, dest_address=None, config=None):
@@ -843,7 +871,7 @@ class EtClient(bce_base_client.BceBaseClient):
843
871
  :param et_channel_id:
844
872
  The id of et channel.
845
873
  :type et_channel_id: string
846
-
874
+
847
875
  :param et_channel_route_rule_id:
848
876
  The id of et channel route rule.
849
877
  :type et_channel_route_rule_id: string
@@ -893,7 +921,7 @@ class EtClient(bce_base_client.BceBaseClient):
893
921
  :param et_channel_id:
894
922
  The id of et channel.
895
923
  :type et_channel_id: string
896
-
924
+
897
925
  :param et_channel_route_rule_id:
898
926
  The id of et channel route rule.
899
927
  :type et_channel_route_rule_id: string
@@ -1007,6 +1035,151 @@ class EtClient(bce_base_client.BceBaseClient):
1007
1035
 
1008
1036
  return self._send_request(http_methods.PUT, path, params=params, body=json.dumps(body), config=config)
1009
1037
 
1038
+ @required(et_id=(bytes, str), et_channel_id=(bytes, str),
1039
+ detect_multiplier=int, send_interval=int, receive_interval=int)
1040
+ def create_et_channel_bfd(self, et_id, et_channel_id, detect_multiplier, send_interval,
1041
+ receive_interval, client_token=None, config=None):
1042
+ """
1043
+ Create BFD configuration for et channel.
1044
+
1045
+ :param et_id:
1046
+ The id of et.
1047
+ :type et_id: string
1048
+
1049
+ :param et_channel_id:
1050
+ The id of et channel.
1051
+ :type et_channel_id: string
1052
+
1053
+ :param detect_multiplier:
1054
+ Detection time multiplier, an integer between 3-10, recommended value is 4.
1055
+ :type detect_multiplier: int
1056
+
1057
+ :param send_interval:
1058
+ Message send interval, an integer between 200-1000 in milliseconds, recommended value is 300.
1059
+ :type send_interval: int
1060
+
1061
+ :param receive_interval:
1062
+ Message receive interval, an integer between 200-1000 in milliseconds, recommended value is 300.
1063
+ :type receive_interval: int
1064
+
1065
+ :param client_token:
1066
+ An ASCII string whose length is less than 64.
1067
+ The request will be idempotent if clientToken is provided.
1068
+ If the clientToken is not specified by the user,
1069
+ a random String generated by default algorithm will be used.
1070
+ :type client_token: string
1071
+
1072
+ :param config:
1073
+ :type config: baidubce.BceClientConfiguration
1074
+
1075
+ :return:
1076
+ :rtype baidubce.bce_response.BceResponse
1077
+ """
1078
+ path = utils.append_uri(self.prefix, self.et, et_id, self.channel, et_channel_id, self.bfd)
1079
+
1080
+ params = {}
1081
+ if client_token is None:
1082
+ params[b'clientToken'] = generate_client_token()
1083
+ else:
1084
+ params[b'clientToken'] = client_token
1085
+
1086
+ body = {
1087
+ 'detectMultiplier': detect_multiplier,
1088
+ 'sendInterval': send_interval,
1089
+ 'receivInterval': receive_interval
1090
+ }
1091
+ return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
1092
+
1093
+ @required(et_id=(bytes, str), et_channel_id=(bytes, str))
1094
+ def delete_et_channel_bfd(self, et_id, et_channel_id, client_token=None, config=None):
1095
+ """
1096
+ Delete BFD configuration for et channel.
1097
+
1098
+ :param et_id:
1099
+ The id of et.
1100
+ :type et_id: string
1101
+
1102
+ :param et_channel_id:
1103
+ The id of et channel.
1104
+ :type et_channel_id: string
1105
+
1106
+ :param client_token:
1107
+ An ASCII string whose length is less than 64.
1108
+ The request will be idempotent if clientToken is provided.
1109
+ If the clientToken is not specified by the user,
1110
+ a random String generated by default algorithm will be used.
1111
+ :type client_token: string
1112
+
1113
+ :param config:
1114
+ :type config: baidubce.BceClientConfiguration
1115
+
1116
+ :return:
1117
+ :rtype baidubce.bce_response.BceResponse
1118
+ """
1119
+ path = utils.append_uri(self.prefix, self.et, et_id, self.channel, et_channel_id, self.bfd)
1120
+
1121
+ params = {}
1122
+ if client_token is None:
1123
+ params[b'clientToken'] = generate_client_token()
1124
+ else:
1125
+ params[b'clientToken'] = client_token
1126
+
1127
+ return self._send_request(http_methods.DELETE, path, params=params, config=config)
1128
+
1129
+ @required(et_id=(bytes, str), et_channel_id=(bytes, str),
1130
+ detect_multiplier=int, send_interval=int, receive_interval=int)
1131
+ def update_et_channel_bfd(self, et_id, et_channel_id, detect_multiplier, send_interval,
1132
+ receive_interval, client_token=None, config=None):
1133
+ """
1134
+ Update BFD configuration for et channel.
1135
+
1136
+ :param et_id:
1137
+ The id of et.
1138
+ :type et_id: string
1139
+
1140
+ :param et_channel_id:
1141
+ The id of et channel.
1142
+ :type et_channel_id: string
1143
+
1144
+ :param detect_multiplier:
1145
+ Detection time multiplier, an integer between 3-10, recommended value is 4.
1146
+ :type detect_multiplier: int
1147
+
1148
+ :param send_interval:
1149
+ Message send interval, an integer between 200-1000 in milliseconds, recommended value is 300.
1150
+ :type send_interval: int
1151
+
1152
+ :param receive_interval:
1153
+ Message receive interval, an integer between 200-1000 in milliseconds, recommended value is 300.
1154
+ :type receive_interval: int
1155
+
1156
+ :param client_token:
1157
+ An ASCII string whose length is less than 64.
1158
+ The request will be idempotent if clientToken is provided.
1159
+ If the clientToken is not specified by the user,
1160
+ a random String generated by default algorithm will be used.
1161
+ :type client_token: string
1162
+
1163
+ :param config:
1164
+ :type config: baidubce.BceClientConfiguration
1165
+
1166
+ :return:
1167
+ :rtype baidubce.bce_response.BceResponse
1168
+ """
1169
+ path = utils.append_uri(self.prefix, self.et, et_id, self.channel, et_channel_id, self.bfd)
1170
+
1171
+ params = {}
1172
+ if client_token is None:
1173
+ params[b'clientToken'] = generate_client_token()
1174
+ else:
1175
+ params[b'clientToken'] = client_token
1176
+
1177
+ body = {
1178
+ 'detectMultiplier': detect_multiplier,
1179
+ 'sendInterval': send_interval,
1180
+ 'receivInterval': receive_interval
1181
+ }
1182
+ return self._send_request(http_methods.PUT, path, body=json.dumps(body), params=params, config=config)
1010
1183
 
1011
1184
  def generate_client_token_by_uuid():
1012
1185
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bce-python-sdk
3
- Version: 0.9.59
3
+ Version: 0.9.60
4
4
  Summary: BCE SDK for python
5
5
  Home-page: http://bce.baidu.com
6
6
  Author:
@@ -1,4 +1,4 @@
1
- baidubce/__init__.py,sha256=Wmf6zRPvFW3mCvc5ugWLBTT7TtY0e1HhvCK6EHJjJdg,813
1
+ baidubce/__init__.py,sha256=rnZqSpe0-XrdYAhEaCOTgLUlBBsmZxhf9j8tIEljSSc,813
2
2
  baidubce/bce_base_client.py,sha256=7gjkRy_YlTTb6TXHYHyZRYMjdVO7FTtHMdwXx8bPgsE,3428
3
3
  baidubce/bce_client_configuration.py,sha256=i9z5wVXaRSlJxE0LD1odexza35KQyFy7m1Az5XclD_I,3252
4
4
  baidubce/bce_response.py,sha256=gOj48U6iurYJsChzFdrB7Rj3RpkU-fUdhtftrIj9o8U,1985
@@ -33,7 +33,7 @@ baidubce/services/aihc/modules/dataset/dataset_model.py,sha256=UGfUwL9J0iW1FRqNM
33
33
  baidubce/services/aihc/modules/dev_instance/__init__.py,sha256=2sBKuEWiVg7nVUdjB1gj_va2_VSmOM3lm9npLKw24DQ,757
34
34
  baidubce/services/aihc/modules/dev_instance/dev_instance_client.py,sha256=sK783JNRO4KIMy2ae-9zo6P00OwAsHodW5ckizWu57I,10888
35
35
  baidubce/services/aihc/modules/job/__init__.py,sha256=cgdV7f4DQ8bwzLU8xvrwQGBmg3jlEcrxF-r0Oh5KxTU,714
36
- baidubce/services/aihc/modules/job/job_client.py,sha256=kHEhTLMVD3cLEeJ_D8sS40ESGXk77V-pvCUyN83OGi8,19486
36
+ baidubce/services/aihc/modules/job/job_client.py,sha256=bud3xkv1m7p1MFvK3_ieHIOgsRoTh9ltTbTXRd5zbPo,20786
37
37
  baidubce/services/aihc/modules/job/job_model.py,sha256=kws5tI7IjHPDQ1wj2FJCkRMQdOFDCQYoMzf7bvRkh9A,7373
38
38
  baidubce/services/aihc/modules/model/__init__.py,sha256=JYO6XwyHsxqv6jMrEwZIkP7v4uZketKsTw15qXdpsUg,724
39
39
  baidubce/services/aihc/modules/model/model_client.py,sha256=T-i29o-6far4rUl7s-XPfIC-H2Vc00DZcjwujP94BaQ,9368
@@ -51,7 +51,7 @@ baidubce/services/bbc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
51
51
  baidubce/services/bbc/bbc_client.py,sha256=6x2fWmjyKSZ02WvsmQ1pryE0c_mtXHCjI0Ev80MfzbY,38951
52
52
  baidubce/services/bbc/bbc_model.py,sha256=Dy80LZ4ro_iS3UejJ_CL9kI7OyMSBoDitTE4J1XAC_g,1790
53
53
  baidubce/services/bcc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
- baidubce/services/bcc/bcc_client.py,sha256=1XTHkkhgd59F6tEMNiniqTop0TytZiKW8lGsiTbdwlc,299976
54
+ baidubce/services/bcc/bcc_client.py,sha256=nDhtOWi5x0IyM1Fzdf6_VOctJj1PEn-QlBR6rtBXNXA,300606
55
55
  baidubce/services/bcc/bcc_model.py,sha256=xKYC4Z-gxWjFhe8b1AmMBEN_wYhnwcqAmer29ysS17k,6788
56
56
  baidubce/services/bcc/fpga_card_type.py,sha256=n6goqnapIgAC9_sciA_2he5HFqPRbRv109qitO7qpd8,948
57
57
  baidubce/services/bcc/gpu_card_type.py,sha256=HEfMzne-UC5F295JPrPUu7V9F5g-hbXF2TNBontEFes,1054
@@ -125,7 +125,7 @@ baidubce/services/esg/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
125
125
  baidubce/services/esg/esg_client.py,sha256=3yZ2V98mc0QxTYRtmMxERl9NjmRilF8c3-feOfB3AGY,13122
126
126
  baidubce/services/esg/esg_model.py,sha256=TNf5J7ZdDBa4fKD40qA8mHewxXK6YvvPqYkZth4sEJw,3646
127
127
  baidubce/services/et/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
128
- baidubce/services/et/et_client.py,sha256=skz620Hdk8c8mS1hkDbWAekvfWVytqkgb5AMeK0sDFw,34426
128
+ baidubce/services/et/et_client.py,sha256=yTKYQ7VU80EeRyuYhOqg5b793pF_v24ri6LDytF5-6Y,40322
129
129
  baidubce/services/et/model.py,sha256=H0IkBVtMWYldFcLoXb_pFbrGQWGD4ZPthdfI443VQcc,975
130
130
  baidubce/services/etGateway/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
131
131
  baidubce/services/etGateway/et_gateway_client.py,sha256=ZD4clsjS9CVqb-iQ53nJJx8aA9_OqadQNsrRABDaOT0,14970
@@ -198,7 +198,7 @@ baidubce/services/vpc/vpc_client.py,sha256=Cdg009gZdI1gPgGy08-kIOxT3_VvuQoPqI_82
198
198
  baidubce/services/vpn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
199
199
  baidubce/services/vpn/vpn_client.py,sha256=rrnQElD-LTttsqMbbIHoHK0Jdc7FrVVTZIdu-0Zthr8,31352
200
200
  baidubce/services/vpn/vpn_model.py,sha256=C9rEBYyFIDjrqvqJG4WEin6qVzEIvbhPvT5KwDYm1qA,3365
201
- bce_python_sdk-0.9.59.dist-info/METADATA,sha256=YLnTksp2a9qvV1bjePpdJi0X9Am4iqVn21gAeM0lZ_A,416
202
- bce_python_sdk-0.9.59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
203
- bce_python_sdk-0.9.59.dist-info/top_level.txt,sha256=Oh6eo_-T_AuEDpIaR54biUUPThxsoQiYMVHLBTaweQs,9
204
- bce_python_sdk-0.9.59.dist-info/RECORD,,
201
+ bce_python_sdk-0.9.60.dist-info/METADATA,sha256=hLgIlV_86FKyot0sB-UD0_dg68v7pJx-Q_PjPHXM9V0,416
202
+ bce_python_sdk-0.9.60.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
203
+ bce_python_sdk-0.9.60.dist-info/top_level.txt,sha256=Oh6eo_-T_AuEDpIaR54biUUPThxsoQiYMVHLBTaweQs,9
204
+ bce_python_sdk-0.9.60.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5