tccli 3.0.1214.1__py2.py3-none-any.whl → 3.0.1216.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/configure.py +46 -1
- tccli/services/__init__.py +0 -3
- tccli/services/ams/v20201229/examples.json +2 -2
- tccli/services/apm/v20210622/api.json +20 -0
- tccli/services/asr/v20190614/api.json +3 -3
- tccli/services/bi/v20220105/api.json +32 -4
- tccli/services/bi/v20220105/examples.json +1 -1
- tccli/services/billing/billing_client.py +53 -0
- tccli/services/billing/v20180709/api.json +304 -0
- tccli/services/billing/v20180709/examples.json +8 -0
- tccli/services/bsca/v20210811/api.json +222 -17
- tccli/services/bsca/v20210811/examples.json +4 -4
- tccli/services/ccc/ccc_client.py +53 -0
- tccli/services/ccc/v20200210/api.json +176 -18
- tccli/services/ccc/v20200210/examples.json +11 -3
- tccli/services/cdb/v20170320/api.json +22 -4
- tccli/services/cdb/v20170320/examples.json +1 -1
- tccli/services/cdn/v20180606/api.json +5 -3
- tccli/services/cdwdoris/v20211228/api.json +23 -2
- tccli/services/cfs/v20190719/api.json +3 -3
- tccli/services/cfw/v20190904/api.json +86 -52
- tccli/services/cfw/v20190904/examples.json +68 -56
- tccli/services/ciam/v20220331/api.json +316 -315
- tccli/services/ciam/v20220331/examples.json +49 -49
- tccli/services/ckafka/v20190819/api.json +1 -1
- tccli/services/cloudaudit/cloudaudit_client.py +30 -30
- tccli/services/cloudaudit/v20190319/api.json +215 -186
- tccli/services/cloudaudit/v20190319/examples.json +13 -13
- tccli/services/cls/v20201016/api.json +365 -66
- tccli/services/cls/v20201016/examples.json +9 -3
- tccli/services/csip/v20221121/api.json +4 -4
- tccli/services/cvm/v20170312/api.json +42 -0
- tccli/services/cwp/v20180228/api.json +865 -809
- tccli/services/cwp/v20180228/examples.json +98 -110
- tccli/services/cynosdb/v20190107/api.json +77 -29
- tccli/services/cynosdb/v20190107/examples.json +22 -22
- tccli/services/dasb/v20191018/api.json +77 -0
- tccli/services/dasb/v20191018/examples.json +5 -5
- tccli/services/dbbrain/v20191016/examples.json +1 -1
- tccli/services/dlc/v20210125/api.json +11 -0
- tccli/services/domain/v20180808/api.json +3 -3
- tccli/services/domain/v20180808/examples.json +3 -3
- tccli/services/eb/v20210416/api.json +15 -15
- tccli/services/eb/v20210416/examples.json +1 -1
- tccli/services/emr/v20190103/api.json +9 -0
- tccli/services/es/es_client.py +249 -37
- tccli/services/es/v20180416/api.json +521 -0
- tccli/services/es/v20180416/examples.json +32 -0
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +155 -10
- tccli/services/ess/v20201111/examples.json +15 -1
- tccli/services/essbasic/essbasic_client.py +106 -0
- tccli/services/essbasic/v20210526/api.json +244 -13
- tccli/services/essbasic/v20210526/examples.json +22 -0
- tccli/services/gaap/v20180529/api.json +44 -26
- tccli/services/gaap/v20180529/examples.json +24 -30
- tccli/services/hunyuan/v20230901/examples.json +6 -0
- tccli/services/iotexplorer/v20190423/api.json +40 -0
- tccli/services/iss/v20230517/api.json +19 -0
- tccli/services/live/v20180801/api.json +35 -9
- tccli/services/mongodb/v20190725/api.json +6 -8
- tccli/services/mqtt/v20240516/api.json +2 -2
- tccli/services/mqtt/v20240516/examples.json +1 -1
- tccli/services/ocr/v20181119/api.json +2 -2
- tccli/services/organization/organization_client.py +352 -34
- tccli/services/organization/v20210331/api.json +451 -0
- tccli/services/organization/v20210331/examples.json +48 -0
- tccli/services/partners/partners_client.py +57 -4
- tccli/services/partners/v20180321/api.json +44 -0
- tccli/services/partners/v20180321/examples.json +8 -0
- tccli/services/region/v20220627/api.json +1 -1
- tccli/services/scf/scf_client.py +269 -4
- tccli/services/scf/v20180416/api.json +554 -0
- tccli/services/scf/v20180416/examples.json +46 -0
- tccli/services/ssl/v20191205/api.json +34 -5
- tccli/services/tat/v20201028/api.json +27 -25
- tccli/services/tat/v20201028/examples.json +4 -4
- tccli/services/tcss/v20201101/api.json +256 -14
- tccli/services/tcss/v20201101/examples.json +7 -7
- tccli/services/tdmq/v20200217/api.json +64 -63
- tccli/services/tdmq/v20200217/examples.json +2 -2
- tccli/services/tem/v20210701/api.json +144 -103
- tccli/services/tem/v20210701/examples.json +27 -27
- tccli/services/teo/teo_client.py +277 -12
- tccli/services/teo/v20220901/api.json +1023 -146
- tccli/services/teo/v20220901/examples.json +71 -1
- tccli/services/tke/tke_client.py +53 -0
- tccli/services/tke/v20180525/api.json +43 -0
- tccli/services/tke/v20180525/examples.json +8 -0
- tccli/services/tms/tms_client.py +4 -57
- tccli/services/tms/v20201229/api.json +0 -354
- tccli/services/tms/v20201229/examples.json +0 -8
- tccli/services/trtc/v20190722/api.json +221 -22
- tccli/services/vpc/v20170312/api.json +111 -34
- tccli/services/vpc/v20170312/examples.json +11 -3
- tccli/services/vpc/vpc_client.py +107 -54
- tccli/services/waf/v20180125/api.json +61 -0
- tccli/services/waf/v20180125/examples.json +8 -0
- tccli/services/waf/waf_client.py +53 -0
- tccli/services/wedata/v20210820/api.json +686 -0
- tccli/services/wedata/v20210820/examples.json +16 -0
- tccli/services/wedata/wedata_client.py +106 -0
- {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/METADATA +6 -2
- {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/RECORD +108 -112
- tccli/services/cr/__init__.py +0 -4
- tccli/services/cr/cr_client.py +0 -1626
- tccli/services/cr/v20180321/api.json +0 -2829
- tccli/services/cr/v20180321/examples.json +0 -235
- {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1214.1.dist-info → tccli-3.0.1216.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1216.1'
|
tccli/configure.py
CHANGED
@@ -230,6 +230,50 @@ class ConfigureSetCommand(BasicConfigure):
|
|
230
230
|
self._init_configure(profile_name + '.credential', cred)
|
231
231
|
|
232
232
|
|
233
|
+
class ConfigureSetRootDomainCommand(BasicConfigure):
|
234
|
+
NAME = 'set-root-domain'
|
235
|
+
DESCRIPTION = 'Set the root domain name for all endpoints.'
|
236
|
+
USEAGE = 'tccli configure set-root-domain [root-domain-value] [--profile profile-name]'
|
237
|
+
AVAILABLECONFIG = "[cvm, cbs ...].endpoint: service [cvm cbs ...] access point root domain name"
|
238
|
+
EXAMPLES = "$ tccli configure set-root-domain internal.tencentcloudapi.com --profile test"
|
239
|
+
ARG_TABLE = [
|
240
|
+
{'name': 'varname',
|
241
|
+
'help_text': 'The name of the root domain value to set.',
|
242
|
+
'action': 'store',
|
243
|
+
'nargs': '+',
|
244
|
+
'cli_type_name': 'string',
|
245
|
+
'positional_arg': True},
|
246
|
+
]
|
247
|
+
|
248
|
+
def __init__(self):
|
249
|
+
super(ConfigureSetRootDomainCommand, self).__init__()
|
250
|
+
|
251
|
+
def _run_main(self, args, parsed_globals):
|
252
|
+
var_value = args.varname
|
253
|
+
if len(var_value) != 1:
|
254
|
+
raise ParamError("Unexpected format\n"
|
255
|
+
"Expected input format:\n\n"
|
256
|
+
" $tccli configure set-root-domain internal.tencentcloudapi.com\n")
|
257
|
+
profile_name = self._get_profile_name(parsed_globals)
|
258
|
+
profile_name = profile_name + '.configure'
|
259
|
+
|
260
|
+
conf_data = {}
|
261
|
+
is_exist, config_path = self._profile_existed(profile_name)
|
262
|
+
if is_exist:
|
263
|
+
conf_data = Utils.load_json_msg(config_path)
|
264
|
+
if profile_name.endswith(".configure"):
|
265
|
+
for mod in self._cli_data.get_available_services().keys():
|
266
|
+
if mod not in conf_data:
|
267
|
+
conf_data[mod] = {}
|
268
|
+
conf_data[mod]["endpoint"] = "%s.tencentcloudapi.com" % mod
|
269
|
+
if mod != 'autoscaling':
|
270
|
+
conf_data[mod]["endpoint"] = "%s.%s" % (mod, var_value[0])
|
271
|
+
else:
|
272
|
+
conf_data[mod]["endpoint"] = "as.%s" % var_value[0]
|
273
|
+
conf_data[mod]["version"] = self._cli_data.get_available_services()[mod][0]
|
274
|
+
Utils.dump_json_msg(config_path, conf_data)
|
275
|
+
|
276
|
+
|
233
277
|
class ConfigureGetCommand(BasicConfigure):
|
234
278
|
NAME = 'get'
|
235
279
|
DESCRIPTION = "get your profile(eg:SecretId, SecretKey, Region)."
|
@@ -342,7 +386,8 @@ class ConfigureCommand(BasicConfigure):
|
|
342
386
|
{'name': 'list', 'command_class': ConfigureListCommand},
|
343
387
|
{'name': 'get', 'command_class': ConfigureGetCommand},
|
344
388
|
{'name': 'set', 'command_class': ConfigureSetCommand},
|
345
|
-
{'name': 'remove', 'command_class': ConfigureRemoveCommand}
|
389
|
+
{'name': 'remove', 'command_class': ConfigureRemoveCommand},
|
390
|
+
{'name': 'set-root-domain', 'command_class': ConfigureSetRootDomainCommand},
|
346
391
|
]
|
347
392
|
|
348
393
|
VALUES_TO_PROMPT = [
|
tccli/services/__init__.py
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
{
|
35
35
|
"document": "在创建任务后,可以通过TaskId查看任务详情",
|
36
36
|
"input": "POST / HTTP/1.1\nHost: ams.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTaskDetail\n<公共请求参数>\n\n{\n \"TaskId\": \"task-video-XwxJtbkKXWgCt8AZ\"\n}",
|
37
|
-
"output": "{\n \"Response\": {\n \"TaskId\": \"
|
37
|
+
"output": "{\n \"Response\": {\n \"TaskId\": \"w-audio-ZxisIxxxxiui72wo\",\n \"DataId\": \"55xxx32_30496167\",\n \"BizType\": \"audio_test_xmly\",\n \"Name\": \"55xxx32_30496167.flv\",\n \"Status\": \"FINISH\",\n \"Type\": \"AUDIO\",\n \"Suggestion\": \"Block\",\n \"Labels\": [\n {\n \"Label\": \"Porn\",\n \"Suggestion\": \"Block\",\n \"Score\": 99,\n \"SubLabel\": \"SexualBehavior\"\n }\n ],\n \"InputInfo\": {\n \"Type\": \"URL\",\n \"Url\": \"https://cms.myqcloud.com/audio/test.flv\",\n \"BucketInfo\": {\n \"Bucket\": \"null\",\n \"Region\": \"null\",\n \"Object\": \"null\"\n }\n },\n \"AudioText\": \"测试音频文本\",\n \"AudioSegments\": [\n {\n \"OffsetTime\": \"30\",\n \"Result\": {\n \"HitFlag\": 1,\n \"Label\": \"Porn\",\n \"Suggestion\": \"Block\",\n \"Score\": 95,\n \"Text\": \"测试音频文本\",\n \"Url\": \"https://cms.myqcloud.com/audio/test.flv\",\n \"Duration\": \"29000\",\n \"Extra\": \"\",\n \"TextResults\": [\n {\n \"Label\": \"Porn\",\n \"Keywords\": [\n \"\"\n ],\n \"LibId\": \"\",\n \"LibName\": \"0\",\n \"Score\": 0,\n \"Suggestion\": \"Block\",\n \"LibType\": 0,\n \"SubLabel\": \"SexualBehavior\"\n }\n ],\n \"MoanResults\": [\n {\n \"Label\": \"Moan\",\n \"Score\": 0,\n \"StartTime\": 0,\n \"EndTime\": 29,\n \"SubLabelCode\": \"\",\n \"SubLabel\": \"\",\n \"Suggestion\": \"Pass\"\n }\n ],\n \"LanguageResults\": [\n {\n \"Label\": \"cmn\",\n \"Score\": 99,\n \"StartTime\": 0,\n \"EndTime\": 29,\n \"SubLabelCode\": \"\"\n }\n ],\n \"SpeakerResults\": [],\n \"LabelResults\": [],\n \"TravelResults\": [],\n \"SubLabel\": \"SexualBehavior\",\n \"RecognitionResults\": []\n }\n }\n ],\n \"ErrorType\": \"\",\n \"ErrorDescription\": \"\",\n \"CreatedAt\": \"2024-10-23T07:56:17.008Z\",\n \"UpdatedAt\": \"2024-10-23T07:58:01.441Z\",\n \"Label\": \"Porn\",\n \"RequestId\": \"26cada43-6e79-4xxx-b77d-636347cd5637\"\n }\n}",
|
38
38
|
"title": "查看任务详情"
|
39
39
|
}
|
40
40
|
],
|
@@ -42,7 +42,7 @@
|
|
42
42
|
{
|
43
43
|
"document": "查看审核任务列表",
|
44
44
|
"input": "POST / HTTP/1.1\nHost: ams.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTasks\n<公共请求参数>\n\n{\n \"Filter\": {\n \"Type\": \"AUDIO\"\n }\n}",
|
45
|
-
"output": "{\n \"Response\": {\n \"Total\": \"
|
45
|
+
"output": "{\n \"Response\": {\n \"Total\": \"382\",\n \"Data\": [\n {\n \"DataId\": \"317xxx867800\",\n \"TaskId\": \"w-audio-xxxxx_ouZOdcjYeN\",\n \"Status\": \"FINISH\",\n \"Name\": \"test\",\n \"BizType\": \"audit_txxxxx_xmly\",\n \"Type\": \"AUDIO\",\n \"Suggestion\": \"Review\",\n \"MediaInfo\": {\n \"Codecs\": \"\",\n \"Duration\": 177,\n \"Width\": 0,\n \"Height\": 0,\n \"Thumbnail\": \"\"\n },\n \"Labels\": [\n {\n \"Label\": \"Abuse\",\n \"Suggestion\": \"Review\",\n \"Score\": 86,\n \"SubLabel\": \"Uncivilized\"\n }\n ],\n \"InputInfo\": {\n \"Type\": \"URL\",\n \"Url\": \"https://xxxx.com\",\n \"BucketInfo\": null\n },\n \"CreatedAt\": \"2024-10-23T08:41:07.947Z\",\n \"UpdatedAt\": \"2024-10-23T08:41:53.739Z\"\n }\n ],\n \"PageToken\": \".Zxi2o_ouxxxxjYeN\",\n \"RequestId\": \"8172167d-8755-43d8-a7ce-76f3103059ac\"\n }\n}",
|
46
46
|
"title": "查看审核任务列表"
|
47
47
|
}
|
48
48
|
]
|
@@ -795,6 +795,26 @@
|
|
795
795
|
"output_required": false,
|
796
796
|
"type": "int",
|
797
797
|
"value_allowed_null": true
|
798
|
+
},
|
799
|
+
{
|
800
|
+
"disabled": false,
|
801
|
+
"document": "是否免费(0=否,1=限额免费,2=完全免费),默认0\n注意:此字段可能返回 null,表示取不到有效值。",
|
802
|
+
"example": "0",
|
803
|
+
"member": "int64",
|
804
|
+
"name": "Free",
|
805
|
+
"output_required": false,
|
806
|
+
"type": "int",
|
807
|
+
"value_allowed_null": true
|
808
|
+
},
|
809
|
+
{
|
810
|
+
"disabled": false,
|
811
|
+
"document": "是否tsf默认业务系统(0=否,1-是)\n注意:此字段可能返回 null,表示取不到有效值。",
|
812
|
+
"example": "0",
|
813
|
+
"member": "int64",
|
814
|
+
"name": "DefaultTSF",
|
815
|
+
"output_required": false,
|
816
|
+
"type": "int",
|
817
|
+
"value_allowed_null": true
|
798
818
|
}
|
799
819
|
],
|
800
820
|
"usage": "out"
|
@@ -616,7 +616,7 @@
|
|
616
616
|
},
|
617
617
|
{
|
618
618
|
"disabled": false,
|
619
|
-
"document": "识别声道数\n1:单声道(16k音频仅支持单声道,**请勿**设置为双声道);\n2:双声道(仅支持8k电话音频,且双声道应分别为通话双方)\n\n注意:\n• 16k音频:仅支持单声道识别,**需设置ChannelNum=1**;\n• 8k电话音频:支持单声道、双声道识别,**建议设置ChannelNum=2,即双声道**。双声道能够物理区分说话人、避免说话双方重叠产生的识别错误,能达到最好的说话人分离效果和识别效果。设置双声道后,将自动区分说话人,因此**无需再开启说话人分离功能**,相关参数(**SpeakerDiarization、SpeakerNumber
|
619
|
+
"document": "识别声道数\n1:单声道(16k音频仅支持单声道,**请勿**设置为双声道);\n2:双声道(仅支持8k电话音频,且双声道应分别为通话双方)\n\n注意:\n• 16k音频:仅支持单声道识别,**需设置ChannelNum=1**;\n• 8k电话音频:支持单声道、双声道识别,**建议设置ChannelNum=2,即双声道**。双声道能够物理区分说话人、避免说话双方重叠产生的识别错误,能达到最好的说话人分离效果和识别效果。设置双声道后,将自动区分说话人,因此**无需再开启说话人分离功能**,相关参数(**SpeakerDiarization、SpeakerNumber**)使用默认值即可,返回的ResultDetail中的speakerId的值为0代表左声道,值为1代表右声道。",
|
620
620
|
"example": "1",
|
621
621
|
"member": "uint64",
|
622
622
|
"name": "ChannelNum",
|
@@ -1887,7 +1887,7 @@
|
|
1887
1887
|
},
|
1888
1888
|
{
|
1889
1889
|
"disabled": false,
|
1890
|
-
"document": "声道或说话人 Id(请求中如果设置了 speaker_diarization或者ChannelNum为双声道,可区分说话人或声道)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1890
|
+
"document": "声道或说话人 Id(请求中如果设置了 speaker_diarization或者ChannelNum为双声道,可区分说话人或声道)\n单声道话者分离时不同的值代表不同的说话人; 8k双声道话者分离时speakerId的值为0代表左声道,值为1代表右声道。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1891
1891
|
"example": "0",
|
1892
1892
|
"member": "int64",
|
1893
1893
|
"name": "SpeakerId",
|
@@ -1917,7 +1917,7 @@
|
|
1917
1917
|
},
|
1918
1918
|
{
|
1919
1919
|
"disabled": false,
|
1920
|
-
"document": "
|
1920
|
+
"document": "情绪类型(可能为空,有2种情况 1、没有对应资源包;2、情绪跟语音效果相关,如果情绪不够强烈时可能无法识别)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1921
1921
|
"example": "happy",
|
1922
1922
|
"member": "string",
|
1923
1923
|
"name": "EmotionType",
|
@@ -176,7 +176,7 @@
|
|
176
176
|
},
|
177
177
|
{
|
178
178
|
"disabled": false,
|
179
|
-
"document": "分享页面id,嵌出看板时此为空值0",
|
179
|
+
"document": "分享页面id,嵌出看板时此为空值0,ChatBI嵌出时不传\n",
|
180
180
|
"example": "1",
|
181
181
|
"member": "uint64",
|
182
182
|
"name": "PageId",
|
@@ -203,7 +203,16 @@
|
|
203
203
|
},
|
204
204
|
{
|
205
205
|
"disabled": false,
|
206
|
-
"document": "
|
206
|
+
"document": "embed:页面/看板嵌出\nchatBIEmbed:ChatBI嵌出",
|
207
|
+
"example": "embed",
|
208
|
+
"member": "string",
|
209
|
+
"name": "Intention",
|
210
|
+
"required": false,
|
211
|
+
"type": "string"
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"disabled": false,
|
215
|
+
"document": "panel, 看板;page,页面\nproject,ChatBI嵌出时",
|
207
216
|
"example": "page",
|
208
217
|
"member": "string",
|
209
218
|
"name": "Scope",
|
@@ -923,7 +932,7 @@
|
|
923
932
|
},
|
924
933
|
{
|
925
934
|
"disabled": false,
|
926
|
-
"document": "分享页面id,嵌出看板时此为空值0",
|
935
|
+
"document": "分享页面id,嵌出看板时此为空值0,ChatBI嵌出时不传",
|
927
936
|
"example": "1",
|
928
937
|
"member": "uint64",
|
929
938
|
"name": "PageId",
|
@@ -932,7 +941,16 @@
|
|
932
941
|
},
|
933
942
|
{
|
934
943
|
"disabled": false,
|
935
|
-
"document": "
|
944
|
+
"document": "embed表示页面看板嵌出,chatBIEmbed表示ChatBI嵌出",
|
945
|
+
"example": "无",
|
946
|
+
"member": "string",
|
947
|
+
"name": "Intention",
|
948
|
+
"required": false,
|
949
|
+
"type": "string"
|
950
|
+
},
|
951
|
+
{
|
952
|
+
"disabled": false,
|
953
|
+
"document": "page表示嵌出页面,panel表示嵌出整个看板,ChatBI嵌出时使用project",
|
936
954
|
"example": "1",
|
937
955
|
"member": "string",
|
938
956
|
"name": "Scope",
|
@@ -2847,6 +2865,16 @@
|
|
2847
2865
|
"output_required": false,
|
2848
2866
|
"type": "string",
|
2849
2867
|
"value_allowed_null": true
|
2868
|
+
},
|
2869
|
+
{
|
2870
|
+
"disabled": false,
|
2871
|
+
"document": "embed表示页面看板嵌出,chatBIEmbed表示ChatBI嵌出\n注意:此字段可能返回 null,表示取不到有效值。",
|
2872
|
+
"example": "无",
|
2873
|
+
"member": "string",
|
2874
|
+
"name": "Intention",
|
2875
|
+
"output_required": false,
|
2876
|
+
"type": "string",
|
2877
|
+
"value_allowed_null": true
|
2850
2878
|
}
|
2851
2879
|
],
|
2852
2880
|
"usage": "out"
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"ApplyEmbedInterval": [
|
4
4
|
{
|
5
5
|
"document": "",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: bi.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ApplyEmbedInterval\n<公共请求参数>\n\n{\n \"Scope\": \"page\",\n \"BIToken\": \"246cbf0d-aa6c-445d-895d-b368f59159e8\",\n \"ExtraParam\": \"\",\n \"PageId\": \"1\",\n \"ProjectId\": \"2\"\n}",
|
6
|
+
"input": "POST / HTTP/1.1\nHost: bi.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ApplyEmbedInterval\n<公共请求参数>\n\n{\n \"Intention\": \"embed\",\n \"Scope\": \"page\",\n \"BIToken\": \"246cbf0d-aa6c-445d-895d-b368f59159e8\",\n \"ExtraParam\": \"\",\n \"PageId\": \"1\",\n \"ProjectId\": \"2\"\n}",
|
7
7
|
"output": "{\n \"Response\": {\n \"Msg\": \"success\",\n \"RequestId\": \"e60a2172-715b-4305-beb2-40792ae53856\",\n \"Extra\": \"\",\n \"Data\": {\n \"Result\": true\n }\n }\n}",
|
8
8
|
"title": "申请Token延期接口实例"
|
9
9
|
}
|
@@ -1421,6 +1421,58 @@ def doDescribeSavingPlanUsage(args, parsed_globals):
|
|
1421
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
1422
|
|
1423
1423
|
|
1424
|
+
def doDescribeBillAdjustInfo(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.BillingClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1452
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
+
model = models.DescribeBillAdjustInfoRequest()
|
1454
|
+
model.from_json_string(json.dumps(args))
|
1455
|
+
start_time = time.time()
|
1456
|
+
while True:
|
1457
|
+
rsp = client.DescribeBillAdjustInfo(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 doDescribeAllocationBillDetail(args, parsed_globals):
|
1425
1477
|
g_param = parse_global_arg(parsed_globals)
|
1426
1478
|
|
@@ -2395,6 +2447,7 @@ ACTION_MAP = {
|
|
2395
2447
|
"DescribeAccountBalance": doDescribeAccountBalance,
|
2396
2448
|
"DescribeDosageDetailByDate": doDescribeDosageDetailByDate,
|
2397
2449
|
"DescribeSavingPlanUsage": doDescribeSavingPlanUsage,
|
2450
|
+
"DescribeBillAdjustInfo": doDescribeBillAdjustInfo,
|
2398
2451
|
"DescribeAllocationBillDetail": doDescribeAllocationBillDetail,
|
2399
2452
|
"DescribeBillSummaryByRegion": doDescribeBillSummaryByRegion,
|
2400
2453
|
"DescribeBillSummaryByProject": doDescribeBillSummaryByProject,
|