tccli 3.0.1336.1__py2.py3-none-any.whl → 3.0.1338.1__py2.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.
Files changed (53) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/antiddos/v20200309/api.json +2 -2
  3. tccli/services/asr/v20190614/api.json +1 -1
  4. tccli/services/captcha/v20190722/api.json +10 -0
  5. tccli/services/cdb/v20170320/api.json +1 -1
  6. tccli/services/cdwdoris/v20211228/api.json +4 -4
  7. tccli/services/cfs/v20190719/api.json +6 -3
  8. tccli/services/cfw/v20190904/api.json +9 -0
  9. tccli/services/cls/v20201016/api.json +1 -1
  10. tccli/services/cme/v20191029/api.json +1 -1
  11. tccli/services/csip/v20221121/api.json +10 -0
  12. tccli/services/es/v20250101/api.json +71 -0
  13. tccli/services/ess/ess_client.py +106 -0
  14. tccli/services/ess/v20201111/api.json +179 -1
  15. tccli/services/ess/v20201111/examples.json +16 -0
  16. tccli/services/essbasic/essbasic_client.py +114 -8
  17. tccli/services/essbasic/v20210526/api.json +163 -3
  18. tccli/services/essbasic/v20210526/examples.json +16 -0
  19. tccli/services/gs/v20191118/api.json +11 -1
  20. tccli/services/gs/v20191118/examples.json +1 -1
  21. tccli/services/hunyuan/v20230901/api.json +3 -3
  22. tccli/services/lighthouse/lighthouse_client.py +53 -0
  23. tccli/services/lighthouse/v20200324/api.json +43 -0
  24. tccli/services/lighthouse/v20200324/examples.json +8 -0
  25. tccli/services/live/live_client.py +285 -20
  26. tccli/services/live/v20180801/api.json +549 -0
  27. tccli/services/live/v20180801/examples.json +40 -0
  28. tccli/services/lke/lke_client.py +110 -4
  29. tccli/services/lke/v20231130/api.json +141 -0
  30. tccli/services/lke/v20231130/examples.json +16 -0
  31. tccli/services/lkeap/v20240522/api.json +3 -3
  32. tccli/services/mps/v20190612/api.json +117 -1
  33. tccli/services/ocr/v20181119/examples.json +1 -1
  34. tccli/services/tdmq/v20200217/api.json +165 -25
  35. tccli/services/tdmq/v20200217/examples.json +1 -1
  36. tccli/services/teo/v20220901/api.json +1 -1
  37. tccli/services/tiia/tiia_client.py +73 -126
  38. tccli/services/tiia/v20190529/api.json +0 -112
  39. tccli/services/tiia/v20190529/examples.json +0 -14
  40. tccli/services/tione/tione_client.py +216 -4
  41. tccli/services/tione/v20211111/api.json +190 -0
  42. tccli/services/tione/v20211111/examples.json +32 -0
  43. tccli/services/trocket/trocket_client.py +161 -55
  44. tccli/services/trocket/v20230308/api.json +307 -1
  45. tccli/services/trocket/v20230308/examples.json +16 -0
  46. tccli/services/trtc/v20190722/api.json +2 -2
  47. tccli/services/tsf/v20180326/api.json +2 -2
  48. tccli/services/tsf/v20180326/examples.json +2 -2
  49. {tccli-3.0.1336.1.dist-info → tccli-3.0.1338.1.dist-info}/METADATA +2 -2
  50. {tccli-3.0.1336.1.dist-info → tccli-3.0.1338.1.dist-info}/RECORD +53 -53
  51. {tccli-3.0.1336.1.dist-info → tccli-3.0.1338.1.dist-info}/WHEEL +0 -0
  52. {tccli-3.0.1336.1.dist-info → tccli-3.0.1338.1.dist-info}/entry_points.txt +0 -0
  53. {tccli-3.0.1336.1.dist-info → tccli-3.0.1338.1.dist-info}/license_files/LICENSE +0 -0
@@ -118,20 +118,6 @@
118
118
  "title": "图像标签检测请求成功"
119
119
  }
120
120
  ],
