tccli 3.0.990.1__py2.py3-none-any.whl → 3.0.992.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/car/v20220110/DestroySession.md +1 -1
  3. tccli/examples/cls/v20201016/CheckFunction.md +25 -0
  4. tccli/examples/ess/v20201111/DescribeBillUsageDetail.md +108 -0
  5. tccli/examples/essbasic/v20210526/ChannelCreatePreparedPersonalEsign.md +92 -0
  6. tccli/examples/essbasic/v20210526/ChannelCreateReleaseFlow.md +94 -19
  7. tccli/examples/essbasic/v20210526/ChannelCreateSealPolicy.md +88 -0
  8. tccli/examples/essbasic/v20210526/ChannelDescribeEmployees.md +85 -45
  9. tccli/examples/essbasic/v20210526/DescribeBillUsageDetail.md +69 -0
  10. tccli/examples/essbasic/v20210526/SyncProxyOrganization.md +9 -9
  11. tccli/examples/mna/v20210119/GetNetMonitor.md +228 -0
  12. tccli/examples/ocr/v20181119/VatInvoiceVerifyNew.md +4 -0
  13. tccli/examples/tdmq/v20200217/DescribeRocketMQCluster.md +4 -4
  14. tccli/examples/teo/v20220901/BindSharedCNAME.md +48 -0
  15. tccli/examples/teo/v20220901/CreateSharedCNAME.md +4 -4
  16. tccli/examples/teo/v20220901/DeleteSharedCNAME.md +21 -0
  17. tccli/examples/waf/v20180125/DescribeCCRuleList.md +16 -2
  18. tccli/examples/waf/v20180125/DescribeModuleStatus.md +9 -1
  19. tccli/examples/waf/v20180125/ModifyModuleStatus.md +9 -1
  20. tccli/services/aiart/v20221229/api.json +2 -2
  21. tccli/services/car/v20220110/api.json +2 -2
  22. tccli/services/car/v20220110/examples.json +1 -1
  23. tccli/services/clb/v20180317/api.json +1 -1
  24. tccli/services/cls/cls_client.py +53 -0
  25. tccli/services/cls/v20201016/api.json +72 -0
  26. tccli/services/cls/v20201016/examples.json +8 -0
  27. tccli/services/ess/ess_client.py +53 -0
  28. tccli/services/ess/v20201111/api.json +228 -3
  29. tccli/services/ess/v20201111/examples.json +20 -0
  30. tccli/services/essbasic/v20210526/api.json +38 -29
  31. tccli/services/essbasic/v20210526/examples.json +51 -15
  32. tccli/services/mna/mna_client.py +53 -0
  33. tccli/services/mna/v20210119/api.json +142 -0
  34. tccli/services/mna/v20210119/examples.json +8 -0
  35. tccli/services/ocr/v20181119/api.json +65 -25
  36. tccli/services/ocr/v20181119/examples.json +1 -1
  37. tccli/services/tdmq/v20200217/api.json +107 -38
  38. tccli/services/tdmq/v20200217/examples.json +3 -3
  39. tccli/services/teo/teo_client.py +114 -8
  40. tccli/services/teo/v20220901/api.json +127 -4
  41. tccli/services/teo/v20220901/examples.json +26 -4
  42. tccli/services/waf/v20180125/api.json +194 -5
  43. tccli/services/waf/v20180125/examples.json +5 -5
  44. {tccli-3.0.990.1.dist-info → tccli-3.0.992.1.dist-info}/METADATA +2 -2
  45. {tccli-3.0.990.1.dist-info → tccli-3.0.992.1.dist-info}/RECORD +48 -42
  46. {tccli-3.0.990.1.dist-info → tccli-3.0.992.1.dist-info}/WHEEL +0 -0
  47. {tccli-3.0.990.1.dist-info → tccli-3.0.992.1.dist-info}/entry_points.txt +0 -0
  48. {tccli-3.0.990.1.dist-info → tccli-3.0.992.1.dist-info}/license_files/LICENSE +0 -0
@@ -7472,7 +7472,6 @@
7472
7472
  "example": "无",
7473
7473
  "member": "RocketMQClusterInfo",
7474
7474
  "name": "ClusterInfo",
7475
- "required": true,
7476
7475
  "type": "object",
7477
7476
  "value_allowed_null": false
7478
7477
  },
