tccli 3.0.1254.1__py2.py3-none-any.whl → 3.0.1255.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/cdwdoris/v20211228/api.json +89 -44
- tccli/services/cdwdoris/v20211228/examples.json +6 -6
- tccli/services/cfs/cfs_client.py +53 -0
- tccli/services/cfs/v20190719/api.json +44 -0
- tccli/services/cfs/v20190719/examples.json +8 -0
- tccli/services/cvm/v20170312/api.json +48 -1
- tccli/services/cvm/v20170312/examples.json +2 -2
- tccli/services/faceid/v20180301/api.json +12 -12
- tccli/services/faceid/v20180301/examples.json +16 -2
- tccli/services/iotexplorer/iotexplorer_client.py +53 -0
- tccli/services/iotexplorer/v20190423/api.json +243 -2
- tccli/services/iotexplorer/v20190423/examples.json +16 -2
- tccli/services/lighthouse/v20200324/api.json +18 -0
- tccli/services/mps/v20190612/api.json +2 -2
- tccli/services/postgres/v20170312/api.json +30 -11
- tccli/services/postgres/v20170312/examples.json +2 -2
- {tccli-3.0.1254.1.dist-info → tccli-3.0.1255.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1254.1.dist-info → tccli-3.0.1255.1.dist-info}/RECORD +22 -22
- {tccli-3.0.1254.1.dist-info → tccli-3.0.1255.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1254.1.dist-info → tccli-3.0.1255.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1254.1.dist-info → tccli-3.0.1255.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1255.1'
|
@@ -687,36 +687,36 @@
|
|
687
687
|
"members": [
|
688
688
|
{
|
689
689
|
"disabled": false,
|
690
|
-
"document": "备份文件所在的cos
|
691
|
-
"example": "
|
690
|
+
"document": "备份文件所在的cos桶",
|
691
|
+
"example": "https://tss-gz-130551234.cos.ap-guangzhou.myqcloud.com/",
|
692
692
|
"member": "string",
|
693
693
|
"name": "CosBucket",
|
694
694
|
"output_required": false,
|
695
695
|
"required": false,
|
696
696
|
"type": "string",
|
697
|
-
"value_allowed_null":
|
697
|
+
"value_allowed_null": false
|
698
698
|
},
|
699
699
|
{
|
700
700
|
"disabled": false,
|
701
|
-
"document": "备份文件所在的完整cos
|
702
|
-
"example": "
|
701
|
+
"document": "备份文件所在的完整cos路径",
|
702
|
+
"example": "cdwdoris-aaxe12",
|
703
703
|
"member": "string",
|
704
704
|
"name": "CosPath",
|
705
705
|
"output_required": false,
|
706
706
|
"required": false,
|
707
707
|
"type": "string",
|
708
|
-
"value_allowed_null":
|
708
|
+
"value_allowed_null": false
|
709
709
|
},
|
710
710
|
{
|
711
711
|
"disabled": false,
|
712
|
-
"document": "
|
713
|
-
"example": "
|
712
|
+
"document": "备份文件名称",
|
713
|
+
"example": "snapshot-axxx",
|
714
714
|
"member": "string",
|
715
715
|
"name": "SnapShotPath",
|
716
716
|
"output_required": false,
|
717
717
|
"required": false,
|
718
718
|
"type": "string",
|
719
|
-
"value_allowed_null":
|
719
|
+
"value_allowed_null": false
|
720
720
|
}
|
721
721
|
],
|
722
722
|
"usage": "both"
|
@@ -747,7 +747,7 @@
|
|
747
747
|
{
|
748
748
|
"disabled": false,
|
749
749
|
"document": "库名",
|
750
|
-
"example": "
|
750
|
+
"example": "test_db",
|
751
751
|
"member": "string",
|
752
752
|
"name": "DbName",
|
753
753
|
"output_required": true,
|
@@ -817,7 +817,7 @@
|
|
817
817
|
{
|
818
818
|
"disabled": false,
|
819
819
|
"document": "未完成任务",
|
820
|
-
"example": "
|
820
|
+
"example": " tasks",
|
821
821
|
"member": "string",
|
822
822
|
"name": "UnfinishedTasks",
|
823
823
|
"output_required": true,
|
@@ -857,7 +857,7 @@
|
|
857
857
|
{
|
858
858
|
"disabled": false,
|
859
859
|
"document": "超时信息",
|
860
|
-
"example": "
|
860
|
+
"example": "120",
|
861
861
|
"member": "int64",
|
862
862
|
"name": "Timeout",
|
863
863
|
"output_required": true,
|
@@ -866,23 +866,23 @@
|
|
866
866
|
},
|
867
867
|
{
|
868
868
|
"disabled": false,
|
869
|
-
"document": "备份实例id
|
870
|
-
"example": "
|
869
|
+
"document": "备份实例id",
|
870
|
+
"example": "6872",
|
871
871
|
"member": "int64",
|
872
872
|
"name": "BackupJobId",
|
873
873
|
"output_required": false,
|
874
874
|
"type": "int",
|
875
|
-
"value_allowed_null":
|
875
|
+
"value_allowed_null": false
|
876
876
|
},
|
877
877
|
{
|
878
878
|
"disabled": false,
|
879
|
-
"document": "实例对应snapshoit的id
|
879
|
+
"document": "实例对应snapshoit的id",
|
880
880
|
"example": "2221",
|
881
881
|
"member": "int64",
|
882
882
|
"name": "TaskId",
|
883
883
|
"output_required": false,
|
884
884
|
"type": "int",
|
885
|
-
"value_allowed_null":
|
885
|
+
"value_allowed_null": false
|
886
886
|
}
|
887
887
|
],
|
888
888
|
"usage": "out"
|
@@ -975,25 +975,25 @@
|
|
975
975
|
"members": [
|
976
976
|
{
|
977
977
|
"disabled": false,
|
978
|
-
"document": "
|
979
|
-
"example": "
|
978
|
+
"document": "用户名",
|
979
|
+
"example": "user_a",
|
980
980
|
"member": "string",
|
981
981
|
"name": "UserName",
|
982
982
|
"output_required": false,
|
983
983
|
"required": false,
|
984
984
|
"type": "string",
|
985
|
-
"value_allowed_null":
|
985
|
+
"value_allowed_null": false
|
986
986
|
},
|
987
987
|
{
|
988
988
|
"disabled": false,
|
989
|
-
"document": "
|
989
|
+
"document": "主机信息",
|
990
990
|
"example": "%",
|
991
991
|
"member": "string",
|
992
992
|
"name": "Host",
|
993
993
|
"output_required": false,
|
994
994
|
"required": false,
|
995
995
|
"type": "string",
|
996
|
-
"value_allowed_null":
|
996
|
+
"value_allowed_null": false
|
997
997
|
}
|
998
998
|
],
|
999
999
|
"usage": "both"
|
@@ -3050,7 +3050,7 @@
|
|
3050
3050
|
{
|
3051
3051
|
"disabled": false,
|
3052
3052
|
"document": "实例ID",
|
3053
|
-
"example": "
|
3053
|
+
"example": "cdwdoris-akxtck1n",
|
3054
3054
|
"member": "string",
|
3055
3055
|
"name": "InstanceId",
|
3056
3056
|
"required": true,
|
@@ -3059,7 +3059,7 @@
|
|
3059
3059
|
{
|
3060
3060
|
"disabled": false,
|
3061
3061
|
"document": "开始时间",
|
3062
|
-
"example": "
|
3062
|
+
"example": "2025-01-03 12:23:23\t",
|
3063
3063
|
"member": "string",
|
3064
3064
|
"name": "StartTime",
|
3065
3065
|
"required": true,
|
@@ -3068,7 +3068,7 @@
|
|
3068
3068
|
{
|
3069
3069
|
"disabled": false,
|
3070
3070
|
"document": "结束时间",
|
3071
|
-
"example": "
|
3071
|
+
"example": "2025-01-04 12:23:23\t",
|
3072
3072
|
"member": "string",
|
3073
3073
|
"name": "EndTime",
|
3074
3074
|
"required": true,
|
@@ -3172,6 +3172,15 @@
|
|
3172
3172
|
"name": "Catalogs",
|
3173
3173
|
"required": false,
|
3174
3174
|
"type": "list"
|
3175
|
+
},
|
3176
|
+
{
|
3177
|
+
"disabled": false,
|
3178
|
+
"document": "是否是查询\t",
|
3179
|
+
"example": "[true]\t",
|
3180
|
+
"member": "bool",
|
3181
|
+
"name": "IsQuery",
|
3182
|
+
"required": false,
|
3183
|
+
"type": "list"
|
3175
3184
|
}
|
3176
3185
|
],
|
3177
3186
|
"type": "object"
|
@@ -3182,7 +3191,7 @@
|
|
3182
3191
|
{
|
3183
3192
|
"disabled": false,
|
3184
3193
|
"document": "日志的cos地址",
|
3185
|
-
"example": "
|
3194
|
+
"example": "http://ap-guangzhou.com",
|
3186
3195
|
"member": "string",
|
3187
3196
|
"name": "CosUrl",
|
3188
3197
|
"output_required": true,
|
@@ -4072,7 +4081,7 @@
|
|
4072
4081
|
{
|
4073
4082
|
"disabled": false,
|
4074
4083
|
"document": "实例ID",
|
4075
|
-
"example": "
|
4084
|
+
"example": "cdwdoris-3lnbut32",
|
4076
4085
|
"member": "string",
|
4077
4086
|
"name": "InstanceId",
|
4078
4087
|
"required": true,
|
@@ -4081,7 +4090,7 @@
|
|
4081
4090
|
{
|
4082
4091
|
"disabled": false,
|
4083
4092
|
"document": "慢查询时间",
|
4084
|
-
"example": "
|
4093
|
+
"example": "123",
|
4085
4094
|
"member": "int64",
|
4086
4095
|
"name": "QueryDurationMs",
|
4087
4096
|
"required": true,
|
@@ -4090,7 +4099,7 @@
|
|
4090
4099
|
{
|
4091
4100
|
"disabled": false,
|
4092
4101
|
"document": "开始时间",
|
4093
|
-
"example": "
|
4102
|
+
"example": "2025-01-02 12:35:24\t",
|
4094
4103
|
"member": "string",
|
4095
4104
|
"name": "StartTime",
|
4096
4105
|
"required": true,
|
@@ -4099,7 +4108,7 @@
|
|
4099
4108
|
{
|
4100
4109
|
"disabled": false,
|
4101
4110
|
"document": "结束时间",
|
4102
|
-
"example": "
|
4111
|
+
"example": "2025-01-02 14:35:24\t",
|
4103
4112
|
"member": "string",
|
4104
4113
|
"name": "EndTime",
|
4105
4114
|
"required": true,
|
@@ -4108,7 +4117,7 @@
|
|
4108
4117
|
{
|
4109
4118
|
"disabled": false,
|
4110
4119
|
"document": "排序参数",
|
4111
|
-
"example": "
|
4120
|
+
"example": "ASC",
|
4112
4121
|
"member": "string",
|
4113
4122
|
"name": "DurationMs",
|
4114
4123
|
"required": false,
|
@@ -4117,7 +4126,7 @@
|
|
4117
4126
|
{
|
4118
4127
|
"disabled": false,
|
4119
4128
|
"document": "查询sql",
|
4120
|
-
"example": "
|
4129
|
+
"example": "select * from test",
|
4121
4130
|
"member": "string",
|
4122
4131
|
"name": "Sql",
|
4123
4132
|
"required": false,
|
@@ -4126,7 +4135,7 @@
|
|
4126
4135
|
{
|
4127
4136
|
"disabled": false,
|
4128
4137
|
"document": "排序参数",
|
4129
|
-
"example": "
|
4138
|
+
"example": "ASC",
|
4130
4139
|
"member": "string",
|
4131
4140
|
"name": "ReadRows",
|
4132
4141
|
"required": false,
|
@@ -4135,7 +4144,7 @@
|
|
4135
4144
|
{
|
4136
4145
|
"disabled": false,
|
4137
4146
|
"document": "排序参数",
|
4138
|
-
"example": "
|
4147
|
+
"example": "ASC",
|
4139
4148
|
"member": "string",
|
4140
4149
|
"name": "ResultBytes",
|
4141
4150
|
"required": false,
|
@@ -4144,7 +4153,7 @@
|
|
4144
4153
|
{
|
4145
4154
|
"disabled": false,
|
4146
4155
|
"document": "排序参数",
|
4147
|
-
"example": "
|
4156
|
+
"example": "ASC",
|
4148
4157
|
"member": "string",
|
4149
4158
|
"name": "MemoryUsage",
|
4150
4159
|
"required": false,
|
@@ -4153,7 +4162,7 @@
|
|
4153
4162
|
{
|
4154
4163
|
"disabled": false,
|
4155
4164
|
"document": "IsQuery条件",
|
4156
|
-
"example": "
|
4165
|
+
"example": "1",
|
4157
4166
|
"member": "int64",
|
4158
4167
|
"name": "IsQuery",
|
4159
4168
|
"required": false,
|
@@ -4176,6 +4185,24 @@
|
|
4176
4185
|
"name": "CatalogName",
|
4177
4186
|
"required": false,
|
4178
4187
|
"type": "list"
|
4188
|
+
},
|
4189
|
+
{
|
4190
|
+
"disabled": false,
|
4191
|
+
"document": "排序字段",
|
4192
|
+
"example": "MemoryUsage",
|
4193
|
+
"member": "string",
|
4194
|
+
"name": "SortField",
|
4195
|
+
"required": false,
|
4196
|
+
"type": "string"
|
4197
|
+
},
|
4198
|
+
{
|
4199
|
+
"disabled": false,
|
4200
|
+
"document": "排序方式",
|
4201
|
+
"example": "ASC",
|
4202
|
+
"member": "string",
|
4203
|
+
"name": "SortOrder",
|
4204
|
+
"required": false,
|
4205
|
+
"type": "string"
|
4179
4206
|
}
|
4180
4207
|
],
|
4181
4208
|
"type": "object"
|
@@ -4186,7 +4213,7 @@
|
|
4186
4213
|
{
|
4187
4214
|
"disabled": false,
|
4188
4215
|
"document": "cos地址",
|
4189
|
-
"example": "
|
4216
|
+
"example": "http://cos-test.ap-guangzhou.com",
|
4190
4217
|
"member": "string",
|
4191
4218
|
"name": "CosUrl",
|
4192
4219
|
"output_required": true,
|
@@ -4226,7 +4253,7 @@
|
|
4226
4253
|
{
|
4227
4254
|
"disabled": false,
|
4228
4255
|
"document": "开始时间",
|
4229
|
-
"example": "
|
4256
|
+
"example": "2025-01-02 12:35:24",
|
4230
4257
|
"member": "string",
|
4231
4258
|
"name": "StartTime",
|
4232
4259
|
"required": true,
|
@@ -4235,7 +4262,7 @@
|
|
4235
4262
|
{
|
4236
4263
|
"disabled": false,
|
4237
4264
|
"document": "结束时间",
|
4238
|
-
"example": "
|
4265
|
+
"example": "2025-01-02 18:35:24",
|
4239
4266
|
"member": "string",
|
4240
4267
|
"name": "EndTime",
|
4241
4268
|
"required": true,
|
@@ -4262,7 +4289,7 @@
|
|
4262
4289
|
{
|
4263
4290
|
"disabled": false,
|
4264
4291
|
"document": "排序参数",
|
4265
|
-
"example": "
|
4292
|
+
"example": "ASC",
|
4266
4293
|
"member": "string",
|
4267
4294
|
"name": "DurationMs",
|
4268
4295
|
"required": false,
|
@@ -4330,6 +4357,24 @@
|
|
4330
4357
|
"name": "MemoryUsage",
|
4331
4358
|
"required": false,
|
4332
4359
|
"type": "string"
|
4360
|
+
},
|
4361
|
+
{
|
4362
|
+
"disabled": false,
|
4363
|
+
"document": "排序字段",
|
4364
|
+
"example": "MemoryUsage",
|
4365
|
+
"member": "string",
|
4366
|
+
"name": "SortField",
|
4367
|
+
"required": false,
|
4368
|
+
"type": "string"
|
4369
|
+
},
|
4370
|
+
{
|
4371
|
+
"disabled": false,
|
4372
|
+
"document": "排序方式",
|
4373
|
+
"example": "ASC",
|
4374
|
+
"member": "string",
|
4375
|
+
"name": "SortOrder",
|
4376
|
+
"required": false,
|
4377
|
+
"type": "string"
|
4333
4378
|
}
|
4334
4379
|
],
|
4335
4380
|
"type": "object"
|
@@ -4359,23 +4404,23 @@
|
|
4359
4404
|
},
|
4360
4405
|
{
|
4361
4406
|
"disabled": false,
|
4362
|
-
"document": "
|
4407
|
+
"document": "所有数据库名",
|
4363
4408
|
"example": "无",
|
4364
4409
|
"member": "string",
|
4365
4410
|
"name": "DBNameList",
|
4366
4411
|
"output_required": false,
|
4367
4412
|
"type": "list",
|
4368
|
-
"value_allowed_null":
|
4413
|
+
"value_allowed_null": false
|
4369
4414
|
},
|
4370
4415
|
{
|
4371
4416
|
"disabled": false,
|
4372
|
-
"document": "所有catalog
|
4417
|
+
"document": "所有catalog名",
|
4373
4418
|
"example": "无",
|
4374
4419
|
"member": "string",
|
4375
4420
|
"name": "CatalogNameList",
|
4376
4421
|
"output_required": false,
|
4377
4422
|
"type": "list",
|
4378
|
-
"value_allowed_null":
|
4423
|
+
"value_allowed_null": false
|
4379
4424
|
},
|
4380
4425
|
{
|
4381
4426
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
@@ -163,8 +163,8 @@
|
|
163
163
|
"DescribeDatabaseAuditDownload": [
|
164
164
|
{
|
165
165
|
"document": "下载数据库审计日志",
|
166
|
-
"input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDatabaseAuditDownload\n<公共请求参数>\n\n{\n \"InstanceId\": \"
|
167
|
-
"output": "{\n \"Response\": {\n \"CosUrl\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
|
166
|
+
"input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDatabaseAuditDownload\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwdoris-akxtck1n\",\n \"StartTime\": \"2025-01-06 09:36:04\",\n \"EndTime\": \"2025-01-06 10:36:04\",\n \"PageSize\": 0,\n \"PageNum\": 1,\n \"OrderType\": \"DESC\",\n \"Sql\": \"\"\n}",
|
167
|
+
"output": "{\n \"Response\": {\n \"CosUrl\": \"http://abc\",\n \"RequestId\": \"abc-1xas\"\n }\n}",
|
168
168
|
"title": "DescribeDatabaseAuditDownload"
|
169
169
|
}
|
170
170
|
],
|
@@ -265,16 +265,16 @@
|
|
265
265
|
"DescribeSlowQueryRecords": [
|
266
266
|
{
|
267
267
|
"document": "慢查询",
|
268
|
-
"input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSlowQueryRecords\n<公共请求参数>\n\n{\n \"InstanceId\": \"
|
269
|
-
"output": "{\n \"Response\": {\n \"TotalCount\": 0,\n \"SlowQueryRecords\": [\n {\n \"OsUser\": \"
|
268
|
+
"input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSlowQueryRecords\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwdoris-3lnbut3w\",\n \"QueryDurationMs\": 3000,\n \"EndTime\": \"2025-01-03 15:13:48\",\n \"StartTime\": \"2025-01-03 14:58:48\",\n \"PageSize\": 10,\n \"PageNum\": 1,\n \"CatalogName\": [],\n \"DbName\": [],\n \"IsQuery\": -1\n}",
|
269
|
+
"output": "{\n \"Response\": {\n \"TotalCount\": 0,\n \"SlowQueryRecords\": [\n {\n \"OsUser\": \"user\",\n \"InitialQueryId\": \"xadfa-2xasdfa-a74rax\",\n \"Sql\": \"select * from test\",\n \"QueryStartTime\": \"2025-01-02 12:23:12\",\n \"DurationMs\": 12,\n \"ReadRows\": 1234,\n \"ResultRows\": 364,\n \"ResultBytes\": 1,\n \"MemoryUsage\": 0,\n \"InitialAddress\": \"192.168.13.24\"\n }\n ],\n \"RequestId\": \"asdfas-xadsfa-adssfad-1sdsa\"\n }\n}",
|
270
270
|
"title": "DescribeSlowQueryRecords"
|
271
271
|
}
|
272
272
|
],
|
273
273
|
"DescribeSlowQueryRecordsDownload": [
|
274
274
|
{
|
275
275
|
"document": "下载慢查询文件",
|
276
|
-
"input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSlowQueryRecordsDownload\n<公共请求参数>\n\n{\n \"InstanceId\": \"
|
277
|
-
"output": "{\n \"Response\": {\n \"CosUrl\": \"
|
276
|
+
"input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSlowQueryRecordsDownload\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwdoris-3lnbut3w\",\n \"QueryDurationMs\": 3000,\n \"EndTime\": \"2025-01-03 15:13:48\",\n \"StartTime\": \"2025-01-03 14:58:48\",\n \"CatalogName\": [],\n \"DbName\": [],\n \"IsQuery\": -1\n}",
|
277
|
+
"output": "{\n \"Response\": {\n \"CosUrl\": \"http://cos.test-ap-guangzhou.com\",\n \"RequestId\": \"asdfas-xadsfa-adssfad-1sdsa\"\n }\n}",
|
278
278
|
"title": "DescribeSlowQueryRecordsDownload"
|
279
279
|
}
|
280
280
|
],
|
tccli/services/cfs/cfs_client.py
CHANGED
@@ -1421,6 +1421,58 @@ def doUpdateAutoSnapshotPolicy(args, parsed_globals):
|
|
1421
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
1422
|
|
1423
1423
|
|
1424
|
+
def doCreateAccessCert(args, parsed_globals):
|
1425
|
+
g_param = parse_global_arg(parsed_globals)
|
1426
|
+
|
1427
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1428
|
+
cred = credential.CVMRoleCredential()
|
1429
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1430
|
+
cred = credential.STSAssumeRoleCredential(
|
1431
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1432
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1433
|
+
)
|
1434
|
+
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):
|
1435
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1436
|
+
else:
|
1437
|
+
cred = credential.Credential(
|
1438
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1439
|
+
)
|
1440
|
+
http_profile = HttpProfile(
|
1441
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1442
|
+
reqMethod="POST",
|
1443
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1444
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1445
|
+
)
|
1446
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1447
|
+
if g_param[OptionsDefine.Language]:
|
1448
|
+
profile.language = g_param[OptionsDefine.Language]
|
1449
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1450
|
+
client = mod.CfsClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1452
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
+
model = models.CreateAccessCertRequest()
|
1454
|
+
model.from_json_string(json.dumps(args))
|
1455
|
+
start_time = time.time()
|
1456
|
+
while True:
|
1457
|
+
rsp = client.CreateAccessCert(model)
|
1458
|
+
result = rsp.to_json_string()
|
1459
|
+
try:
|
1460
|
+
json_obj = json.loads(result)
|
1461
|
+
except TypeError as e:
|
1462
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1463
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1464
|
+
break
|
1465
|
+
cur_time = time.time()
|
1466
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1467
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1468
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1469
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1470
|
+
else:
|
1471
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1472
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1473
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1474
|
+
|
1475
|
+
|
1424
1476
|
def doDescribeCfsFileSystems(args, parsed_globals):
|
1425
1477
|
g_param = parse_global_arg(parsed_globals)
|
1426
1478
|
|
@@ -2291,6 +2343,7 @@ ACTION_MAP = {
|
|
2291
2343
|
"DescribeUserQuota": doDescribeUserQuota,
|
2292
2344
|
"ModifyFileSystemAutoScaleUpRule": doModifyFileSystemAutoScaleUpRule,
|
2293
2345
|
"UpdateAutoSnapshotPolicy": doUpdateAutoSnapshotPolicy,
|
2346
|
+
"CreateAccessCert": doCreateAccessCert,
|
2294
2347
|
"DescribeCfsFileSystems": doDescribeCfsFileSystems,
|
2295
2348
|
"DescribeCfsSnapshots": doDescribeCfsSnapshots,
|
2296
2349
|
"DescribeMountTargets": doDescribeMountTargets,
|
@@ -7,6 +7,13 @@
|
|
7
7
|
"output": "BindAutoSnapshotPolicyResponse",
|
8
8
|
"status": "online"
|
9
9
|
},
|
10
|
+
"CreateAccessCert": {
|
11
|
+
"document": "创建用于访问文件系统的凭证",
|
12
|
+
"input": "CreateAccessCertRequest",
|
13
|
+
"name": "创建访问凭证",
|
14
|
+
"output": "CreateAccessCertResponse",
|
15
|
+
"status": "online"
|
16
|
+
},
|
10
17
|
"CreateAutoSnapshotPolicy": {
|
11
18
|
"document": "创建定期快照策略",
|
12
19
|
"input": "CreateAutoSnapshotPolicyRequest",
|
@@ -756,6 +763,43 @@
|
|
756
763
|
],
|
757
764
|
"usage": "out"
|
758
765
|
},
|
766
|
+
"CreateAccessCertRequest": {
|
767
|
+
"document": "CreateAccessCert请求参数结构体",
|
768
|
+
"members": [
|
769
|
+
{
|
770
|
+
"disabled": false,
|
771
|
+
"document": "证书描述",
|
772
|
+
"example": "无",
|
773
|
+
"member": "string",
|
774
|
+
"name": "CertDesc",
|
775
|
+
"required": true,
|
776
|
+
"type": "string"
|
777
|
+
}
|
778
|
+
],
|
779
|
+
"type": "object"
|
780
|
+
},
|
781
|
+
"CreateAccessCertResponse": {
|
782
|
+
"document": "CreateAccessCert返回参数结构体",
|
783
|
+
"members": [
|
784
|
+
{
|
785
|
+
"disabled": false,
|
786
|
+
"document": "凭证唯一标识",
|
787
|
+
"example": "无",
|
788
|
+
"member": "string",
|
789
|
+
"name": "CertId",
|
790
|
+
"output_required": true,
|
791
|
+
"type": "string",
|
792
|
+
"value_allowed_null": false
|
793
|
+
},
|
794
|
+
{
|
795
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
796
|
+
"member": "string",
|
797
|
+
"name": "RequestId",
|
798
|
+
"type": "string"
|
799
|
+
}
|
800
|
+
],
|
801
|
+
"type": "object"
|
802
|
+
},
|
759
803
|
"CreateAutoSnapshotPolicyRequest": {
|
760
804
|
"document": "CreateAutoSnapshotPolicy请求参数结构体",
|
761
805
|
"members": [
|
@@ -8,6 +8,14 @@
|
|
8
8
|
"title": "绑定文件系统快照策略"
|
9
9
|
}
|
10
10
|
],
|
11
|
+
"CreateAccessCert": [
|
12
|
+
{
|
13
|
+
"document": "创建访问凭证",
|
14
|
+
"input": "https://cfs.tencentcloudapi.com/?Action=CreateAccessCert\n&CertDesc=test\n&<公共请求参数>",
|
15
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"fjo8aejo-fjei-32eu-2je9-fhue83nd81\",\n \"CertId\": \"cfscert-1234abcd\"\n }\n}",
|
16
|
+
"title": "创建访问凭证"
|
17
|
+
}
|
18
|
+
],
|
11
19
|
"CreateAutoSnapshotPolicy": [
|
12
20
|
{
|
13
21
|
"document": "创建文件系统快照策略",
|
@@ -1875,6 +1875,15 @@
|
|
1875
1875
|
"name": "HpcClusterBusinessId",
|
1876
1876
|
"required": false,
|
1877
1877
|
"type": "string"
|
1878
|
+
},
|
1879
|
+
{
|
1880
|
+
"disabled": false,
|
1881
|
+
"document": "标签描述列表。通过指定该参数可以同时绑定标签到相应的HPC高性能集群。",
|
1882
|
+
"example": "[{\"ResourceType\":\"hpc\",\"Tags\":[{\"Key\":\"tag-key\",\"Value\":\"tag-value\"}",
|
1883
|
+
"member": "TagSpecification",
|
1884
|
+
"name": "TagSpecification",
|
1885
|
+
"required": false,
|
1886
|
+
"type": "list"
|
1878
1887
|
}
|
1879
1888
|
],
|
1880
1889
|
"type": "object"
|
@@ -2785,7 +2794,7 @@
|
|
2785
2794
|
{
|
2786
2795
|
"disabled": false,
|
2787
2796
|
"document": "高性能计算集群ID列表。",
|
2788
|
-
"example": "[\"hpc-p64fdfa9
|
2797
|
+
"example": "[\"hpc-p64fdfa9\"]",
|
2789
2798
|
"member": "string",
|
2790
2799
|
"name": "HpcClusterIds",
|
2791
2800
|
"required": true,
|
@@ -3392,6 +3401,24 @@
|
|
3392
3401
|
"name": "HpcClusterBusinessId",
|
3393
3402
|
"required": false,
|
3394
3403
|
"type": "string"
|
3404
|
+
},
|
3405
|
+
{
|
3406
|
+
"disabled": false,
|
3407
|
+
"document": "高性能计算集群实例类型",
|
3408
|
+
"example": "HCCPNV4ane.58XLARGE1929",
|
3409
|
+
"member": "string",
|
3410
|
+
"name": "InstanceType",
|
3411
|
+
"required": false,
|
3412
|
+
"type": "string"
|
3413
|
+
},
|
3414
|
+
{
|
3415
|
+
"disabled": false,
|
3416
|
+
"document": "<li><strong>tag-key</strong></li> <p style=\"padding-left: 30px;\">按照【<strong>标签键</strong>】进行过滤。</p><p style=\"padding-left: 30px;\">类型:String</p><p style=\"padding-left: 30px;\">必选:否</p> <li><strong>tag-value</strong></li> <p style=\"padding-left: 30px;\">按照【<strong>标签值</strong>】进行过滤。</p><p style=\"padding-left: 30px;\">类型:String</p><p style=\"padding-left: 30px;\">必选:否</p> <li><strong>tag:tag-key</strong></li> <p style=\"padding-left: 30px;\">按照【<strong>标签键值对</strong>】进行过滤。tag-key使用具体的标签键进行替换。</p><p style=\"padding-left: 30px;\">类型:String</p><p style=\"padding-left: 30px;\">必选:否</p> 每次请求的`Filters`的上限为10,`Filter.Values`的上限为5。",
|
3417
|
+
"example": "[{\"Name\": \"tag-key\",\"Values\": [\"myTag\"]}]",
|
3418
|
+
"member": "Filter",
|
3419
|
+
"name": "Filters",
|
3420
|
+
"required": false,
|
3421
|
+
"type": "list"
|
3395
3422
|
}
|
3396
3423
|
],
|
3397
3424
|
"type": "object"
|
@@ -5544,6 +5571,26 @@
|
|
5544
5571
|
"output_required": false,
|
5545
5572
|
"type": "string",
|
5546
5573
|
"value_allowed_null": true
|
5574
|
+
},
|
5575
|
+
{
|
5576
|
+
"disabled": false,
|
5577
|
+
"document": "高性能计算集群网络模式",
|
5578
|
+
"example": "0~32,一般取28,30",
|
5579
|
+
"member": "uint64",
|
5580
|
+
"name": "HpcClusterNetMode",
|
5581
|
+
"output_required": false,
|
5582
|
+
"type": "int",
|
5583
|
+
"value_allowed_null": false
|
5584
|
+
},
|
5585
|
+
{
|
5586
|
+
"disabled": false,
|
5587
|
+
"document": "高性能计算集群关联的标签列表",
|
5588
|
+
"example": "[{\"Key\": \"APP3\", \"Value\": \"3\"}, {\"Key\": \"APP4\", \"Value\": \"4\"}]",
|
5589
|
+
"member": "Tag",
|
5590
|
+
"name": "Tags",
|
5591
|
+
"output_required": false,
|
5592
|
+
"type": "list",
|
5593
|
+
"value_allowed_null": false
|
5547
5594
|
}
|
5548
5595
|
],
|
5549
5596
|
"usage": "out"
|