tccli 3.0.1216.1__py2.py3-none-any.whl → 3.0.1217.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/argparser.py +1 -1
- tccli/command.py +2 -2
- tccli/credentials.py +25 -0
- tccli/main.py +6 -2
- tccli/plugins/sso/__init__.py +61 -0
- tccli/plugins/sso/configs.py +4 -0
- tccli/plugins/sso/configure.py +45 -0
- tccli/plugins/sso/login.py +144 -0
- tccli/plugins/sso/logout.py +21 -0
- tccli/plugins/sso/terminal.py +161 -0
- tccli/plugins/sso/texts.py +40 -0
- tccli/services/__init__.py +6 -0
- tccli/services/acp/v20220105/api.json +7 -7
- tccli/services/acp/v20220105/examples.json +2 -2
- tccli/services/aiart/v20221229/api.json +29 -29
- tccli/services/aiart/v20221229/examples.json +8 -8
- tccli/services/apigateway/v20180808/api.json +18 -17
- tccli/services/apigateway/v20180808/examples.json +12 -12
- tccli/services/apm/v20210622/api.json +98 -4
- tccli/services/asr/v20190614/api.json +18 -17
- tccli/services/asr/v20190614/examples.json +13 -13
- tccli/services/autoscaling/v20180419/api.json +371 -309
- tccli/services/autoscaling/v20180419/examples.json +17 -17
- tccli/services/batch/v20170312/api.json +7 -7
- tccli/services/bda/v20200324/api.json +39 -31
- tccli/services/bda/v20200324/examples.json +9 -9
- tccli/services/bh/__init__.py +4 -0
- tccli/services/bh/bh_client.py +3428 -0
- tccli/services/bh/v20230418/api.json +8180 -0
- tccli/services/bh/v20230418/examples.json +519 -0
- tccli/services/bi/v20220105/api.json +48 -0
- tccli/services/billing/v20180709/api.json +26 -24
- tccli/services/bsca/v20210811/api.json +1 -1
- tccli/services/btoe/v20210514/api.json +4 -4
- tccli/services/btoe/v20210514/examples.json +2 -2
- tccli/services/ca/v20230228/api.json +60 -0
- tccli/services/cam/v20190116/api.json +11 -11
- tccli/services/cat/v20180409/api.json +9 -0
- tccli/services/cbs/v20170312/api.json +200 -188
- tccli/services/cbs/v20170312/examples.json +4 -4
- tccli/services/ccc/v20200210/api.json +390 -323
- tccli/services/ccc/v20200210/examples.json +15 -15
- tccli/services/cdb/cdb_client.py +13 -13
- tccli/services/cdb/v20170320/api.json +295 -270
- tccli/services/cdb/v20170320/examples.json +38 -38
- tccli/services/cdc/v20201214/api.json +283 -270
- tccli/services/cdc/v20201214/examples.json +26 -26
- tccli/services/cds/v20180420/api.json +82 -76
- tccli/services/cds/v20180420/examples.json +1 -1
- tccli/services/cdwch/v20200915/api.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +42 -2
- tccli/services/cdz/v20221123/api.json +41 -5
- tccli/services/cfg/v20210820/api.json +31 -0
- tccli/services/cfs/v20190719/api.json +89 -1
- tccli/services/cfs/v20190719/examples.json +1 -1
- tccli/services/cfw/cfw_client.py +0 -53
- tccli/services/cfw/v20190904/api.json +1849 -1999
- tccli/services/cfw/v20190904/examples.json +157 -159
- tccli/services/ckafka/v20190819/api.json +104 -75
- tccli/services/clb/v20180317/api.json +48 -26
- tccli/services/clb/v20180317/examples.json +1 -1
- tccli/services/cloudapp/v20220530/api.json +5 -1
- tccli/services/cloudaudit/v20190319/api.json +58 -44
- tccli/services/cloudaudit/v20190319/examples.json +6 -6
- tccli/services/cloudstudio/v20230508/api.json +38 -37
- tccli/services/cloudstudio/v20230508/examples.json +4 -4
- tccli/services/cls/cls_client.py +216 -4
- tccli/services/cls/v20201016/api.json +536 -47
- tccli/services/cls/v20201016/examples.json +34 -2
- tccli/services/csip/v20221121/api.json +2562 -2382
- tccli/services/csip/v20221121/examples.json +108 -108
- tccli/services/cvm/v20170312/api.json +149 -112
- tccli/services/cvm/v20170312/examples.json +2 -2
- tccli/services/cwp/cwp_client.py +4 -110
- tccli/services/cwp/v20180228/api.json +6338 -6146
- tccli/services/cwp/v20180228/examples.json +342 -370
- tccli/services/cynosdb/v20190107/api.json +93 -81
- tccli/services/cynosdb/v20190107/examples.json +70 -70
- tccli/services/dasb/v20191018/api.json +796 -651
- tccli/services/dasb/v20191018/examples.json +101 -101
- tccli/services/dcdb/dcdb_client.py +114 -61
- tccli/services/dcdb/v20180411/api.json +141 -7
- tccli/services/dcdb/v20180411/examples.json +32 -0
- tccli/services/dlc/v20210125/api.json +21 -11
- tccli/services/dnspod/dnspod_client.py +417 -46
- tccli/services/dnspod/v20210323/api.json +751 -30
- tccli/services/dnspod/v20210323/examples.json +62 -0
- tccli/services/dts/v20211206/api.json +4 -4
- tccli/services/ecm/v20190719/api.json +2 -2
- tccli/services/emr/v20190103/api.json +339 -114
- tccli/services/emr/v20190103/examples.json +64 -82
- tccli/services/es/v20180416/api.json +29 -0
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/ess/v20201111/api.json +49 -31
- tccli/services/ess/v20201111/examples.json +20 -8
- tccli/services/essbasic/v20210526/api.json +54 -49
- tccli/services/essbasic/v20210526/examples.json +36 -18
- tccli/services/facefusion/v20181201/api.json +47 -45
- tccli/services/facefusion/v20181201/examples.json +2 -2
- tccli/services/facefusion/v20220927/api.json +54 -48
- tccli/services/facefusion/v20220927/examples.json +5 -5
- tccli/services/faceid/v20180301/api.json +497 -496
- tccli/services/faceid/v20180301/examples.json +219 -101
- tccli/services/fmu/v20191213/api.json +59 -67
- tccli/services/fmu/v20191213/examples.json +22 -22
- tccli/services/ft/v20200304/api.json +53 -57
- tccli/services/ft/v20200304/examples.json +14 -14
- tccli/services/gme/v20180711/api.json +21 -11
- tccli/services/gme/v20180711/examples.json +1 -1
- tccli/services/hai/v20230812/api.json +116 -9
- tccli/services/hai/v20230812/examples.json +4 -4
- tccli/services/hunyuan/hunyuan_client.py +436 -12
- tccli/services/hunyuan/v20230901/api.json +1482 -118
- tccli/services/hunyuan/v20230901/examples.json +82 -18
- tccli/services/iai/v20180301/api.json +23 -19
- tccli/services/iai/v20180301/examples.json +2 -2
- tccli/services/iai/v20200303/api.json +530 -511
- tccli/services/iai/v20200303/examples.json +116 -86
- tccli/services/ig/__init__.py +4 -0
- tccli/services/ig/ig_client.py +195 -0
- tccli/services/ig/v20210518/api.json +83 -0
- tccli/services/ig/v20210518/examples.json +13 -0
- tccli/services/ioa/ioa_client.py +53 -0
- tccli/services/ioa/v20220601/api.json +662 -413
- tccli/services/ioa/v20220601/examples.json +24 -10
- tccli/services/iotexplorer/v20190423/api.json +33 -13
- tccli/services/iotexplorer/v20190423/examples.json +3 -3
- tccli/services/iotvideo/iotvideo_client.py +106 -0
- tccli/services/iotvideo/v20191126/api.json +256 -24
- tccli/services/iotvideo/v20191126/examples.json +19 -3
- tccli/services/iotvideo/v20201215/api.json +1 -1
- tccli/services/iotvideo/v20201215/examples.json +1 -1
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/iotvideo/v20211125/examples.json +2 -2
- tccli/services/iss/iss_client.py +69 -122
- tccli/services/iss/v20230517/api.json +10 -54
- tccli/services/iss/v20230517/examples.json +0 -14
- tccli/services/kms/v20190118/api.json +301 -268
- tccli/services/kms/v20190118/examples.json +45 -51
- tccli/services/lcic/lcic_client.py +159 -0
- tccli/services/lcic/v20220817/api.json +273 -1
- tccli/services/lcic/v20220817/examples.json +24 -0
- tccli/services/lighthouse/v20200324/api.json +56 -0
- tccli/services/live/live_client.py +159 -0
- tccli/services/live/v20180801/api.json +244 -0
- tccli/services/live/v20180801/examples.json +24 -0
- tccli/services/lke/v20231130/api.json +17 -17
- tccli/services/lke/v20231130/examples.json +19 -25
- tccli/services/mariadb/v20170312/api.json +7 -7
- tccli/services/market/v20191010/api.json +3 -3
- tccli/services/market/v20191010/examples.json +2 -2
- tccli/services/mmps/v20200710/api.json +47 -47
- tccli/services/mmps/v20200710/examples.json +3 -3
- tccli/services/mongodb/v20190725/api.json +4 -4
- tccli/services/monitor/v20180724/api.json +46 -19
- tccli/services/mps/v20190612/api.json +282 -5
- tccli/services/mps/v20190612/examples.json +25 -1
- tccli/services/mqtt/v20240516/api.json +2 -2
- tccli/services/mrs/v20200910/api.json +72 -34
- tccli/services/mrs/v20200910/examples.json +2 -2
- tccli/services/ms/v20180408/api.json +535 -506
- tccli/services/ms/v20180408/examples.json +25 -25
- tccli/services/oceanus/v20190422/api.json +130 -0
- tccli/services/ocr/ocr_client.py +232 -20
- tccli/services/ocr/v20181119/api.json +2265 -760
- tccli/services/ocr/v20181119/examples.json +200 -180
- tccli/services/omics/v20221128/api.json +614 -553
- tccli/services/omics/v20221128/examples.json +9 -9
- tccli/services/organization/v20210331/api.json +13 -4
- tccli/services/organization/v20210331/examples.json +2 -2
- tccli/services/partners/v20180321/api.json +244 -234
- tccli/services/partners/v20180321/examples.json +19 -19
- tccli/services/privatedns/privatedns_client.py +428 -4
- tccli/services/privatedns/v20201028/api.json +815 -11
- tccli/services/privatedns/v20201028/examples.json +64 -0
- tccli/services/pts/v20210728/api.json +18 -0
- tccli/services/pts/v20210728/examples.json +1 -1
- tccli/services/rce/rce_client.py +53 -0
- tccli/services/rce/v20201103/api.json +146 -0
- tccli/services/rce/v20201103/examples.json +8 -0
- tccli/services/redis/v20180412/api.json +42 -42
- tccli/services/redis/v20180412/examples.json +19 -19
- tccli/services/rum/v20210622/api.json +9 -0
- tccli/services/scf/v20180416/api.json +15 -15
- tccli/services/scf/v20180416/examples.json +1 -1
- tccli/services/smop/v20201203/api.json +46 -42
- tccli/services/smop/v20201203/examples.json +2 -2
- tccli/services/soe/v20180724/api.json +10 -10
- tccli/services/sqlserver/v20180328/api.json +21 -8
- tccli/services/sqlserver/v20180328/examples.json +5 -5
- tccli/services/ssl/v20191205/api.json +97 -4
- tccli/services/ssm/v20190923/api.json +292 -231
- tccli/services/ssm/v20190923/examples.json +42 -42
- tccli/services/tat/v20201028/api.json +97 -97
- tccli/services/tat/v20201028/examples.json +20 -26
- tccli/services/tchd/v20230306/api.json +5 -5
- tccli/services/tchd/v20230306/examples.json +3 -3
- tccli/services/tcr/v20190924/api.json +1 -1
- tccli/services/tcr/v20190924/examples.json +1 -1
- tccli/services/tcss/v20201101/api.json +1973 -1426
- tccli/services/tcss/v20201101/examples.json +346 -364
- tccli/services/tdmq/v20200217/api.json +539 -401
- tccli/services/tdmq/v20200217/examples.json +104 -104
- tccli/services/tds/v20220801/api.json +4 -4
- tccli/services/tem/v20210701/api.json +287 -271
- tccli/services/tem/v20210701/examples.json +59 -59
- tccli/services/teo/v20220901/api.json +37 -9
- tccli/services/teo/v20220901/examples.json +13 -7
- tccli/services/thpc/v20230321/api.json +5 -5
- tccli/services/tke/tke_client.py +217 -58
- tccli/services/tke/v20180525/api.json +36 -27
- tccli/services/tke/v20180525/examples.json +1 -1
- tccli/services/tke/v20220501/api.json +176 -0
- tccli/services/tke/v20220501/examples.json +24 -0
- tccli/services/tmt/v20180321/api.json +38 -8
- tccli/services/trp/v20210515/api.json +86 -74
- tccli/services/trp/v20210515/examples.json +65 -65
- tccli/services/trro/v20220325/api.json +72 -71
- tccli/services/trro/v20220325/examples.json +8 -8
- tccli/services/trtc/trtc_client.py +8 -61
- tccli/services/trtc/v20190722/api.json +72 -30
- tccli/services/trtc/v20190722/examples.json +3 -11
- tccli/services/tse/tse_client.py +110 -4
- tccli/services/tse/v20201207/api.json +122 -7
- tccli/services/tse/v20201207/examples.json +25 -9
- tccli/services/vclm/v20240523/api.json +225 -82
- tccli/services/vclm/v20240523/examples.json +13 -19
- tccli/services/vod/v20180717/api.json +431 -4
- tccli/services/vod/v20180717/examples.json +25 -5
- tccli/services/vod/v20240718/api.json +11 -11
- tccli/services/vod/v20240718/examples.json +4 -4
- tccli/services/vod/vod_client.py +53 -0
- tccli/services/vpc/v20170312/api.json +1090 -862
- tccli/services/vpc/v20170312/examples.json +74 -66
- tccli/services/vpc/vpc_client.py +61 -8
- tccli/services/waf/v20180125/api.json +2540 -2177
- tccli/services/waf/v20180125/examples.json +216 -284
- tccli/services/waf/waf_client.py +172 -119
- tccli/services/wav/v20210129/api.json +48 -48
- tccli/services/wav/v20210129/examples.json +4 -4
- tccli/services/wedata/v20210820/api.json +909 -25
- tccli/services/wedata/v20210820/examples.json +28 -4
- tccli/services/wedata/wedata_client.py +159 -0
- tccli/services/weilingwith/v20230427/api.json +6 -6
- tccli/services/weilingwith/v20230427/examples.json +3 -3
- tccli/sso.py +229 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/RECORD +252 -235
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/license_files/LICENSE +0 -0
@@ -132,7 +132,7 @@
|
|
132
132
|
{
|
133
133
|
"document": "获取应用列表",
|
134
134
|
"input": "POST / HTTP/1.1\nHost: weilingwith.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeApplicationList\n<公共请求参数>\n\n{\n \"WorkspaceId\": 1016,\n \"PageNumber\": 1,\n \"PageSize\": 3,\n \"ApplicationToken\": \"XggJvayJyusfUwuoJ2OlT4Z2YAVq6bVo\"\n}",
|
135
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"2ebee73c-8477-48c0-ad4d-8a748b7842a3\",\n \"Result\": {\n \"ApplicationInfoList\": [\n {\n \"Address\": \"http://checkproject-a6f6718d.dtwin.tencent.com/testcodingpush\",\n \"ApplicationId\": \"10041\",\n \"ApplicationLogo\": {\n \"FileId\": \"359cc1b5-88c1-4dd6-8ff4-21d0b36ac7e2\",\n \"Url\": \"https://wetwin-manager-1258344699.cos.ap-guangzhou.myqcloud.com/%2F100055/0/20230717/359cc1b5-88c1-4dd6-8ff4-21d0b36ac7e2/%E8%B5%84%E4%BA%A7%E7%AE%A1%E7%90%86-%E9%BB%91.png?q-sign-algorithm=sha1&q-ak
|
135
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"2ebee73c-8477-48c0-ad4d-8a748b7842a3\",\n \"Result\": {\n \"ApplicationInfoList\": [\n {\n \"Address\": \"http://checkproject-a6f6718d.dtwin.tencent.com/testcodingpush\",\n \"ApplicationId\": \"10041\",\n \"ApplicationLogo\": {\n \"FileId\": \"359cc1b5-88c1-4dd6-8ff4-21d0b36ac7e2\",\n \"Url\": \"https://wetwin-manager-1258344699.cos.ap-guangzhou.myqcloud.com/%2F100055/0/20230717/359cc1b5-88c1-4dd6-8ff4-21d0b36ac7e2/%E8%B5%84%E4%BA%A7%E7%AE%A1%E7%90%86-%E9%BB%91.png?q-sign-algorithm=sha1&q-ak=******&q-sign-time=1693452005%3B1693453205&q-key-time=1693452005%3B1693453205&q-header-list=host&q-url-param-list=&q-signature=6bf531d1b08d6f75eb7e153c24746a61d7be37d0\"\n },\n \"Description\": \"12345611111\",\n \"EnglishName\": \"zctest1111\",\n \"Name\": \"智能资产管理\",\n \"Type\": 0\n },\n {\n \"Address\": \"http://t-ws.twins.tencent.com/proxy/29098b25-447d-437e-987a-d493d55e84f5/weiling-pubsub/test\",\n \"ApplicationId\": \"10048\",\n \"ApplicationLogo\": {\n \"FileId\": \"\",\n \"Url\": \"\"\n },\n \"Description\": \"\",\n \"EnglishName\": \"MsgCenter\",\n \"Name\": \"消息服务\",\n \"Type\": 0\n },\n {\n \"Address\": \"http://t.twins.tencent.com/\",\n \"ApplicationId\": \"10051\",\n \"ApplicationLogo\": {\n \"FileId\": \"\",\n \"Url\": \"\"\n },\n \"Description\": \"\",\n \"EnglishName\": \"IOT\",\n \"Name\": \"孪生中台(物联感知中心)\",\n \"Type\": 0\n }\n ],\n \"TotalCount\": \"171\"\n }\n }\n}",
|
136
136
|
"title": "应用列表"
|
137
137
|
}
|
138
138
|
],
|
@@ -154,13 +154,13 @@
|
|
154
154
|
{
|
155
155
|
"document": "查询建筑模型成功响应示例",
|
156
156
|
"input": "POST / HTTP/1.1\nHost: weilingwith.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBuildingModel\n<公共请求参数>\n\n{\n \"BuildingId\": \"82d5fb5a-52d0-4636-a225-d46245e911ef\",\n \"WorkspaceId\": \"1016\",\n \"ApplicationToken\": \"ZRCJHdnhqEUEqO1vyskCgWimPucHhREV\"\n}",
|
157
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"8f193fa9-506a-421d-afe9-fdde94cc5849\",\n \"Result\": {\n \"Models\": [\n {\n \"ElementId\": \"82d5fb5a-52d0-4636-a225-d46245e911ef\",\n \"ElementName\": \"验证专用\",\n \"ModelType\": \"MODEL_ORIGIN\",\n \"ModelUrl\": \"https://bim-1301743406.cos.ap-guangzhou.myqcloud.com/100055/1016/cb6bad63-0855-4dc2-8908-20518627479b.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%
|
157
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"8f193fa9-506a-421d-afe9-fdde94cc5849\",\n \"Result\": {\n \"Models\": [\n {\n \"ElementId\": \"82d5fb5a-52d0-4636-a225-d46245e911ef\",\n \"ElementName\": \"验证专用\",\n \"ModelType\": \"MODEL_ORIGIN\",\n \"ModelUrl\": \"https://bim-1301743406.cos.ap-guangzhou.myqcloud.com/100055/1016/cb6bad63-0855-4dc2-8908-20518627479b.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1692758001%3B1787366001%26q-key-time%3D1692758001%3B1787366001%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3Ddbac70b180e5a2d8c343506dae755a01669ffb04\"\n },\n {\n \"ElementId\": \"82d5fb5a-52d0-4636-a225-d46245e911ef\",\n \"ElementName\": \"验证专用-外壳\",\n \"ModelType\": \"MODEL_HULL\",\n \"ModelUrl\": \"https://bim-1301743406.cos.ap-guangzhou.myqcloud.com/100055/1016/ff847c36-89f8-4644-9c1f-d265bd5d5167.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1692758001%3B1787366001%26q-key-time%3D1692758001%3B1787366001%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D7af0ab15cab83314e44026fedc0927467d07b776\"\n },\n {\n \"ElementId\": \"0b00f88f-36f1-4ae3-a7b4-5db12332c005\",\n \"ElementName\": \"-1F\",\n \"ModelType\": \"MODEL_STOREY\",\n \"ModelUrl\": \"https://bim-1301743406.cos.ap-guangzhou.myqcloud.com/100055/1016/2ee86ae4-41a1-4c45-840b-4e9eae1b83a1.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1692758001%3B1787366001%26q-key-time%3D1692758001%3B1787366001%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3De9b58a5293201d24c19e2bc28b49404035b569c1\"\n },\n {\n \"ElementId\": \"61049c1b-158d-41bd-9f0b-df30a50401bd\",\n \"ElementName\": \"RF\",\n \"ModelType\": \"MODEL_STOREY\",\n \"ModelUrl\": \"https://bim-1301743406.cos.ap-guangzhou.myqcloud.com/100055/1016/c96a40b9-f5b6-4523-b58d-15c79f4a4d3b.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1692758001%3B1787366001%26q-key-time%3D1692758001%3B1787366001%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D1dfc789fc1770b898e4ffcca61a234449f2c8ff3\"\n },\n {\n \"ElementId\": \"5880efdd-829e-4e3b-a3e2-9e5be4818747\",\n \"ElementName\": \"-2F\",\n \"ModelType\": \"MODEL_STOREY\",\n \"ModelUrl\": \"https://bim-1301743406.cos.ap-guangzhou.myqcloud.com/100055/1016/f7afb966-8df5-416c-9e93-22e323cceca6.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1692758001%3B1787366001%26q-key-time%3D1692758001%3B1787366001%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D12cfa0a9344a3064cdd0a3e75d81a160b44085ce\"\n },\n {\n \"ElementId\": \"d0f4a172-6d8b-4993-b7f3-dec2fe8f0a57\",\n \"ElementName\": \"1F\",\n \"ModelType\": \"MODEL_STOREY\",\n \"ModelUrl\": \"https://bim-1301743406.cos.ap-guangzhou.myqcloud.com/100055/1016/d4f94196-63cc-4075-885b-b73853653d78.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1692758001%3B1787366001%26q-key-time%3D1692758001%3B1787366001%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3De901cf3e32c4efe7344924a9c9f5a69b681d8e45\"\n }\n ]\n }\n }\n}",
|
158
158
|
"title": "查询建筑模型"
|
159
159
|
},
|
160
160
|
{
|
161
161
|
"document": "查询建筑模型示例-prod",
|
162
162
|
"input": "POST / HTTP/1.1\nHost: weilingwith.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBuildingModel\n<公共请求参数>\n\n{\n \"BuildingId\": \"9e98dc3920df4230b431404222fefe37\",\n \"WorkspaceId\": \"1124\",\n \"ApplicationToken\": \"Sl5ZDmVuHzhN52o8n1KWagl7sLdrLfN7\"\n}",
|
163
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"02cc707e-e6bf-4b5d-a1c3-0544eadfc3fa\",\n \"Result\": {\n \"Models\": [\n {\n \"ElementId\": \"9e98dc3920df4230b431404222fefe37\",\n \"ElementName\": \"rvm\",\n \"ModelType\": \"MODEL_ORIGIN\",\n \"ModelUrl\": \"https://bim-1317915939.cos.ap-guangzhou.myqcloud.com/100001/1124/070b7a50-90ec-4cdb-bd16-ce5073878bc9.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%
|
163
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"02cc707e-e6bf-4b5d-a1c3-0544eadfc3fa\",\n \"Result\": {\n \"Models\": [\n {\n \"ElementId\": \"9e98dc3920df4230b431404222fefe37\",\n \"ElementName\": \"rvm\",\n \"ModelType\": \"MODEL_ORIGIN\",\n \"ModelUrl\": \"https://bim-1317915939.cos.ap-guangzhou.myqcloud.com/100001/1124/070b7a50-90ec-4cdb-bd16-ce5073878bc9.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1693827299%3B1694345699%26q-key-time%3D1693827299%3B1694345699%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3Daa7fea7e00ec0c07ccee5f350fa7e881cfd78035\"\n },\n {\n \"ElementId\": \"9e98dc3920df4230b431404222fefe37\",\n \"ElementName\": \"rvm-外壳\",\n \"ModelType\": \"MODEL_HULL\",\n \"ModelUrl\": \"https://bim-1317915939.cos.ap-guangzhou.myqcloud.com/100001/1124/dbdb4717-6629-4a7e-85a7-b720eae82cdd.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1693827299%3B1694345699%26q-key-time%3D1693827299%3B1694345699%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D9ba5a3ed7b71a008fb0e11b194f4c1948bc9c9e9\"\n },\n {\n \"ElementId\": \"679279f4adaa431daf04bab2ea30ad28\",\n \"ElementName\": \"/STABILIZER\",\n \"ModelType\": \"MODEL_STOREY\",\n \"ModelUrl\": \"https://bim-1317915939.cos.ap-guangzhou.myqcloud.com/100001/1124/d0c77567-597e-48fd-9afb-7afddb5d1786.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1693827299%3B1694345699%26q-key-time%3D1693827299%3B1694345699%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3Ddf00cf2e40bd39a3d26ce10e19f910d6e425c16f\"\n },\n {\n \"ElementId\": \"4cf3865c355048d0be117466b89ff5ae\",\n \"ElementName\": \"/SAMPLE-ADMIN\",\n \"ModelType\": \"MODEL_STOREY\",\n \"ModelUrl\": \"https://bim-1317915939.cos.ap-guangzhou.myqcloud.com/100001/1124/b04791d4-f6ad-43f5-a36d-74eba01b2090.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1693827299%3B1694345699%26q-key-time%3D1693827299%3B1694345699%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D8f62e68d47eabbfe029af1d736815aa248691cf2\"\n },\n {\n \"ElementId\": \"42ac80b2834442f89c9c73e723986012\",\n \"ElementName\": \"/PSI-SAMPLE\",\n \"ModelType\": \"MODEL_STOREY\",\n \"ModelUrl\": \"https://bim-1317915939.cos.ap-guangzhou.myqcloud.com/100001/1124/12816356-f38e-4252-a8d0-6222df7d9421.glb?sign=q-sign-algorithm%3Dsha1%26q-ak%3D******%26q-sign-time%3D1693827299%3B1694345699%26q-key-time%3D1693827299%3B1694345699%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D39f7013ce9d5e7d2d36532e2b54ab4edfbc605ff\"\n }\n ]\n }\n }\n}",
|
164
164
|
"title": "查询建筑模型示例-prod"
|
165
165
|
}
|
166
166
|
],
|
tccli/sso.py
ADDED
@@ -0,0 +1,229 @@
|
|
1
|
+
import json
|
2
|
+
import os
|
3
|
+
import time
|
4
|
+
import uuid
|
5
|
+
|
6
|
+
import requests
|
7
|
+
|
8
|
+
_API_ENDPOINT = "https://cli.cloud.tencent.com"
|
9
|
+
_CRED_REFRESH_SAFE_DUR = 60 * 5
|
10
|
+
_SKEY_REFRESH_SAFE_DUR = 3600 * 12 - 300
|
11
|
+
|
12
|
+
|
13
|
+
def maybe_refresh_credential(profile):
|
14
|
+
cred_path = cred_path_of_profile(profile)
|
15
|
+
try:
|
16
|
+
with open(cred_path, "r") as cred_file:
|
17
|
+
cred = json.load(cred_file)
|
18
|
+
except IOError:
|
19
|
+
# file not found, don't check
|
20
|
+
return
|
21
|
+
|
22
|
+
if cred.get("type") != "sso":
|
23
|
+
return
|
24
|
+
|
25
|
+
try:
|
26
|
+
now = time.time()
|
27
|
+
|
28
|
+
expires_at = cred["expiresAt"]
|
29
|
+
if expires_at - now > _CRED_REFRESH_SAFE_DUR:
|
30
|
+
return
|
31
|
+
|
32
|
+
sso_info = cred["sso"]
|
33
|
+
site = sso_info["site"]
|
34
|
+
sso_expires = sso_info["expiresAt"]
|
35
|
+
if sso_expires - now < _SKEY_REFRESH_SAFE_DUR:
|
36
|
+
# sso can't be refreshed if expired, re-login is required
|
37
|
+
return
|
38
|
+
|
39
|
+
saml_resp = gen_saml_response(
|
40
|
+
sso_info["token"], "RoleSAML", sso_info["uin"], "", sso_info["roleConfigurationId"],
|
41
|
+
sso_info["site"]
|
42
|
+
)
|
43
|
+
|
44
|
+
role_arn = "qcs::cam::uin/%s:roleName/TencentCloudSSO-%s" % (sso_info["uin"], sso_info["roleConfigurationName"])
|
45
|
+
principal_arn = "qcs::cam::uin/%s:saml-provider/TencentReservedSSO-%s" % (sso_info["uin"], sso_info["zoneId"])
|
46
|
+
cred = assume_role_with_saml(
|
47
|
+
saml_resp["SAMLResponse"], principal_arn, role_arn, "ses-%s" % uuid.uuid4(), 7200, site)
|
48
|
+
save_credential(cred, sso_info, profile)
|
49
|
+
|
50
|
+
except KeyError as e:
|
51
|
+
print("failed to refresh credential, your credential file(%s) is corrupted, %s" % (cred_path, e))
|
52
|
+
|
53
|
+
except Exception as e:
|
54
|
+
print("failed to refresh credential, %s" % e)
|
55
|
+
|
56
|
+
|
57
|
+
def verify_login_skey(token, site):
|
58
|
+
api_endpoint = _API_ENDPOINT + "/api/org/verify_login_skey"
|
59
|
+
|
60
|
+
body = {
|
61
|
+
"TraceId": str(uuid.uuid4()),
|
62
|
+
"Site": site,
|
63
|
+
"LoginSkey": token,
|
64
|
+
}
|
65
|
+
http_response = requests.post(api_endpoint, json=body)
|
66
|
+
try:
|
67
|
+
resp = http_response.json()
|
68
|
+
if "Error" in resp:
|
69
|
+
raise ValueError(http_response.content)
|
70
|
+
return resp
|
71
|
+
except Exception:
|
72
|
+
print(http_response.content)
|
73
|
+
raise
|
74
|
+
|
75
|
+
|
76
|
+
def list_accounts_for_access_assignment(token, site):
|
77
|
+
api_endpoint = _API_ENDPOINT + "/api/org/list_accounts_for_access_assignment"
|
78
|
+
page_num = 1
|
79
|
+
page_size = 20
|
80
|
+
|
81
|
+
accounts = []
|
82
|
+
while True:
|
83
|
+
body = {
|
84
|
+
"TraceId": str(uuid.uuid4()),
|
85
|
+
"Site": site,
|
86
|
+
"LoginToken": token,
|
87
|
+
"PageNum": page_num,
|
88
|
+
"PageSize": page_size,
|
89
|
+
}
|
90
|
+
http_response = requests.post(api_endpoint, json=body)
|
91
|
+
resp = http_response.json()
|
92
|
+
if "Error" in resp:
|
93
|
+
raise ValueError(http_response.content)
|
94
|
+
|
95
|
+
try:
|
96
|
+
accounts.extend(resp.get("Accounts", []))
|
97
|
+
if resp["TotalCounts"] <= len(accounts):
|
98
|
+
break
|
99
|
+
|
100
|
+
page_num += 1
|
101
|
+
except Exception:
|
102
|
+
print(http_response.content)
|
103
|
+
raise
|
104
|
+
|
105
|
+
return accounts
|
106
|
+
|
107
|
+
|
108
|
+
def list_role_configurations_for_account(uin, token, site):
|
109
|
+
api_endpoint = _API_ENDPOINT + "/api/org/list_role_configurations_for_account"
|
110
|
+
page_size = 20
|
111
|
+
|
112
|
+
configs = []
|
113
|
+
next_token = ""
|
114
|
+
while True:
|
115
|
+
body = {
|
116
|
+
"TraceId": str(uuid.uuid4()),
|
117
|
+
"Site": site,
|
118
|
+
"TargetUin": uin,
|
119
|
+
"LoginToken": token,
|
120
|
+
"MaxResults": page_size,
|
121
|
+
"NextToken": next_token,
|
122
|
+
}
|
123
|
+
http_response = requests.post(api_endpoint, json=body)
|
124
|
+
try:
|
125
|
+
resp = http_response.json()
|
126
|
+
|
127
|
+
if "Error" in resp:
|
128
|
+
raise ValueError(http_response.content)
|
129
|
+
|
130
|
+
configs.extend(resp.get("RoleConfigurationsForAccount", []))
|
131
|
+
if not resp["IsTruncated"]:
|
132
|
+
break
|
133
|
+
|
134
|
+
next_token = resp["NextToken"]
|
135
|
+
except Exception:
|
136
|
+
print(http_response.content)
|
137
|
+
raise
|
138
|
+
|
139
|
+
return configs
|
140
|
+
|
141
|
+
|
142
|
+
def gen_saml_response(token, login_type, uin, user_id, conf_id, site):
|
143
|
+
api_endpoint = _API_ENDPOINT + "/api/org/gen_saml_response"
|
144
|
+
|
145
|
+
body = {
|
146
|
+
"TraceId": str(uuid.uuid4()),
|
147
|
+
"Site": site,
|
148
|
+
"LoginToken": token,
|
149
|
+
"LoginType": login_type,
|
150
|
+
"TargetUin": uin,
|
151
|
+
"UserId": user_id,
|
152
|
+
"RoleConfigurationId": conf_id,
|
153
|
+
}
|
154
|
+
http_response = requests.post(api_endpoint, json=body)
|
155
|
+
try:
|
156
|
+
resp = http_response.json()
|
157
|
+
if "Error" in resp:
|
158
|
+
raise ValueError(http_response.content)
|
159
|
+
|
160
|
+
return resp
|
161
|
+
except Exception:
|
162
|
+
print(http_response.content)
|
163
|
+
raise
|
164
|
+
|
165
|
+
|
166
|
+
def assume_role_with_saml(saml_assertion, principal_arn, role_arn, role_ses_name, dur, site):
|
167
|
+
api_endpoint = _API_ENDPOINT + "/api/sts/assume_role_with_saml"
|
168
|
+
|
169
|
+
body = {
|
170
|
+
"TraceId": str(uuid.uuid4()),
|
171
|
+
"Site": site,
|
172
|
+
"SAMLAssertion": saml_assertion,
|
173
|
+
"PrincipalArn": principal_arn,
|
174
|
+
"RoleArn": role_arn,
|
175
|
+
"RoleSessionName": role_ses_name,
|
176
|
+
"DurationSeconds": dur,
|
177
|
+
}
|
178
|
+
http_response = requests.post(api_endpoint, json=body)
|
179
|
+
try:
|
180
|
+
resp = http_response.json()
|
181
|
+
if "Error" in resp:
|
182
|
+
raise ValueError(http_response.content)
|
183
|
+
return resp
|
184
|
+
except Exception:
|
185
|
+
print(http_response.content)
|
186
|
+
raise
|
187
|
+
|
188
|
+
|
189
|
+
def save_credential(cred, sso_info, profile):
|
190
|
+
cred_path = cred_path_of_profile(profile)
|
191
|
+
|
192
|
+
cred = {
|
193
|
+
"type": "sso",
|
194
|
+
"secretId": cred["Credentials"]["TmpSecretId"],
|
195
|
+
"secretKey": cred["Credentials"]["TmpSecretKey"],
|
196
|
+
"token": cred["Credentials"]["Token"],
|
197
|
+
"expiresAt": cred["ExpiredTime"],
|
198
|
+
"sso": {
|
199
|
+
"token": sso_info["token"],
|
200
|
+
"uin": sso_info["uin"],
|
201
|
+
"roleConfigurationId": sso_info["roleConfigurationId"],
|
202
|
+
"roleConfigurationName": sso_info["roleConfigurationName"],
|
203
|
+
"zoneId": sso_info["zoneId"],
|
204
|
+
"site": sso_info["site"],
|
205
|
+
"authUrl": sso_info["authUrl"],
|
206
|
+
"expiresAt": sso_info["expiresAt"],
|
207
|
+
},
|
208
|
+
}
|
209
|
+
with open(cred_path, "w") as cred_file:
|
210
|
+
json.dump(cred, cred_file, indent=4)
|
211
|
+
|
212
|
+
|
213
|
+
def cred_path_of_profile(profile):
|
214
|
+
return os.path.join(os.path.expanduser("~"), ".tccli", profile + ".credential")
|
215
|
+
|
216
|
+
|
217
|
+
def check_login_state(state):
|
218
|
+
api_endpoint = _API_ENDPOINT + "/api/sso/check_login_state"
|
219
|
+
|
220
|
+
body = {
|
221
|
+
"TraceId": str(uuid.uuid4()),
|
222
|
+
"State": state,
|
223
|
+
}
|
224
|
+
http_response = requests.post(api_endpoint, json=body)
|
225
|
+
try:
|
226
|
+
return http_response.json()
|
227
|
+
except Exception:
|
228
|
+
print(http_response.content)
|
229
|
+
raise
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tccli
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.1217.1
|
4
4
|
Summary: Universal Command Line Environment for Tencent Cloud
|
5
5
|
Project-URL: Bug Tracker, https://github.com/TencentCloud/tencentcloud-cli/issues
|
6
6
|
Project-URL: Homepage, https://github.com/TencentCloud/tencentcloud-cli
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
14
14
|
Requires-Dist: jmespath==0.10.0
|
15
15
|
Requires-Dist: six==1.16.0
|
16
|
-
Requires-Dist: tencentcloud-sdk-python>=3.0.
|
16
|
+
Requires-Dist: tencentcloud-sdk-python>=3.0.1217
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
|
19
19
|
# 命令行工具简介
|