121
- "DetectLabelBeta": [
122
- {
123
- "document": "",
124
- "input": "POST / HTTP/1.1\nHost: tiia.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DetectLabelBeta\n<公共请求参数>\n\n{\n \"ImageUrl\": \"https://liudhu-9527.cos.ap-guangzhou.myqcloud.com/input.jpeg\"\n}",
125
- "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"FailedOperation.DownLoadError\",\n \"Message\": \"下载失败\"\n },\n \"RequestId\": \"a169390a-6ff3-4c42-ad25-a7858c35e576\"\n }\n}",
126
- "title": "图像标签检测请求失败"
127
- },
128
- {
129
- "document": "",
130
- "input": "POST / HTTP/1.1\nHost: tiia.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DetectLabelBeta\n<公共请求参数>\n\n{\n \"ImageUrl\": \"https://liudhu-9527.cos.ap-guangzhou.myqcloud.com/input.jpeg\",\n \"Scenes\": [\n \"WEB\",\n \"CAMERA\",\n \"ALBUM\"\n ]\n}",
131
- "output": "{\n \"Response\": {\n \"Labels\": [\n {\n \"Name\": \"塔楼\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"建筑\",\n \"Confidence\": 81\n },\n {\n \"Name\": \"夜晚\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"自然风光\",\n \"Confidence\": 79\n },\n {\n \"Name\": \"天际线\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"自然风光\",\n \"Confidence\": 77\n },\n {\n \"Name\": \"城市景观\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"其他\",\n \"Confidence\": 77\n },\n {\n \"Name\": \"城市\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"生活/娱乐场所\",\n \"Confidence\": 72\n },\n {\n \"Name\": \"都市\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"其他\",\n \"Confidence\": 69\n }\n ],\n \"CameraLabels\": [\n {\n \"Name\": \"夜景\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"自然风光\",\n \"Confidence\": 92\n },\n {\n \"Name\": \"城市\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"建筑\",\n \"Confidence\": 3\n },\n {\n \"Name\": \"游乐园\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"生活/娱乐场所\",\n \"Confidence\": 2\n },\n {\n \"Name\": \"大厦\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"建筑\",\n \"Confidence\": 1\n },\n {\n \"Name\": \"桥\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"建筑\",\n \"Confidence\": 0\n }\n ],\n \"AlbumLabels\": [\n {\n \"Name\": \"夜景\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"自然风光\",\n \"Confidence\": 93\n },\n {\n \"Name\": \"塔\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"建筑\",\n \"Confidence\": 82\n },\n {\n \"Name\": \"城市\",\n \"FirstCategory\": \"场景\",\n \"SecondCategory\": \"建筑\",\n \"Confidence\": 5\n }\n ],\n \"NoneCamLabels\": null,\n \"LocationLabels\": null,\n \"NewsLabels\": null,\n \"RequestId\": \"e6d685b1-d898-4dc9-a545-cfeb3a988da8\"\n }\n}",
132
- "title": "图像标签检测请求成功"
133
- }
134
- ],
135
121
  "DetectLabelPro": [
136
122
  {
137
123
  "document": "",
@@ -851,6 +851,58 @@ def doCreateTrainingTask(args, parsed_globals):
851
851
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
852
852
 
853
853
 
854
+ def doModifyModelServiceAuthorization(args, parsed_globals):
855
+ g_param = parse_global_arg(parsed_globals)
856
+
857
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
858
+ cred = credential.CVMRoleCredential()
859
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
860
+ cred = credential.STSAssumeRoleCredential(
861
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
862
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
863
+ )
864
+ 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):
865
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
866
+ else:
867
+ cred = credential.Credential(
868
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
869
+ )
870
+ http_profile = HttpProfile(
871
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
872
+ reqMethod="POST",
873
+ endpoint=g_param[OptionsDefine.Endpoint],
874
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
875
+ )
876
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
877
+ if g_param[OptionsDefine.Language]:
878
+ profile.language = g_param[OptionsDefine.Language]
879
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
880
+ client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
881
+ client._sdkVersion += ("_CLI_" + __version__)
882
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
883
+ model = models.ModifyModelServiceAuthorizationRequest()
884
+ model.from_json_string(json.dumps(args))
885
+ start_time = time.time()
886
+ while True:
887
+ rsp = client.ModifyModelServiceAuthorization(model)
888
+ result = rsp.to_json_string()
889
+ try:
890
+ json_obj = json.loads(result)
891
+ except TypeError as e:
892
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
893
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
894
+ break
895
+ cur_time = time.time()
896
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
897
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
898
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
899
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
900
+ else:
901
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
902
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
903
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
904
+
905
+
854
906
  def doStartNotebookInstance(args, parsed_globals):
855
907
  g_param = parse_global_arg(parsed_globals)
856
908
 
@@ -955,7 +1007,7 @@ def doDeleteNotebook(args, parsed_globals):
955
1007
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
956
1008
 
957
1009
 
958
- def doDeleteNotebookInstance(args, parsed_globals):
1010
+ def doDeleteModelServiceAuthToken(args, parsed_globals):
959
1011
  g_param = parse_global_arg(parsed_globals)
960
1012
 
961
1013
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -984,11 +1036,11 @@ def doDeleteNotebookInstance(args, parsed_globals):
984
1036
  client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
985
1037
  client._sdkVersion += ("_CLI_" + __version__)
986
1038
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
987
- model = models.DeleteNotebookInstanceRequest()
1039
+ model = models.DeleteModelServiceAuthTokenRequest()
988
1040
  model.from_json_string(json.dumps(args))
989
1041
  start_time = time.time()
990
1042
  while True:
991
- rsp = client.DeleteNotebookInstance(model)
1043
+ rsp = client.DeleteModelServiceAuthToken(model)
992
1044
  result = rsp.to_json_string()
993
1045
  try:
994
1046
  json_obj = json.loads(result)
@@ -1579,6 +1631,58 @@ def doCreatePresignedNotebookInstanceUrl(args, parsed_globals):
1579
1631
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1580
1632
 
1581
1633
 
1634
+ def doDeleteNotebookInstance(args, parsed_globals):
1635
+ g_param = parse_global_arg(parsed_globals)
1636
+
1637
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1638
+ cred = credential.CVMRoleCredential()
1639
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1640
+ cred = credential.STSAssumeRoleCredential(
1641
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1642
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1643
+ )
1644
+ 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):
1645
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1646
+ else:
1647
+ cred = credential.Credential(
1648
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1649
+ )
1650
+ http_profile = HttpProfile(
1651
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1652
+ reqMethod="POST",
1653
+ endpoint=g_param[OptionsDefine.Endpoint],
1654
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1655
+ )
1656
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1657
+ if g_param[OptionsDefine.Language]:
1658
+ profile.language = g_param[OptionsDefine.Language]
1659
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1660
+ client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
1661
+ client._sdkVersion += ("_CLI_" + __version__)
1662
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1663
+ model = models.DeleteNotebookInstanceRequest()
1664
+ model.from_json_string(json.dumps(args))
1665
+ start_time = time.time()
1666
+ while True:
1667
+ rsp = client.DeleteNotebookInstance(model)
1668
+ result = rsp.to_json_string()
1669
+ try:
1670
+ json_obj = json.loads(result)
1671
+ except TypeError as e:
1672
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1673
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1674
+ break
1675
+ cur_time = time.time()
1676
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1677
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1678
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1679
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1680
+ else:
1681
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1682
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1683
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1684
+
1685
+
1582
1686
  def doDeleteModelServiceGroup(args, parsed_globals):