@@ -7482,17 +7481,15 @@
7482
7481
  "example": "无",
7483
7482
  "member": "RocketMQClusterConfig",
7484
7483
  "name": "ClusterConfig",
7485
- "required": true,
7486
7484
  "type": "object",
7487
7485
  "value_allowed_null": false
7488
7486
  },
7489
7487
  {
7490
7488
  "disabled": false,
7491
- "document": "集群最近使用量\n注意:此字段可能返回 null,表示取不到有效值。",
7489
+ "document": "集群最近使用量,即将废弃,请使用云监控获取相关数据。\n注意:此字段可能返回 null,表示取不到有效值。",
7492
7490
  "example": "无",
7493
7491
  "member": "RocketMQClusterRecentStats",
7494
7492
  "name": "ClusterStats",
7495
- "required": true,
7496
7493
  "type": "object",
7497
7494
  "value_allowed_null": true
7498
7495
  },
@@ -13969,7 +13966,7 @@
13969
13966
  "example": "8000",
13970
13967
  "member": "uint64",
13971
13968
  "name": "MaxTpsPerNamespace",
13972
- "required": false,
13969
+ "output_required": true,
13973
13970
  "type": "int",
13974
13971
  "value_allowed_null": false
13975
13972
  },
@@ -13979,7 +13976,7 @@
13979
13976
  "example": "10",
13980
13977
  "member": "uint64",
13981
13978
  "name": "MaxNamespaceNum",
13982
- "required": false,
13979
+ "output_required": true,
13983
13980
  "type": "int",
13984
13981
  "value_allowed_null": false
13985
13982
  },
@@ -13989,7 +13986,7 @@
13989
13986
  "example": "3",
13990
13987
  "member": "uint64",
13991
13988
  "name": "UsedNamespaceNum",
13992
- "required": false,
13989
+ "output_required": true,
13993
13990
  "type": "int",
13994
13991
  "value_allowed_null": false
13995
13992
  },
@@ -13999,7 +13996,7 @@
13999
13996
  "example": "1000",
14000
13997
  "member": "uint64",
14001
13998
  "name": "MaxTopicNum",
14002
- "required": false,
13999
+ "output_required": true,
14003
14000
  "type": "int",
14004
14001
  "value_allowed_null": false
14005
14002
  },
@@ -14009,7 +14006,7 @@
14009
14006
  "example": "8",
14010
14007
  "member": "uint64",
14011
14008
  "name": "UsedTopicNum",
14012
- "required": false,
14009
+ "output_required": true,
14013
14010
  "type": "int",
14014
14011
  "value_allowed_null": false
14015
14012
  },
@@ -14019,7 +14016,7 @@
14019
14016
  "example": "10000",
14020
14017
  "member": "uint64",
14021
14018
  "name": "MaxGroupNum",
14022
- "required": false,
14019
+ "output_required": true,
14023
14020
  "type": "int",
14024
14021
  "value_allowed_null": false
14025
14022
  },
@@ -14029,7 +14026,7 @@
14029
14026
  "example": "10",
14030
14027
  "member": "uint64",
14031
14028
  "name": "UsedGroupNum",
14032
- "required": false,
14029
+ "output_required": true,
14033
14030
  "type": "int",
14034
14031
  "value_allowed_null": false
14035
14032
  },
@@ -14039,7 +14036,7 @@
14039
14036
  "example": "100000",
14040
14037
  "member": "uint64",
14041
14038
  "name": "MaxRetentionTime",
14042
- "required": false,
14039
+ "output_required": true,
14043
14040
  "type": "int",
14044
14041
  "value_allowed_null": false
14045
14042
  },
@@ -14049,7 +14046,7 @@
14049
14046
  "example": "100000",
14050
14047
  "member": "uint64",
14051
14048
  "name": "MaxLatencyTime",
14052
- "required": false,
14049
+ "output_required": true,
14053
14050
  "type": "int",
14054
14051
  "value_allowed_null": false
14055
14052
  },
@@ -14059,9 +14056,19 @@
14059
14056
  "example": "16",
14060
14057
  "member": "uint64",
14061
14058
  "name": "MaxQueuesPerTopic",
14062
- "required": false,
14059
+ "output_required": true,
14063
14060
  "type": "int",
14064
14061
  "value_allowed_null": true
