tccli 3.0.1206.1__py2.py3-none-any.whl → 3.0.1208.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/advisor/v20200721/api.json +1 -1
- tccli/services/cbs/v20170312/api.json +5 -5
- tccli/services/cdn/v20180606/api.json +1 -1
- tccli/services/cdwch/v20200915/api.json +20 -0
- tccli/services/clb/v20180317/api.json +6 -6
- tccli/services/cls/v20201016/api.json +50 -0
- tccli/services/cls/v20201016/examples.json +7 -7
- tccli/services/cvm/v20170312/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +84 -2
- tccli/services/cynosdb/v20190107/examples.json +1 -1
- tccli/services/dlc/dlc_client.py +53 -0
- tccli/services/dlc/v20210125/api.json +273 -0
- tccli/services/dlc/v20210125/examples.json +8 -0
- tccli/services/dsgc/v20190723/api.json +150 -22
- tccli/services/dsgc/v20190723/examples.json +4 -4
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/ess/v20201111/api.json +84 -26
- tccli/services/ess/v20201111/examples.json +2 -2
- tccli/services/essbasic/essbasic_client.py +53 -0
- tccli/services/essbasic/v20210526/api.json +95 -2
- tccli/services/essbasic/v20210526/examples.json +8 -0
- tccli/services/faceid/v20180301/api.json +1 -1
- tccli/services/ioa/v20220601/api.json +18 -1
- tccli/services/iotexplorer/iotexplorer_client.py +106 -0
- tccli/services/iotexplorer/v20190423/api.json +198 -0
- tccli/services/iotexplorer/v20190423/examples.json +22 -0
- tccli/services/lke/v20231130/api.json +1 -1
- tccli/services/mongodb/v20190725/api.json +1 -1
- tccli/services/mps/mps_client.py +220 -8
- tccli/services/mps/v20190612/api.json +627 -11
- tccli/services/mps/v20190612/examples.json +40 -2
- tccli/services/oceanus/oceanus_client.py +53 -0
- tccli/services/oceanus/v20190422/api.json +88 -0
- tccli/services/oceanus/v20190422/examples.json +8 -0
- tccli/services/redis/redis_client.py +53 -0
- tccli/services/redis/v20180412/api.json +75 -8
- tccli/services/redis/v20180412/examples.json +8 -0
- tccli/services/tcss/v20201101/api.json +10 -10
- tccli/services/tke/tke_client.py +4 -57
- tccli/services/tke/v20180525/api.json +0 -72
- tccli/services/tke/v20180525/examples.json +0 -8
- tccli/services/tms/v20201229/api.json +17 -17
- tccli/services/trtc/v20190722/api.json +24 -6
- tccli/services/vod/v20180717/api.json +1 -1
- tccli/services/vpc/v20170312/api.json +23 -14
- tccli/services/vpc/v20170312/examples.json +1 -1
- tccli/services/waf/v20180125/api.json +655 -1
- tccli/services/waf/v20180125/examples.json +22 -0
- tccli/services/waf/waf_client.py +114 -8
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1208.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1208.1.dist-info}/RECORD +55 -55
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1208.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1208.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1208.1.dist-info}/license_files/LICENSE +0 -0
@@ -200,6 +200,28 @@
|
|
200
200
|
"title": "创建转码模板"
|
201
201
|
}
|
202
202
|
],
|
203
|
+
"CreateVideoDatabaseEntryTask": [
|
204
|
+
{
|
205
|
+
"document": "使用视频url发起视频入库任务",
|
206
|
+
"input": "POST / HTTP/1.1\nHost: mps.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateVideoDatabaseEntryTask\n<公共请求参数>\n\n{\n \"InputInfo\": {\n \"Type\": \"URL\",\n \"UrlInputInfo\": {\n \"Url\": \"http://qq.com/test.mp4\"\n }\n },\n \"TaskNotifyConfig\": {\n \"NotifyType\": \"URL\",\n \"NotifyUrl\": \"http://qq.com/callback\"\n }\n}",
|
207
|
+
"output": "{\n \"Response\": {\n \"TaskId\": \"251xxx279-VideoDBEntryTask-60e4ae3b23ff4fd3936eb6b7e8af25ec\",\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
208
|
+
"title": "Url视频入库"
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"document": "使用视频COS地址发起视频入库任务",
|
212
|
+
"input": "POST / HTTP/1.1\nHost: mps.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateVideoDatabaseEntryTask\n<公共请求参数>\n\n{\n \"InputInfo\": {\n \"Type\": \"COS\",\n \"CosInputInfo\": {\n \"Bucket\": \"test-bucket\",\n \"Region\": \"ap-nanjing\",\n \"Object\": \"/movie/test.mp4\"\n }\n },\n \"TaskNotifyConfig\": {\n \"NotifyType\": \"URL\",\n \"NotifyUrl\": \"http://qq.com/callback\"\n }\n}",
|
213
|
+
"output": "{\n \"Response\": {\n \"TaskId\": \"251xxx279-VideoDBEntryTask-60e4ae3b23ff4fd3936eb6b7e8af25ec\",\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
214
|
+
"title": "COS视频入库"
|
215
|
+
}
|
216
|
+
],
|
217
|
+
"CreateVideoSearchTask": [
|
218
|
+
{
|
219
|
+
"document": "创建文本检索视频任务",
|
220
|
+
"input": "POST / HTTP/1.1\nHost: mps.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateVideoSearchTask\n<公共请求参数>\n\n{\n \"SearchValueInput\": {\n \"SearchValueType\": \"Text\",\n \"TextInput\": \"喜欢\"\n },\n \"Limit\": 3,\n \"TaskNotifyConfig\": {\n \"NotifyType\": \"URL\",\n \"NotifyUrl\": \"http://qq.com/callback\"\n }\n}",
|
221
|
+
"output": "{\n \"Response\": {\n \"TaskId\": \"251xxx279-SearchTask-60e4ae3b23ff4fd3936eb6b7e8af25ec\",\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
222
|
+
"title": "创建文本检索视频任务"
|
223
|
+
}
|
224
|
+
],
|
203
225
|
"CreateWatermarkTemplate": [
|
204
226
|
{
|
205
227
|
"document": "",
|
@@ -634,10 +656,26 @@
|
|
634
656
|
{
|
635
657
|
"document": "获取转码模板",
|
636
658
|
"input": "POST / HTTP/1.1\nHost: mps.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTranscodeTemplates\n<公共请求参数>\n\n{\n \"Definitions\": [\n \"10\"\n ]\n}",
|
637
|
-
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"TranscodeTemplateSet\": [\n {\n \"Definition\": \"abc\",\n \"Container\": \"abc\",\n \"Name\": \"abc\",\n \"Comment\": \"abc\",\n \"Type\": \"abc\",\n \"RemoveVideo\": 0,\n \"RemoveAudio\": 0,\n \"VideoTemplate\": {\n \"Codec\": \"abc\",\n \"Fps\": 0,\n \"Bitrate\": 0,\n \"ResolutionAdaptive\": \"abc\",\n \"Width\": 1,\n \"Height\": 1,\n \"Gop\": 1,\n \"FillType\": \"abc\",\n \"Vcrf\": 1,\n \"SegmentType\": 0\n },\n \"AudioTemplate\": {\n \"Codec\": \"abc\",\n \"Bitrate\": 0,\n \"SampleRate\": 1,\n \"AudioChannel\": 0\n },\n \"TEHDConfig\": {\n \"Type\": \"abc\",\n \"MaxVideoBitrate\": 0\n },\n \"ContainerType\": \"abc\",\n \"CreateTime\": \"abc\",\n \"UpdateTime\": \"abc\",\n \"EnhanceConfig\": {\n \"VideoEnhance\": {\n \"FrameRate\": {\n \"Switch\": \"abc\",\n \"Fps\": 1\n },\n \"SuperResolution\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\",\n \"Size\": 0\n },\n \"Hdr\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"Denoise\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"ImageQualityEnhance\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"ColorEnhance\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"SharpEnhance\": {\n \"Switch\": \"abc\",\n \"Intensity\": 0\n },\n \"FaceEnhance\": {\n \"Switch\": \"abc\",\n \"Intensity\": 0\n },\n \"LowLightEnhance\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"ScratchRepair\": {\n \"Switch\": \"abc\",\n \"Intensity\": 0\n },\n \"ArtifactRepair\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n }\n },\n \"AudioEnhance\": {\n \"Denoise\": {\n \"Switch\": \"abc\"\n },\n \"Separate\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\",\n \"Track\": \"abc\"\n },\n \"VolumeBalance\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"Beautify\": {\n \"Switch\": \"abc\",\n \"Types\": [\n \"abc\"\n ]\n }\n }\n }\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
659
|
+
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"TranscodeTemplateSet\": [\n {\n \"Definition\": \"abc\",\n \"Container\": \"abc\",\n \"Name\": \"abc\",\n \"Comment\": \"abc\",\n \"Type\": \"abc\",\n \"RemoveVideo\": 0,\n \"RemoveAudio\": 0,\n \"VideoTemplate\": {\n \"Codec\": \"abc\",\n \"Fps\": 0,\n \"Bitrate\": 0,\n \"ResolutionAdaptive\": \"abc\",\n \"Width\": 1,\n \"Height\": 1,\n \"Gop\": 1,\n \"FillType\": \"abc\",\n \"Vcrf\": 1,\n \"HlsTime\": 1,\n \"SegmentType\": 0\n },\n \"AudioTemplate\": {\n \"Codec\": \"abc\",\n \"Bitrate\": 0,\n \"SampleRate\": 1,\n \"AudioChannel\": 0\n },\n \"TEHDConfig\": {\n \"Type\": \"abc\",\n \"MaxVideoBitrate\": 0\n },\n \"ContainerType\": \"abc\",\n \"CreateTime\": \"abc\",\n \"UpdateTime\": \"abc\",\n \"EnhanceConfig\": {\n \"VideoEnhance\": {\n \"FrameRate\": {\n \"Switch\": \"abc\",\n \"Fps\": 1\n },\n \"SuperResolution\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\",\n \"Size\": 0\n },\n \"Hdr\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"Denoise\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"ImageQualityEnhance\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"ColorEnhance\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"SharpEnhance\": {\n \"Switch\": \"abc\",\n \"Intensity\": 0\n },\n \"FaceEnhance\": {\n \"Switch\": \"abc\",\n \"Intensity\": 0\n },\n \"LowLightEnhance\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"ScratchRepair\": {\n \"Switch\": \"abc\",\n \"Intensity\": 0\n },\n \"ArtifactRepair\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n }\n },\n \"AudioEnhance\": {\n \"Denoise\": {\n \"Switch\": \"abc\"\n },\n \"Separate\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\",\n \"Track\": \"abc\"\n },\n \"VolumeBalance\": {\n \"Switch\": \"abc\",\n \"Type\": \"abc\"\n },\n \"Beautify\": {\n \"Switch\": \"abc\",\n \"Types\": [\n \"abc\"\n ]\n }\n }\n }\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
638
660
|
"title": "获取转码模板"
|
639
661
|
}
|
640
662
|
],
|
663
|
+
"DescribeVideoDatabaseEntryTaskDetail": [
|
664
|
+
{
|
665
|
+
"document": "根据任务ID查询视频入库任务的状态",
|
666
|
+
"input": "POST / HTTP/1.1\nHost: mps.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeVideoDatabaseEntryTaskDetail\n<公共请求参数>\n\n{\n \"TaskId\": \"251xxx279-VideoDBEntryTask-60e4ae3b23ff4fd3936eb6b7e8af25ec\"\n}",
|
667
|
+
"output": "{\n \"Response\": {\n \"TaskId\": \"251xxx279-VideoDBEntryTask-60e4ae3b23ff4fd3936eb6b7e8af25ec\",\n \"Status\": \"SUCCESS\",\n \"VideoDBEntryTaskResults\": [\n {\n \"VideoId\": \"c92846202b9fca7813dfc92846fc3e408\"\n }\n ],\n \"RequestId\": \"c92846202b9fca7813df05aa2b9fe408\"\n }\n}",
|
668
|
+
"title": "查询任务状态"
|
669
|
+
}
|
670
|
+
],
|
671
|
+
"DescribeVideoSearchTaskDetail": [
|
672
|
+
{
|
673
|
+
"document": "根据任务ID查询视频检索任务的状态",
|
674
|
+
"input": "POST / HTTP/1.1\nHost: mps.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeVideoSearchTaskDetail\n<公共请求参数>\n\n{\n \"TaskId\": \"251xxx279-SearchTask-60e4ae3b23ff4fd3936eb6b7e8af25ec\"\n}",
|
675
|
+
"output": "{\n \"Response\": {\n \"TaskId\": \"251xxx279-SearchTask-60e4ae3b23ff4fd3936eb6b7e8af25ec\",\n \"Status\": \"SUCCESS\",\n \"SearchTaskResults\": [\n {\n \"Score\": 0.7654,\n \"VideoId\": \"c92846202b9fca7813d2846a6fc3e408\"\n }\n ],\n \"RequestId\": \"65ef8b23-677a-429d-83aa-d7eef8bb2aa9\"\n }\n}",
|
676
|
+
"title": "查询任务状态"
|
677
|
+
}
|
678
|
+
],
|
641
679
|
"DescribeWatermarkTemplates": [
|
642
680
|
{
|
643
681
|
"document": "",
|
@@ -664,7 +702,7 @@
|
|
664
702
|
{
|
665
703
|
"document": "查询 ID 为78459的工作流。",
|
666
704
|
"input": "https://mps.tencentcloudapi.com/?Action=DescribeWorkflows\n&WorkflowIds.0=78459\n&<公共请求参数>",
|
667
|
-
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"WorkflowInfoSet\": [\n {\n \"WorkflowId\": 0,\n \"WorkflowName\": \"abc\",\n \"Status\": \"abc\",\n \"Trigger\": {\n \"Type\": \"abc\",\n \"CosFileUploadTrigger\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Dir\": \"abc\",\n \"Formats\": [\n \"abc\"\n ]\n },\n \"AwsS3FileUploadTrigger\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"Dir\": \"abc\",\n \"Formats\": [\n \"abc\"\n ],\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\",\n \"AwsSQS\": {\n \"SQSRegion\": \"abc\",\n \"SQSQueueName\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n }\n },\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"MediaProcessTask\": {\n \"TranscodeTaskSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Container\": \"abc\",\n \"RemoveVideo\": 0,\n \"RemoveAudio\": 0,\n \"VideoTemplate\": {\n \"Codec\": \"abc\",\n \"Fps\": 0,\n \"Bitrate\": 0,\n \"ResolutionAdaptive\": \"abc\",\n \"Width\": 1,\n \"Height\": 1,\n \"Gop\": 1,\n \"FillType\": \"abc\",\n \"Vcrf\": 1,\n \"SegmentType\": 0\n },\n \"AudioTemplate\": {\n \"Codec\": \"abc\",\n \"Bitrate\": 0,\n \"SampleRate\": 1,\n \"AudioChannel\": 0\n },\n \"TEHDConfig\": {\n \"Type\": \"abc\",\n \"MaxVideoBitrate\": 0\n }\n },\n \"OverrideParameter\": {\n \"Container\": \"abc\",\n \"RemoveVideo\": 1,\n \"RemoveAudio\": 1,\n \"VideoTemplate\": {\n \"Codec\": \"abc\",\n \"Fps\": 0,\n \"Bitrate\": 0,\n \"ResolutionAdaptive\": \"abc\",\n \"Width\": 1,\n \"Height\": 1,\n \"Gop\": 1,\n \"FillType\": \"abc\",\n \"Vcrf\": 1,\n \"ContentAdaptStream\": 1,\n \"SegmentType\": 0\n },\n \"AudioTemplate\": {\n \"Codec\": \"abc\",\n \"Bitrate\": 0,\n \"SampleRate\": 1,\n \"AudioChannel\": 0,\n \"StreamSelects\": [\n 0\n ]\n },\n \"TEHDConfig\": {\n \"Type\": \"abc\",\n \"MaxVideoBitrate\": 0\n },\n \"SubtitleTemplate\": {\n \"Path\": \"abc\",\n \"StreamIndex\": 0,\n \"FontType\": \"abc\",\n \"FontSize\": \"abc\",\n \"FontColor\": \"abc\",\n \"FontAlpha\": 0\n },\n \"AddonAudioStream\": [\n {\n \"Type\": \"abc\",\n \"CosInputInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n },\n \"UrlInputInfo\": {\n \"Url\": \"abc\"\n },\n \"S3InputInfo\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3Object\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n }\n ],\n \"StdExtInfo\": \"abc\",\n \"AddOnSubtitles\": [\n {\n \"Type\": \"abc\",\n \"Subtitle\": {\n \"Type\": \"abc\",\n \"CosInputInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n },\n \"UrlInputInfo\": {\n \"Url\": \"abc\"\n },\n \"S3InputInfo\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3Object\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n }\n }\n ]\n },\n \"WatermarkSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Type\": \"abc\",\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"ImageTemplate\": {\n \"ImageContent\": {\n \"Type\": \"abc\",\n \"CosInputInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n },\n \"UrlInputInfo\": {\n \"Url\": \"abc\"\n },\n \"S3InputInfo\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3Object\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"RepeatType\": \"abc\"\n }\n },\n \"TextContent\": \"abc\",\n \"SvgContent\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"MosaicSet\": [\n {\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0,\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"OutputObjectPath\": \"abc\",\n \"SegmentObjectName\": \"abc\",\n \"ObjectNumberFormat\": {\n \"InitialValue\": 1,\n \"Increment\": 1,\n \"MinLength\": 1,\n \"PlaceHolder\": \"abc\"\n },\n \"HeadTailParameter\": {}\n }\n ],\n \"AnimatedGraphicTaskSet\": [\n {\n \"Definition\": 1,\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0,\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"OutputObjectPath\": \"abc\"\n }\n ],\n \"SnapshotByTimeOffsetTaskSet\": [\n {\n \"Definition\": 1,\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"ExtTimeOffsetSet\": [\n \"abc\"\n ],\n \"TimeOffsetSet\": [\n 0\n ],\n \"WatermarkSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Type\": \"abc\",\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"ImageTemplate\": {\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"RepeatType\": \"abc\"\n }\n },\n \"TextContent\": \"abc\",\n \"SvgContent\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"OutputObjectPath\": \"abc\",\n \"ObjectNumberFormat\": {\n \"InitialValue\": 1,\n \"Increment\": 1,\n \"MinLength\": 1,\n \"PlaceHolder\": \"abc\"\n }\n }\n ],\n \"SampleSnapshotTaskSet\": [\n {\n \"Definition\": 1,\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"WatermarkSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Type\": \"abc\",\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"ImageTemplate\": {\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"RepeatType\": \"abc\"\n }\n },\n \"TextContent\": \"abc\",\n \"SvgContent\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"OutputObjectPath\": \"abc\",\n \"ObjectNumberFormat\": {\n \"InitialValue\": 1,\n \"Increment\": 1,\n \"MinLength\": 1,\n \"PlaceHolder\": \"abc\"\n }\n }\n ],\n \"ImageSpriteTaskSet\": [\n {\n \"Definition\": 1,\n \"OutputObjectPath\": \"abc\",\n \"WebVttObjectName\": \"abc\"\n }\n ],\n \"AdaptiveDynamicStreamingTaskSet\": [\n {\n \"Definition\": 1,\n \"WatermarkSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Type\": \"abc\",\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"ImageTemplate\": {\n \"ImageContent\": {\n \"Type\": \"abc\",\n \"CosInputInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n },\n \"UrlInputInfo\": {\n \"Url\": \"abc\"\n },\n \"S3InputInfo\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3Object\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"RepeatType\": \"abc\"\n }\n },\n \"TextContent\": \"abc\",\n \"SvgContent\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"OutputObjectPath\": \"abc\",\n \"SubStreamObjectName\": \"abc\",\n \"SegmentObjectName\": \"abc\",\n \"AddOnSubtitles\": [\n {\n \"Type\": \"abc\"\n }\n ],\n \"DrmInfo\": {\n \"Type\": \"abc\",\n \"SimpleAesDrm\": {\n \"Uri\": \"abc\",\n \"Key\": \"abc\",\n \"Vector\": \"abc\"\n }\n },\n \"DefinitionType\": \"abc\"\n }\n ]\n },\n \"AiContentReviewTask\": {\n \"Definition\": 1\n },\n \"AiAnalysisTask\": {\n \"Definition\": 1,\n \"ExtendedParameter\": \"abc\"\n },\n \"AiRecognitionTask\": {\n \"Definition\": 1\n },\n \"TaskNotifyConfig\": {\n \"NotifyType\": \"abc\",\n \"NotifyMode\": \"abc\",\n \"NotifyUrl\": \"abc\",\n \"CmqModel\": \"abc\",\n \"CmqRegion\": \"abc\",\n \"TopicName\": \"abc\",\n \"QueueName\": \"abc\",\n \"AwsSQS\": {\n \"SQSRegion\": \"abc\",\n \"SQSQueueName\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n },\n \"NotifyKey\": \"abc\"\n },\n \"TaskPriority\": 0,\n \"OutputDir\": \"abc\",\n \"CreateTime\": \"abc\",\n \"UpdateTime\": \"abc\"\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
705
|
+
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"WorkflowInfoSet\": [\n {\n \"WorkflowId\": 0,\n \"WorkflowName\": \"abc\",\n \"Status\": \"abc\",\n \"Trigger\": {\n \"Type\": \"abc\",\n \"CosFileUploadTrigger\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Dir\": \"abc\",\n \"Formats\": [\n \"abc\"\n ]\n },\n \"AwsS3FileUploadTrigger\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"Dir\": \"abc\",\n \"Formats\": [\n \"abc\"\n ],\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\",\n \"AwsSQS\": {\n \"SQSRegion\": \"abc\",\n \"SQSQueueName\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n }\n },\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"MediaProcessTask\": {\n \"TranscodeTaskSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Container\": \"abc\",\n \"RemoveVideo\": 0,\n \"RemoveAudio\": 0,\n \"VideoTemplate\": {\n \"Codec\": \"abc\",\n \"Fps\": 0,\n \"Bitrate\": 0,\n \"ResolutionAdaptive\": \"abc\",\n \"Width\": 1,\n \"Height\": 1,\n \"Gop\": 1,\n \"FillType\": \"abc\",\n \"Vcrf\": 1,\n \"HlsTime\": 1,\n \"SegmentType\": 0\n },\n \"AudioTemplate\": {\n \"Codec\": \"abc\",\n \"Bitrate\": 0,\n \"SampleRate\": 1,\n \"AudioChannel\": 0\n },\n \"TEHDConfig\": {\n \"Type\": \"abc\",\n \"MaxVideoBitrate\": 0\n }\n },\n \"OverrideParameter\": {\n \"Container\": \"abc\",\n \"RemoveVideo\": 1,\n \"RemoveAudio\": 1,\n \"VideoTemplate\": {\n \"Codec\": \"abc\",\n \"Fps\": 0,\n \"Bitrate\": 0,\n \"ResolutionAdaptive\": \"abc\",\n \"Width\": 1,\n \"Height\": 1,\n \"Gop\": 1,\n \"FillType\": \"abc\",\n \"Vcrf\": 1,\n \"ContentAdaptStream\": 1,\n \"HlsTime\": 1,\n \"SegmentType\": 0\n },\n \"AudioTemplate\": {\n \"Codec\": \"abc\",\n \"Bitrate\": 0,\n \"SampleRate\": 1,\n \"AudioChannel\": 0,\n \"StreamSelects\": [\n 0\n ]\n },\n \"TEHDConfig\": {\n \"Type\": \"abc\",\n \"MaxVideoBitrate\": 0\n },\n \"SubtitleTemplate\": {\n \"Path\": \"abc\",\n \"StreamIndex\": 0,\n \"FontType\": \"abc\",\n \"FontSize\": \"abc\",\n \"FontColor\": \"abc\",\n \"FontAlpha\": 0\n },\n \"AddonAudioStream\": [\n {\n \"Type\": \"abc\",\n \"CosInputInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n },\n \"UrlInputInfo\": {\n \"Url\": \"abc\"\n },\n \"S3InputInfo\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3Object\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n }\n ],\n \"StdExtInfo\": \"abc\",\n \"AddOnSubtitles\": [\n {\n \"Type\": \"abc\",\n \"Subtitle\": {\n \"Type\": \"abc\",\n \"CosInputInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n },\n \"UrlInputInfo\": {\n \"Url\": \"abc\"\n },\n \"S3InputInfo\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3Object\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n }\n }\n ]\n },\n \"WatermarkSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Type\": \"abc\",\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"ImageTemplate\": {\n \"ImageContent\": {\n \"Type\": \"abc\",\n \"CosInputInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n },\n \"UrlInputInfo\": {\n \"Url\": \"abc\"\n },\n \"S3InputInfo\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3Object\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"RepeatType\": \"abc\"\n }\n },\n \"TextContent\": \"abc\",\n \"SvgContent\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"MosaicSet\": [\n {\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0,\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"OutputObjectPath\": \"abc\",\n \"SegmentObjectName\": \"abc\",\n \"ObjectNumberFormat\": {\n \"InitialValue\": 1,\n \"Increment\": 1,\n \"MinLength\": 1,\n \"PlaceHolder\": \"abc\"\n },\n \"HeadTailParameter\": {}\n }\n ],\n \"AnimatedGraphicTaskSet\": [\n {\n \"Definition\": 1,\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0,\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"OutputObjectPath\": \"abc\"\n }\n ],\n \"SnapshotByTimeOffsetTaskSet\": [\n {\n \"Definition\": 1,\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"ExtTimeOffsetSet\": [\n \"abc\"\n ],\n \"TimeOffsetSet\": [\n 0\n ],\n \"WatermarkSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Type\": \"abc\",\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"ImageTemplate\": {\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"RepeatType\": \"abc\"\n }\n },\n \"TextContent\": \"abc\",\n \"SvgContent\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"OutputObjectPath\": \"abc\",\n \"ObjectNumberFormat\": {\n \"InitialValue\": 1,\n \"Increment\": 1,\n \"MinLength\": 1,\n \"PlaceHolder\": \"abc\"\n }\n }\n ],\n \"SampleSnapshotTaskSet\": [\n {\n \"Definition\": 1,\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"WatermarkSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Type\": \"abc\",\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"ImageTemplate\": {\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"RepeatType\": \"abc\"\n }\n },\n \"TextContent\": \"abc\",\n \"SvgContent\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"OutputObjectPath\": \"abc\",\n \"ObjectNumberFormat\": {\n \"InitialValue\": 1,\n \"Increment\": 1,\n \"MinLength\": 1,\n \"PlaceHolder\": \"abc\"\n }\n }\n ],\n \"ImageSpriteTaskSet\": [\n {\n \"Definition\": 1,\n \"OutputObjectPath\": \"abc\",\n \"WebVttObjectName\": \"abc\"\n }\n ],\n \"AdaptiveDynamicStreamingTaskSet\": [\n {\n \"Definition\": 1,\n \"WatermarkSet\": [\n {\n \"Definition\": 1,\n \"RawParameter\": {\n \"Type\": \"abc\",\n \"CoordinateOrigin\": \"abc\",\n \"XPos\": \"abc\",\n \"YPos\": \"abc\",\n \"ImageTemplate\": {\n \"ImageContent\": {\n \"Type\": \"abc\",\n \"CosInputInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n },\n \"UrlInputInfo\": {\n \"Url\": \"abc\"\n },\n \"S3InputInfo\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3Object\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"Width\": \"abc\",\n \"Height\": \"abc\",\n \"RepeatType\": \"abc\"\n }\n },\n \"TextContent\": \"abc\",\n \"SvgContent\": \"abc\",\n \"StartTimeOffset\": 0,\n \"EndTimeOffset\": 0\n }\n ],\n \"OutputStorage\": {\n \"Type\": \"abc\",\n \"CosOutputStorage\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\"\n },\n \"S3OutputStorage\": {\n \"S3Bucket\": \"abc\",\n \"S3Region\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n }\n },\n \"OutputObjectPath\": \"abc\",\n \"SubStreamObjectName\": \"abc\",\n \"SegmentObjectName\": \"abc\",\n \"AddOnSubtitles\": [\n {\n \"Type\": \"abc\"\n }\n ],\n \"DrmInfo\": {\n \"Type\": \"abc\",\n \"SimpleAesDrm\": {\n \"Uri\": \"abc\",\n \"Key\": \"abc\",\n \"Vector\": \"abc\"\n }\n },\n \"DefinitionType\": \"abc\"\n }\n ]\n },\n \"AiContentReviewTask\": {\n \"Definition\": 1\n },\n \"AiAnalysisTask\": {\n \"Definition\": 1,\n \"ExtendedParameter\": \"abc\"\n },\n \"AiRecognitionTask\": {\n \"Definition\": 1\n },\n \"TaskNotifyConfig\": {\n \"NotifyType\": \"abc\",\n \"NotifyMode\": \"abc\",\n \"NotifyUrl\": \"abc\",\n \"CmqModel\": \"abc\",\n \"CmqRegion\": \"abc\",\n \"TopicName\": \"abc\",\n \"QueueName\": \"abc\",\n \"AwsSQS\": {\n \"SQSRegion\": \"abc\",\n \"SQSQueueName\": \"abc\",\n \"S3SecretId\": \"abc\",\n \"S3SecretKey\": \"abc\"\n },\n \"NotifyKey\": \"abc\"\n },\n \"TaskPriority\": 0,\n \"OutputDir\": \"abc\",\n \"CreateTime\": \"abc\",\n \"UpdateTime\": \"abc\"\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
668
706
|
"title": "查询特定工作流"
|
669
707
|
}
|
670
708
|
],
|
@@ -745,6 +745,58 @@ def doDescribeResources(args, parsed_globals):
|
|
745
745
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
746
|
|
747
747
|
|
748
|
+
def doDescribeJobRuntimeInfo(args, parsed_globals):
|
749
|
+
g_param = parse_global_arg(parsed_globals)
|
750
|
+
|
751
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
752
|
+
cred = credential.CVMRoleCredential()
|
753
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
754
|
+
cred = credential.STSAssumeRoleCredential(
|
755
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
756
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
757
|
+
)
|
758
|
+
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):
|
759
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
760
|
+
else:
|
761
|
+
cred = credential.Credential(
|
762
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
763
|
+
)
|
764
|
+
http_profile = HttpProfile(
|
765
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
766
|
+
reqMethod="POST",
|
767
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
768
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
769
|
+
)
|
770
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
771
|
+
if g_param[OptionsDefine.Language]:
|
772
|
+
profile.language = g_param[OptionsDefine.Language]
|
773
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
774
|
+
client = mod.OceanusClient(cred, g_param[OptionsDefine.Region], profile)
|
775
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
776
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
+
model = models.DescribeJobRuntimeInfoRequest()
|
778
|
+
model.from_json_string(json.dumps(args))
|
779
|
+
start_time = time.time()
|
780
|
+
while True:
|
781
|
+
rsp = client.DescribeJobRuntimeInfo(model)
|
782
|
+
result = rsp.to_json_string()
|
783
|
+
try:
|
784
|
+
json_obj = json.loads(result)
|
785
|
+
except TypeError as e:
|
786
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
787
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
788
|
+
break
|
789
|
+
cur_time = time.time()
|
790
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
791
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
792
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
793
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
794
|
+
else:
|
795
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
796
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
797
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
798
|
+
|
799
|
+
|
748
800
|
def doFetchSqlGatewayStatementResult(args, parsed_globals):
|
749
801
|
g_param = parse_global_arg(parsed_globals)
|
750
802
|
|
@@ -2018,6 +2070,7 @@ ACTION_MAP = {
|
|
2018
2070
|
"DescribeJobSavepoint": doDescribeJobSavepoint,
|
2019
2071
|
"DescribeJobSubmissionLog": doDescribeJobSubmissionLog,
|
2020
2072
|
"DescribeResources": doDescribeResources,
|
2073
|
+
"DescribeJobRuntimeInfo": doDescribeJobRuntimeInfo,
|
2021
2074
|
"FetchSqlGatewayStatementResult": doFetchSqlGatewayStatementResult,
|
2022
2075
|
"DescribeJobEvents": doDescribeJobEvents,
|
2023
2076
|
"DeleteWorkSpace": doDeleteWorkSpace,
|
@@ -133,6 +133,13 @@
|
|
133
133
|
"output": "DescribeJobEventsResponse",
|
134
134
|
"status": "online"
|
135
135
|
},
|
136
|
+
"DescribeJobRuntimeInfo": {
|
137
|
+
"document": "获取作业运行时的信息",
|
138
|
+
"input": "DescribeJobRuntimeInfoRequest",
|
139
|
+
"name": "获取作业运行时的信息",
|
140
|
+
"output": "DescribeJobRuntimeInfoResponse",
|
141
|
+
"status": "online"
|
142
|
+
},
|
136
143
|
"DescribeJobSavepoint": {
|
137
144
|
"document": "查找Savepoint列表",
|
138
145
|
"input": "DescribeJobSavepointRequest",
|
@@ -2947,6 +2954,61 @@
|
|
2947
2954
|
],
|
2948
2955
|
"type": "object"
|
2949
2956
|
},
|
2957
|
+
"DescribeJobRuntimeInfoRequest": {
|
2958
|
+
"document": "DescribeJobRuntimeInfo请求参数结构体",
|
2959
|
+
"members": [
|
2960
|
+
{
|
2961
|
+
"disabled": false,
|
2962
|
+
"document": "作业ID",
|
2963
|
+
"example": "cql-xxx",
|
2964
|
+
"member": "string",
|
2965
|
+
"name": "JobId",
|
2966
|
+
"required": true,
|
2967
|
+
"type": "string"
|
2968
|
+
},
|
2969
|
+
{
|
2970
|
+
"disabled": false,
|
2971
|
+
"document": "工作空间ID",
|
2972
|
+
"example": "space-xxx",
|
2973
|
+
"member": "string",
|
2974
|
+
"name": "WorkSpaceId",
|
2975
|
+
"required": true,
|
2976
|
+
"type": "string"
|
2977
|
+
},
|
2978
|
+
{
|
2979
|
+
"disabled": false,
|
2980
|
+
"document": "作业运行信息 key",
|
2981
|
+
"example": "[\"TaskManagers\",\"SubTasks\"]",
|
2982
|
+
"member": "string",
|
2983
|
+
"name": "IncludeInfo",
|
2984
|
+
"required": true,
|
2985
|
+
"type": "list"
|
2986
|
+
}
|
2987
|
+
],
|
2988
|
+
"type": "object"
|
2989
|
+
},
|
2990
|
+
"DescribeJobRuntimeInfoResponse": {
|
2991
|
+
"document": "DescribeJobRuntimeInfo返回参数结构体",
|
2992
|
+
"members": [
|
2993
|
+
{
|
2994
|
+
"disabled": false,
|
2995
|
+
"document": "作业运行时信息",
|
2996
|
+
"example": "无",
|
2997
|
+
"member": "JobRuntimeInfo",
|
2998
|
+
"name": "JobRuntimeInfo",
|
2999
|
+
"output_required": false,
|
3000
|
+
"type": "list",
|
3001
|
+
"value_allowed_null": false
|
3002
|
+
},
|
3003
|
+
{
|
3004
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
3005
|
+
"member": "string",
|
3006
|
+
"name": "RequestId",
|
3007
|
+
"type": "string"
|
3008
|
+
}
|
3009
|
+
],
|
3010
|
+
"type": "object"
|
3011
|
+
},
|
2950
3012
|
"DescribeJobSavepointRequest": {
|
2951
3013
|
"document": "DescribeJobSavepoint请求参数结构体",
|
2952
3014
|
"members": [
|
@@ -4958,6 +5020,32 @@
|
|
4958
5020
|
],
|
4959
5021
|
"usage": "out"
|
4960
5022
|
},
|
5023
|
+
"JobRuntimeInfo": {
|
5024
|
+
"document": "作业运行时信息",
|
5025
|
+
"members": [
|
5026
|
+
{
|
5027
|
+
"disabled": false,
|
5028
|
+
"document": "运行信息的key,目前支持:TaskManagers:taskmanager pod 列表; StreamGraph:作业对应的 StreamGraph;SubTasks:作业的 subtask 列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
5029
|
+
"example": "TaskManagers",
|
5030
|
+
"member": "string",
|
5031
|
+
"name": "Key",
|
5032
|
+
"output_required": false,
|
5033
|
+
"type": "string",
|
5034
|
+
"value_allowed_null": true
|
5035
|
+
},
|
5036
|
+
{
|
5037
|
+
"disabled": false,
|
5038
|
+
"document": "运行信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
5039
|
+
"example": "无",
|
5040
|
+
"member": "string",
|
5041
|
+
"name": "Value",
|
5042
|
+
"output_required": false,
|
5043
|
+
"type": "string",
|
5044
|
+
"value_allowed_null": true
|
5045
|
+
}
|
5046
|
+
],
|
5047
|
+
"usage": "out"
|
5048
|
+
},
|
4961
5049
|
"JobV1": {
|
4962
5050
|
"document": "Job详细信息",
|
4963
5051
|
"members": [
|
@@ -158,6 +158,14 @@
|
|
158
158
|
"title": "查询作业事件"
|
159
159
|
}
|
160
160
|
],
|
161
|
+
"DescribeJobRuntimeInfo": [
|
162
|
+
{
|
163
|
+
"document": "查询作业的taskmanger和subtask",
|
164
|
+
"input": "POST / HTTP/1.1\nHost: oceanus.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeJobRuntimeInfo\n<公共请求参数>\n\n{\n \"JobId\": \"cql-xxx\",\n \"WorkSpaceId\": \"space-xxx\",\n \"IncludeInfo\": [\n \"TaskManagers\",\n \"SubTasks\"\n ]\n}",
|
165
|
+
"output": "{\n \"Response\": {\n \"JobRuntimeInfo\": [\n {\n \"Key\": \"TaskManagers\",\n \"Value\": \"WyJjcWwtbDkzZzJ3eGotNDI0MS10YXNrbWFuYWdlci0xLTEiXQ==\"\n },\n {\n \"Key\": \"SubTasks\",\n \"Value\": \"W3siVGFza0lkIjoiY2JjMzU3Y2NiNzYzZGYyODUyZmVlOGM0ZmM3ZDU1ZjIiLCJUYXNrRGVzY3JpcHRpb24iOiJTb3VyY2U6IFRhYmxlU291cmNlU2Nhbih0YWJsZT1bW2RlZmF1bHRfY2F0YWxvZywgZGVmYXVsdF9kYXRhYmFzZSwgZGF0YWdlbl9zb3VyY2VfdGFibGVdXSwgZmllbGRzPVtpZCwgbmFtZV0pIC1cdTAwMjZndDsgU2luazogU2luayh0YWJsZT1bZGVmYXVsdF9jYXRhbG9nLmRlZmF1bHRfZGF0YWJhc2UubG9nZ2VyX3NpbmtfdGFibGVdLCBmaWVsZHM9W2lkLCBuYW1lXSlfMCIsIlN1YlRhc2tJbmRleCI6MH1d\"\n }\n ],\n \"RequestId\": \"51964833-6e61-4909-b93b-3d4996c9360d\"\n }\n}",
|
166
|
+
"title": "查询作业的taskmanger和subtask"
|
167
|
+
}
|
168
|
+
],
|
161
169
|
"DescribeJobSavepoint": [
|
162
170
|
{
|
163
171
|
"document": "",
|
@@ -3345,6 +3345,58 @@ def doUpgradeSmallVersion(args, parsed_globals):
|
|
3345
3345
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3346
3346
|
|
3347
3347
|
|
3348
|
+
def doModifyInstancePassword(args, parsed_globals):
|
3349
|
+
g_param = parse_global_arg(parsed_globals)
|
3350
|
+
|
3351
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3352
|
+
cred = credential.CVMRoleCredential()
|
3353
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3354
|
+
cred = credential.STSAssumeRoleCredential(
|
3355
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3356
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3357
|
+
)
|
3358
|
+
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):
|
3359
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3360
|
+
else:
|
3361
|
+
cred = credential.Credential(
|
3362
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3363
|
+
)
|
3364
|
+
http_profile = HttpProfile(
|
3365
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3366
|
+
reqMethod="POST",
|
3367
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3368
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3369
|
+
)
|
3370
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3371
|
+
if g_param[OptionsDefine.Language]:
|
3372
|
+
profile.language = g_param[OptionsDefine.Language]
|
3373
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3374
|
+
client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile)
|
3375
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3376
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3377
|
+
model = models.ModifyInstancePasswordRequest()
|
3378
|
+
model.from_json_string(json.dumps(args))
|
3379
|
+
start_time = time.time()
|
3380
|
+
while True:
|
3381
|
+
rsp = client.ModifyInstancePassword(model)
|
3382
|
+
result = rsp.to_json_string()
|
3383
|
+
try:
|
3384
|
+
json_obj = json.loads(result)
|
3385
|
+
except TypeError as e:
|
3386
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3387
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3388
|
+
break
|
3389
|
+
cur_time = time.time()
|
3390
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3391
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3392
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3393
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3394
|
+
else:
|
3395
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3396
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3397
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3398
|
+
|
3399
|
+
|
3348
3400
|
def doCreateReplicationGroup(args, parsed_globals):
|
3349
3401
|
g_param = parse_global_arg(parsed_globals)
|
3350
3402
|
|
@@ -5604,6 +5656,7 @@ ACTION_MAP = {
|
|
5604
5656
|
"ResetPassword": doResetPassword,
|
5605
5657
|
"RemoveReplicationInstance": doRemoveReplicationInstance,
|
5606
5658
|
"UpgradeSmallVersion": doUpgradeSmallVersion,
|
5659
|
+
"ModifyInstancePassword": doModifyInstancePassword,
|
5607
5660
|
"CreateReplicationGroup": doCreateReplicationGroup,
|
5608
5661
|
"DescribeInstanceMonitorSIP": doDescribeInstanceMonitorSIP,
|
5609
5662
|
"DescribeProjectSecurityGroup": doDescribeProjectSecurityGroup,
|