1583
1687
  g_param = parse_global_arg(parsed_globals)
1584
1688
 
@@ -1943,6 +2047,58 @@ def doCreateCodeRepository(args, parsed_globals):
1943
2047
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1944
2048
 
1945
2049
 
2050
+ def doModifyModelServiceAuthToken(args, parsed_globals):
2051
+ g_param = parse_global_arg(parsed_globals)
2052
+
2053
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2054
+ cred = credential.CVMRoleCredential()
2055
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2056
+ cred = credential.STSAssumeRoleCredential(
2057
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2058
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2059
+ )
2060
+ 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):
2061
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2062
+ else:
2063
+ cred = credential.Credential(
2064
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2065
+ )
2066
+ http_profile = HttpProfile(
2067
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2068
+ reqMethod="POST",
2069
+ endpoint=g_param[OptionsDefine.Endpoint],
2070
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2071
+ )
2072
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2073
+ if g_param[OptionsDefine.Language]:
2074
+ profile.language = g_param[OptionsDefine.Language]
2075
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2076
+ client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
2077
+ client._sdkVersion += ("_CLI_" + __version__)
2078
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2079
+ model = models.ModifyModelServiceAuthTokenRequest()
2080
+ model.from_json_string(json.dumps(args))
2081
+ start_time = time.time()
2082
+ while True:
2083
+ rsp = client.ModifyModelServiceAuthToken(model)
2084
+ result = rsp.to_json_string()
2085
+ try:
2086
+ json_obj = json.loads(result)
2087
+ except TypeError as e:
2088
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2089
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2090
+ break
2091
+ cur_time = time.time()
2092
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2093
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2094
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2095
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2096
+ else:
2097
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2098
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2099
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2100
+
2101
+
1946
2102
  def doCreateModelService(args, parsed_globals):
