tccli 3.0.1200.1__py2.py3-none-any.whl → 3.0.1202.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +3 -0
  3. tccli/services/autoscaling/v20180419/api.json +33 -5
  4. tccli/services/autoscaling/v20180419/examples.json +3 -3
  5. tccli/services/batch/v20170312/api.json +2 -2
  6. tccli/services/ca/__init__.py +4 -0
  7. tccli/services/ca/ca_client.py +301 -0
  8. tccli/services/ca/v20230228/api.json +264 -0
  9. tccli/services/ca/v20230228/examples.json +41 -0
  10. tccli/services/ccc/ccc_client.py +153 -47
  11. tccli/services/ccc/v20200210/api.json +185 -1
  12. tccli/services/ccc/v20200210/examples.json +17 -1
  13. tccli/services/cdn/v20180606/api.json +30 -1
  14. tccli/services/cdwdoris/v20211228/api.json +5 -1
  15. tccli/services/cvm/cvm_client.py +53 -0
  16. tccli/services/cvm/v20170312/api.json +173 -25
  17. tccli/services/cvm/v20170312/examples.json +9 -1
  18. tccli/services/cynosdb/v20190107/api.json +56 -56
  19. tccli/services/dts/v20211206/api.json +12 -12
  20. tccli/services/emr/v20190103/api.json +9 -0
  21. tccli/services/ess/v20201111/api.json +6 -6
  22. tccli/services/essbasic/v20210526/api.json +1 -1
  23. tccli/services/lcic/v20220817/api.json +1 -1
  24. tccli/services/lighthouse/v20200324/api.json +2 -2
  25. tccli/services/mqtt/v20240516/api.json +1 -1
  26. tccli/services/mrs/v20200910/api.json +71 -1
  27. tccli/services/ocr/v20181119/api.json +10 -0
  28. tccli/services/ses/v20201002/api.json +50 -0
  29. tccli/services/ses/v20201002/examples.json +6 -0
  30. tccli/services/ssl/v20191205/api.json +20 -1
  31. tccli/services/ssl/v20191205/examples.json +1 -1
  32. tccli/services/teo/teo_client.py +724 -141
  33. tccli/services/teo/v20220901/api.json +993 -106
  34. tccli/services/teo/v20220901/examples.json +112 -0
  35. tccli/services/tke/v20180525/api.json +7 -4
  36. tccli/services/vpc/v20170312/api.json +1273 -17
  37. tccli/services/vpc/v20170312/examples.json +176 -0
  38. tccli/services/vpc/vpc_client.py +1315 -149
  39. {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/METADATA +2 -2
  40. {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/RECORD +43 -39
  41. {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/WHEEL +0 -0
  42. {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/entry_points.txt +0 -0
  43. {tccli-3.0.1200.1.dist-info → tccli-3.0.1202.1.dist-info}/license_files/LICENSE +0 -0
@@ -17,7 +17,7 @@ from tencentcloud.ccc.v20200210 import models as models_v20200210
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
- def doModifyCompanyApply(args, parsed_globals):
20
+ def doModifyStaff(args, parsed_globals):
21
21
  g_param = parse_global_arg(parsed_globals)
22
22
 
23
23
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -46,11 +46,11 @@ def doModifyCompanyApply(args, parsed_globals):
46
46
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
47
47
  client._sdkVersion += ("_CLI_" + __version__)
48
48
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.ModifyCompanyApplyRequest()
49
+ model = models.ModifyStaffRequest()
50
50
  model.from_json_string(json.dumps(args))
51
51
  start_time = time.time()
52
52
  while True:
53
- rsp = client.ModifyCompanyApply(model)
53
+ rsp = client.ModifyStaff(model)
54
54
  result = rsp.to_json_string()
55
55
  try:
56
56
  json_obj = json.loads(result)
@@ -69,7 +69,7 @@ def doModifyCompanyApply(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
- def doUnbindNumberCallOutSkillGroup(args, parsed_globals):
72
+ def doDescribeExtensions(args, parsed_globals):
73
73
  g_param = parse_global_arg(parsed_globals)
74
74
 
75
75
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -98,11 +98,11 @@ def doUnbindNumberCallOutSkillGroup(args, parsed_globals):
98
98
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
99
99
  client._sdkVersion += ("_CLI_" + __version__)
100
100
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.UnbindNumberCallOutSkillGroupRequest()
101
+ model = models.DescribeExtensionsRequest()
102
102
  model.from_json_string(json.dumps(args))
103
103
  start_time = time.time()
104
104
  while True:
105
- rsp = client.UnbindNumberCallOutSkillGroup(model)
105
+ rsp = client.DescribeExtensions(model)
106
106
  result = rsp.to_json_string()
107
107
  try:
108
108
  json_obj = json.loads(result)
@@ -121,7 +121,7 @@ def doUnbindNumberCallOutSkillGroup(args, parsed_globals):
121
121
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
122
 
123
123
 
124
- def doDescribeExtensions(args, parsed_globals):
124
+ def doDescribeAutoCalloutTasks(args, parsed_globals):
125
125
  g_param = parse_global_arg(parsed_globals)
126
126
 
127
127
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -150,11 +150,11 @@ def doDescribeExtensions(args, parsed_globals):
150
150
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
151
151
  client._sdkVersion += ("_CLI_" + __version__)
152
152
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
- model = models.DescribeExtensionsRequest()
153
+ model = models.DescribeAutoCalloutTasksRequest()
154
154
  model.from_json_string(json.dumps(args))
155
155
  start_time = time.time()
156
156
  while True:
157
- rsp = client.DescribeExtensions(model)
157
+ rsp = client.DescribeAutoCalloutTasks(model)
158
158
  result = rsp.to_json_string()
159
159
  try:
160
160
  json_obj = json.loads(result)
@@ -173,7 +173,7 @@ def doDescribeExtensions(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
- def doDescribeAutoCalloutTasks(args, parsed_globals):
176
+ def doCreateAICall(args, parsed_globals):
177
177
  g_param = parse_global_arg(parsed_globals)
178
178
 
179
179
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -202,11 +202,11 @@ def doDescribeAutoCalloutTasks(args, parsed_globals):
202
202
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
203
203
  client._sdkVersion += ("_CLI_" + __version__)
204
204
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
- model = models.DescribeAutoCalloutTasksRequest()
205
+ model = models.CreateAICallRequest()
206
206
  model.from_json_string(json.dumps(args))
207
207
  start_time = time.time()
208
208
  while True:
209
- rsp = client.DescribeAutoCalloutTasks(model)
209
+ rsp = client.CreateAICall(model)
210
210
  result = rsp.to_json_string()
211
211
  try:
212
212
  json_obj = json.loads(result)
@@ -225,7 +225,7 @@ def doDescribeAutoCalloutTasks(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
- def doCreateAICall(args, parsed_globals):
228
+ def doModifyOwnNumberApply(args, parsed_globals):
229
229
  g_param = parse_global_arg(parsed_globals)
230
230
 
231
231
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -254,11 +254,11 @@ def doCreateAICall(args, parsed_globals):
254
254
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
255
255
  client._sdkVersion += ("_CLI_" + __version__)
256
256
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
- model = models.CreateAICallRequest()
257
+ model = models.ModifyOwnNumberApplyRequest()
258
258
  model.from_json_string(json.dumps(args))
259
259
  start_time = time.time()
260
260
  while True:
261
- rsp = client.CreateAICall(model)
261
+ rsp = client.ModifyOwnNumberApply(model)
262
262
  result = rsp.to_json_string()
263
263
  try:
264
264
  json_obj = json.loads(result)
@@ -485,7 +485,7 @@ def doBindStaffSkillGroupList(args, parsed_globals):
485
485
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
486
 
487
487
 
488
- def doBindNumberCallOutSkillGroup(args, parsed_globals):
488
+ def doDescribeChatMessages(args, parsed_globals):
489
489
  g_param = parse_global_arg(parsed_globals)
490
490
 
491
491
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -514,11 +514,11 @@ def doBindNumberCallOutSkillGroup(args, parsed_globals):
514
514
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
515
515
  client._sdkVersion += ("_CLI_" + __version__)
516
516
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
- model = models.BindNumberCallOutSkillGroupRequest()
517
+ model = models.DescribeChatMessagesRequest()
518
518
  model.from_json_string(json.dumps(args))
519
519
  start_time = time.time()
520
520
  while True:
521
- rsp = client.BindNumberCallOutSkillGroup(model)
521
+ rsp = client.DescribeChatMessages(model)
522
522
  result = rsp.to_json_string()
523
523
  try:
524
524
  json_obj = json.loads(result)
@@ -693,7 +693,7 @@ def doDeleteStaff(args, parsed_globals):
693
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
694
 
695
695
 
696
- def doModifyStaff(args, parsed_globals):
696
+ def doModifyCompanyApply(args, parsed_globals):
697
697
  g_param = parse_global_arg(parsed_globals)
698
698
 
699
699
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -722,11 +722,11 @@ def doModifyStaff(args, parsed_globals):
722
722
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
723
723
  client._sdkVersion += ("_CLI_" + __version__)
724
724
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
- model = models.ModifyStaffRequest()
725
+ model = models.ModifyCompanyApplyRequest()
726
726
  model.from_json_string(json.dumps(args))
727
727
  start_time = time.time()
728
728
  while True:
729
- rsp = client.ModifyStaff(model)
729
+ rsp = client.ModifyCompanyApply(model)
730
730
  result = rsp.to_json_string()
731
731
  try:
732
732
  json_obj = json.loads(result)
@@ -1057,7 +1057,7 @@ def doCreateCallOutSession(args, parsed_globals):
1057
1057
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
1058
 
1059
1059
 
1060
- def doDescribePredictiveDialingCampaigns(args, parsed_globals):
1060
+ def doDescribeCarrierPrivilegeNumberApplicants(args, parsed_globals):
1061
1061
  g_param = parse_global_arg(parsed_globals)
1062
1062
 
1063
1063
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1086,11 +1086,11 @@ def doDescribePredictiveDialingCampaigns(args, parsed_globals):
1086
1086
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
1087
1087
  client._sdkVersion += ("_CLI_" + __version__)
1088
1088
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1089
- model = models.DescribePredictiveDialingCampaignsRequest()
1089
+ model = models.DescribeCarrierPrivilegeNumberApplicantsRequest()
1090
1090
  model.from_json_string(json.dumps(args))
1091
1091
  start_time = time.time()
1092
1092
  while True:
1093
- rsp = client.DescribePredictiveDialingCampaigns(model)
1093
+ rsp = client.DescribeCarrierPrivilegeNumberApplicants(model)
1094
1094
  result = rsp.to_json_string()
1095
1095
  try:
1096
1096
  json_obj = json.loads(result)
@@ -1369,6 +1369,58 @@ def doDescribeSkillGroupInfoList(args, parsed_globals):
1369
1369
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
1370
 
1371
1371
 
1372
+ def doUnbindNumberCallOutSkillGroup(args, parsed_globals):
1373
+ g_param = parse_global_arg(parsed_globals)
1374
+
1375
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1376
+ cred = credential.CVMRoleCredential()
1377
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1378
+ cred = credential.STSAssumeRoleCredential(
1379
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1380
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1381
+ )
1382
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1383
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1384
+ else:
1385
+ cred = credential.Credential(
1386
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1387
+ )
1388
+ http_profile = HttpProfile(
1389
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1390
+ reqMethod="POST",
1391
+ endpoint=g_param[OptionsDefine.Endpoint],
1392
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1393
+ )
1394
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1395
+ if g_param[OptionsDefine.Language]:
1396
+ profile.language = g_param[OptionsDefine.Language]
1397
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1398
+ client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
1399
+ client._sdkVersion += ("_CLI_" + __version__)
1400
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1401
+ model = models.UnbindNumberCallOutSkillGroupRequest()
1402
+ model.from_json_string(json.dumps(args))
1403
+ start_time = time.time()
1404
+ while True:
1405
+ rsp = client.UnbindNumberCallOutSkillGroup(model)
1406
+ result = rsp.to_json_string()
1407
+ try:
1408
+ json_obj = json.loads(result)
1409
+ except TypeError as e:
1410
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1411
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1412
+ break
1413
+ cur_time = time.time()
1414
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1415
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1416
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1417
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1418
+ else:
1419
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1420
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1421
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1422
+
1423
+
1372
1424
  def doStopAutoCalloutTask(args, parsed_globals):
1373
1425
  g_param = parse_global_arg(parsed_globals)
1374
1426
 
@@ -1473,7 +1525,7 @@ def doDescribeIvrAudioList(args, parsed_globals):
1473
1525
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1474
1526
 
1475
1527
 
1476
- def doCreateCarrierPrivilegeNumberApplicant(args, parsed_globals):
1528
+ def doBindNumberCallOutSkillGroup(args, parsed_globals):
1477
1529
  g_param = parse_global_arg(parsed_globals)
1478
1530
 
1479
1531
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1502,11 +1554,11 @@ def doCreateCarrierPrivilegeNumberApplicant(args, parsed_globals):
1502
1554
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
1503
1555
  client._sdkVersion += ("_CLI_" + __version__)
1504
1556
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1505
- model = models.CreateCarrierPrivilegeNumberApplicantRequest()
1557
+ model = models.BindNumberCallOutSkillGroupRequest()
1506
1558
  model.from_json_string(json.dumps(args))
1507
1559
  start_time = time.time()
1508
1560
  while True:
1509
- rsp = client.CreateCarrierPrivilegeNumberApplicant(model)
1561
+ rsp = client.BindNumberCallOutSkillGroup(model)
1510
1562
  result = rsp.to_json_string()
1511
1563
  try:
1512
1564
  json_obj = json.loads(result)
@@ -1577,7 +1629,7 @@ def doUploadIvrAudio(args, parsed_globals):
1577
1629
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1578
1630
 
1579
1631
 
1580
- def doDescribeActiveCarrierPrivilegeNumber(args, parsed_globals):
1632
+ def doCreateCarrierPrivilegeNumberApplicant(args, parsed_globals):
1581
1633
  g_param = parse_global_arg(parsed_globals)
1582
1634
 
1583
1635
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1606,11 +1658,11 @@ def doDescribeActiveCarrierPrivilegeNumber(args, parsed_globals):
1606
1658
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
1607
1659
  client._sdkVersion += ("_CLI_" + __version__)
1608
1660
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1609
- model = models.DescribeActiveCarrierPrivilegeNumberRequest()
1661
+ model = models.CreateCarrierPrivilegeNumberApplicantRequest()
1610
1662
  model.from_json_string(json.dumps(args))
1611
1663
  start_time = time.time()
1612
1664
  while True:
1613
- rsp = client.DescribeActiveCarrierPrivilegeNumber(model)
1665
+ rsp = client.CreateCarrierPrivilegeNumberApplicant(model)
1614
1666
  result = rsp.to_json_string()
1615
1667
  try:
1616
1668
  json_obj = json.loads(result)
@@ -1629,7 +1681,7 @@ def doDescribeActiveCarrierPrivilegeNumber(args, parsed_globals):
1629
1681
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1682
 
1631
1683
 
1632
- def doDescribeChatMessages(args, parsed_globals):
1684
+ def doDescribeActiveCarrierPrivilegeNumber(args, parsed_globals):
1633
1685
  g_param = parse_global_arg(parsed_globals)
1634
1686
 
1635
1687
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1658,11 +1710,11 @@ def doDescribeChatMessages(args, parsed_globals):
1658
1710
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
1659
1711
  client._sdkVersion += ("_CLI_" + __version__)
1660
1712
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
- model = models.DescribeChatMessagesRequest()
1713
+ model = models.DescribeActiveCarrierPrivilegeNumberRequest()
1662
1714
  model.from_json_string(json.dumps(args))
1663
1715
  start_time = time.time()
1664
1716
  while True:
1665
- rsp = client.DescribeChatMessages(model)
1717
+ rsp = client.DescribeActiveCarrierPrivilegeNumber(model)
1666
1718
  result = rsp.to_json_string()
1667
1719
  try:
1668
1720
  json_obj = json.loads(result)
@@ -1681,7 +1733,7 @@ def doDescribeChatMessages(args, parsed_globals):
1681
1733
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1682
1734
 
1683
1735
 
1684
- def doDescribeCCCBuyInfoList(args, parsed_globals):
1736
+ def doCreateOwnNumberApply(args, parsed_globals):
1685
1737
  g_param = parse_global_arg(parsed_globals)
1686
1738
 
1687
1739
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1710,11 +1762,11 @@ def doDescribeCCCBuyInfoList(args, parsed_globals):
1710
1762
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
1711
1763
  client._sdkVersion += ("_CLI_" + __version__)
1712
1764
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1713
- model = models.DescribeCCCBuyInfoListRequest()
1765
+ model = models.CreateOwnNumberApplyRequest()
1714
1766
  model.from_json_string(json.dumps(args))
1715
1767
  start_time = time.time()
1716
1768
  while True:
1717
- rsp = client.DescribeCCCBuyInfoList(model)
1769
+ rsp = client.CreateOwnNumberApply(model)
1718
1770
  result = rsp.to_json_string()
1719
1771
  try:
1720
1772
  json_obj = json.loads(result)
@@ -1733,7 +1785,7 @@ def doDescribeCCCBuyInfoList(args, parsed_globals):
1733
1785
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1734
1786
 
1735
1787
 
1736
- def doDescribeCarrierPrivilegeNumberApplicants(args, parsed_globals):
1788
+ def doDescribeCCCBuyInfoList(args, parsed_globals):
1737
1789
  g_param = parse_global_arg(parsed_globals)
1738
1790
 
1739
1791
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1762,11 +1814,11 @@ def doDescribeCarrierPrivilegeNumberApplicants(args, parsed_globals):
1762
1814
  client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
1763
1815
  client._sdkVersion += ("_CLI_" + __version__)
1764
1816
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1765
- model = models.DescribeCarrierPrivilegeNumberApplicantsRequest()
1817
+ model = models.DescribeCCCBuyInfoListRequest()
1766
1818
  model.from_json_string(json.dumps(args))
1767
1819
  start_time = time.time()
1768
1820
  while True:
1769
- rsp = client.DescribeCarrierPrivilegeNumberApplicants(model)
1821
+ rsp = client.DescribeCCCBuyInfoList(model)
1770
1822
  result = rsp.to_json_string()
1771
1823
  try:
1772
1824
  json_obj = json.loads(result)
@@ -1993,6 +2045,58 @@ def doDescribeStaffInfoList(args, parsed_globals):
1993
2045
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1994
2046
 
1995
2047
 
2048
+ def doDescribePredictiveDialingCampaigns(args, parsed_globals):
2049
+ g_param = parse_global_arg(parsed_globals)
2050
+
2051
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2052
+ cred = credential.CVMRoleCredential()
2053
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2054
+ cred = credential.STSAssumeRoleCredential(
2055
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2056
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2057
+ )
2058
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
2059
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2060
+ else:
2061
+ cred = credential.Credential(
2062
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2063
+ )
2064
+ http_profile = HttpProfile(
2065
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2066
+ reqMethod="POST",
2067
+ endpoint=g_param[OptionsDefine.Endpoint],
2068
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2069
+ )
2070
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2071
+ if g_param[OptionsDefine.Language]:
2072
+ profile.language = g_param[OptionsDefine.Language]
2073
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2074
+ client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
2075
+ client._sdkVersion += ("_CLI_" + __version__)
2076
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2077
+ model = models.DescribePredictiveDialingCampaignsRequest()
2078
+ model.from_json_string(json.dumps(args))
2079
+ start_time = time.time()
2080
+ while True:
2081
+ rsp = client.DescribePredictiveDialingCampaigns(model)
2082
+ result = rsp.to_json_string()
2083
+ try:
2084
+ json_obj = json.loads(result)
2085
+ except TypeError as e:
2086
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2087
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2088
+ break
2089
+ cur_time = time.time()
2090
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2091
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2092
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2093
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2094
+ else:
2095
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2096
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2097
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2098
+
2099
+
1996
2100
  def doDisableCCCPhoneNumber(args, parsed_globals):
1997
2101
  g_param = parse_global_arg(parsed_globals)
1998
2102
 
@@ -3096,44 +3200,46 @@ MODELS_MAP = {
3096
3200
  }
3097
3201
 
3098
3202
  ACTION_MAP = {
3099
- "ModifyCompanyApply": doModifyCompanyApply,
3100
- "UnbindNumberCallOutSkillGroup": doUnbindNumberCallOutSkillGroup,
3203
+ "ModifyStaff": doModifyStaff,
3101
3204
  "DescribeExtensions": doDescribeExtensions,
3102
3205
  "DescribeAutoCalloutTasks": doDescribeAutoCalloutTasks,
3103
3206
  "CreateAICall": doCreateAICall,
3207
+ "ModifyOwnNumberApply": doModifyOwnNumberApply,
3104
3208
  "DescribePredictiveDialingCampaign": doDescribePredictiveDialingCampaign,
3105
3209
  "DescribePSTNActiveSessionList": doDescribePSTNActiveSessionList,
3106
3210
  "DeleteExtension": doDeleteExtension,
3107
3211
  "BindStaffSkillGroupList": doBindStaffSkillGroupList,
3108
- "BindNumberCallOutSkillGroup": doBindNumberCallOutSkillGroup,
3212
+ "DescribeChatMessages": doDescribeChatMessages,
3109
3213
  "DescribeIMCdrs": doDescribeIMCdrs,
3110
3214
  "CreatePredictiveDialingCampaign": doCreatePredictiveDialingCampaign,
3111
3215
  "DeleteStaff": doDeleteStaff,
3112
- "ModifyStaff": doModifyStaff,
3216
+ "ModifyCompanyApply": doModifyCompanyApply,
3113
3217
  "CreateExtension": doCreateExtension,
3114
3218
  "ResetExtensionPassword": doResetExtensionPassword,
3115
3219
  "CreateStaff": doCreateStaff,
3116
3220
  "DescribeExtension": doDescribeExtension,
3117
3221
  "DescribeTelSession": doDescribeTelSession,
3118
3222
  "CreateCallOutSession": doCreateCallOutSession,
3119
- "DescribePredictiveDialingCampaigns": doDescribePredictiveDialingCampaigns,
3223
+ "DescribeCarrierPrivilegeNumberApplicants": doDescribeCarrierPrivilegeNumberApplicants,
3120
3224
  "DescribeAutoCalloutTask": doDescribeAutoCalloutTask,
3121
3225
  "DescribePredictiveDialingSessions": doDescribePredictiveDialingSessions,
3122
3226
  "CreateCompanyApply": doCreateCompanyApply,
3123
3227
  "ResumePredictiveDialingCampaign": doResumePredictiveDialingCampaign,
3124
3228
  "DescribeSkillGroupInfoList": doDescribeSkillGroupInfoList,
3229
+ "UnbindNumberCallOutSkillGroup": doUnbindNumberCallOutSkillGroup,
3125
3230
  "StopAutoCalloutTask": doStopAutoCalloutTask,
3126
3231
  "DescribeIvrAudioList": doDescribeIvrAudioList,
3127
- "CreateCarrierPrivilegeNumberApplicant": doCreateCarrierPrivilegeNumberApplicant,
3232
+ "BindNumberCallOutSkillGroup": doBindNumberCallOutSkillGroup,
3128
3233
  "UploadIvrAudio": doUploadIvrAudio,
3234
+ "CreateCarrierPrivilegeNumberApplicant": doCreateCarrierPrivilegeNumberApplicant,
3129
3235
  "DescribeActiveCarrierPrivilegeNumber": doDescribeActiveCarrierPrivilegeNumber,
3130
- "DescribeChatMessages": doDescribeChatMessages,
3236
+ "CreateOwnNumberApply": doCreateOwnNumberApply,
3131
3237
  "DescribeCCCBuyInfoList": doDescribeCCCBuyInfoList,
3132
- "DescribeCarrierPrivilegeNumberApplicants": doDescribeCarrierPrivilegeNumberApplicants,
3133
3238
  "CreateCCCSkillGroup": doCreateCCCSkillGroup,
3134
3239
  "UnbindStaffSkillGroupList": doUnbindStaffSkillGroupList,
3135
3240
  "ModifyStaffPassword": doModifyStaffPassword,
3136
3241
  "DescribeStaffInfoList": doDescribeStaffInfoList,
3242
+ "DescribePredictiveDialingCampaigns": doDescribePredictiveDialingCampaigns,
3137
3243
  "DisableCCCPhoneNumber": doDisableCCCPhoneNumber,
3138
3244
  "DescribeStaffStatusMetrics": doDescribeStaffStatusMetrics,
3139
3245
  "DescribeTelCallInfo": doDescribeTelCallInfo,