14062
+ },
14063
+ {
14064
+ "disabled": false,
14065
+ "document": "topic分布\n注意:此字段可能返回 null,表示取不到有效值。",
14066
+ "example": "无",
14067
+ "member": "RocketMQTopicDistribution",
14068
+ "name": "TopicDistribution",
14069
+ "output_required": true,
14070
+ "type": "list",
14071
+ "value_allowed_null": true
14065
14072
  }
14066
14073
  ],
14067
14074
  "usage": "out"
@@ -14111,7 +14118,7 @@
14111
14118
  "example": "rocketmq-xxxxx",
14112
14119
  "member": "string",
14113
14120
  "name": "ClusterId",
14114
- "required": false,
14121
+ "output_required": true,
14115
14122
  "type": "string",
14116
14123
  "value_allowed_null": false
14117
14124
  },
@@ -14121,7 +14128,7 @@
14121
14128
  "example": "test",
14122
14129
  "member": "string",
14123
14130
  "name": "ClusterName",
14124
- "required": false,
14131
+ "output_required": true,
14125
14132
  "type": "string",
14126
14133
  "value_allowed_null": false
14127
14134
  },
@@ -14131,7 +14138,7 @@
14131
14138
  "example": "华南地区",
14132
14139
  "member": "string",
14133
14140
  "name": "Region",
14134
- "required": false,
14141
+ "output_required": true,
14135
14142
  "type": "string",
14136
14143
  "value_allowed_null": false
14137
14144
  },
@@ -14141,7 +14148,7 @@
14141
14148
  "example": "100000000",
14142
14149
  "member": "uint64",
14143
14150
  "name": "CreateTime",
14144
- "required": false,
14151
+ "output_required": true,
14145
14152
  "type": "int",
14146
14153
  "value_allowed_null": false
14147
14154
  },
@@ -14151,7 +14158,7 @@
14151
14158
  "example": "备注",
14152
14159
  "member": "string",
14153
14160
  "name": "Remark",
14154
- "required": false,
14161
+ "output_required": true,
14155
14162
  "type": "string",
14156
14163
  "value_allowed_null": true
14157
14164
  },
@@ -14161,7 +14168,7 @@
14161
14168
  "example": "xxx",
14162
14169
  "member": "string",
14163
14170
  "name": "PublicEndPoint",
14164
- "required": false,
14171
+ "output_required": true,
14165
14172
  "type": "string",
14166
14173
  "value_allowed_null": false
14167
14174
  },
@@ -14171,7 +14178,7 @@
14171
14178
  "example": "xxxx",
14172
14179
  "member": "string",
14173
14180
  "name": "VpcEndPoint",
14174
- "required": false,
14181
+ "output_required": true,
14175
14182
  "type": "string",
14176
14183
  "value_allowed_null": false
14177
14184
  },
@@ -14181,7 +14188,7 @@
14181
14188
  "example": "true",
14182
14189
  "member": "bool",
14183
14190
  "name": "SupportNamespaceEndpoint",
14184
- "required": false,
14191
+ "output_required": true,
14185
14192
  "type": "bool",
14186
14193
  "value_allowed_null": true
14187
14194
  },
@@ -14191,7 +14198,7 @@
14191
14198
  "example": "无",
14192
14199
  "member": "VpcConfig",
14193
14200
  "name": "Vpcs",
14194
- "required": false,
14201
+ "output_required": true,
14195
14202
  "type": "list",
14196
14203
  "value_allowed_null": true
14197
14204
  },
@@ -14201,7 +14208,7 @@
14201
14208
  "example": "false",
14202
14209
  "member": "bool",
14203
14210
  "name": "IsVip",
14204
- "required": false,
14211
+ "output_required": true,
14205
14212
  "type": "bool",
14206
14213
  "value_allowed_null": true
14207
14214
  },
@@ -14211,7 +14218,7 @@
14211
14218
  "example": "false",
14212
14219
  "member": "bool",
14213
14220
  "name": "RocketMQFlag",
14214
- "required": false,
14221
+ "output_required": true,
14215
14222
  "type": "bool",
14216
14223
  "value_allowed_null": true
14217
14224
  },
@@ -14221,7 +14228,7 @@
14221
14228
  "example": "1",
14222
14229
  "member": "int64",
14223
14230
  "name": "Status",
14224
- "required": false,
14231
+ "output_required": true,
14225
14232
  "type": "int",
14226
14233
  "value_allowed_null": true