1947
2103
  g_param = parse_global_arg(parsed_globals)
1948
2104
 
@@ -2307,6 +2463,58 @@ def doDescribeDatasets(args, parsed_globals):
2307
2463
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2308
2464
 
2309
2465
 
2466
+ def doCreateModelServiceAuthToken(args, parsed_globals):
2467
+ g_param = parse_global_arg(parsed_globals)
2468
+
2469
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2470
+ cred = credential.CVMRoleCredential()
2471
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2472
+ cred = credential.STSAssumeRoleCredential(
2473
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2474
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2475
+ )
2476
+ 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):
2477
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2478
+ else:
2479
+ cred = credential.Credential(
2480
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2481
+ )
2482
+ http_profile = HttpProfile(
2483
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2484
+ reqMethod="POST",
2485
+ endpoint=g_param[OptionsDefine.Endpoint],
2486
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2487
+ )
2488
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2489
+ if g_param[OptionsDefine.Language]:
2490
+ profile.language = g_param[OptionsDefine.Language]
2491
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2492
+ client = mod.TioneClient(cred, g_param[OptionsDefine.Region], profile)
2493
+ client._sdkVersion += ("_CLI_" + __version__)
2494
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2495
+ model = models.CreateModelServiceAuthTokenRequest()
2496
+ model.from_json_string(json.dumps(args))
2497
+ start_time = time.time()
2498
+ while True:
2499
+ rsp = client.CreateModelServiceAuthToken(model)
2500
+ result = rsp.to_json_string()
2501
+ try:
2502
+ json_obj = json.loads(result)
2503
+ except TypeError as e:
2504
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2505
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2506
+ break
2507
+ cur_time = time.time()
2508
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2509
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2510
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2511
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2512
+ else:
2513
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2514
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2515
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2516
+
2517
+
2310
2518
  def doDescribeBillingResourceInstanceRunningJobs(args, parsed_globals):
2311
2519
  g_param = parse_global_arg(parsed_globals)
2312
2520
 
