tccli 3.0.1242.1__py2.py3-none-any.whl → 3.0.1244.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/aca/v20210323/api.json +107 -107
- tccli/services/aca/v20210323/examples.json +5 -5
- tccli/services/asr/v20190614/examples.json +6 -6
- tccli/services/cbs/v20170312/api.json +9 -0
- tccli/services/cdwdoris/v20211228/api.json +22 -2
- tccli/services/cdwdoris/v20211228/examples.json +1 -1
- tccli/services/cfs/v20190719/examples.json +2 -2
- tccli/services/ckafka/v20190819/api.json +11 -0
- tccli/services/clb/v20180317/api.json +23 -18
- tccli/services/clb/v20180317/examples.json +14 -14
- tccli/services/cls/v20201016/api.json +185 -156
- tccli/services/cls/v20201016/examples.json +5 -5
- tccli/services/cvm/v20170312/api.json +8 -8
- tccli/services/cvm/v20170312/examples.json +4 -4
- tccli/services/cwp/v20180228/api.json +1 -1
- tccli/services/cwp/v20180228/examples.json +1 -1
- tccli/services/dts/v20211206/api.json +9 -0
- tccli/services/dts/v20211206/examples.json +1 -1
- tccli/services/ecm/v20190719/api.json +11 -11
- tccli/services/ecm/v20190719/examples.json +1 -1
- tccli/services/emr/v20190103/api.json +896 -841
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/gaap/v20180529/api.json +3 -5
- tccli/services/gwlb/v20240906/api.json +14 -14
- tccli/services/hunyuan/v20230901/api.json +1 -1
- tccli/services/iotexplorer/v20190423/api.json +1 -1
- tccli/services/iotvideoindustry/v20201201/api.json +162 -110
- tccli/services/iotvideoindustry/v20201201/examples.json +3 -3
- tccli/services/mna/v20210119/api.json +80 -82
- tccli/services/mna/v20210119/examples.json +21 -21
- tccli/services/ocr/ocr_client.py +38 -91
- tccli/services/ocr/v20181119/api.json +12 -190
- tccli/services/ocr/v20181119/examples.json +2 -10
- tccli/services/pts/v20210728/api.json +36 -33
- tccli/services/pts/v20210728/examples.json +12 -12
- tccli/services/scf/scf_client.py +118 -65
- tccli/services/scf/v20180416/api.json +570 -475
- tccli/services/scf/v20180416/examples.json +52 -44
- tccli/services/sqlserver/v20180328/api.json +30 -1
- tccli/services/tcb/v20180608/api.json +72 -63
- tccli/services/tcb/v20180608/examples.json +1 -1
- tccli/services/tcm/v20210413/api.json +45 -47
- tccli/services/tcr/v20190924/api.json +399 -371
- tccli/services/tcr/v20190924/examples.json +32 -32
- tccli/services/thpc/v20211109/api.json +30 -44
- tccli/services/thpc/v20220401/api.json +30 -44
- tccli/services/thpc/v20230321/api.json +54 -54
- tccli/services/tke/v20180525/api.json +691 -591
- tccli/services/tke/v20180525/examples.json +130 -130
- tccli/services/tke/v20220501/api.json +15 -15
- tccli/services/vpc/v20170312/api.json +178 -150
- tccli/services/vpc/v20170312/examples.json +24 -24
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/RECORD +59 -59
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1242.1.dist-info → tccli-3.0.1244.1.dist-info}/license_files/LICENSE +0 -0
@@ -75,8 +75,8 @@
|
|
75
75
|
"CreateScenario": [
|
76
76
|
{
|
77
77
|
"document": "创建场景",
|
78
|
-
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateScenario\n<公共请求参数>\n\n{\n \"Load\": {\n \"
|
79
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
78
|
+
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateScenario\n<公共请求参数>\n\n{\n \"Load\": {\n \"GeoRegionsLoadDistribution\": [\n {\n \"Region\": \"ap-guangzhou\",\n \"RegionId\": 1,\n \"Percentage\": 30\n },\n {\n \"Region\": \"ap-shanghai\",\n \"RegionId\": 5,\n \"Percentage\": 70\n }\n ],\n \"LoadSpec\": {\n \"Concurrency\": {\n \"Stages\": [\n {\n \"DurationSeconds\": 60,\n \"TargetVirtualUsers\": 1000\n }\n ]\n }\n }\n },\n \"Name\": \"name\",\n \"ProjectId\": \"project-1a2b3c4d\",\n \"Type\": \"pts-js\"\n}",
|
79
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"abc-123-xyz\",\n \"ScenarioId\": \"scenario-1a2b3c4d\"\n }\n}",
|
80
80
|
"title": "创建场景"
|
81
81
|
}
|
82
82
|
],
|
@@ -163,8 +163,8 @@
|
|
163
163
|
"DescribeCheckSummary": [
|
164
164
|
{
|
165
165
|
"document": "",
|
166
|
-
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCheckSummary\n<公共请求参数>\n\n{\n \"ProjectId\": \"
|
167
|
-
"output": "{\n \"Response\": {\n \"CheckSummarySet\": [\n {\n \"Name\": \"400\",\n \"Step\": \"sample\",\n \"SuccessCount\": 0,\n \"FailCount\": 92343,\n \"ErrorRate\": 1\n },\n {\n \"Name\": \"status 200\",\n \"Step\": \"sample\",\n \"SuccessCount\": 831084,\n \"FailCount\": 0,\n \"ErrorRate\": 0\n }\n ],\n \"RequestId\": \"
|
166
|
+
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCheckSummary\n<公共请求参数>\n\n{\n \"ProjectId\": \"project-1a2b3c4d\",\n \"ScenarioId\": \"scenario-1a2b3c4d\",\n \"JobId\": \"job-1a2b3c4d\"\n}",
|
167
|
+
"output": "{\n \"Response\": {\n \"CheckSummarySet\": [\n {\n \"Name\": \"400\",\n \"Step\": \"sample\",\n \"SuccessCount\": 0,\n \"FailCount\": 92343,\n \"ErrorRate\": 1\n },\n {\n \"Name\": \"status 200\",\n \"Step\": \"sample\",\n \"SuccessCount\": 831084,\n \"FailCount\": 0,\n \"ErrorRate\": 0\n }\n ],\n \"RequestId\": \"abc-123-xyz\"\n }\n}",
|
168
168
|
"title": "查询检查点汇总信息"
|
169
169
|
}
|
170
170
|
],
|
@@ -172,7 +172,7 @@
|
|
172
172
|
{
|
173
173
|
"document": "列出定时任务,数组为空默认全选",
|
174
174
|
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCronJobs\n<公共请求参数>\n\n{\n \"ProjectIds\": [\n \"project-xx\"\n ],\n \"CronJobIds\": [\n \"cron-xx\"\n ],\n \"OrderBy\": \"Status\",\n \"Limit\": 10,\n \"Ascend\": true\n}",
|
175
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
175
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"abc-123-xyz\",\n \"CronJobSet\": [\n {\n \"AppId\": 1258300000,\n \"Uin\": \"438100000\",\n \"SubAccountUin\": \"100026600000\",\n \"CreatedAt\": \"2021-09-27T10:46:26+08:00\",\n \"UpdatedAt\": \"2021-09-27T10:46:26+08:00\",\n \"CronJobId\": \"cron-pybdiltm\",\n \"Name\": \"name\",\n \"ProjectId\": \"project-1a2b3c4d\",\n \"ScenarioId\": \"scenario-1a2b3c4d\",\n \"ScenarioName\": \"name\",\n \"CronExpression\": \"6 16 * * 1,2,3,4,5,6,7\",\n \"FrequencyType\": 3,\n \"EndTime\": null,\n \"AbortReason\": 0,\n \"Status\": 3,\n \"NoticeId\": \"\",\n \"Note\": \"\",\n \"JobOwner\": \"owner\"\n }\n ],\n \"Total\": 1\n }\n}",
|
176
176
|
"title": "DescribeCronJobs"
|
177
177
|
}
|
178
178
|
],
|
@@ -188,7 +188,7 @@
|
|
188
188
|
{
|
189
189
|
"document": "查询错误汇总信息",
|
190
190
|
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeErrorSummary\n<公共请求参数>\n\n{\n \"ProjectId\": \"project-xx\",\n \"JobId\": \"job-xx\",\n \"ScenarioId\": \"scenario-xx\",\n \"Filters\": []\n}",
|
191
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"abc\",\n \"ErrorSummarySet\": [\n {\n \"Status\": \"
|
191
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"abc-123-xyz\",\n \"ErrorSummarySet\": [\n {\n \"Status\": \"404\",\n \"Result\": \"404 Not Found\",\n \"Proto\": \"HTTP/1.1\",\n \"Count\": 17,\n \"Rate\": 47.22222222222222,\n \"Message\": \"该状态码表明,服务器找不到客户端请求的资源\"\n }\n ]\n }\n}",
|
192
192
|
"title": "查询错误汇总信息"
|
193
193
|
}
|
194
194
|
],
|
@@ -299,8 +299,8 @@
|
|
299
299
|
"DescribeScenarioWithJobs": [
|
300
300
|
{
|
301
301
|
"document": "查询场景及对应的job内容",
|
302
|
-
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeScenarioWithJobs\n<公共请求参数>\n\n{\n \"ScenarioIds\": [\n \"scenario-
|
303
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
302
|
+
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeScenarioWithJobs\n<公共请求参数>\n\n{\n \"ScenarioIds\": [\n \"scenario-1a2b3c4d\"\n ],\n \"ScenarioRelatedJobsParams\": {\n \"OrderBy\": \"StartTime\",\n \"Limit\": 10,\n \"Ascend\": true\n }\n}",
|
303
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"abc-123-xyz\",\n \"ScenarioWithJobsSet\": [\n {\n \"Scenario\": {\n \"AppId\": 251201585,\n \"Uin\": \"700000153395\",\n \"SubAccountUin\": \"700000153395\",\n \"CreatedAt\": \"2021-09-27T10:46:26+08:00\",\n \"UpdatedAt\": \"2021-09-27T10:46:26+08:00\",\n \"ScenarioId\": \"scenario-1a2b3c4d\",\n \"Name\": \"hello\",\n \"Type\": \"pts-js\",\n \"Load\": {\n \"LoadSpec\": {\n \"Concurrency\": {\n \"Stages\": [\n {\n \"DurationSeconds\": 60,\n \"TargetVirtualUsers\": 10\n }\n ],\n \"IterationCount\": 5,\n \"MaxRequestsPerSecond\": 1000,\n \"GracefulStopSeconds\": 3,\n \"Resources\": 1\n },\n \"RequestsPerSecond\": null,\n \"ScriptOrigin\": null\n },\n \"VpcLoadDistribution\": {\n \"Region\": \"ap-guangzhou\",\n \"RegionId\": 1,\n \"VpcId\": \"1\",\n \"SubnetIds\": null\n },\n \"GeoRegionsLoadDistribution\": [\n {\n \"Region\": \"1\",\n \"RegionId\": 1,\n \"Percentage\": 1\n }\n ]\n },\n \"EncodedScripts\": \"\",\n \"Description\": \"\",\n \"Status\": 2,\n \"Configs\": [\n \"a.prop\"\n ],\n \"Datasets\": null,\n \"Extensions\": [\n \"a.jar\"\n ],\n \"ProjectId\": \"project-1a2b3c4d\",\n \"ProjectName\": \"name\",\n \"SLAId\": \"\",\n \"CronId\": \"\",\n \"TestScripts\": null,\n \"Protocols\": [],\n \"RequestFiles\": [],\n \"Plugins\": [],\n \"SLAPolicy\": {\n \"SLARules\": [],\n \"AlertChannel\": {\n \"NoticeId\": \"\",\n \"AMPConsumerId\": \"\"\n }\n },\n \"DomainNameConfig\": {\n \"HostAliases\": null,\n \"DNSConfig\": null\n },\n \"NotificationHooks\": null,\n \"Owner\": \"\"\n },\n \"Jobs\": [\n {\n \"ErrorRate\": 0,\n \"RequestTotal\": 0,\n \"RequestsPerSecond\": 0,\n \"ResponseTimeAverage\": 0,\n \"ResponseTimeP99\": 0,\n \"ResponseTimeP95\": 0,\n \"ResponseTimeP90\": 0,\n \"ResponseTimeMax\": 0,\n \"ResponseTimeMin\": 0,\n \"NetworkReceiveRate\": 0,\n \"NetworkSendRate\": 0,\n \"JobId\": \"job-1a2b3c4d\",\n \"ProjectId\": \"project-1a2b3c4d\",\n \"ProjectName\": \"name\",\n \"ScenarioId\": \"scenario-1a2b3c4d\",\n \"ScenarioName\": \"name\",\n \"CronId\": \"\",\n \"Type\": \"pts-js\",\n \"Load\": {\n \"LoadSpec\": {\n \"Concurrency\": {\n \"Stages\": [\n {\n \"DurationSeconds\": 60,\n \"TargetVirtualUsers\": 10\n }\n ],\n \"IterationCount\": 5,\n \"MaxRequestsPerSecond\": 1000,\n \"Resources\": 1,\n \"GracefulStopSeconds\": 3\n },\n \"RequestsPerSecond\": null,\n \"ScriptOrigin\": null\n },\n \"VpcLoadDistribution\": null,\n \"GeoRegionsLoadDistribution\": [\n {\n \"Region\": \"ap-guangzhou\",\n \"RegionId\": 1,\n \"Percentage\": 100\n }\n ]\n },\n \"TestScripts\": null,\n \"Datasets\": null,\n \"Protocols\": [],\n \"RequestFiles\": [],\n \"Plugins\": [],\n \"StartTime\": \"2021-09-27T10:46:26+08:00\",\n \"EndTime\": \"2021-09-27T10:46:26+08:00\",\n \"Note\": \"\",\n \"JobOwner\": \"owner\",\n \"AbortReason\": 0,\n \"Status\": 12,\n \"Message\": \"\",\n \"DomainNameConfig\": {\n \"HostAliases\": null,\n \"DNSConfig\": null\n },\n \"Debug\": false,\n \"NotificationHooks\": null,\n \"Duration\": 600,\n \"MaxVirtualUserCount\": 1,\n \"MaxRequestsPerSecond\": 8,\n \"LoadSourceInfos\": null,\n \"CreatedAt\": \"2021-09-27T10:46:26+08:00\",\n \"Configs\": null,\n \"Extensions\": null,\n \"Scripts\": null,\n \"LoadSources\": null\n }\n ]\n }\n ],\n \"Total\": 1\n }\n}",
|
304
304
|
"title": "查询场景及对应的job内容"
|
305
305
|
}
|
306
306
|
],
|
@@ -308,7 +308,7 @@
|
|
308
308
|
{
|
309
309
|
"document": "",
|
310
310
|
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeScenarios\n<公共请求参数>\n\n{\n \"ScenarioIds\": [\n \"scenario-xx\"\n ]\n}",
|
311
|
-
"output": "{\n \"Response\": {\n \"
|
311
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"abc-123-xyz\",\n \"ScenarioSet\": [\n {\n \"AppId\": 251008000,\n \"Configs\": null,\n \"CreatedAt\": \"2024-12-25T11:43:42+08:00\",\n \"CronId\": \"\",\n \"Datasets\": [],\n \"Description\": \"\",\n \"DomainNameConfig\": {\n \"DNSConfig\": null,\n \"HostAliases\": null\n },\n \"EncodedScripts\": \"\",\n \"Extensions\": null,\n \"Load\": {\n \"GeoRegionsLoadDistribution\": [\n {\n \"Percentage\": 80,\n \"Region\": \"ap-guangzhou\",\n \"RegionId\": 1\n },\n {\n \"Percentage\": 20,\n \"Region\": \"ap-shanghai\",\n \"RegionId\": 4\n }\n ],\n \"LoadSpec\": {\n \"Concurrency\": {\n \"GracefulStopSeconds\": 3,\n \"IterationCount\": 0,\n \"MaxRequestsPerSecond\": 40,\n \"Resources\": 5,\n \"Stages\": [\n {\n \"DurationSeconds\": 60,\n \"TargetVirtualUsers\": 5\n },\n {\n \"DurationSeconds\": 0,\n \"TargetVirtualUsers\": 5\n }\n ]\n },\n \"RequestsPerSecond\": null,\n \"ScriptOrigin\": null\n },\n \"VpcLoadDistribution\": null\n },\n \"Name\": \"pts-js(2024-12-25 11:43:40)\",\n \"NotificationHooks\": null,\n \"Owner\": \"\",\n \"Plugins\": [],\n \"ProjectId\": \"project-1a2b3c4d\",\n \"ProjectName\": \"name\",\n \"Protocols\": [],\n \"RequestFiles\": [],\n \"SLAId\": \"\",\n \"SLAPolicy\": {\n \"AlertChannel\": {\n \"AMPConsumerId\": \"\",\n \"NoticeId\": \"\"\n },\n \"SLARules\": []\n },\n \"ScenarioId\": \"scenario-1a2b3c4d\",\n \"Status\": 2,\n \"SubAccountUin\": \"700000200000\",\n \"TestScripts\": [\n {\n \"EncodedContent\": \"EncodedContent\",\n \"EncodedHttpArchive\": \"\",\n \"FileId\": \"\",\n \"LoadWeight\": 100,\n \"Name\": \"script.js\",\n \"Size\": 896,\n \"Type\": \"js\",\n \"UpdatedAt\": \"2024-12-26T10:30:34+08:00\"\n }\n ],\n \"Type\": \"pts-js\",\n \"Uin\": \"3510500000\",\n \"UpdatedAt\": \"2024-12-26T10:30:57+08:00\"\n }\n ],\n \"Total\": 1\n }\n}",
|
312
312
|
"title": "查询场景列表"
|
313
313
|
}
|
314
314
|
],
|
@@ -371,15 +371,15 @@
|
|
371
371
|
"UpdateProject": [
|
372
372
|
{
|
373
373
|
"document": "",
|
374
|
-
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateProject\n<公共请求参数>\n\n{\n \"ProjectId\": \"project-
|
375
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
374
|
+
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateProject\n<公共请求参数>\n\n{\n \"ProjectId\": \"project-1a2b3c4d\",\n \"Name\": \"test\"\n}",
|
375
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"abc-123-xyz\"\n }\n}",
|
376
376
|
"title": "更新项目"
|
377
377
|
}
|
378
378
|
],
|
379
379
|
"UpdateScenario": [
|
380
380
|
{
|
381
381
|
"document": "更新场景",
|
382
|
-
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateScenario\n<公共请求参数>\n\n{\n \"ScenarioId\": \"scenario-
|
382
|
+
"input": "POST / HTTP/1.1\nHost: pts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateScenario\n<公共请求参数>\n\n{\n \"ScenarioId\": \"scenario-1a2b3c4d\",\n \"Name\": \"pts-js(2023-05-12 16:12:30)\",\n \"Description\": \"\",\n \"Type\": \"pts-js\",\n \"Load\": {\n \"LoadSpec\": {\n \"Concurrency\": {\n \"IterationCount\": 0,\n \"MaxRequestsPerSecond\": 0,\n \"Stages\": [\n {\n \"DurationSeconds\": 120,\n \"TargetVirtualUsers\": 2\n },\n {\n \"DurationSeconds\": 120,\n \"TargetVirtualUsers\": 4\n },\n {\n \"DurationSeconds\": 120,\n \"TargetVirtualUsers\": 5\n },\n {\n \"DurationSeconds\": 240,\n \"TargetVirtualUsers\": 5\n }\n ],\n \"Resources\": 1\n }\n },\n \"GeoRegionsLoadDistribution\": [\n {\n \"Region\": \"ap-guangzhou\",\n \"RegionId\": 1,\n \"Percentage\": 100\n }\n ]\n },\n \"Status\": 2,\n \"ProjectId\": \"project-abc\",\n \"TestScripts\": [\n {\n \"Type\": \"js\",\n \"Name\": \"script.js\",\n \"Size\": 896,\n \"EncodedContent\": \"Ly8gU2VuZCBhIGh0dHAgZ2V0IHJlcXVlc3QKaW1wb3J0IGh0dHAgZnJvbSAncHRzL2h0dHAnOwppbXBvcnQgeyBjaGVjaywgc2xlZXAgfSBmcm9tICdwdHMnOwoKZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gKCkgewogIC8vIHNpbXBsZSBnZXQgcmVxdWVzdAogIGNvbnN0IHJlc3AxID0gaHR0cC5nZXQoJ2h0dHA6Ly9tb2NraHR0cGJpbi5wdHMuc3ZjLmNsdXN0ZXIubG9jYWwvZ2V0Jyk7CiAgY29uc29sZS5sb2cocmVzcDEuYm9keSk7CiAgLy8gaWYgcmVzcDEuYm9keSBpcyBhIGpzb24gc3RyaW5nLCByZXNwMS5qc29uKCkgdHJhbnNmZXIganNvbiBmb3JtYXQgYm9keSB0byBhIGpzb24gb2JqZWN0CiAgY29uc29sZS5sb2cocmVzcDEuanNvbigpKTsKICBjaGVjaygnc3RhdHVzIGlzIDIwMCcsICgpID0+IHJlc3AxLnN0YXR1c0NvZGUgPT09IDIwMCwgcmVzcDEpOwoKICAvLyBzbGVlcCAxIHNlY29uZAogIHNsZWVwKDEpOwoKICAvLyBnZXQgcmVxdWVzdCB3aXRoIGhlYWRlcnMgYW5kIHBhcmFtZXRlcnMKICBjb25zdCByZXNwMiA9IGh0dHAuZ2V0KCdodHRwOi8vbW9ja2h0dHBiaW4ucHRzLnN2Yy5jbHVzdGVyLmxvY2FsL2dldCcsIHsKICAgIGhlYWRlcnM6IHsKICAgICAgQ29ubmVjdGlvbjogJ2tlZXAtYWxpdmUnLAogICAgICAnVXNlci1BZ2VudCc6ICdwdHMtZW5naW5lJywKICAgIH0sCiAgICBxdWVyeTogewogICAgICBuYW1lMTogJ3ZhbHVlMScsCiAgICAgIG5hbWUyOiAndmFsdWUyJywKICAgIH0sCiAgfSk7CgogIGNvbnNvbGUubG9nKHJlc3AyLmpzb24oKS5hcmdzLm5hbWUxKTsgLy8gJ3ZhbHVlMScKICBjaGVjaygnYm9keS5hcmdzLm5hbWUxIGVxdWFscyB2YWx1ZTEnLCAoKSA9PiByZXNwMi5qc29uKCkuYXJncy5uYW1lMSA9PT0gJ3ZhbHVlMScsIHJlc3AyKTsKfQo=\",\n \"LoadWeight\": 100,\n \"UpdatedAt\": \"2023-05-12T16:12:31+08:00\",\n \"EncodedHttpArchive\": \"\"\n }\n ],\n \"SLAPolicy\": {\n \"SLARules\": [],\n \"AlertChannel\": {}\n },\n \"DomainNameConfig\": {},\n \"Owner\": \"owner\"\n}",
|
383
383
|
"output": "{\n \"Response\": {\n \"RequestId\": \"31446d02-c4f3-4a53-9efe-b5ad18cfcb7f\"\n }\n}",
|
384
384
|
"title": "更新场景"
|
385
385
|
}
|
tccli/services/scf/scf_client.py
CHANGED
@@ -485,7 +485,7 @@ def doCopyFunction(args, parsed_globals):
|
|
485
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
486
|
|
487
487
|
|
488
|
-
def
|
488
|
+
def doDeleteTrigger(args, parsed_globals):
|
489
489
|
g_param = parse_global_arg(parsed_globals)
|
490
490
|
|
491
491
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -514,11 +514,11 @@ def doGetFunctionLogs(args, parsed_globals):
|
|
514
514
|
client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
|
515
515
|
client._sdkVersion += ("_CLI_" + __version__)
|
516
516
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
-
model = models.
|
517
|
+
model = models.DeleteTriggerRequest()
|
518
518
|
model.from_json_string(json.dumps(args))
|
519
519
|
start_time = time.time()
|
520
520
|
while True:
|
521
|
-
rsp = client.
|
521
|
+
rsp = client.DeleteTrigger(model)
|
522
522
|
result = rsp.to_json_string()
|
523
523
|
try:
|
524
524
|
json_obj = json.loads(result)
|
@@ -589,7 +589,7 @@ def doListAliases(args, parsed_globals):
|
|
589
589
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
590
|
|
591
591
|
|
592
|
-
def
|
592
|
+
def doDeleteNamespace(args, parsed_globals):
|
593
593
|
g_param = parse_global_arg(parsed_globals)
|
594
594
|
|
595
595
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -618,11 +618,11 @@ def doDeleteTrigger(args, parsed_globals):
|
|
618
618
|
client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
|
619
619
|
client._sdkVersion += ("_CLI_" + __version__)
|
620
620
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
-
model = models.
|
621
|
+
model = models.DeleteNamespaceRequest()
|
622
622
|
model.from_json_string(json.dumps(args))
|
623
623
|
start_time = time.time()
|
624
624
|
while True:
|
625
|
-
rsp = client.
|
625
|
+
rsp = client.DeleteNamespace(model)
|
626
626
|
result = rsp.to_json_string()
|
627
627
|
try:
|
628
628
|
json_obj = json.loads(result)
|
@@ -1109,7 +1109,7 @@ def doGetAsyncEventStatus(args, parsed_globals):
|
|
1109
1109
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
1110
|
|
1111
1111
|
|
1112
|
-
def
|
1112
|
+
def doPutTotalConcurrencyConfig(args, parsed_globals):
|
1113
1113
|
g_param = parse_global_arg(parsed_globals)
|
1114
1114
|
|
1115
1115
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1138,11 +1138,11 @@ def doDeleteNamespace(args, parsed_globals):
|
|
1138
1138
|
client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
|
1139
1139
|
client._sdkVersion += ("_CLI_" + __version__)
|
1140
1140
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1141
|
-
model = models.
|
1141
|
+
model = models.PutTotalConcurrencyConfigRequest()
|
1142
1142
|
model.from_json_string(json.dumps(args))
|
1143
1143
|
start_time = time.time()
|
1144
1144
|
while True:
|
1145
|
-
rsp = client.
|
1145
|
+
rsp = client.PutTotalConcurrencyConfig(model)
|
1146
1146
|
result = rsp.to_json_string()
|
1147
1147
|
try:
|
1148
1148
|
json_obj = json.loads(result)
|
@@ -1213,6 +1213,110 @@ def doListAsyncEvents(args, parsed_globals):
|
|
1213
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1214
|
|
1215
1215
|
|
1216
|
+
def doDeleteFunctionVersion(args, parsed_globals):
|
1217
|
+
g_param = parse_global_arg(parsed_globals)
|
1218
|
+
|
1219
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1220
|
+
cred = credential.CVMRoleCredential()
|
1221
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1222
|
+
cred = credential.STSAssumeRoleCredential(
|
1223
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1224
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1225
|
+
)
|
1226
|
+
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):
|
1227
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1228
|
+
else:
|
1229
|
+
cred = credential.Credential(
|
1230
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1231
|
+
)
|
1232
|
+
http_profile = HttpProfile(
|
1233
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1234
|
+
reqMethod="POST",
|
1235
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1236
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1237
|
+
)
|
1238
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1239
|
+
if g_param[OptionsDefine.Language]:
|
1240
|
+
profile.language = g_param[OptionsDefine.Language]
|
1241
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1242
|
+
client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1244
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
+
model = models.DeleteFunctionVersionRequest()
|
1246
|
+
model.from_json_string(json.dumps(args))
|
1247
|
+
start_time = time.time()
|
1248
|
+
while True:
|
1249
|
+
rsp = client.DeleteFunctionVersion(model)
|
1250
|
+
result = rsp.to_json_string()
|
1251
|
+
try:
|
1252
|
+
json_obj = json.loads(result)
|
1253
|
+
except TypeError as e:
|
1254
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1255
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1256
|
+
break
|
1257
|
+
cur_time = time.time()
|
1258
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1259
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1260
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1261
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1262
|
+
else:
|
1263
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1264
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1265
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1266
|
+
|
1267
|
+
|
1268
|
+
def doGetFunctionLogs(args, parsed_globals):
|
1269
|
+
g_param = parse_global_arg(parsed_globals)
|
1270
|
+
|
1271
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1272
|
+
cred = credential.CVMRoleCredential()
|
1273
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1274
|
+
cred = credential.STSAssumeRoleCredential(
|
1275
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1276
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1277
|
+
)
|
1278
|
+
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):
|
1279
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1280
|
+
else:
|
1281
|
+
cred = credential.Credential(
|
1282
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1283
|
+
)
|
1284
|
+
http_profile = HttpProfile(
|
1285
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1286
|
+
reqMethod="POST",
|
1287
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1288
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1289
|
+
)
|
1290
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1291
|
+
if g_param[OptionsDefine.Language]:
|
1292
|
+
profile.language = g_param[OptionsDefine.Language]
|
1293
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1294
|
+
client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
|
1295
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1296
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1297
|
+
model = models.GetFunctionLogsRequest()
|
1298
|
+
model.from_json_string(json.dumps(args))
|
1299
|
+
start_time = time.time()
|
1300
|
+
while True:
|
1301
|
+
rsp = client.GetFunctionLogs(model)
|
1302
|
+
result = rsp.to_json_string()
|
1303
|
+
try:
|
1304
|
+
json_obj = json.loads(result)
|
1305
|
+
except TypeError as e:
|
1306
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1307
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1308
|
+
break
|
1309
|
+
cur_time = time.time()
|
1310
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1311
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1312
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1313
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1314
|
+
else:
|
1315
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1316
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1317
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1318
|
+
|
1319
|
+
|
1216
1320
|
def doCreateAlias(args, parsed_globals):
|
1217
1321
|
g_param = parse_global_arg(parsed_globals)
|
1218
1322
|
|
@@ -2305,58 +2409,6 @@ def doGetReservedConcurrencyConfig(args, parsed_globals):
|
|
2305
2409
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2306
2410
|
|
2307
2411
|
|
2308
|
-
def doPutTotalConcurrencyConfig(args, parsed_globals):
|
2309
|
-
g_param = parse_global_arg(parsed_globals)
|
2310
|
-
|
2311
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2312
|
-
cred = credential.CVMRoleCredential()
|
2313
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2314
|
-
cred = credential.STSAssumeRoleCredential(
|
2315
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2316
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2317
|
-
)
|
2318
|
-
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):
|
2319
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2320
|
-
else:
|
2321
|
-
cred = credential.Credential(
|
2322
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2323
|
-
)
|
2324
|
-
http_profile = HttpProfile(
|
2325
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2326
|
-
reqMethod="POST",
|
2327
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
2328
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2329
|
-
)
|
2330
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2331
|
-
if g_param[OptionsDefine.Language]:
|
2332
|
-
profile.language = g_param[OptionsDefine.Language]
|
2333
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2334
|
-
client = mod.ScfClient(cred, g_param[OptionsDefine.Region], profile)
|
2335
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
2336
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2337
|
-
model = models.PutTotalConcurrencyConfigRequest()
|
2338
|
-
model.from_json_string(json.dumps(args))
|
2339
|
-
start_time = time.time()
|
2340
|
-
while True:
|
2341
|
-
rsp = client.PutTotalConcurrencyConfig(model)
|
2342
|
-
result = rsp.to_json_string()
|
2343
|
-
try:
|
2344
|
-
json_obj = json.loads(result)
|
2345
|
-
except TypeError as e:
|
2346
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2347
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2348
|
-
break
|
2349
|
-
cur_time = time.time()
|
2350
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2351
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2352
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2353
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2354
|
-
else:
|
2355
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2356
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2357
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2358
|
-
|
2359
|
-
|
2360
2412
|
def doGetCustomDomain(args, parsed_globals):
|
2361
2413
|
g_param = parse_global_arg(parsed_globals)
|
2362
2414
|
|
@@ -2689,9 +2741,9 @@ ACTION_MAP = {
|
|
2689
2741
|
"CreateTrigger": doCreateTrigger,
|
2690
2742
|
"CreateNamespace": doCreateNamespace,
|
2691
2743
|
"CopyFunction": doCopyFunction,
|
2692
|
-
"GetFunctionLogs": doGetFunctionLogs,
|
2693
|
-
"ListAliases": doListAliases,
|
2694
2744
|
"DeleteTrigger": doDeleteTrigger,
|
2745
|
+
"ListAliases": doListAliases,
|
2746
|
+
"DeleteNamespace": doDeleteNamespace,
|
2695
2747
|
"GetProvisionedConcurrencyConfig": doGetProvisionedConcurrencyConfig,
|
2696
2748
|
"UpdateNamespace": doUpdateNamespace,
|
2697
2749
|
"ListCustomDomains": doListCustomDomains,
|
@@ -2701,8 +2753,10 @@ ACTION_MAP = {
|
|
2701
2753
|
"GetFunction": doGetFunction,
|
2702
2754
|
"DeleteAlias": doDeleteAlias,
|
2703
2755
|
"GetAsyncEventStatus": doGetAsyncEventStatus,
|
2704
|
-
"
|
2756
|
+
"PutTotalConcurrencyConfig": doPutTotalConcurrencyConfig,
|
2705
2757
|
"ListAsyncEvents": doListAsyncEvents,
|
2758
|
+
"DeleteFunctionVersion": doDeleteFunctionVersion,
|
2759
|
+
"GetFunctionLogs": doGetFunctionLogs,
|
2706
2760
|
"CreateAlias": doCreateAlias,
|
2707
2761
|
"TerminateAsyncEvent": doTerminateAsyncEvent,
|
2708
2762
|
"DeleteCustomDomain": doDeleteCustomDomain,
|
@@ -2724,7 +2778,6 @@ ACTION_MAP = {
|
|
2724
2778
|
"PutProvisionedConcurrencyConfig": doPutProvisionedConcurrencyConfig,
|
2725
2779
|
"GetAlias": doGetAlias,
|
2726
2780
|
"GetReservedConcurrencyConfig": doGetReservedConcurrencyConfig,
|
2727
|
-
"PutTotalConcurrencyConfig": doPutTotalConcurrencyConfig,
|
2728
2781
|
"GetCustomDomain": doGetCustomDomain,
|
2729
2782
|
"UpdateCustomDomain": doUpdateCustomDomain,
|
2730
2783
|
"CreateFunction": doCreateFunction,
|