14227
14234
  },
@@ -14231,7 +14238,7 @@
14231
14238
  "example": "10000000",
14232
14239
  "member": "int64",
14233
14240
  "name": "IsolateTime",
14234
- "required": false,
14241
+ "output_required": true,
14235
14242
  "type": "int",
14236
14243
  "value_allowed_null": true
14237
14244
  },
@@ -14241,7 +14248,7 @@
14241
14248
  "example": "无",
14242
14249
  "member": "string",
14243
14250
  "name": "HttpPublicEndpoint",
14244
- "required": false,
14251
+ "output_required": true,
14245
14252
  "type": "string",
14246
14253
  "value_allowed_null": true
14247
14254
  },
@@ -14251,7 +14258,7 @@
14251
14258
  "example": "无",
14252
14259
  "member": "string",
14253
14260
  "name": "HttpVpcEndpoint",
14254
- "required": false,
14261
+ "output_required": true,
14255
14262
  "type": "string",
14256
14263
  "value_allowed_null": true
14257
14264
  },
@@ -14261,7 +14268,7 @@
14261
14268
  "example": "无",
14262
14269
  "member": "string",
14263
14270
  "name": "InternalEndpoint",
14264
- "required": false,
14271
+ "output_required": true,
14265
14272
  "type": "string",
14266
14273
  "value_allowed_null": true
14267
14274
  },
@@ -14271,9 +14278,69 @@
14271
14278
  "example": "无",
14272
14279
  "member": "string",
14273
14280
  "name": "HttpInternalEndpoint",
14274
- "required": false,
14281
+ "output_required": true,
14282
+ "type": "string",
14283
+ "value_allowed_null": true
14284
+ },
14285
+ {
14286
+ "disabled": false,
14287
+ "document": "是否开启ACL鉴权,专享实例支持关闭\n注意:此字段可能返回 null,表示取不到有效值。",
14288
+ "example": "true",
14289
+ "member": "bool",
14290
+ "name": "AclEnabled",
14291
+ "output_required": true,
14292
+ "type": "bool",
14293
+ "value_allowed_null": true
14294
+ },
14295
+ {
14296
+ "disabled": false,
14297
+ "document": "公网CLB实例ID\n注意:此字段可能返回 null,表示取不到有效值。",
14298
+ "example": "clbId",
14299
+ "member": "string",
14300
+ "name": "PublicClbId",
14301
+ "output_required": false,
14302
+ "type": "string",
14303
+ "value_allowed_null": true
14304
+ },
14305
+ {
14306
+ "disabled": false,
14307
+ "document": "vip\n注意:此字段可能返回 null,表示取不到有效值。",
14308
+ "example": "无",
14309
+ "member": "string",
14310
+ "name": "Vip",
14311
+ "output_required": false,
14275
14312
  "type": "string",
14276
14313
  "value_allowed_null": true
14314
+ },
14315
+ {
14316
+ "disabled": false,
14317
+ "document": "所属VPC\n注意:此字段可能返回 null,表示取不到有效值。",
14318
+ "example": "无",
14319
+ "member": "string",
14320
+ "name": "VpcId",
14321
+ "output_required": false,
14322
+ "type": "string",
14323
+ "value_allowed_null": true
14324
+ },
14325
+ {
14326
+ "disabled": false,
14327
+ "document": "是否支持迁移\n注意:此字段可能返回 null,表示取不到有效值。",
14328
+ "example": "无",
14329
+ "member": "bool",
14330
+ "name": "SupportMigration",
14331
+ "output_required": false,
14332
+ "type": "bool",
14333
+ "value_allowed_null": true
14334
+ },
14335
+ {
14336
+ "disabled": false,
14337
+ "document": "实例状态,0表示创建中,1表示正常,2表示隔离中,3表示已销毁,4 - 异常, 5 - 发货失败,6 - 变配中,7 - 变配失败\n注意:此字段可能返回 null,表示取不到有效值。",
14338
+ "example": "无",
14339
+ "member": "int64",
14340
+ "name": "InstanceStatus",
14341
+ "output_required": false,
14342
+ "type": "int",
14343
+ "value_allowed_null": true
14277
14344
  }
14278
14345
  ],
14279
14346
  "usage": "out"
