tccli 3.0.1282.1__py2.py3-none-any.whl → 3.0.1284.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.
- tccli/__init__.py +1 -1
- tccli/services/acp/v20220105/api.json +23 -23
- tccli/services/acp/v20220105/examples.json +2 -8
- tccli/services/advisor/v20200721/api.json +4 -2
- tccli/services/antiddos/v20200309/api.json +1 -1
- tccli/services/apm/v20210622/api.json +1 -1
- tccli/services/cdn/v20180606/api.json +4 -2
- tccli/services/cdwch/v20200915/api.json +3 -3
- tccli/services/cdwch/v20200915/examples.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +18 -0
- tccli/services/cfg/v20210820/api.json +5 -5
- tccli/services/chdfs/v20201112/api.json +12 -12
- tccli/services/clb/v20180317/api.json +20 -2
- tccli/services/cynosdb/v20190107/api.json +10 -0
- tccli/services/dbbrain/v20191016/api.json +17 -17
- tccli/services/dbbrain/v20210527/api.json +22 -22
- tccli/services/dcdb/v20180411/api.json +14 -4
- tccli/services/dcdb/v20180411/examples.json +1 -1
- tccli/services/dlc/v20210125/api.json +128 -56
- tccli/services/dlc/v20210125/examples.json +3 -3
- tccli/services/domain/v20180808/api.json +3 -3
- tccli/services/dts/v20180330/api.json +16 -16
- tccli/services/dts/v20211206/api.json +493 -488
- tccli/services/es/v20180416/api.json +3 -3
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +122 -1
- tccli/services/ess/v20201111/examples.json +26 -0
- tccli/services/essbasic/essbasic_client.py +57 -4
- tccli/services/essbasic/v20210526/api.json +163 -0
- tccli/services/essbasic/v20210526/examples.json +26 -0
- tccli/services/goosefs/v20220519/api.json +26 -24
- tccli/services/goosefs/v20220519/examples.json +2 -2
- tccli/services/lke/v20231130/api.json +8 -8
- tccli/services/lke/v20231130/examples.json +1 -1
- tccli/services/lowcode/v20210108/api.json +165 -165
- tccli/services/lowcode/v20210108/examples.json +5 -5
- tccli/services/mariadb/v20170312/api.json +12 -2
- tccli/services/mariadb/v20170312/examples.json +4 -4
- tccli/services/mongodb/v20190725/api.json +2 -2
- tccli/services/mongodb/v20190725/examples.json +2 -2
- tccli/services/monitor/v20180724/api.json +7 -7
- tccli/services/monitor/v20180724/examples.json +2 -2
- tccli/services/mqtt/mqtt_client.py +106 -0
- tccli/services/mqtt/v20240516/api.json +511 -213
- tccli/services/mqtt/v20240516/examples.json +21 -5
- tccli/services/oceanus/v20190422/api.json +43 -4
- tccli/services/ocr/v20181119/api.json +2 -2
- tccli/services/ocr/v20181119/examples.json +2 -2
- tccli/services/organization/organization_client.py +53 -0
- tccli/services/organization/v20210331/api.json +61 -0
- tccli/services/organization/v20210331/examples.json +8 -0
- tccli/services/redis/v20180412/api.json +11 -2
- tccli/services/redis/v20180412/examples.json +1 -1
- tccli/services/rum/v20210622/api.json +2 -2
- tccli/services/scf/v20180416/api.json +40 -0
- tccli/services/tdmq/tdmq_client.py +4 -57
- tccli/services/tdmq/v20200217/api.json +118 -212
- tccli/services/tdmq/v20200217/examples.json +0 -8
- tccli/services/tds/v20220801/api.json +2 -2
- tccli/services/tione/v20211111/api.json +41 -1
- tccli/services/tse/v20201207/api.json +207 -104
- tccli/services/vclm/v20240523/api.json +20 -2
- tccli/services/vdb/v20230616/api.json +62 -62
- tccli/services/vdb/v20230616/examples.json +2 -2
- tccli/services/waf/v20180125/api.json +143 -0
- tccli/services/waf/v20180125/examples.json +16 -0
- tccli/services/waf/waf_client.py +106 -0
- tccli/services/wedata/v20210820/api.json +965 -133
- tccli/services/wedata/v20210820/examples.json +24 -8
- tccli/services/wedata/wedata_client.py +106 -0
- {tccli-3.0.1282.1.dist-info → tccli-3.0.1284.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1282.1.dist-info → tccli-3.0.1284.1.dist-info}/RECORD +76 -76
- {tccli-3.0.1282.1.dist-info → tccli-3.0.1284.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1282.1.dist-info → tccli-3.0.1284.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1282.1.dist-info → tccli-3.0.1284.1.dist-info}/license_files/LICENSE +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
"CreateKnowledgeSet": [
|
4
4
|
{
|
5
5
|
"document": "创建微搭知识库",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: lowcode.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateKnowledgeSet\n<公共请求参数>\n\n{\n \"EnvId\": \"lowcode-1cf\",\n \"Name\": \"
|
6
|
+
"input": "POST / HTTP/1.1\nHost: lowcode.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateKnowledgeSet\n<公共请求参数>\n\n{\n \"EnvId\": \"lowcode-1cf\",\n \"Name\": \"the_name\",\n \"Title\": \"the_title\",\n \"Desc\": \"the_desc\"\n}",
|
7
7
|
"output": "{\n \"Response\": {\n \"RequestId\": \"dde48f19-e0fb-490e-bf4c-150bcf7e3c91\"\n }\n}",
|
8
8
|
"title": "创建知识库"
|
9
9
|
}
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"DeleteKnowledgeSet": [
|
20
20
|
{
|
21
21
|
"document": "用于删除知识库",
|
22
|
-
"input": "POST / HTTP/1.1\nHost: lowcode.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteKnowledgeSet\n<公共请求参数>\n\n{\n \"EnvId\": \"lowcode-1cf\",\n \"Name\": \"
|
22
|
+
"input": "POST / HTTP/1.1\nHost: lowcode.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteKnowledgeSet\n<公共请求参数>\n\n{\n \"EnvId\": \"lowcode-1cf\",\n \"Name\": \"name\"\n}",
|
23
23
|
"output": "{\n \"Response\": {\n \"RequestId\": \"dde48f19-e0fb-490e-bf4c-150bcf7e3c91\"\n }\n}",
|
24
24
|
"title": "删除知识库"
|
25
25
|
}
|
@@ -52,7 +52,7 @@
|
|
52
52
|
{
|
53
53
|
"document": "查询环境下的知识库列表",
|
54
54
|
"input": "POST / HTTP/1.1\nHost: lowcode.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeKnowledgeSetList\n<公共请求参数>\n\n{\n \"EnvId\": \"lowcode-xxxx\",\n \"Offset\": 0,\n \"Limit\": 10\n}",
|
55
|
-
"output": "{\n \"Response\": {\n \"Data\": {\n \"KnowledgeSets\": [\n {\n \"Name\": \"
|
55
|
+
"output": "{\n \"Response\": {\n \"Data\": {\n \"KnowledgeSets\": [\n {\n \"Name\": \"name\",\n \"Title\": \"title\",\n \"Desc\": \"desc\",\n \"Active\": \"ENABLED\",\n \"CreateTime\": \"2024-06-04 18:07:38\",\n \"UpdateTime\": \"2024-06-04 18:09:29\"\n }\n ],\n \"Total\": 1\n },\n \"RequestId\": \"f549082e-0cff-4026-96f6-a570d9f1c22d\"\n }\n}",
|
56
56
|
"title": "查询环境下的知识库列表"
|
57
57
|
}
|
58
58
|
],
|
@@ -60,14 +60,14 @@
|
|
60
60
|
{
|
61
61
|
"document": "根据关键字搜索知识库文档",
|
62
62
|
"input": "POST / HTTP/1.1\nHost: lowcode.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SearchDocList\n<公共请求参数>\n\n{\n \"EnvId\": \"prod-1\",\n \"CollectionView\": \"view\",\n \"SearchKey\": \"key\",\n \"SearchValue\": \"value\",\n \"PageNo\": 1,\n \"PageSize\": 1\n}",
|
63
|
-
"output": "{\n \"Response\": {\n \"Data\": {\n \"DocInfos\": [\n {\n \"CollectionViewName\": \"name\",\n \"DocSetId\": \"00-11\",\n \"DocSetName\": \"abc.md\",\n \"DocType\": \".md\",\n \"FileTitle\": \"title\",\n \"FileMetaData\": \"{\\\"key\\\":\\\"value\\\"}\",\n \"DocDesc\": \"
|
63
|
+
"output": "{\n \"Response\": {\n \"Data\": {\n \"DocInfos\": [\n {\n \"CollectionViewName\": \"name\",\n \"DocSetId\": \"00-11\",\n \"DocSetName\": \"abc.md\",\n \"DocType\": \".md\",\n \"FileTitle\": \"title\",\n \"FileMetaData\": \"{\\\"key\\\":\\\"value\\\"}\",\n \"DocDesc\": \"desc\",\n \"FileSize\": 0\n }\n ],\n \"Total\": 10\n },\n \"RequestId\": \"1cc82948-244f-4812-bb2a-25a8a473d312\"\n }\n}",
|
64
64
|
"title": "知识库文档搜索接口"
|
65
65
|
}
|
66
66
|
],
|
67
67
|
"UpdateKnowledgeSet": [
|
68
68
|
{
|
69
69
|
"document": "更新知识库状态",
|
70
|
-
"input": "POST / HTTP/1.1\nHost: lowcode.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateKnowledgeSet\n<公共请求参数>\n\n{\n \"EnvId\": \"lowcode-xxx\",\n \"Name\": \"
|
70
|
+
"input": "POST / HTTP/1.1\nHost: lowcode.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateKnowledgeSet\n<公共请求参数>\n\n{\n \"EnvId\": \"lowcode-xxx\",\n \"Name\": \"name\",\n \"Active\": \"ENABLED\"\n}",
|
71
71
|
"output": "{\n \"Response\": {\n \"RequestId\": \"dde48f19-e0fb-490e-bf4c-150bcf7e3c91\"\n }\n}",
|
72
72
|
"title": "更新知识库"
|
73
73
|
}
|
@@ -3596,6 +3596,16 @@
|
|
3596
3596
|
"type": "int",
|
3597
3597
|
"value_allowed_null": false
|
3598
3598
|
},
|
3599
|
+
{
|
3600
|
+
"disabled": false,
|
3601
|
+
"document": "文件下载链接路径前缀",
|
3602
|
+
"example": "http://newdtsdev-1301792469.cos.ap-guangzhou.myqcloud.com",
|
3603
|
+
"member": "string",
|
3604
|
+
"name": "UrlPrefix",
|
3605
|
+
"output_required": true,
|
3606
|
+
"type": "string",
|
3607
|
+
"value_allowed_null": false
|
3608
|
+
},
|
3599
3609
|
{
|
3600
3610
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
3601
3611
|
"member": "string",
|
@@ -3676,7 +3686,7 @@
|
|
3676
3686
|
"example": "2019-04-06 00:31:10",
|
3677
3687
|
"member": "string",
|
3678
3688
|
"name": "StartTime",
|
3679
|
-
"
|
3689
|
+
"output_required": true,
|
3680
3690
|
"type": "string",
|
3681
3691
|
"value_allowed_null": false
|
3682
3692
|
},
|
@@ -3686,7 +3696,7 @@
|
|
3686
3696
|
"example": "2019-04-06 14:31:56",
|
3687
3697
|
"member": "string",
|
3688
3698
|
"name": "EndTime",
|
3689
|
-
"
|
3699
|
+
"output_required": true,
|
3690
3700
|
"type": "string",
|
3691
3701
|
"value_allowed_null": false
|
3692
3702
|
},
|
@@ -122,10 +122,10 @@
|
|
122
122
|
],
|
123
123
|
"DescribeBackupFiles": [
|
124
124
|
{
|
125
|
-
"document": "",
|
126
|
-
"input": "POST / HTTP/1.1\nHost: mariadb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBackupFiles\n<公共请求参数>\n\n{}",
|
127
|
-
"output": "{\n \"Response\": {\n \"Files\": [\n {\n \"BackupType\": \"Data\",\n \"EndTime\": \"
|
128
|
-
"title": "
|
125
|
+
"document": "该接口用于获取实例的备份列表",
|
126
|
+
"input": "POST / HTTP/1.1\nHost: mariadb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBackupFiles\n<公共请求参数>\n\n{\n \"InstanceId\": \"tdsql-02badqa3\",\n \"BackupType\": \"Data\",\n \"Limit\": 20,\n \"Offset\": 0\n}",
|
127
|
+
"output": "{\n \"Response\": {\n \"Files\": [\n {\n \"BackupType\": \"Data\",\n \"EndTime\": \"2024-12-20 16:29:07\",\n \"FileName\": \"cos_xtrabackup+1734683337+20241220+162857+1507806831+xbstream.lz4\",\n \"FilePath\": \"cos_backup/tdsql/set_1734680376_202786203/xtrabackup/2024-12-20/cos_xtrabackup+1734683337+20241220+162857+1507806831+xbstream.lz4\",\n \"FileSize\": 13930740,\n \"InstanceId\": \"tdsql-02badqa3\",\n \"InstanceName\": \"QT4syxfv8.0\",\n \"InstanceStatus\": 2,\n \"ManualBackup\": 0,\n \"ShardId\": \"\",\n \"StartTime\": \"2024-12-20 16:28:57\",\n \"StorageClass\": \"STANDARD\"\n }\n ],\n \"RequestId\": \"549454bd-65ac-4507-8f75-65609c357328\",\n \"TotalCount\": 1,\n \"UrlPrefix\": \"http://newdtsdev-1301792469.cos.ap-guangzhou.myqcloud.com\"\n }\n}",
|
128
|
+
"title": "获取实例备份列表"
|
129
129
|
}
|
130
130
|
],
|
131
131
|
"DescribeBackupTime": [
|
@@ -197,7 +197,7 @@
|
|
197
197
|
"status": "online"
|
198
198
|
},
|
199
199
|
"EnableTransparentDataEncryption": {
|
200
|
-
"document": "
|
200
|
+
"document": "本接口(EnableTransparentDataEncryption)用于开启云数据库 MongoDB 的透明加密能力。",
|
201
201
|
"input": "EnableTransparentDataEncryptionRequest",
|
202
202
|
"name": "开启实例数据透明加密",
|
203
203
|
"output": "EnableTransparentDataEncryptionResponse",
|
@@ -3416,7 +3416,7 @@
|
|
3416
3416
|
{
|
3417
3417
|
"disabled": false,
|
3418
3418
|
"document": "密钥 ID。若不设置该参数,不指定具体的密钥 ID,由腾讯云自动生成密钥。",
|
3419
|
-
"example": "
|
3419
|
+
"example": "AKID********************************",
|
3420
3420
|
"member": "string",
|
3421
3421
|
"name": "KeyId",
|
3422
3422
|
"required": false,
|
@@ -227,8 +227,8 @@
|
|
227
227
|
"EnableTransparentDataEncryption": [
|
228
228
|
{
|
229
229
|
"document": "",
|
230
|
-
"input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: EnableTransparentDataEncryption\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-
|
231
|
-
"output": "{\n \"Response\": {\n \"FlowId\":
|
230
|
+
"input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: EnableTransparentDataEncryption\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-igjy****\",\n \"KmsRegion\": \"ap-guangzhou\",\n \"KeyId\": \"AKID********************************\"\n}",
|
231
|
+
"output": "{\n \"Response\": {\n \"FlowId\": 17316505316,\n \"RequestId\": \"a8dce7a4-d488-49c9-8d24-33cf623f5992\"\n }\n}",
|
232
232
|
"title": "开启实例数据透明加密"
|
233
233
|
}
|
234
234
|
],
|
@@ -10186,7 +10186,7 @@
|
|
10186
10186
|
{
|
10187
10187
|
"disabled": false,
|
10188
10188
|
"document": "策略组id",
|
10189
|
-
"example": "
|
10189
|
+
"example": "1247756",
|
10190
10190
|
"member": "int64",
|
10191
10191
|
"name": "GroupId",
|
10192
10192
|
"required": true,
|
@@ -10261,7 +10261,7 @@
|
|
10261
10261
|
{
|
10262
10262
|
"disabled": false,
|
10263
10263
|
"document": "最近编辑的用户uin",
|
10264
|
-
"example": "
|
10264
|
+
"example": "100040701662",
|
10265
10265
|
"member": "string",
|
10266
10266
|
"name": "LastEditUin",
|
10267
10267
|
"output_required": true,
|
@@ -10301,7 +10301,7 @@
|
|
10301
10301
|
{
|
10302
10302
|
"disabled": false,
|
10303
10303
|
"document": "阈值规则列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
10304
|
-
"example": "
|
10304
|
+
"example": "无",
|
10305
10305
|
"member": "DescribePolicyGroupInfoCondition",
|
10306
10306
|
"name": "ConditionsConfig",
|
10307
10307
|
"output_required": true,
|
@@ -10311,7 +10311,7 @@
|
|
10311
10311
|
{
|
10312
10312
|
"disabled": false,
|
10313
10313
|
"document": "产品事件规则列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
10314
|
-
"example": "
|
10314
|
+
"example": "无",
|
10315
10315
|
"member": "DescribePolicyGroupInfoEventCondition",
|
10316
10316
|
"name": "EventConfig",
|
10317
10317
|
"output_required": true,
|
@@ -10321,7 +10321,7 @@
|
|
10321
10321
|
{
|
10322
10322
|
"disabled": false,
|
10323
10323
|
"document": "用户接收人列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
10324
|
-
"example": "
|
10324
|
+
"example": "无",
|
10325
10325
|
"member": "DescribePolicyGroupInfoReceiverInfo",
|
10326
10326
|
"name": "ReceiverInfos",
|
10327
10327
|
"output_required": true,
|
@@ -10331,7 +10331,7 @@
|
|
10331
10331
|
{
|
10332
10332
|
"disabled": false,
|
10333
10333
|
"document": "用户回调信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
10334
|
-
"example": "
|
10334
|
+
"example": "无",
|
10335
10335
|
"member": "DescribePolicyGroupInfoCallback",
|
10336
10336
|
"name": "Callback",
|
10337
10337
|
"output_required": true,
|
@@ -10341,7 +10341,7 @@
|
|
10341
10341
|
{
|
10342
10342
|
"disabled": false,
|
10343
10343
|
"document": "模板策略组\n注意:此字段可能返回 null,表示取不到有效值。",
|
10344
|
-
"example": "
|
10344
|
+
"example": "无",
|
10345
10345
|
"member": "DescribePolicyGroupInfoConditionTpl",
|
10346
10346
|
"name": "ConditionsTemp",
|
10347
10347
|
"output_required": true,
|
@@ -853,8 +853,8 @@
|
|
853
853
|
"DescribePrometheusConfig": [
|
854
854
|
{
|
855
855
|
"document": "拉取prometheus配置",
|
856
|
-
"input": "https://monitor.tencentcloudapi.com/?Action=DescribePrometheusConfig\
|
857
|
-
"output": "{\n \"Response\": {\n \"Config\": \"
|
856
|
+
"input": "https://monitor.tencentcloudapi.com/?Action=DescribePrometheusConfig\n&InstanceId=prom-fdfasasf\n&ClusterType=tke\n&ClusterId=cls-gdgdge\n&<公共请求参数>",
|
857
|
+
"output": "{\n \"Response\": {\n \"Config\": \"global:\\n scrape_interval: 15s\",\n \"ServiceMonitors\": [\n {\n \"Name\": \"test-sm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"PodMonitors\": [\n {\n \"Name\": \"test-pm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"RawJobs\": [\n {\n \"Name\": \"test-rawjob\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"Probes\": [\n {\n \"Name\": \"test-probe\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"ImageNeedUpdate\": true,\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
|
858
858
|
"title": "拉取prometheus配置"
|
859
859
|
}
|
860
860
|
],
|
@@ -2097,6 +2097,58 @@ def doDeleteAuthorizationPolicy(args, parsed_globals):
|
|
2097
2097
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2098
2098
|
|
2099
2099
|
|
2100
|
+
def doModifyHttpAuthenticator(args, parsed_globals):
|
2101
|
+
g_param = parse_global_arg(parsed_globals)
|
2102
|
+
|
2103
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2104
|
+
cred = credential.CVMRoleCredential()
|
2105
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2106
|
+
cred = credential.STSAssumeRoleCredential(
|
2107
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2108
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2109
|
+
)
|
2110
|
+
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):
|
2111
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2112
|
+
else:
|
2113
|
+
cred = credential.Credential(
|
2114
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2115
|
+
)
|
2116
|
+
http_profile = HttpProfile(
|
2117
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2118
|
+
reqMethod="POST",
|
2119
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2120
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2121
|
+
)
|
2122
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2123
|
+
if g_param[OptionsDefine.Language]:
|
2124
|
+
profile.language = g_param[OptionsDefine.Language]
|
2125
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2126
|
+
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2128
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
+
model = models.ModifyHttpAuthenticatorRequest()
|
2130
|
+
model.from_json_string(json.dumps(args))
|
2131
|
+
start_time = time.time()
|
2132
|
+
while True:
|
2133
|
+
rsp = client.ModifyHttpAuthenticator(model)
|
2134
|
+
result = rsp.to_json_string()
|
2135
|
+
try:
|
2136
|
+
json_obj = json.loads(result)
|
2137
|
+
except TypeError as e:
|
2138
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2139
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2140
|
+
break
|
2141
|
+
cur_time = time.time()
|
2142
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2143
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2144
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2145
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2146
|
+
else:
|
2147
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2148
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2149
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
|
+
|
2151
|
+
|
2100
2152
|
def doDescribeTopic(args, parsed_globals):
|
2101
2153
|
g_param = parse_global_arg(parsed_globals)
|
2102
2154
|
|
@@ -2617,6 +2669,58 @@ def doModifyInstance(args, parsed_globals):
|
|
2617
2669
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2618
2670
|
|
2619
2671
|
|
2672
|
+
def doCreateHttpAuthenticator(args, parsed_globals):
|
2673
|
+
g_param = parse_global_arg(parsed_globals)
|
2674
|
+
|
2675
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2676
|
+
cred = credential.CVMRoleCredential()
|
2677
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2678
|
+
cred = credential.STSAssumeRoleCredential(
|
2679
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2680
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2681
|
+
)
|
2682
|
+
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):
|
2683
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2684
|
+
else:
|
2685
|
+
cred = credential.Credential(
|
2686
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2687
|
+
)
|
2688
|
+
http_profile = HttpProfile(
|
2689
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2690
|
+
reqMethod="POST",
|
2691
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2692
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2693
|
+
)
|
2694
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2695
|
+
if g_param[OptionsDefine.Language]:
|
2696
|
+
profile.language = g_param[OptionsDefine.Language]
|
2697
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2698
|
+
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
2699
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2700
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2701
|
+
model = models.CreateHttpAuthenticatorRequest()
|
2702
|
+
model.from_json_string(json.dumps(args))
|
2703
|
+
start_time = time.time()
|
2704
|
+
while True:
|
2705
|
+
rsp = client.CreateHttpAuthenticator(model)
|
2706
|
+
result = rsp.to_json_string()
|
2707
|
+
try:
|
2708
|
+
json_obj = json.loads(result)
|
2709
|
+
except TypeError as e:
|
2710
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2711
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2712
|
+
break
|
2713
|
+
cur_time = time.time()
|
2714
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2715
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2716
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2717
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2718
|
+
else:
|
2719
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2720
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2721
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2722
|
+
|
2723
|
+
|
2620
2724
|
CLIENT_MAP = {
|
2621
2725
|
"v20240516": mqtt_client_v20240516,
|
2622
2726
|
|
@@ -2668,6 +2772,7 @@ ACTION_MAP = {
|
|
2668
2772
|
"DescribeInstanceList": doDescribeInstanceList,
|
2669
2773
|
"ModifyAuthorizationPolicy": doModifyAuthorizationPolicy,
|
2670
2774
|
"DeleteAuthorizationPolicy": doDeleteAuthorizationPolicy,
|
2775
|
+
"ModifyHttpAuthenticator": doModifyHttpAuthenticator,
|
2671
2776
|
"DescribeTopic": doDescribeTopic,
|
2672
2777
|
"RegisterCaCertificate": doRegisterCaCertificate,
|
2673
2778
|
"ModifyInsPublicEndpoint": doModifyInsPublicEndpoint,
|
@@ -2678,6 +2783,7 @@ ACTION_MAP = {
|
|
2678
2783
|
"DescribeTopicList": doDescribeTopicList,
|
2679
2784
|
"CreateAuthorizationPolicy": doCreateAuthorizationPolicy,
|
2680
2785
|
"ModifyInstance": doModifyInstance,
|
2786
|
+
"CreateHttpAuthenticator": doCreateHttpAuthenticator,
|
2681
2787
|
|
2682
2788
|
}
|
2683
2789
|
|