@@ -3584,9 +3792,10 @@ ACTION_MAP = {
3584
3792
  "StartNotebook": doStartNotebook,
3585
3793
  "DescribeNotebooks": doDescribeNotebooks,
3586
3794
  "CreateTrainingTask": doCreateTrainingTask,
3795
+ "ModifyModelServiceAuthorization": doModifyModelServiceAuthorization,
3587
3796
  "StartNotebookInstance": doStartNotebookInstance,
3588
3797
  "DeleteNotebook": doDeleteNotebook,
3589
- "DeleteNotebookInstance": doDeleteNotebookInstance,
3798
+ "DeleteModelServiceAuthToken": doDeleteModelServiceAuthToken,
3590
3799
  "DescribeTrainingTaskPods": doDescribeTrainingTaskPods,
3591
3800
  "DescribeModelServiceHotUpdated": doDescribeModelServiceHotUpdated,
3592
3801
  "DescribeModelAccelerateTask": doDescribeModelAccelerateTask,
@@ -3598,6 +3807,7 @@ ACTION_MAP = {
3598
3807
  "StartTrainingTask": doStartTrainingTask,
3599
3808
  "DescribeModelServiceGroup": doDescribeModelServiceGroup,
3600
3809
  "CreatePresignedNotebookInstanceUrl": doCreatePresignedNotebookInstanceUrl,
3810
+ "DeleteNotebookInstance": doDeleteNotebookInstance,
3601
3811
  "DeleteModelServiceGroup": doDeleteModelServiceGroup,
3602
3812
  "DescribeNotebookLifecycleScript": doDescribeNotebookLifecycleScript,
3603
3813
  "PushTrainingMetrics": doPushTrainingMetrics,
@@ -3605,6 +3815,7 @@ ACTION_MAP = {
3605
3815
  "DescribeTrainingModelVersions": doDescribeTrainingModelVersions,
3606
3816
  "CreateNotebookLifecycleScript": doCreateNotebookLifecycleScript,
3607
3817
  "CreateCodeRepository": doCreateCodeRepository,
3818
+ "ModifyModelServiceAuthToken": doModifyModelServiceAuthToken,
3608
3819
  "CreateModelService": doCreateModelService,
3609
3820
  "DescribeTrainingJob": doDescribeTrainingJob,
3610
3821
  "StopNotebookInstance": doStopNotebookInstance,
@@ -3612,6 +3823,7 @@ ACTION_MAP = {
3612
3823
  "DescribeLogs": doDescribeLogs,
3613
3824
  "DeleteModelService": doDeleteModelService,
3614
3825
  "DescribeDatasets": doDescribeDatasets,
3826
+ "CreateModelServiceAuthToken": doCreateModelServiceAuthToken,
3615
3827
  "DescribeBillingResourceInstanceRunningJobs": doDescribeBillingResourceInstanceRunningJobs,
3616
3828
  "ModifyModelService": doModifyModelService,
3617
3829
  "DescribeTrainingTask": doDescribeTrainingTask,
@@ -21,6 +21,13 @@
21
21
  "output": "CreateModelServiceResponse",
22
22
  "status": "online"
23
23
  },
24
+ "CreateModelServiceAuthToken": {
25
+ "document": "创建一个 AuthToken",
26
+ "input": "CreateModelServiceAuthTokenRequest",
27
+ "name": "在线服务创建 AuthToken",
28
+ "output": "CreateModelServiceAuthTokenResponse",
29
+ "status": "online"
30
+ },
24
31
  "CreateNotebook": {
25
32
  "document": "创建Notebook",
26
33
  "input": "CreateNotebookRequest",
@@ -63,6 +70,13 @@
63
70
  "output": "DeleteModelServiceResponse",
64
71
  "status": "online"
65
72
  },
73
+ "DeleteModelServiceAuthToken": {
74
+ "document": "删除一个 AuthToken",
75
+ "input": "DeleteModelServiceAuthTokenRequest",
76
+ "name": "在线服务删除 AuthToken",
77
+ "output": "DeleteModelServiceAuthTokenResponse",
78
+ "status": "online"
79
+ },
66
80
  "DeleteModelServiceGroup": {
67
81
  "document": "根据服务组id删除服务组下所有模型服务",
68
82
  "input": "DeleteModelServiceGroupRequest",
@@ -273,6 +287,20 @@
273
287
  "output": "ModifyModelServiceResponse",
274
288
  "status": "online"
275
289
  },
290
+ "ModifyModelServiceAuthToken": {
291
+ "document": "修改一个 AuthToken",
292
+ "input": "ModifyModelServiceAuthTokenRequest",
293
+ "name": "在线服务修改 AuthToken",
294
+ "output": "ModifyModelServiceAuthTokenResponse",
295
+ "status": "online"
296
+ },
297
+ "ModifyModelServiceAuthorization": {
298
+ "document": "修改服务鉴权配置",
299
+ "input": "ModifyModelServiceAuthorizationRequest",
300
+ "name": "修改服务鉴权配置",
301
+ "output": "ModifyModelServiceAuthorizationResponse",
302
+ "status": "online"
303
+ },
276
304
  "ModifyNotebookTags": {
277
305
  "document": "修改Notebook标签",
278
306
  "input": "ModifyNotebookTagsRequest",
@@ -1011,6 +1039,51 @@
1011
1039
  ],
1012
1040
  "type": "object"
1013
1041
  },
1042
+ "CreateModelServiceAuthTokenRequest": {
1043
+ "document": "CreateModelServiceAuthToken请求参数结构体",
1044
+ "members": [
1045
+ {
1046
+ "disabled": false,
1047
+ "document": "服务组 id",
1048
+ "example": "ms-xxx",
1049
+ "member": "string",
1050
+ "name": "ServiceGroupId",
1051
+ "required": true,
1052
+ "type": "string"
1053
+ },
1054
+ {
1055
+ "disabled": false,
1056
+ "document": "token 名称",
1057
+ "example": "这是 token 名称",
1058
+ "member": "string",
1059
+ "name": "Name",
1060
+ "required": false,
1061
+ "type": "string"
1062
+ },
1063
+ {
1064
+ "disabled": false,
1065
+ "document": "Description 描述",
1066
+ "example": "这是 token 描述",
1067
+ "member": "string",
1068
+ "name": "Description",
1069
+ "required": false,
1070
+ "type": "string"
1071
+ }
1072
+ ],
1073
+ "type": "object"
1074
+ },
1075
+ "CreateModelServiceAuthTokenResponse": {
1076
+ "document": "CreateModelServiceAuthToken返回参数结构体",
1077
+ "members": [
1078
+ {
1079
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1080
+ "member": "string",
1081
+ "name": "RequestId",
1082
+ "type": "string"
1083
+ }
1084
+ ],
1085
+ "type": "object"
1086
+ },
1014
1087
  "CreateModelServiceRequest": {
1015
1088
  "document": "CreateModelService请求参数结构体",
1016
1089
  "members": [
@@ -3251,6 +3324,42 @@
3251
3324
  ],
3252
3325
  "type": "object"
3253
3326
  },
3327
+ "DeleteModelServiceAuthTokenRequest": {
3328
+ "document": "DeleteModelServiceAuthToken请求参数结构体",
3329
+ "members": [
3330
+ {
3331
+ "disabled": false,
3332
+ "document": "服务组 id",
3333
+ "example": "ms-xxx",
3334
+ "member": "string",
3335
+ "name": "ServiceGroupId",
3336
+ "required": true,
3337
+ "type": "string"
3338
+ },
3339
+ {
3340
+ "disabled": false,
3341
+ "document": "token 值",
3342
+ "example": "8PyrHoGd6uZ52hQ",
3343
+ "member": "string",
3344
+ "name": "AuthTokenValue",
3345
+ "required": false,
3346
+ "type": "string"
3347
+ }
3348
+ ],
3349
+ "type": "object"
3350
+ },
3351
+ "DeleteModelServiceAuthTokenResponse": {
3352
+ "document": "DeleteModelServiceAuthToken返回参数结构体",
3353
+ "members": [
3354
+ {
3355
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
3356
+ "member": "string",
3357
+ "name": "RequestId",
3358
+ "type": "string"
3359
+ }
3360
+ ],
3361
+ "type": "object"
3362
+ },
3254
3363
  "DeleteModelServiceGroupRequest": {
3255
3364
  "document": "DeleteModelServiceGroup请求参数结构体",
3256
3365
  "members": [
@@ -7251,6 +7360,87 @@
7251
7360
  ],
7252
7361
  "usage": "out"
7253
7362
  },
7363
+ "ModifyModelServiceAuthTokenRequest": {
7364
+ "document": "ModifyModelServiceAuthToken请求参数结构体",
7365
+ "members": [
7366
+ {
7367
+ "disabled": false,
7368
+ "document": "服务组 id",
7369
+ "example": "ms-xxx",
7370
+ "member": "string",
7371
+ "name": "ServiceGroupId",
7372
+ "required": true,
7373
+ "type": "string"
7374
+ },
7375
+ {
7376
+ "disabled": false,
7377
+ "document": "是否需要重置,如果为 true,重置 token 值",
7378
+ "example": "false",
7379
+ "member": "bool",
7380
+ "name": "NeedReset",
7381
+ "required": false,
7382
+ "type": "bool"
7383
+ },
7384
+ {
7385
+ "disabled": false,
7386
+ "document": "AuthToken 数据",
7387
+ "example": "无",
7388
+ "member": "AuthToken",
7389
+ "name": "AuthToken",
7390
+ "required": false,
7391
+ "type": "object"
7392
+ }
7393
+ ],
7394
+ "type": "object"
7395
+ },
7396
+ "ModifyModelServiceAuthTokenResponse": {
7397
+ "document": "ModifyModelServiceAuthToken返回参数结构体",
7398
+ "members": [
7399
+ {
7400
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
7401
+ "member": "string",
7402
+ "name": "RequestId",
7403
+ "type": "string"
7404
+ }
7405
+ ],
7406
+ "type": "object"
7407
+ },
7408
+ "ModifyModelServiceAuthorizationRequest": {
7409
+ "document": "ModifyModelServiceAuthorization请求参数结构体",
7410
+ "members": [
7411
+ {
7412
+ "disabled": false,
7413
+ "document": "服务组Id",
7414
+ "example": "ms-xxffs23",
7415
+ "member": "string",
7416
+ "name": "ServiceGroupId",
7417
+ "required": true,
7418
+ "type": "string"
7419
+ },
7420
+ {
7421
+ "disabled": false,
7422
+ "document": "是否开启鉴权,true表示开启",
7423
+ "example": "无",
7424
+ "member": "bool",
7425
+ "name": "AuthorizationEnable",
7426
+ "required": false,
7427
+ "type": "bool"
7428
+ }
7429
+ ],
7430
+ "type": "object"
7431
+ },
7432
+ "ModifyModelServiceAuthorizationResponse": {
7433
+ "document": "ModifyModelServiceAuthorization返回参数结构体",
7434
+ "members": [
7435
+ {
7436
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
7437
+ "member": "string",
7438
+ "name": "RequestId",
7439
+ "type": "string"
7440
+ }
7441
+ ],
7442
+ "type": "object"
7443
+ },
7254
7444
  "ModifyModelServiceRequest": {
7255
7445
  "document": "ModifyModelService请求参数结构体",
7256
7446
  "members": [
@@ -24,6 +24,14 @@
24
24
  "title": "创建示例"
25
25
  }
26
26
  ],
27
+ "CreateModelServiceAuthToken": [
28
+ {
29
+ "document": "创建一个AuthToken",
30
+ "input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateModelService\n<公共请求参数>\n\n{\n \"ServiceGroupId\": \"ms-n2f929h2\",\n \"Name\": \"testname\",\n \"Description\": \"testdesc\"\n}",
31
+ "output": "{\n \"Response\": {\n \"RequestId\": \"0f254c3b-2161-4583-8316-fc6ed570d4cc\"\n }\n}",
32
+ "title": "创建示例"
33
+ }
34
+ ],
27
35
  "CreateNotebook": [
28
36
  {
29
37
  "document": "创建Notebook",
@@ -72,6 +80,14 @@
72
80
  "title": "删除一个在线服务组"
73
81
  }
74
82
  ],
83
+ "DeleteModelServiceAuthToken": [
84
+ {
85
+ "document": "删除一个 token",
86
+ "input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateModelService\n<公共请求参数>\n\n{\n \"ServiceGroupId\": \"ms-n2f929h2\",\n \"AuthTokenValue\": \"MTc0NTQ5NDY5NzI\"\n}",
87
+ "output": "{\n \"Response\": {\n \"RequestId\": \"d3dca072-937b-44da-8ffb-8e00190a2044\"\n }\n}",
88
+ "title": "删除示例"
89
+ }
90
+ ],
75
91
  "DeleteModelServiceGroup": [
76
92
  {
77
93
  "document": "",
@@ -312,6 +328,22 @@
312
328
  "title": "更新模型服务"
313
329
  }
314
330
  ],
331
+ "ModifyModelServiceAuthToken": [
332
+ {
333
+ "document": "修改一个 token",
334
+ "input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateModelService\n<公共请求参数>\n\n{\n \"ServiceGroupId\": \"ms-n2f929h2\",\n \"NeedReset\": false,\n \"AuthToken\": {\n \"Base\": {\n \"Value\": \"MTc0NDgwMjgxMTU\",\n \"Name\": \"test\",\n \"Description\": \"desc\",\n \"CreateTime\": \"2025-04-16T11:26:51Z\",\n \"Status\": \"Enabled\"\n },\n \"Limits\": []\n }\n}",
335
+ "output": "{\n \"Response\": {\n \"RequestId\": \"71d3ba29-c044-4142-91c4-777c8fcec877\"\n }\n}",
336
+ "title": "修改示例"
337
+ }
338
+ ],
339
+ "ModifyModelServiceAuthorization": [
340
+ {
341
+ "document": "",
342
+ "input": "POST / HTTP/1.1\nHost: tione.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyModelServiceAuthorization\n<公共请求参数>\n\n{\n \"ServiceGroupId\": \"ms-frsxddfrx\",\n \"AuthorizationEnable\": true\n}",
343
+ "output": "{\n \"Response\": {\n \"RequestId\": \"7587b204-6e6d-4564-afd7-548ebf83291e\"\n }\n}",
344
+ "title": "鉴权开启示例"
345
+ }
346
+ ],
315
347
  "ModifyNotebookTags": [
316
348
  {
317
349
  "document": "修改Notebook标签",