@@ -16487,26 +16554,28 @@
16487
16554
  "members": [
16488
16555
  {
16489
16556
  "disabled": false,
16490
- "document": "标签的key的值",
16491
- "example": "",
16557
+ "document": "标签的key的值\n注意:此字段可能返回 null,表示取不到有效值。",
16558
+ "example": "",
16492
16559
  "member": "string",
16493
16560
  "name": "TagKey",
16561
+ "output_required": false,
16494
16562
  "required": true,
16495
16563
  "type": "string",
16496
- "value_allowed_null": false
16564
+ "value_allowed_null": true
16497
16565
  },
16498
16566
  {
16499
16567
  "disabled": false,
16500
- "document": "标签的Value的值",
16501
- "example": "",
16568
+ "document": "标签的Value的值\n注意:此字段可能返回 null,表示取不到有效值。",
16569
+ "example": "",
16502
16570
  "member": "string",
16503
16571
  "name": "TagValue",
16572
+ "output_required": false,
16504
16573
  "required": true,
16505
16574
  "type": "string",
16506
- "value_allowed_null": false
16575
+ "value_allowed_null": true
16507
16576
  }
16508
16577
  ],
16509
- "usage": "in"
16578
+ "usage": "both"
16510
16579
  },
16511
16580
  "Topic": {
16512
16581
  "document": "主题实例",
@@ -550,10 +550,10 @@
550
550
  ],
551
551
  "DescribeRocketMQCluster": [
552
552
  {
553
- "document": "",
553
+ "document": "获取RocketMQ集群详情",
554
554
  "input": "POST / HTTP/1.1\nHost: tdmq.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeRocketMQCluster\n<公共请求参数>\n\n{\n \"ClusterId\": \"rocketmq-rd3545bkkj49\"\n}",
555
- "output": "{\n \"Response\": {\n \"RequestId\": \"c6d158b6-89b2-40d1-b1f6-5973f0f00cd5\",\n \"ClusterInfo\": {\n \"ClusterId\": \"rocketmq-rd3545bkkj49\",\n \"ClusterName\": \"test-example\",\n \"Region\": \"ap-beijing\",\n \"CreateTime\": 1620321019000,\n \"Remark\": \"modified\",\n \"PublicEndPoint\": \"pulsar://xxxxx.com:6650\",\n \"VpcEndPoint\": \"pulsar://xxxxx.com:6650\",\n \"Vpcs\": [\n {\n \"SubnetId\": \"xx\",\n \"VpcId\": \"xx\"\n }\n ],\n \"SupportNamespaceEndpoint\": true,\n \"RocketMQFlag\": true,\n \"IsVip\": true\n },\n \"ClusterConfig\": {\n \"MaxTpsPerNamespace\": 8000,\n \"UsedNamespaceNum\": 1,\n \"MaxTopicNum\": 1000,\n \"UsedTopicNum\": 2,\n \"MaxGroupNum\": 10000,\n \"UsedGroupNum\": 1,\n \"MaxRetentionTime\": 1296000000,\n \"MaxLatencyTime\": 3456000000,\n \"MaxNamespaceNum\": 10\n },\n \"ClusterStats\": {\n \"TopicNum\": 2,\n \"ProducedMsgNum\": 0,\n \"ConsumedMsgNum\": 0,\n \"AccumulativeMsgNum\": 0\n }\n }\n}",
556
- "title": "huo"
555
+ "output": "{\n \"Response\": {\n \"RequestId\": \"c6d158b6-89b2-40d1-b1f6-5973f0f00cd5\",\n \"ClusterInfo\": {\n \"ClusterId\": \"rocketmq-rd3545bkkj49\",\n \"ClusterName\": \"test-example\",\n \"Region\": \"ap-beijing\",\n \"CreateTime\": 1620321019000,\n \"Remark\": \"modified\",\n \"PublicEndPoint\": \"pulsar://xxxxx.com:6650\",\n \"VpcEndPoint\": \"pulsar://xxxxx.com:6650\",\n \"Vpcs\": [\n {\n \"SubnetId\": \"subnet-123\",\n \"VpcId\": \"vpc-12333\"\n }\n ],\n \"SupportNamespaceEndpoint\": true,\n \"RocketMQFlag\": true,\n \"IsVip\": true\n },\n \"ClusterConfig\": {\n \"MaxTpsPerNamespace\": 8000,\n \"UsedNamespaceNum\": 1,\n \"MaxTopicNum\": 1000,\n \"UsedTopicNum\": 2,\n \"MaxGroupNum\": 10000,\n \"UsedGroupNum\": 1,\n \"MaxRetentionTime\": 1296000000,\n \"MaxLatencyTime\": 3456000000,\n \"MaxNamespaceNum\": 10\n },\n \"ClusterStats\": {\n \"TopicNum\": 2,\n \"ProducedMsgNum\": 0,\n \"ConsumedMsgNum\": 0,\n \"AccumulativeMsgNum\": 0\n }\n }\n}",
556
+ "title": "获取RocketMQ集群详情"
557
557
  }
558
558
  ],
