tccli 3.0.1158.1__py2.py3-none-any.whl → 3.0.1160.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/aiart/v20221229/api.json +11 -14
- tccli/services/ams/v20201229/api.json +314 -56
- tccli/services/ams/v20201229/examples.json +2 -2
- tccli/services/bi/v20220105/api.json +1 -1
- tccli/services/cat/v20180409/api.json +9 -0
- tccli/services/cdb/v20170320/api.json +33 -4
- tccli/services/cdn/v20180606/api.json +86 -0
- tccli/services/cfg/cfg_client.py +224 -12
- tccli/services/cfg/v20210820/api.json +897 -32
- tccli/services/cfg/v20210820/examples.json +32 -0
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +255 -2
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/cls/v20201016/api.json +11 -1
- tccli/services/cme/v20191029/api.json +9 -9
- tccli/services/cme/v20191029/examples.json +1 -1
- tccli/services/csip/csip_client.py +53 -0
- tccli/services/csip/v20221121/api.json +134 -0
- tccli/services/csip/v20221121/examples.json +8 -0
- tccli/services/cwp/v20180228/api.json +66 -46
- tccli/services/cwp/v20180228/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +91 -0
- tccli/services/dnspod/v20210323/api.json +1 -1
- tccli/services/ecm/v20190719/api.json +23 -5
- tccli/services/emr/emr_client.py +53 -0
- tccli/services/emr/v20190103/api.json +351 -98
- tccli/services/emr/v20190103/examples.json +11 -3
- tccli/services/ess/v20201111/api.json +1 -1
- tccli/services/ess/v20201111/examples.json +6 -6
- tccli/services/essbasic/v20210526/api.json +10 -1
- tccli/services/essbasic/v20210526/examples.json +7 -1
- tccli/services/hunyuan/v20230901/api.json +114 -3
- tccli/services/iotexplorer/v20190423/api.json +25 -25
- tccli/services/iotexplorer/v20190423/examples.json +10 -4
- tccli/services/lcic/lcic_client.py +57 -4
- tccli/services/lcic/v20220817/api.json +52 -0
- tccli/services/lcic/v20220817/examples.json +8 -0
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/lke/v20231130/api.json +7 -7
- tccli/services/ocr/v20181119/api.json +10 -0
- tccli/services/tke/tke_client.py +53 -0
- tccli/services/tke/v20180525/api.json +188 -0
- tccli/services/tke/v20180525/examples.json +8 -0
- tccli/services/trtc/trtc_client.py +53 -0
- tccli/services/trtc/v20190722/api.json +76 -0
- tccli/services/trtc/v20190722/examples.json +8 -0
- tccli/services/vclm/v20240523/api.json +136 -0
- tccli/services/vclm/v20240523/examples.json +46 -0
- tccli/services/vclm/vclm_client.py +106 -0
- tccli/services/vm/v20201229/api.json +209 -45
- tccli/services/vm/v20201229/examples.json +1 -1
- tccli/services/vm/v20210922/api.json +25 -25
- tccli/services/vpc/v20170312/api.json +1 -1
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/RECORD +59 -59
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/license_files/LICENSE +0 -0
@@ -1577,6 +1577,58 @@ def doSendRoomNormalMessage(args, parsed_globals):
|
|
1577
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1578
|
|
1579
1579
|
|
1580
|
+
def doCreateGroupWithSubGroup(args, parsed_globals):
|
1581
|
+
g_param = parse_global_arg(parsed_globals)
|
1582
|
+
|
1583
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1584
|
+
cred = credential.CVMRoleCredential()
|
1585
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1586
|
+
cred = credential.STSAssumeRoleCredential(
|
1587
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1588
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1589
|
+
)
|
1590
|
+
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):
|
1591
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1592
|
+
else:
|
1593
|
+
cred = credential.Credential(
|
1594
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1595
|
+
)
|
1596
|
+
http_profile = HttpProfile(
|
1597
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1598
|
+
reqMethod="POST",
|
1599
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1600
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1601
|
+
)
|
1602
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1603
|
+
if g_param[OptionsDefine.Language]:
|
1604
|
+
profile.language = g_param[OptionsDefine.Language]
|
1605
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1606
|
+
client = mod.LcicClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1608
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
+
model = models.CreateGroupWithSubGroupRequest()
|
1610
|
+
model.from_json_string(json.dumps(args))
|
1611
|
+
start_time = time.time()
|
1612
|
+
while True:
|
1613
|
+
rsp = client.CreateGroupWithSubGroup(model)
|
1614
|
+
result = rsp.to_json_string()
|
1615
|
+
try:
|
1616
|
+
json_obj = json.loads(result)
|
1617
|
+
except TypeError as e:
|
1618
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1619
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1620
|
+
break
|
1621
|
+
cur_time = time.time()
|
1622
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1623
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1624
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1625
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1626
|
+
else:
|
1627
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1628
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1629
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
|
+
|
1631
|
+
|
1580
1632
|
def doDescribeGroupList(args, parsed_globals):
|
1581
1633
|
g_param = parse_global_arg(parsed_globals)
|
1582
1634
|
|
@@ -2877,7 +2929,7 @@ def doUnbindDocumentFromRoom(args, parsed_globals):
|
|
2877
2929
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2878
2930
|
|
2879
2931
|
|
2880
|
-
def
|
2932
|
+
def doUnblockKickedUser(args, parsed_globals):
|
2881
2933
|
g_param = parse_global_arg(parsed_globals)
|
2882
2934
|
|
2883
2935
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2906,11 +2958,11 @@ def doCreateGroupWithSubGroup(args, parsed_globals):
|
|
2906
2958
|
client = mod.LcicClient(cred, g_param[OptionsDefine.Region], profile)
|
2907
2959
|
client._sdkVersion += ("_CLI_" + __version__)
|
2908
2960
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2909
|
-
model = models.
|
2961
|
+
model = models.UnblockKickedUserRequest()
|
2910
2962
|
model.from_json_string(json.dumps(args))
|
2911
2963
|
start_time = time.time()
|
2912
2964
|
while True:
|
2913
|
-
rsp = client.
|
2965
|
+
rsp = client.UnblockKickedUser(model)
|
2914
2966
|
result = rsp.to_json_string()
|
2915
2967
|
try:
|
2916
2968
|
json_obj = json.loads(result)
|
@@ -3178,6 +3230,7 @@ ACTION_MAP = {
|
|
3178
3230
|
"DescribeRoom": doDescribeRoom,
|
3179
3231
|
"DescribeDocuments": doDescribeDocuments,
|
3180
3232
|
"SendRoomNormalMessage": doSendRoomNormalMessage,
|
3233
|
+
"CreateGroupWithSubGroup": doCreateGroupWithSubGroup,
|
3181
3234
|
"DescribeGroupList": doDescribeGroupList,
|
3182
3235
|
"DeleteSupervisor": doDeleteSupervisor,
|
3183
3236
|
"DeleteUser": doDeleteUser,
|
@@ -3203,7 +3256,7 @@ ACTION_MAP = {
|
|
3203
3256
|
"SendRoomNotificationMessage": doSendRoomNotificationMessage,
|
3204
3257
|
"DeleteRoom": doDeleteRoom,
|
3205
3258
|
"UnbindDocumentFromRoom": doUnbindDocumentFromRoom,
|
3206
|
-
"
|
3259
|
+
"UnblockKickedUser": doUnblockKickedUser,
|
3207
3260
|
"CreateRoom": doCreateRoom,
|
3208
3261
|
"BatchCreateGroupWithMembers": doBatchCreateGroupWithMembers,
|
3209
3262
|
"DescribeScoreList": doDescribeScoreList,
|
@@ -419,6 +419,13 @@
|
|
419
419
|
"name": "文档从房间解绑",
|
420
420
|
"output": "UnbindDocumentFromRoomResponse",
|
421
421
|
"status": "online"
|
422
|
+
},
|
423
|
+
"UnblockKickedUser": {
|
424
|
+
"document": "解禁从房间里面踢出的用户",
|
425
|
+
"input": "UnblockKickedUserRequest",
|
426
|
+
"name": "解禁房间被踢用户",
|
427
|
+
"output": "UnblockKickedUserResponse",
|
428
|
+
"status": "online"
|
422
429
|
}
|
423
430
|
},
|
424
431
|
"metadata": {
|
@@ -6857,6 +6864,51 @@
|
|
6857
6864
|
],
|
6858
6865
|
"type": "object"
|
6859
6866
|
},
|
6867
|
+
"UnblockKickedUserRequest": {
|
6868
|
+
"document": "UnblockKickedUser请求参数结构体",
|
6869
|
+
"members": [
|
6870
|
+
{
|
6871
|
+
"disabled": false,
|
6872
|
+
"document": "低代码平台的SdkAppId。",
|
6873
|
+
"example": "123456",
|
6874
|
+
"member": "uint64",
|
6875
|
+
"name": "SdkAppId",
|
6876
|
+
"required": true,
|
6877
|
+
"type": "int"
|
6878
|
+
},
|
6879
|
+
{
|
6880
|
+
"disabled": false,
|
6881
|
+
"document": "房间Id。",
|
6882
|
+
"example": "301234567",
|
6883
|
+
"member": "uint64",
|
6884
|
+
"name": "RoomId",
|
6885
|
+
"required": true,
|
6886
|
+
"type": "int"
|
6887
|
+
},
|
6888
|
+
{
|
6889
|
+
"disabled": false,
|
6890
|
+
"document": "需要解禁踢出的成员Id。",
|
6891
|
+
"example": "dfgsadffg",
|
6892
|
+
"member": "string",
|
6893
|
+
"name": "UserId",
|
6894
|
+
"required": true,
|
6895
|
+
"type": "string"
|
6896
|
+
}
|
6897
|
+
],
|
6898
|
+
"type": "object"
|
6899
|
+
},
|
6900
|
+
"UnblockKickedUserResponse": {
|
6901
|
+
"document": "UnblockKickedUser返回参数结构体",
|
6902
|
+
"members": [
|
6903
|
+
{
|
6904
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
6905
|
+
"member": "string",
|
6906
|
+
"name": "RequestId",
|
6907
|
+
"type": "string"
|
6908
|
+
}
|
6909
|
+
],
|
6910
|
+
"type": "object"
|
6911
|
+
},
|
6860
6912
|
"UserInfo": {
|
6861
6913
|
"document": "用户信息结构体",
|
6862
6914
|
"members": [
|
@@ -509,6 +509,14 @@
|
|
509
509
|
"output": "{\n \"Response\": {\n \"RequestId\": \"e574aae1-lp02-4225-a2f8-9032h7199f5f0\"\n }\n}",
|
510
510
|
"title": "文档从房间解绑"
|
511
511
|
}
|
512
|
+
],
|
513
|
+
"UnblockKickedUser": [
|
514
|
+
{
|
515
|
+
"document": "示例",
|
516
|
+
"input": "POST / HTTP/1.1\nHost: lcic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UnblockKickedUser\n<公共请求参数>\n\n{\n \"RoomId\": 313337981,\n \"SdkAppId\": 3520371,\n \"UserId\": \"2PMcgEVHi9CMWq6tmfNnPGUkEGn\"\n}",
|
517
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"3f156f86-9939-4ea0-aee7-81d32fa46c3f\"\n }\n}",
|
518
|
+
"title": "解禁房间踢出的用户"
|
519
|
+
}
|
512
520
|
]
|
513
521
|
},
|
514
522
|
"version": "1.0"
|
@@ -1867,7 +1867,7 @@
|
|
1867
1867
|
},
|
1868
1868
|
{
|
1869
1869
|
"disabled": false,
|
1870
|
-
"document": "文件的 Base64
|
1870
|
+
"document": "文件的 Base64 值。支持的文件大小:所下载文件经Base64编码后不超过 8M。文件下载时间不超过 3 秒。支持的图片像素:单边介于20-10000px之间。文件的 FileUrl、FileBase64 必须提供一个,如果都提供,只使用 FileUrl。",
|
1871
1871
|
"example": "无",
|
1872
1872
|
"member": "string",
|
1873
1873
|
"name": "FileBase64",
|
@@ -1876,7 +1876,7 @@
|
|
1876
1876
|
},
|
1877
1877
|
{
|
1878
1878
|
"disabled": false,
|
1879
|
-
"document": "文件的 Url
|
1879
|
+
"document": "文件的 Url 地址。支持的文件大小:所下载文件经 Base64 编码后不超过 100M。文件下载时间不超过 15 秒。支持的图片像素:单边介于20-10000px之间。 文件存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议文件存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。",
|
1880
1880
|
"example": "无",
|
1881
1881
|
"member": "string",
|
1882
1882
|
"name": "FileUrl",
|
@@ -5177,7 +5177,7 @@
|
|
5177
5177
|
},
|
5178
5178
|
{
|
5179
5179
|
"disabled": false,
|
5180
|
-
"document": "应用AppKey",
|
5180
|
+
"document": "应用AppKey(应用发布后在应用页面[发布管理]-[调用信息]-[API管理]处获取)",
|
5181
5181
|
"example": "无",
|
5182
5182
|
"member": "string",
|
5183
5183
|
"name": "BotAppKey",
|
@@ -5186,7 +5186,7 @@
|
|
5186
5186
|
},
|
5187
5187
|
{
|
5188
5188
|
"disabled": false,
|
5189
|
-
"document": "
|
5189
|
+
"document": "访客ID(外部输入,建议唯一,标识当前接入会话的用户)",
|
5190
5190
|
"example": "无",
|
5191
5191
|
"member": "string",
|
5192
5192
|
"name": "VisitorBizId",
|
@@ -5195,7 +5195,7 @@
|
|
5195
5195
|
},
|
5196
5196
|
{
|
5197
5197
|
"disabled": false,
|
5198
|
-
"document": "
|
5198
|
+
"document": "知识标签(用于知识库中知识的检索过滤)",
|
5199
5199
|
"example": "无",
|
5200
5200
|
"member": "GetWsTokenReq_Label",
|
5201
5201
|
"name": "VisitorLabels",
|
@@ -5210,7 +5210,7 @@
|
|
5210
5210
|
"members": [
|
5211
5211
|
{
|
5212
5212
|
"disabled": false,
|
5213
|
-
"document": "token
|
5213
|
+
"document": "token值(有效期60s)",
|
5214
5214
|
"example": "无",
|
5215
5215
|
"member": "string",
|
5216
5216
|
"name": "Token",
|
@@ -5220,7 +5220,7 @@
|
|
5220
5220
|
},
|
5221
5221
|
{
|
5222
5222
|
"disabled": false,
|
5223
|
-
"document": "余额; 余额大于 0
|
5223
|
+
"document": "余额; 余额大于 0 时表示有效\n注意:此字段可能返回 null,表示取不到有效值。",
|
5224
5224
|
"example": "无",
|
5225
5225
|
"member": "float",
|
5226
5226
|
"name": "Balance",
|
@@ -21084,6 +21084,16 @@
|
|
21084
21084
|
"type": "object",
|
21085
21085
|
"value_allowed_null": false
|
21086
21086
|
},
|
21087
|
+
{
|
21088
|
+
"disabled": false,
|
21089
|
+
"document": "发票标题",
|
21090
|
+
"example": "无",
|
21091
|
+
"member": "string",
|
21092
|
+
"name": "InvoiceTitle",
|
21093
|
+
"output_required": false,
|
21094
|
+
"type": "string",
|
21095
|
+
"value_allowed_null": false
|
21096
|
+
},
|
21087
21097
|
{
|
21088
21098
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
21089
21099
|
"member": "string",
|
tccli/services/tke/tke_client.py
CHANGED
@@ -4231,6 +4231,58 @@ def doDescribeRegions(args, parsed_globals):
|
|
4231
4231
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4232
4232
|
|
4233
4233
|
|
4234
|
+
def doDescribeReservedInstanceUtilizationRate(args, parsed_globals):
|
4235
|
+
g_param = parse_global_arg(parsed_globals)
|
4236
|
+
|
4237
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4238
|
+
cred = credential.CVMRoleCredential()
|
4239
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4240
|
+
cred = credential.STSAssumeRoleCredential(
|
4241
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4242
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4243
|
+
)
|
4244
|
+
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):
|
4245
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4246
|
+
else:
|
4247
|
+
cred = credential.Credential(
|
4248
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4249
|
+
)
|
4250
|
+
http_profile = HttpProfile(
|
4251
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4252
|
+
reqMethod="POST",
|
4253
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4254
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4255
|
+
)
|
4256
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4257
|
+
if g_param[OptionsDefine.Language]:
|
4258
|
+
profile.language = g_param[OptionsDefine.Language]
|
4259
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4260
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
4261
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4262
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4263
|
+
model = models.DescribeReservedInstanceUtilizationRateRequest()
|
4264
|
+
model.from_json_string(json.dumps(args))
|
4265
|
+
start_time = time.time()
|
4266
|
+
while True:
|
4267
|
+
rsp = client.DescribeReservedInstanceUtilizationRate(model)
|
4268
|
+
result = rsp.to_json_string()
|
4269
|
+
try:
|
4270
|
+
json_obj = json.loads(result)
|
4271
|
+
except TypeError as e:
|
4272
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4273
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4274
|
+
break
|
4275
|
+
cur_time = time.time()
|
4276
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4277
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4278
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4279
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4280
|
+
else:
|
4281
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4282
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4283
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4284
|
+
|
4285
|
+
|
4234
4286
|
def doAddExistedInstances(args, parsed_globals):
|
4235
4287
|
g_param = parse_global_arg(parsed_globals)
|
4236
4288
|
|
@@ -11813,6 +11865,7 @@ ACTION_MAP = {
|
|
11813
11865
|
"DeleteReservedInstances": doDeleteReservedInstances,
|
11814
11866
|
"DeletePrometheusTemplate": doDeletePrometheusTemplate,
|
11815
11867
|
"DescribeRegions": doDescribeRegions,
|
11868
|
+
"DescribeReservedInstanceUtilizationRate": doDescribeReservedInstanceUtilizationRate,
|
11816
11869
|
"AddExistedInstances": doAddExistedInstances,
|
11817
11870
|
"CreateEdgeCVMInstances": doCreateEdgeCVMInstances,
|
11818
11871
|
"DisableClusterDeletionProtection": doDisableClusterDeletionProtection,
|
@@ -1022,6 +1022,13 @@
|
|
1022
1022
|
"output": "DescribeRegionsResponse",
|
1023
1023
|
"status": "online"
|
1024
1024
|
},
|
1025
|
+
"DescribeReservedInstanceUtilizationRate": {
|
1026
|
+
"document": "查询各种规格类型的预留券使用率",
|
1027
|
+
"input": "DescribeReservedInstanceUtilizationRateRequest",
|
1028
|
+
"name": "查询预留券使用率",
|
1029
|
+
"output": "DescribeReservedInstanceUtilizationRateResponse",
|
1030
|
+
"status": "online"
|
1031
|
+
},
|
1025
1032
|
"DescribeReservedInstances": {
|
1026
1033
|
"document": "查询预留实例列表",
|
1027
1034
|
"input": "DescribeReservedInstancesRequest",
|
@@ -13292,6 +13299,81 @@
|
|
13292
13299
|
],
|
13293
13300
|
"type": "object"
|
13294
13301
|
},
|
13302
|
+
"DescribeReservedInstanceUtilizationRateRequest": {
|
13303
|
+
"document": "DescribeReservedInstanceUtilizationRate请求参数结构体",
|
13304
|
+
"members": [
|
13305
|
+
{
|
13306
|
+
"disabled": false,
|
13307
|
+
"document": "可用区",
|
13308
|
+
"example": "ap-guangzhou-2",
|
13309
|
+
"member": "string",
|
13310
|
+
"name": "Zone",
|
13311
|
+
"required": false,
|
13312
|
+
"type": "string"
|
13313
|
+
},
|
13314
|
+
{
|
13315
|
+
"disabled": false,
|
13316
|
+
"document": "集群 ID",
|
13317
|
+
"example": "cls-12345678",
|
13318
|
+
"member": "string",
|
13319
|
+
"name": "ClusterId",
|
13320
|
+
"required": false,
|
13321
|
+
"type": "string"
|
13322
|
+
},
|
13323
|
+
{
|
13324
|
+
"disabled": false,
|
13325
|
+
"document": " 节点名称",
|
13326
|
+
"example": "eklet-subnet-0j105iya",
|
13327
|
+
"member": "string",
|
13328
|
+
"name": "NodeName",
|
13329
|
+
"required": false,
|
13330
|
+
"type": "string"
|
13331
|
+
}
|
13332
|
+
],
|
13333
|
+
"type": "object"
|
13334
|
+
},
|
13335
|
+
"DescribeReservedInstanceUtilizationRateResponse": {
|
13336
|
+
"document": "DescribeReservedInstanceUtilizationRate返回参数结构体",
|
13337
|
+
"members": [
|
13338
|
+
{
|
13339
|
+
"disabled": false,
|
13340
|
+
"document": "预留券使用率",
|
13341
|
+
"example": "无",
|
13342
|
+
"member": "ReservedInstanceUtilizationRate",
|
13343
|
+
"name": "UtilizationRateSet",
|
13344
|
+
"output_required": true,
|
13345
|
+
"type": "list",
|
13346
|
+
"value_allowed_null": false
|
13347
|
+
},
|
13348
|
+
{
|
13349
|
+
"disabled": false,
|
13350
|
+
"document": "按量计费的 Pod 总数",
|
13351
|
+
"example": "1",
|
13352
|
+
"member": "uint64",
|
13353
|
+
"name": "PodNum",
|
13354
|
+
"output_required": true,
|
13355
|
+
"type": "int",
|
13356
|
+
"value_allowed_null": false
|
13357
|
+
},
|
13358
|
+
{
|
13359
|
+
"disabled": false,
|
13360
|
+
"document": " Pod 被预留券抵扣的抵扣率",
|
13361
|
+
"example": "0.5",
|
13362
|
+
"member": "float",
|
13363
|
+
"name": "PodRate",
|
13364
|
+
"output_required": true,
|
13365
|
+
"type": "float",
|
13366
|
+
"value_allowed_null": false
|
13367
|
+
},
|
13368
|
+
{
|
13369
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
13370
|
+
"member": "string",
|
13371
|
+
"name": "RequestId",
|
13372
|
+
"type": "string"
|
13373
|
+
}
|
13374
|
+
],
|
13375
|
+
"type": "object"
|
13376
|
+
},
|
13295
13377
|
"DescribeReservedInstancesRequest": {
|
13296
13378
|
"document": "DescribeReservedInstances请求参数结构体",
|
13297
13379
|
"members": [
|
@@ -22978,6 +23060,112 @@
|
|
22978
23060
|
],
|
22979
23061
|
"usage": "in"
|
22980
23062
|
},
|
23063
|
+
"ReservedInstanceUtilizationRate": {
|
23064
|
+
"document": "预留券的使用率信息",
|
23065
|
+
"members": [
|
23066
|
+
{
|
23067
|
+
"disabled": false,
|
23068
|
+
"document": "使用率\n注意:此字段可能返回 null,表示取不到有效值。",
|
23069
|
+
"example": "1.0",
|
23070
|
+
"member": "float",
|
23071
|
+
"name": "Rate",
|
23072
|
+
"required": false,
|
23073
|
+
"type": "float",
|
23074
|
+
"value_allowed_null": true
|
23075
|
+
},
|
23076
|
+
{
|
23077
|
+
"disabled": false,
|
23078
|
+
"document": "预留券数量\n注意:此字段可能返回 null,表示取不到有效值。",
|
23079
|
+
"example": "1",
|
23080
|
+
"member": "uint64",
|
23081
|
+
"name": "Num",
|
23082
|
+
"required": false,
|
23083
|
+
"type": "int",
|
23084
|
+
"value_allowed_null": true
|
23085
|
+
},
|
23086
|
+
{
|
23087
|
+
"disabled": false,
|
23088
|
+
"document": "核数\n注意:此字段可能返回 null,表示取不到有效值。",
|
23089
|
+
"example": "0.5",
|
23090
|
+
"member": "float",
|
23091
|
+
"name": "CPU",
|
23092
|
+
"required": false,
|
23093
|
+
"type": "float",
|
23094
|
+
"value_allowed_null": true
|
23095
|
+
},
|
23096
|
+
{
|
23097
|
+
"disabled": false,
|
23098
|
+
"document": "内存\n注意:此字段可能返回 null,表示取不到有效值。",
|
23099
|
+
"example": "1.0",
|
23100
|
+
"member": "float",
|
23101
|
+
"name": "Memory",
|
23102
|
+
"required": false,
|
23103
|
+
"type": "float",
|
23104
|
+
"value_allowed_null": true
|
23105
|
+
},
|
23106
|
+
{
|
23107
|
+
"disabled": false,
|
23108
|
+
"document": " 预留券类型\n注意:此字段可能返回 null,表示取不到有效值。",
|
23109
|
+
"example": "common",
|
23110
|
+
"member": "string",
|
23111
|
+
"name": "Type",
|
23112
|
+
"required": false,
|
23113
|
+
"type": "string",
|
23114
|
+
"value_allowed_null": true
|
23115
|
+
},
|
23116
|
+
{
|
23117
|
+
"disabled": false,
|
23118
|
+
"document": "GPU 卡数\n注意:此字段可能返回 null,表示取不到有效值。",
|
23119
|
+
"example": "0.5",
|
23120
|
+
"member": "string",
|
23121
|
+
"name": "GpuNum",
|
23122
|
+
"required": false,
|
23123
|
+
"type": "string",
|
23124
|
+
"value_allowed_null": true
|
23125
|
+
},
|
23126
|
+
{
|
23127
|
+
"disabled": false,
|
23128
|
+
"document": "可用区\n注意:此字段可能返回 null,表示取不到有效值。",
|
23129
|
+
"example": "ap-guangzhou-2",
|
23130
|
+
"member": "string",
|
23131
|
+
"name": "Zone",
|
23132
|
+
"required": false,
|
23133
|
+
"type": "string",
|
23134
|
+
"value_allowed_null": true
|
23135
|
+
},
|
23136
|
+
{
|
23137
|
+
"disabled": false,
|
23138
|
+
"document": "集群 ID\n注意:此字段可能返回 null,表示取不到有效值。",
|
23139
|
+
"example": "cls-12345678",
|
23140
|
+
"member": "string",
|
23141
|
+
"name": "ClusterId",
|
23142
|
+
"required": false,
|
23143
|
+
"type": "string",
|
23144
|
+
"value_allowed_null": true
|
23145
|
+
},
|
23146
|
+
{
|
23147
|
+
"disabled": false,
|
23148
|
+
"document": "节点名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
23149
|
+
"example": "eklet-subnet-12345678",
|
23150
|
+
"member": "string",
|
23151
|
+
"name": "NodeName",
|
23152
|
+
"required": false,
|
23153
|
+
"type": "string",
|
23154
|
+
"value_allowed_null": true
|
23155
|
+
},
|
23156
|
+
{
|
23157
|
+
"disabled": false,
|
23158
|
+
"document": "Pod 数量\n注意:此字段可能返回 null,表示取不到有效值。",
|
23159
|
+
"example": "1",
|
23160
|
+
"member": "uint64",
|
23161
|
+
"name": "PodNum",
|
23162
|
+
"required": false,
|
23163
|
+
"type": "int",
|
23164
|
+
"value_allowed_null": true
|
23165
|
+
}
|
23166
|
+
],
|
23167
|
+
"usage": "out"
|
23168
|
+
},
|
22981
23169
|
"ResourceDeleteOption": {
|
22982
23170
|
"document": "资源删除选项",
|
22983
23171
|
"members": [
|
@@ -1258,6 +1258,14 @@
|
|
1258
1258
|
"title": "获取地域列表"
|
1259
1259
|
}
|
1260
1260
|
],
|
1261
|
+
"DescribeReservedInstanceUtilizationRate": [
|
1262
|
+
{
|
1263
|
+
"document": "预留券使用率",
|
1264
|
+
"input": "POST / HTTP/1.1\nHost: tke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeReservedInstanceUtilizationRate\n<公共请求参数>\n\n{}",
|
1265
|
+
"output": "{\n \"Response\": {\n \"PodNum\": 1,\n \"PodRate\": 0,\n \"UtilizationRateSet\": [\n {\n \"Rate\": 0,\n \"Num\": 1,\n \"PodNum\": 1,\n \"CPU\": 1,\n \"Memory\": 2,\n \"Type\": \"common\",\n \"GpuNum\": \"\",\n \"Zone\": \"\",\n \"ClusterId\": \"\",\n \"NodeName\": \"\"\n }\n ],\n \"RequestId\": \"0be873cf-014f-408b-8527-03c25c32725b\"\n }\n}",
|
1266
|
+
"title": "查询预留券使用率"
|
1267
|
+
}
|
1268
|
+
],
|
1261
1269
|
"DescribeReservedInstances": [
|
1262
1270
|
{
|
1263
1271
|
"document": "Filter Name只支持文档中的示例值",
|
@@ -1421,6 +1421,58 @@ def doStopWebRecord(args, parsed_globals):
|
|
1421
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
1422
|
|
1423
1423
|
|
1424
|
+
def doControlAIConversation(args, parsed_globals):
|
1425
|
+
g_param = parse_global_arg(parsed_globals)
|
1426
|
+
|
1427
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1428
|
+
cred = credential.CVMRoleCredential()
|
1429
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1430
|
+
cred = credential.STSAssumeRoleCredential(
|
1431
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1432
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1433
|
+
)
|
1434
|
+
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):
|
1435
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1436
|
+
else:
|
1437
|
+
cred = credential.Credential(
|
1438
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1439
|
+
)
|
1440
|
+
http_profile = HttpProfile(
|
1441
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1442
|
+
reqMethod="POST",
|
1443
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1444
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1445
|
+
)
|
1446
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1447
|
+
if g_param[OptionsDefine.Language]:
|
1448
|
+
profile.language = g_param[OptionsDefine.Language]
|
1449
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1450
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1452
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
+
model = models.ControlAIConversationRequest()
|
1454
|
+
model.from_json_string(json.dumps(args))
|
1455
|
+
start_time = time.time()
|
1456
|
+
while True:
|
1457
|
+
rsp = client.ControlAIConversation(model)
|
1458
|
+
result = rsp.to_json_string()
|
1459
|
+
try:
|
1460
|
+
json_obj = json.loads(result)
|
1461
|
+
except TypeError as e:
|
1462
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1463
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1464
|
+
break
|
1465
|
+
cur_time = time.time()
|
1466
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1467
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1468
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1469
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1470
|
+
else:
|
1471
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1472
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1473
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1474
|
+
|
1475
|
+
|
1424
1476
|
def doCreateCloudRecording(args, parsed_globals):
|
1425
1477
|
g_param = parse_global_arg(parsed_globals)
|
1426
1478
|
|
@@ -2811,6 +2863,7 @@ ACTION_MAP = {
|
|
2811
2863
|
"StartAITranscription": doStartAITranscription,
|
2812
2864
|
"DescribeTRTCMarketScaleData": doDescribeTRTCMarketScaleData,
|
2813
2865
|
"StopWebRecord": doStopWebRecord,
|
2866
|
+
"ControlAIConversation": doControlAIConversation,
|
2814
2867
|
"CreateCloudRecording": doCreateCloudRecording,
|
2815
2868
|
"DescribeScaleInfo": doDescribeScaleInfo,
|
2816
2869
|
"DescribeRelayUsage": doDescribeRelayUsage,
|