tccli 3.0.1241.1__py2.py3-none-any.whl → 3.0.1243.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/apm/v20210622/api.json +216 -216
- tccli/services/apm/v20210622/examples.json +5 -5
- tccli/services/bh/v20230418/api.json +9 -0
- tccli/services/bh/v20230418/examples.json +2 -2
- tccli/services/cfs/v20190719/api.json +20 -20
- tccli/services/cfs/v20190719/examples.json +7 -7
- tccli/services/ckafka/v20190819/api.json +38 -0
- tccli/services/clb/v20180317/api.json +107 -82
- tccli/services/clb/v20180317/examples.json +14 -14
- tccli/services/cls/cls_client.py +220 -8
- tccli/services/cls/v20201016/api.json +417 -39
- tccli/services/cls/v20201016/examples.json +89 -45
- tccli/services/cwp/v20180228/api.json +3 -3
- tccli/services/cwp/v20180228/examples.json +2 -2
- tccli/services/cynosdb/v20190107/api.json +18 -18
- tccli/services/dbbrain/v20210527/api.json +1 -1
- tccli/services/dnspod/v20210323/api.json +173 -119
- tccli/services/dnspod/v20210323/examples.json +18 -18
- 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 +18 -9
- tccli/services/ess/v20201111/examples.json +6 -0
- tccli/services/essbasic/v20210526/api.json +80 -2
- tccli/services/gaap/v20180529/api.json +16 -18
- tccli/services/goosefs/v20220519/api.json +17 -17
- tccli/services/goosefs/v20220519/examples.json +4 -4
- 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 +244 -192
- tccli/services/iotvideoindustry/v20201201/examples.json +32 -32
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/mna/v20210119/api.json +110 -109
- tccli/services/mna/v20210119/examples.json +63 -63
- tccli/services/mps/v20190612/api.json +9 -0
- tccli/services/ocr/ocr_client.py +110 -4
- tccli/services/ocr/v20181119/api.json +370 -7
- tccli/services/ocr/v20181119/examples.json +20 -4
- tccli/services/pts/v20210728/api.json +37 -34
- tccli/services/pts/v20210728/examples.json +13 -13
- tccli/services/sqlserver/v20180328/api.json +68 -6
- tccli/services/ssl/v20191205/api.json +52 -50
- tccli/services/ssl/v20191205/examples.json +7 -7
- tccli/services/tbaas/v20180416/api.json +9 -6
- tccli/services/tbaas/v20180416/examples.json +2 -2
- tccli/services/tcb/v20180608/api.json +270 -221
- tccli/services/tcb/v20180608/examples.json +22 -22
- tccli/services/tcm/v20210413/api.json +2 -2
- tccli/services/tcm/v20210413/examples.json +2 -2
- tccli/services/tcr/v20190924/api.json +8 -8
- tccli/services/tcr/v20190924/examples.json +4 -4
- tccli/services/tdmq/tdmq_client.py +167 -8
- tccli/services/tdmq/v20200217/api.json +307 -0
- tccli/services/tdmq/v20200217/examples.json +24 -0
- tccli/services/tem/v20210701/api.json +1 -1
- tccli/services/tem/v20210701/examples.json +2 -2
- tccli/services/teo/v20220901/api.json +2 -2
- tccli/services/teo/v20220901/examples.json +3 -3
- tccli/services/thpc/v20211109/api.json +74 -100
- tccli/services/thpc/v20211109/examples.json +2 -2
- tccli/services/thpc/v20220401/api.json +196 -223
- tccli/services/thpc/v20220401/examples.json +1 -1
- tccli/services/thpc/v20230321/api.json +150 -153
- tccli/services/thpc/v20230321/examples.json +3 -3
- tccli/services/tke/v20180525/api.json +1 -1
- tccli/services/tke/v20180525/examples.json +2 -2
- tccli/services/tke/v20220501/api.json +161 -112
- tccli/services/tke/v20220501/examples.json +15 -21
- tccli/services/trocket/trocket_client.py +53 -0
- tccli/services/trocket/v20230308/api.json +219 -0
- tccli/services/trocket/v20230308/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +31 -20
- tccli/services/trtc/v20190722/examples.json +11 -11
- tccli/services/tse/v20201207/api.json +141 -113
- tccli/services/tse/v20201207/examples.json +5 -5
- tccli/services/tsf/v20180326/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +320 -270
- tccli/services/vpc/v20170312/examples.json +40 -40
- tccli/services/waf/v20180125/api.json +2 -2
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1243.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1243.1.dist-info}/RECORD +86 -86
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1243.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1243.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1243.1.dist-info}/license_files/LICENSE +0 -0
@@ -27,8 +27,8 @@
|
|
27
27
|
"BatchModifyTargetTag": [
|
28
28
|
{
|
29
29
|
"document": "",
|
30
|
-
"input": "POST / HTTP/1.1\nHost: clb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: BatchModifyTargetTag\n<公共请求参数>\n\n{\n \"LoadBalancerId\": \"lb-xxxxxxxx\",\n \"ModifyList\": [\n {\n \"ListenerId\": \"lbl-yyyyyyyy\",\n \"Targets\": [\n {\n \"Port\": 1000,\n \"EniIp\": \"1.1.1.1\",\n \"Tag\": \"
|
31
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
30
|
+
"input": "POST / HTTP/1.1\nHost: clb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: BatchModifyTargetTag\n<公共请求参数>\n\n{\n \"LoadBalancerId\": \"lb-xxxxxxxx\",\n \"ModifyList\": [\n {\n \"ListenerId\": \"lbl-yyyyyyyy\",\n \"Targets\": [\n {\n \"Port\": 1000,\n \"EniIp\": \"1.1.1.1\",\n \"Tag\": \"tag-target\"\n }\n ]\n }\n ]\n}",
|
31
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"9cc30f1d-c237-422a-87ff-8f08c31a46e6\"\n }\n}",
|
32
32
|
"title": "设置标签"
|
33
33
|
}
|
34
34
|
],
|
@@ -41,7 +41,7 @@
|
|
41
41
|
},
|
42
42
|
{
|
43
43
|
"document": "同时对一个负载均衡下的四层和七层监听器修改所绑定的服务器权重",
|
44
|
-
"input": "https://clb.tencentcloudapi.com/?Action=BatchModifyTargetWeight\n&LoadBalancerId=lb-1kkno9qf\n&ModifyList.0.ListenerId=lbl-mhtffs09\n&ModifyList.0.Targets.0.InstanceId=ins-kjp6cb2f\n&ModifyList.0.Targets.0.Port=79\n&ModifyList.0.Targets.0.Weight=50\n&ModifyList.1.ListenerId=lbl-661zpn3b\n&ModifyList.1.LocationId=loc-78p1r0vb\n&ModifyList.1.Targets.0.EniIp=10.202.0.96\n&ModifyList.1.Targets.0.Port=
|
44
|
+
"input": "https://clb.tencentcloudapi.com/?Action=BatchModifyTargetWeight\n&LoadBalancerId=lb-1kkno9qf\n&ModifyList.0.ListenerId=lbl-mhtffs09\n&ModifyList.0.Targets.0.InstanceId=ins-kjp6cb2f\n&ModifyList.0.Targets.0.Port=79\n&ModifyList.0.Targets.0.Weight=50\n&ModifyList.1.ListenerId=lbl-661zpn3b\n&ModifyList.1.LocationId=loc-78p1r0vb\n&ModifyList.1.Targets.0.EniIp=10.202.0.96\n&ModifyList.1.Targets.0.Port=80\n&ModifyList.1.Targets.0.Weight=30\n&<公共请求参数>",
|
45
45
|
"output": "{\n \"Response\": {\n \"RequestId\": \"38bab2ce-616d-412c-a4b0-36110d5b17a3\"\n }\n}",
|
46
46
|
"title": "批量修改四层和七层监听器绑定的服务器权重"
|
47
47
|
}
|
@@ -227,7 +227,7 @@
|
|
227
227
|
"DeregisterTargetGroupInstances": [
|
228
228
|
{
|
229
229
|
"document": "",
|
230
|
-
"input": "https://clb.tencentcloudapi.com/?Action=DeregisterTargetGroupInstances\n&TargetGroupId=lbtg-815iz538\n&TargetGroupInstances.0.BindIP=172.16.0.34\n&TargetGroupInstances.0.Port=
|
230
|
+
"input": "https://clb.tencentcloudapi.com/?Action=DeregisterTargetGroupInstances\n&TargetGroupId=lbtg-815iz538\n&TargetGroupInstances.0.BindIP=172.16.0.34\n&TargetGroupInstances.0.Port=80\n&<公共请求参数>",
|
231
231
|
"output": "{\n \"Response\": {\n \"RequestId\": \"4b4987ca-58d0-4bad-9ded-344fa4011bda\"\n }\n}",
|
232
232
|
"title": "从目标组中解绑服务器"
|
233
233
|
}
|
@@ -252,14 +252,14 @@
|
|
252
252
|
{
|
253
253
|
"document": "",
|
254
254
|
"input": "https://clb.tencentcloudapi.com/?Action=DescribeBlockIPList\r\n&LoadBalancerId=lb-6efswuxa\r\n&<公共请求参数>",
|
255
|
-
"output": "{\n \"Response\": {\n \"BlockedIPCount\": 1,\n \"BlockedIPList\": [\n {\n \"IP\": \"192.1.2.3\",\n \"CreateTime\": \"2019-01-10 10:55:40\",\n \"ExpireTime\": \"2019-01-10 11:12:19\"\n }\n ],\n \"ClientIPField\": \"
|
255
|
+
"output": "{\n \"Response\": {\n \"BlockedIPCount\": 1,\n \"BlockedIPList\": [\n {\n \"IP\": \"192.1.2.3\",\n \"CreateTime\": \"2019-01-10 10:55:40\",\n \"ExpireTime\": \"2019-01-10 11:12:19\"\n }\n ],\n \"ClientIPField\": \"cdn_src_ip\",\n \"RequestId\": \"83329908-a282-4f9f-82ab-033a3025baff\"\n }\n}",
|
256
256
|
"title": "查询一个负载均衡所封禁的IP列表(黑名单)"
|
257
257
|
}
|
258
258
|
],
|
259
259
|
"DescribeBlockIPTask": [
|
260
260
|
{
|
261
|
-
"document": "",
|
262
|
-
"input": "
|
261
|
+
"document": "查询封禁IP(黑名单)异步任务的执行状态",
|
262
|
+
"input": "POST / HTTP/1.1\nHost: clb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBlockIPTask\n<公共请求参数>\n\n{\n \"TaskId\": \"localjob010916173469001234567890\"\n}",
|
263
263
|
"output": "{\n \"Response\": {\n \"Status\": 6,\n \"RequestId\": \"83329908-a282-4f9f-8ab-033a3025baff\"\n }\n}",
|
264
264
|
"title": "查询封禁IP(黑名单)异步任务的执行状态"
|
265
265
|
}
|
@@ -284,7 +284,7 @@
|
|
284
284
|
{
|
285
285
|
"document": "",
|
286
286
|
"input": "https://clb.tencentcloudapi.com/?Action=DescribeClassicalLBListeners\n&LoadBalancerId=lb-a3u5l5zc\n&<公共请求参数>",
|
287
|
-
"output": "{\n \"Response\": {\n \"Listeners\": [\n {\n \"ListenerId\": \"lbl-3jur3gei\",\n \"ListenerPort\":
|
287
|
+
"output": "{\n \"Response\": {\n \"Listeners\": [\n {\n \"ListenerId\": \"lbl-3jur3gei\",\n \"ListenerPort\": 80,\n \"InstancePort\": 8080,\n \"ListenerName\": \"HTTP-LISTENER\",\n \"Protocol\": \"tcp\",\n \"SessionExpire\": 0,\n \"HealthSwitch\": 1,\n \"TimeOut\": 2,\n \"IntervalTime\": 5,\n \"HealthNum\": 3,\n \"UnhealthNum\": 3,\n \"HttpHash\": \"\",\n \"HttpCode\": 31,\n \"HttpCheckPath\": \"\",\n \"SSLMode\": \"\",\n \"CertId\": \"\",\n \"CertCaId\": \"\",\n \"Status\": 1\n }\n ],\n \"RequestId\": \"5da375f4-214d-42bb-8d50-e74bf556b38f\"\n }\n}",
|
288
288
|
"title": "获取一个传统型负载均衡的监听器信息"
|
289
289
|
}
|
290
290
|
],
|
@@ -316,7 +316,7 @@
|
|
316
316
|
{
|
317
317
|
"document": "",
|
318
318
|
"input": "https://clb.tencentcloudapi.com/?Action=DescribeCrossTargets\n&Offset=0\n&Limit=20\n&<公共请求参数>",
|
319
|
-
"output": "{\n \"Response\": {\n \"CrossTargetSet\": [\n {\n \"LocalVpcId\": \"vpc-test1234\",\n \"VpcId\": \"vpc-test4321\",\n \"IP\": \"10.22.106.8\",\n \"VpcName\": \"
|
319
|
+
"output": "{\n \"Response\": {\n \"CrossTargetSet\": [\n {\n \"LocalVpcId\": \"vpc-test1234\",\n \"VpcId\": \"vpc-test4321\",\n \"IP\": \"10.22.106.8\",\n \"VpcName\": \"VPC-BIZ-TEST\",\n \"EniId\": \"eni-test1234\",\n \"InstanceId\": \"ins-test1234\",\n \"InstanceName\": \"inf-node-test.com\",\n \"Region\": \"ap-shanghai\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"7717db32-9080-4391-acd7-18f8bbd0664d\"\n }\n}",
|
320
320
|
"title": "查询跨域2.0版本云联网后端子机和网卡信息"
|
321
321
|
}
|
322
322
|
],
|
@@ -324,7 +324,7 @@
|
|
324
324
|
{
|
325
325
|
"document": "拉取配置绑定的server或location",
|
326
326
|
"input": "https://clb.tencentcloudapi.com/?Action=DescribeCustomizedConfigAssociateList\n&UconfigId=pz-fi018waq\n&Offset=0\n&Limit=3\n&<公共请求参数>",
|
327
|
-
"output": "{\n \"Response\": {\n \"BindList\": [\n {\n \"LoadBalancerId\": \"lb-az5a9oyo\",\n \"ListenerId\": \"lbl-nppnktey\",\n \"Domain\": \"www.aaa.com\",\n \"LocationId\": \"loc-nppnktey\",\n \"ListenerName\": \"
|
327
|
+
"output": "{\n \"Response\": {\n \"BindList\": [\n {\n \"LoadBalancerId\": \"lb-az5a9oyo\",\n \"ListenerId\": \"lbl-nppnktey\",\n \"Domain\": \"www.aaa.com\",\n \"LocationId\": \"loc-nppnktey\",\n \"ListenerName\": \"http-listener\",\n \"Protocol\": \"http\",\n \"Vport\": 80,\n \"Url\": \"\",\n \"UconfigId\": \"pz-n651fsue\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"83129908-a282-4f9f-8ab-131a3025ba11\"\n }\n}",
|
328
328
|
"title": "拉取配置绑定的server或location"
|
329
329
|
}
|
330
330
|
],
|
@@ -510,13 +510,13 @@
|
|
510
510
|
{
|
511
511
|
"document": "当负载均衡的7层监听器规则太多,而只想查询某个规则下的服务列表时,可通过Filters过滤location-id。",
|
512
512
|
"input": "https://clb.tencentcloudapi.com/?Action=DescribeTargets\n&LoadBalancerId=lb-12345678\n&Filters.0.Name=location-id\n&Filters.0.Values.0=loc-12345678\n&<公共请求参数>",
|
513
|
-
"output": "{\n \"Response\": {\n \"Listeners\": [\n {\n \"ListenerId\": \"lbl-12345678\",\n \"Protocol\": \"HTTP\",\n \"Port\": 80,\n \"Rules\": [\n {\n \"LocationId\": \"loc-12345678\",\n \"Domain\": \"123.com\",\n \"Url\": \"
|
513
|
+
"output": "{\n \"Response\": {\n \"Listeners\": [\n {\n \"ListenerId\": \"lbl-12345678\",\n \"Protocol\": \"HTTP\",\n \"Port\": 80,\n \"Rules\": [\n {\n \"LocationId\": \"loc-12345678\",\n \"Domain\": \"123.com\",\n \"Url\": \"/query\",\n \"Targets\": [\n {\n \"Type\": \"CVM\",\n \"InstanceId\": \"ins-12345678\",\n \"Port\": 80,\n \"Weight\": 10,\n \"PublicIpAddresses\": null,\n \"PrivateIpAddresses\": [\n \"172.16.0.100\"\n ],\n \"InstanceName\": \"cvm-biz-test\",\n \"RegisteredTime\": \"2023-01-01\",\n \"EniId\": \"eni-12345678\"\n }\n ],\n \"FunctionTargets\": null\n }\n ],\n \"Targets\": null,\n \"EndPort\": 0\n }\n ],\n \"RequestId\": \"038afb75-7303-48da-abdc-e25f0cbfda0f\"\n }\n}",
|
514
514
|
"title": "通过Location过滤查询后端服务列表"
|
515
515
|
},
|
516
516
|
{
|
517
517
|
"document": "查询负载均衡实例上绑定的所有后端服务",
|
518
518
|
"input": "https://clb.tencentcloudapi.com/?Action=DescribeTargets\n&LoadBalancerId=lb-10iq9lou\n&<公共请求参数>",
|
519
|
-
"output": "{\n \"Response\": {\n \"Listeners\": [\n {\n \"ListenerId\": \"lbl-4fo6k8na\",\n \"Protocol\": \"HTTP\",\n \"Port\": 80,\n \"Rules\": [\n {\n \"LocationId\": \"loc-o9732aw0\",\n \"Domain\": \"www.123.com\",\n \"Url\": \"
|
519
|
+
"output": "{\n \"Response\": {\n \"Listeners\": [\n {\n \"ListenerId\": \"lbl-4fo6k8na\",\n \"Protocol\": \"HTTP\",\n \"Port\": 80,\n \"Rules\": [\n {\n \"LocationId\": \"loc-o9732aw0\",\n \"Domain\": \"www.123.com\",\n \"Url\": \"/query\",\n \"Targets\": [\n {\n \"Type\": \"cvm\",\n \"PrivateIpAddresses\": [\n \"172.16.0.12\"\n ],\n \"EniId\": \"\",\n \"PublicIpAddresses\": null,\n \"InstanceName\": \"abcd1234\",\n \"Port\": 555,\n \"Weight\": 10,\n \"InstanceId\": \"ins-19425y2y\",\n \"RegisteredTime\": \"2019-07-12 16:22:02\"\n }\n ],\n \"FunctionTargets\": []\n }\n ],\n \"Targets\": null,\n \"EndPort\": 0\n },\n {\n \"ListenerId\": \"lbl-4ue2rpl2\",\n \"Protocol\": \"TCP\",\n \"Port\": 888,\n \"Rules\": null,\n \"EndPort\": 0,\n \"Targets\": [\n {\n \"Type\": \"cvm\",\n \"PrivateIpAddresses\": [\n \"172.16.0.12\"\n ],\n \"EniId\": \"\",\n \"PublicIpAddresses\": null,\n \"InstanceName\": \"abcd1234\",\n \"Port\": 666,\n \"Weight\": 40,\n \"InstanceId\": \"ins-19425y2y\",\n \"RegisteredTime\": \"2019-07-12 16:22:54\"\n }\n ]\n }\n ],\n \"RequestId\": \"a5cbe92d-c7f2-41d4-8343-3cb42c3fd1dd\"\n }\n}",
|
520
520
|
"title": "查询负载均衡实例上绑定的所有后端服务"
|
521
521
|
}
|
522
522
|
],
|
@@ -705,7 +705,7 @@
|
|
705
705
|
"ModifyTargetGroupInstancesPort": [
|
706
706
|
{
|
707
707
|
"document": "",
|
708
|
-
"input": "https://clb.tencentcloudapi.com/?Action=ModifyTargetGroupInstancesPort\n&TargetGroupId=lbtg-815iz538\n&TargetGroupInstances.0.BindIP=172.16.0.34\n&TargetGroupInstances.0.Port=
|
708
|
+
"input": "https://clb.tencentcloudapi.com/?Action=ModifyTargetGroupInstancesPort\n&TargetGroupId=lbtg-815iz538\n&TargetGroupInstances.0.BindIP=172.16.0.34\n&TargetGroupInstances.0.Port=8000\n&TargetGroupInstances.0.NewPort=8080\n&<公共请求参数>",
|
709
709
|
"output": "{\n \"Response\": {\n \"RequestId\": \"15566c73-3881-4762-939f-bae9ecf25808\"\n }\n}",
|
710
710
|
"title": "批量修改服务器的端口"
|
711
711
|
}
|
@@ -713,7 +713,7 @@
|
|
713
713
|
"ModifyTargetGroupInstancesWeight": [
|
714
714
|
{
|
715
715
|
"document": "",
|
716
|
-
"input": "https://clb.tencentcloudapi.com/?Action=ModifyTargetGroupInstancesWeight\n&TargetGroupId=lbtg-815iz538\n&TargetGroupInstances.0.BindIP=172.16.0.34\n&TargetGroupInstances.0.Port=
|
716
|
+
"input": "https://clb.tencentcloudapi.com/?Action=ModifyTargetGroupInstancesWeight\n&TargetGroupId=lbtg-815iz538\n&TargetGroupInstances.0.BindIP=172.16.0.34\n&TargetGroupInstances.0.Port=8080\n&TargetGroupInstances.0.Weight=55\n&<公共请求参数>",
|
717
717
|
"output": "{\n \"Response\": {\n \"RequestId\": \"ed90470e-eade-423f-aae6-264d814d0d65\"\n }\n}",
|
718
718
|
"title": "批量修改目标组服务器权重"
|
719
719
|
}
|
tccli/services/cls/cls_client.py
CHANGED
@@ -69,7 +69,7 @@ def doModifyKafkaConsumer(args, parsed_globals):
|
|
69
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
70
|
|
71
71
|
|
72
|
-
def
|
72
|
+
def doCreateWebCallback(args, parsed_globals):
|
73
73
|
g_param = parse_global_arg(parsed_globals)
|
74
74
|
|
75
75
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -98,11 +98,11 @@ def doCreateKafkaRecharge(args, parsed_globals):
|
|
98
98
|
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
99
99
|
client._sdkVersion += ("_CLI_" + __version__)
|
100
100
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
-
model = models.
|
101
|
+
model = models.CreateWebCallbackRequest()
|
102
102
|
model.from_json_string(json.dumps(args))
|
103
103
|
start_time = time.time()
|
104
104
|
while True:
|
105
|
-
rsp = client.
|
105
|
+
rsp = client.CreateWebCallback(model)
|
106
106
|
result = rsp.to_json_string()
|
107
107
|
try:
|
108
108
|
json_obj = json.loads(result)
|
@@ -381,6 +381,58 @@ def doModifyShipper(args, parsed_globals):
|
|
381
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
382
|
|
383
383
|
|
384
|
+
def doCreateKafkaRecharge(args, parsed_globals):
|
385
|
+
g_param = parse_global_arg(parsed_globals)
|
386
|
+
|
387
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
388
|
+
cred = credential.CVMRoleCredential()
|
389
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
390
|
+
cred = credential.STSAssumeRoleCredential(
|
391
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
392
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
393
|
+
)
|
394
|
+
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):
|
395
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
396
|
+
else:
|
397
|
+
cred = credential.Credential(
|
398
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
399
|
+
)
|
400
|
+
http_profile = HttpProfile(
|
401
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
402
|
+
reqMethod="POST",
|
403
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
404
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
405
|
+
)
|
406
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
407
|
+
if g_param[OptionsDefine.Language]:
|
408
|
+
profile.language = g_param[OptionsDefine.Language]
|
409
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
410
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
411
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
412
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
+
model = models.CreateKafkaRechargeRequest()
|
414
|
+
model.from_json_string(json.dumps(args))
|
415
|
+
start_time = time.time()
|
416
|
+
while True:
|
417
|
+
rsp = client.CreateKafkaRecharge(model)
|
418
|
+
result = rsp.to_json_string()
|
419
|
+
try:
|
420
|
+
json_obj = json.loads(result)
|
421
|
+
except TypeError as e:
|
422
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
423
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
424
|
+
break
|
425
|
+
cur_time = time.time()
|
426
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
427
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
428
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
429
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
430
|
+
else:
|
431
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
432
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
433
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
|
+
|
435
|
+
|
384
436
|
def doDescribeConfigs(args, parsed_globals):
|
385
437
|
g_param = parse_global_arg(parsed_globals)
|
386
438
|
|
@@ -1161,6 +1213,58 @@ def doDescribeTopics(args, parsed_globals):
|
|
1161
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1162
1214
|
|
1163
1215
|
|
1216
|
+
def doCreateAlarmNotice(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.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1244
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
+
model = models.CreateAlarmNoticeRequest()
|
1246
|
+
model.from_json_string(json.dumps(args))
|
1247
|
+
start_time = time.time()
|
1248
|
+
while True:
|
1249
|
+
rsp = client.CreateAlarmNotice(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
|
+
|
1164
1268
|
def doCreateCosRecharge(args, parsed_globals):
|
1165
1269
|
g_param = parse_global_arg(parsed_globals)
|
1166
1270
|
|
@@ -2409,7 +2513,7 @@ def doDeleteIndex(args, parsed_globals):
|
|
2409
2513
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
2514
|
|
2411
2515
|
|
2412
|
-
def
|
2516
|
+
def doDeleteWebCallback(args, parsed_globals):
|
2413
2517
|
g_param = parse_global_arg(parsed_globals)
|
2414
2518
|
|
2415
2519
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2438,11 +2542,11 @@ def doCreateAlarmNotice(args, parsed_globals):
|
|
2438
2542
|
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
2439
2543
|
client._sdkVersion += ("_CLI_" + __version__)
|
2440
2544
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2441
|
-
model = models.
|
2545
|
+
model = models.DeleteWebCallbackRequest()
|
2442
2546
|
model.from_json_string(json.dumps(args))
|
2443
2547
|
start_time = time.time()
|
2444
2548
|
while True:
|
2445
|
-
rsp = client.
|
2549
|
+
rsp = client.DeleteWebCallback(model)
|
2446
2550
|
result = rsp.to_json_string()
|
2447
2551
|
try:
|
2448
2552
|
json_obj = json.loads(result)
|
@@ -3293,6 +3397,58 @@ def doModifyKafkaRecharge(args, parsed_globals):
|
|
3293
3397
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3294
3398
|
|
3295
3399
|
|
3400
|
+
def doDescribeWebCallbacks(args, parsed_globals):
|
3401
|
+
g_param = parse_global_arg(parsed_globals)
|
3402
|
+
|
3403
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3404
|
+
cred = credential.CVMRoleCredential()
|
3405
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3406
|
+
cred = credential.STSAssumeRoleCredential(
|
3407
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3408
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3409
|
+
)
|
3410
|
+
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):
|
3411
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3412
|
+
else:
|
3413
|
+
cred = credential.Credential(
|
3414
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3415
|
+
)
|
3416
|
+
http_profile = HttpProfile(
|
3417
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3418
|
+
reqMethod="POST",
|
3419
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3420
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3421
|
+
)
|
3422
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3423
|
+
if g_param[OptionsDefine.Language]:
|
3424
|
+
profile.language = g_param[OptionsDefine.Language]
|
3425
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3426
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
3427
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3428
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3429
|
+
model = models.DescribeWebCallbacksRequest()
|
3430
|
+
model.from_json_string(json.dumps(args))
|
3431
|
+
start_time = time.time()
|
3432
|
+
while True:
|
3433
|
+
rsp = client.DescribeWebCallbacks(model)
|
3434
|
+
result = rsp.to_json_string()
|
3435
|
+
try:
|
3436
|
+
json_obj = json.loads(result)
|
3437
|
+
except TypeError as e:
|
3438
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3439
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3440
|
+
break
|
3441
|
+
cur_time = time.time()
|
3442
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3443
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3444
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3445
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3446
|
+
else:
|
3447
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3448
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3449
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3450
|
+
|
3451
|
+
|
3296
3452
|
def doDescribeKafkaConsumer(args, parsed_globals):
|
3297
3453
|
g_param = parse_global_arg(parsed_globals)
|
3298
3454
|
|
@@ -4385,6 +4541,58 @@ def doDescribeDashboardSubscribes(args, parsed_globals):
|
|
4385
4541
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4542
|
|
4387
4543
|
|
4544
|
+
def doModifyWebCallback(args, parsed_globals):
|
4545
|
+
g_param = parse_global_arg(parsed_globals)
|
4546
|
+
|
4547
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4548
|
+
cred = credential.CVMRoleCredential()
|
4549
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4550
|
+
cred = credential.STSAssumeRoleCredential(
|
4551
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4552
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4553
|
+
)
|
4554
|
+
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):
|
4555
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4556
|
+
else:
|
4557
|
+
cred = credential.Credential(
|
4558
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4559
|
+
)
|
4560
|
+
http_profile = HttpProfile(
|
4561
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4562
|
+
reqMethod="POST",
|
4563
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4564
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4565
|
+
)
|
4566
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4567
|
+
if g_param[OptionsDefine.Language]:
|
4568
|
+
profile.language = g_param[OptionsDefine.Language]
|
4569
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4570
|
+
client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
|
4571
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4572
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4573
|
+
model = models.ModifyWebCallbackRequest()
|
4574
|
+
model.from_json_string(json.dumps(args))
|
4575
|
+
start_time = time.time()
|
4576
|
+
while True:
|
4577
|
+
rsp = client.ModifyWebCallback(model)
|
4578
|
+
result = rsp.to_json_string()
|
4579
|
+
try:
|
4580
|
+
json_obj = json.loads(result)
|
4581
|
+
except TypeError as e:
|
4582
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4583
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4584
|
+
break
|
4585
|
+
cur_time = time.time()
|
4586
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4587
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4588
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4589
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4590
|
+
else:
|
4591
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4592
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4593
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4594
|
+
|
4595
|
+
|
4388
4596
|
def doModifyMachineGroup(args, parsed_globals):
|
4389
4597
|
g_param = parse_global_arg(parsed_globals)
|
4390
4598
|
|
@@ -5704,12 +5912,13 @@ MODELS_MAP = {
|
|
5704
5912
|
|
5705
5913
|
ACTION_MAP = {
|
5706
5914
|
"ModifyKafkaConsumer": doModifyKafkaConsumer,
|
5707
|
-
"
|
5915
|
+
"CreateWebCallback": doCreateWebCallback,
|
5708
5916
|
"DescribeExports": doDescribeExports,
|
5709
5917
|
"DescribeConsoleSharingList": doDescribeConsoleSharingList,
|
5710
5918
|
"CreateIndex": doCreateIndex,
|
5711
5919
|
"QueryMetric": doQueryMetric,
|
5712
5920
|
"ModifyShipper": doModifyShipper,
|
5921
|
+
"CreateKafkaRecharge": doCreateKafkaRecharge,
|
5713
5922
|
"DescribeConfigs": doDescribeConfigs,
|
5714
5923
|
"CreateDeliverCloudFunction": doCreateDeliverCloudFunction,
|
5715
5924
|
"DeleteLogset": doDeleteLogset,
|
@@ -5725,6 +5934,7 @@ ACTION_MAP = {
|
|
5725
5934
|
"CreateConfig": doCreateConfig,
|
5726
5935
|
"DescribeLogsets": doDescribeLogsets,
|
5727
5936
|
"DescribeTopics": doDescribeTopics,
|
5937
|
+
"CreateAlarmNotice": doCreateAlarmNotice,
|
5728
5938
|
"CreateCosRecharge": doCreateCosRecharge,
|
5729
5939
|
"MergePartition": doMergePartition,
|
5730
5940
|
"ModifyAlarmNotice": doModifyAlarmNotice,
|
@@ -5749,7 +5959,7 @@ ACTION_MAP = {
|
|
5749
5959
|
"CreateDashboardSubscribe": doCreateDashboardSubscribe,
|
5750
5960
|
"ModifyDashboardSubscribe": doModifyDashboardSubscribe,
|
5751
5961
|
"DeleteIndex": doDeleteIndex,
|
5752
|
-
"
|
5962
|
+
"DeleteWebCallback": doDeleteWebCallback,
|
5753
5963
|
"ModifyCosRecharge": doModifyCosRecharge,
|
5754
5964
|
"ModifyConfigExtra": doModifyConfigExtra,
|
5755
5965
|
"ModifyAlarmShield": doModifyAlarmShield,
|
@@ -5766,6 +5976,7 @@ ACTION_MAP = {
|
|
5766
5976
|
"ModifyNoticeContent": doModifyNoticeContent,
|
5767
5977
|
"SearchCosRechargeInfo": doSearchCosRechargeInfo,
|
5768
5978
|
"ModifyKafkaRecharge": doModifyKafkaRecharge,
|
5979
|
+
"DescribeWebCallbacks": doDescribeWebCallbacks,
|
5769
5980
|
"DescribeKafkaConsumer": doDescribeKafkaConsumer,
|
5770
5981
|
"DeleteDashboardSubscribe": doDeleteDashboardSubscribe,
|
5771
5982
|
"CreateDataTransform": doCreateDataTransform,
|
@@ -5787,6 +5998,7 @@ ACTION_MAP = {
|
|
5787
5998
|
"CreateConsumer": doCreateConsumer,
|
5788
5999
|
"ModifyTopic": doModifyTopic,
|
5789
6000
|
"DescribeDashboardSubscribes": doDescribeDashboardSubscribes,
|
6001
|
+
"ModifyWebCallback": doModifyWebCallback,
|
5790
6002
|
"ModifyMachineGroup": doModifyMachineGroup,
|
5791
6003
|
"DescribeScheduledSqlInfo": doDescribeScheduledSqlInfo,
|
5792
6004
|
"DeleteConfig": doDeleteConfig,
|