559
559
  "DescribeRocketMQClusters": [
@@ -1111,6 +1111,58 @@ def doDescribeAvailablePlans(args, parsed_globals):
1111
1111
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1112
1112
 
1113
1113
 
1114
+ def doBindSharedCNAME(args, parsed_globals):
1115
+ g_param = parse_global_arg(parsed_globals)
1116
+
1117
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1118
+ cred = credential.CVMRoleCredential()
1119
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1120
+ cred = credential.STSAssumeRoleCredential(
1121
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1122
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
1123
+ )
1124
+ 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):
1125
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1126
+ else:
1127
+ cred = credential.Credential(
1128
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1129
+ )
1130
+ http_profile = HttpProfile(
1131
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1132
+ reqMethod="POST",
1133
+ endpoint=g_param[OptionsDefine.Endpoint],
1134
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1135
+ )
1136
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1137
+ if g_param[OptionsDefine.Language]:
1138
+ profile.language = g_param[OptionsDefine.Language]
1139
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1140
+ client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
1141
+ client._sdkVersion += ("_CLI_" + __version__)
1142
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1143
+ model = models.BindSharedCNAMERequest()
1144
+ model.from_json_string(json.dumps(args))
1145
+ start_time = time.time()
1146
+ while True:
1147
+ rsp = client.BindSharedCNAME(model)
1148
+ result = rsp.to_json_string()
1149
+ try:
1150
+ json_obj = json.loads(result)
1151
+ except TypeError as e:
1152
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1153
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1154
+ break
1155
+ cur_time = time.time()
1156
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1157
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1158
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1159
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1160
+ else:
1161
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1162
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1163
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1164
+
1165
+
1114
1166
  def doDescribeAliasDomains(args, parsed_globals):
1115
1167
  g_param = parse_global_arg(parsed_globals)
1116
1168
 
@@ -2463,6 +2515,58 @@ def doDescribeTopL7AnalysisData(args, parsed_globals):
2463
2515
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2464
2516
 
2465
2517
 
2518
+ def doCreateAccelerationDomain(args, parsed_globals):
2519
+ g_param = parse_global_arg(parsed_globals)
2520
+
2521
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2522
+ cred = credential.CVMRoleCredential()
2523
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2524
+ cred = credential.STSAssumeRoleCredential(
2525
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2526
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
2527
+ )
2528
+ 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):
2529
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2530
+ else:
2531
+ cred = credential.Credential(
2532
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2533
+ )
2534
+ http_profile = HttpProfile(
2535
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2536
+ reqMethod="POST",
2537
+ endpoint=g_param[OptionsDefine.Endpoint],
2538
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2539
+ )
2540
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2541
+ if g_param[OptionsDefine.Language]:
2542
+ profile.language = g_param[OptionsDefine.Language]
2543
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2544
+ client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
2545
+ client._sdkVersion += ("_CLI_" + __version__)
2546
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2547
+ model = models.CreateAccelerationDomainRequest()
2548
+ model.from_json_string(json.dumps(args))
2549
+ start_time = time.time()
2550
+ while True:
2551
+ rsp = client.CreateAccelerationDomain(model)
2552
+ result = rsp.to_json_string()
2553
+ try:
2554
+ json_obj = json.loads(result)
2555
+ except TypeError as e:
2556
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2557
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2558
+ break
2559
+ cur_time = time.time()
2560
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2561
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2562
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2563
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2564
+ else:
2565
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2566
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2567
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2568
+
2569
+
2466
2570
  def doDescribeDDoSAttackData(args, parsed_globals):
2467
2571
  g_param = parse_global_arg(parsed_globals)
2468
2572
 
@@ -2515,7 +2619,7 @@ def doDescribeDDoSAttackData(args, parsed_globals):
2515
2619
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2516
2620
 
2517
2621
 
2518
- def doDescribeDDoSAttackEvent(args, parsed_globals):
2622
+ def doDeleteSharedCNAME(args, parsed_globals):
2519
2623
  g_param = parse_global_arg(parsed_globals)
2520
2624
 
2521
2625
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2544,11 +2648,11 @@ def doDescribeDDoSAttackEvent(args, parsed_globals):
2544
2648
  client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
2545
2649
  client._sdkVersion += ("_CLI_" + __version__)
2546
2650
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2547
- model = models.DescribeDDoSAttackEventRequest()
2651
+ model = models.DeleteSharedCNAMERequest()
2548
2652
  model.from_json_string(json.dumps(args))
2549
2653
  start_time = time.time()
2550
2654
  while True:
2551
- rsp = client.DescribeDDoSAttackEvent(model)
2655
+ rsp = client.DeleteSharedCNAME(model)
2552
2656
  result = rsp.to_json_string()
2553
2657
  try:
2554
2658
  json_obj = json.loads(result)
@@ -2879,7 +2983,7 @@ def doBindZoneToPlan(args, parsed_globals):
2879
2983
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2880
2984
 
2881
2985
 
2882
- def doCreateAccelerationDomain(args, parsed_globals):
2986
+ def doDescribeDDoSAttackEvent(args, parsed_globals):
2883
2987
  g_param = parse_global_arg(parsed_globals)
2884
2988
 
2885
2989
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2908,11 +3012,11 @@ def doCreateAccelerationDomain(args, parsed_globals):
2908
3012
  client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
2909
3013
  client._sdkVersion += ("_CLI_" + __version__)
2910
3014
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2911
- model = models.CreateAccelerationDomainRequest()
3015
+ model = models.DescribeDDoSAttackEventRequest()
2912
3016
  model.from_json_string(json.dumps(args))
2913
3017
  start_time = time.time()
2914
3018
  while True:
2915
- rsp = client.CreateAccelerationDomain(model)
3019
+ rsp = client.DescribeDDoSAttackEvent(model)
2916
3020
  result = rsp.to_json_string()
2917
3021
  try:
2918
3022
  json_obj = json.loads(result)
@@ -3641,6 +3745,7 @@ ACTION_MAP = {
3641
3745
  "DescribeHostsSetting": doDescribeHostsSetting,
3642
3746
  "DescribeSecurityTemplateBindings": doDescribeSecurityTemplateBindings,
3643
3747
  "DescribeAvailablePlans": doDescribeAvailablePlans,
3748
+ "BindSharedCNAME": doBindSharedCNAME,
3644
3749
  "DescribeAliasDomains": doDescribeAliasDomains,
3645
3750
  "IdentifyZone": doIdentifyZone,
3646
3751
  "DescribeOriginProtection": doDescribeOriginProtection,
@@ -3667,15 +3772,16 @@ ACTION_MAP = {
3667
3772
  "DeleteSecurityIPGroup": doDeleteSecurityIPGroup,
3668
3773
  "ModifyRule": doModifyRule,
3669
3774
  "DescribeTopL7AnalysisData": doDescribeTopL7AnalysisData,
3775
+ "CreateAccelerationDomain": doCreateAccelerationDomain,
3670
3776
  "DescribeDDoSAttackData": doDescribeDDoSAttackData,
3671
- "DescribeDDoSAttackEvent": doDescribeDDoSAttackEvent,
3777
+ "DeleteSharedCNAME": doDeleteSharedCNAME,
3672
3778
  "ModifyZone": doModifyZone,
3673
3779
  "DownloadL4Logs": doDownloadL4Logs,
3674
3780
  "CreatePrefetchTask": doCreatePrefetchTask,
3675
3781
  "DeleteAliasDomain": doDeleteAliasDomain,
3676
3782
  "DescribeOverviewL7Data": doDescribeOverviewL7Data,
3677
3783
  "BindZoneToPlan": doBindZoneToPlan,
3678
- "CreateAccelerationDomain": doCreateAccelerationDomain,
3784
+ "DescribeDDoSAttackEvent": doDescribeDDoSAttackEvent,
3679
3785
  "DeleteRules": doDeleteRules,
3680
3786
  "ModifySecurityPolicy": doModifySecurityPolicy,
3681
3787
  "ModifyAccelerationDomain": doModifyAccelerationDomain,