tccli 3.0.1368.1__py2.py3-none-any.whl → 3.0.1370.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 (58) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/autoscaling/v20180419/api.json +4 -3
  3. tccli/services/batch/v20170312/api.json +34 -1
  4. tccli/services/batch/v20170312/examples.json +1 -1
  5. tccli/services/cdb/v20170320/api.json +6 -6
  6. tccli/services/cdb/v20170320/examples.json +1 -1
  7. tccli/services/cdwch/v20200915/api.json +16 -7
  8. tccli/services/cfg/v20210820/api.json +9 -0
  9. tccli/services/cfs/cfs_client.py +61 -8
  10. tccli/services/cfs/v20190719/api.json +71 -0
  11. tccli/services/cfs/v20190719/examples.json +8 -0
  12. tccli/services/clb/v20180317/api.json +11 -11
  13. tccli/services/csip/csip_client.py +53 -0
  14. tccli/services/csip/v20221121/api.json +333 -3
  15. tccli/services/csip/v20221121/examples.json +8 -0
  16. tccli/services/dcdb/v20180411/api.json +31 -2
  17. tccli/services/dcdb/v20180411/examples.json +1 -1
  18. tccli/services/dlc/v20210125/api.json +14 -4
  19. tccli/services/dsgc/v20190723/api.json +8 -8
  20. tccli/services/dsgc/v20190723/examples.json +1 -1
  21. tccli/services/emr/v20190103/api.json +9 -0
  22. tccli/services/emr/v20190103/examples.json +1 -1
  23. tccli/services/es/v20180416/examples.json +3 -3
  24. tccli/services/ess/v20201111/api.json +4 -4
  25. tccli/services/ess/v20201111/examples.json +1 -1
  26. tccli/services/faceid/v20180301/api.json +1 -1
  27. tccli/services/hunyuan/v20230901/api.json +4 -4
  28. tccli/services/iai/v20180301/api.json +1 -1
  29. tccli/services/iai/v20200303/api.json +1 -1
  30. tccli/services/lighthouse/v20200324/api.json +1 -1
  31. tccli/services/live/v20180801/api.json +1 -1
  32. tccli/services/mariadb/v20170312/api.json +30 -1
  33. tccli/services/mariadb/v20170312/examples.json +1 -1
  34. tccli/services/mongodb/v20180408/api.json +1 -1
  35. tccli/services/mongodb/v20190725/api.json +1 -1
  36. tccli/services/mps/v20190612/api.json +15 -5
  37. tccli/services/mps/v20190612/examples.json +1 -1
  38. tccli/services/omics/v20221128/api.json +105 -6
  39. tccli/services/organization/organization_client.py +53 -0
  40. tccli/services/organization/v20210331/api.json +175 -0
  41. tccli/services/organization/v20210331/examples.json +8 -0
  42. tccli/services/privatedns/v20201028/api.json +7 -7
  43. tccli/services/sqlserver/v20180328/api.json +20 -0
  44. tccli/services/tdmq/v20200217/api.json +12 -3
  45. tccli/services/tdmq/v20200217/examples.json +1 -1
  46. tccli/services/teo/v20220901/api.json +85 -2
  47. tccli/services/tione/v20211111/api.json +1 -1
  48. tccli/services/trocket/v20230308/api.json +18 -9
  49. tccli/services/trocket/v20230308/examples.json +1 -1
  50. tccli/services/tsf/v20180326/api.json +6 -6
  51. tccli/services/tts/v20190823/api.json +1 -1
  52. tccli/services/vdb/v20230616/api.json +12 -3
  53. tccli/services/vrs/v20200824/api.json +1 -1
  54. {tccli-3.0.1368.1.dist-info → tccli-3.0.1370.1.dist-info}/METADATA +2 -2
  55. {tccli-3.0.1368.1.dist-info → tccli-3.0.1370.1.dist-info}/RECORD +58 -58
  56. {tccli-3.0.1368.1.dist-info → tccli-3.0.1370.1.dist-info}/WHEEL +0 -0
  57. {tccli-3.0.1368.1.dist-info → tccli-3.0.1370.1.dist-info}/entry_points.txt +0 -0
  58. {tccli-3.0.1368.1.dist-info → tccli-3.0.1370.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1368.1'
1
+ __version__ = '3.0.1370.1'
@@ -6967,7 +6967,7 @@
6967
6967
  "members": [
6968
6968
  {
6969
6969
  "disabled": false,
6970
- "document": "伸缩组ID",
6970
+ "document": "伸缩组ID。可以通过如下方式获取可用的伸缩组ID:\n<li>通过登录 [控制台](https://console.cloud.tencent.com/autoscaling/group) 查询伸缩组ID。</li>\n<li>通过调用接口 [DescribeAutoScalingGroups](https://cloud.tencent.com/document/api/377/20438) ,取返回信息中的 AutoScalingGroupId 获取伸缩组ID。</li>",
6971
6971
  "example": "asg-12yqet78",
6972
6972
  "member": "string",
6973
6973
  "name": "AutoScalingGroupId",
@@ -6976,7 +6976,7 @@
6976
6976
  },
6977
6977
  {
6978
6978
  "disabled": false,
6979
- "document": "希望扩容的实例数量。",
6979
+ "document": "希望扩容的实例数量。该参数的静态取值范围是 [1,2000],同时该参数不得大于期望数与最大值的差值。例如伸缩组期望数为 20,最大值为 100,此时可取值范围为 [1,80]。",
6980
6980
  "example": "1",
6981
6981
  "member": "uint64",
6982
6982
  "name": "ScaleOutNumber",
@@ -6995,6 +6995,7 @@
6995
6995
  "example": "asa-n6w01f6m",
6996
6996
  "member": "string",
6997
6997
  "name": "ActivityId",
6998
+ "output_required": true,
6998
6999
  "type": "string",
6999
7000
  "value_allowed_null": false
7000
7001
  },
@@ -7511,7 +7512,7 @@
7511
7512
  "members": [
7512
7513
  {
7513
7514
  "disabled": false,
7514
- "document": "伸缩组ID。",
7515
+ "document": "伸缩组ID。可通过登录 [控制台](https://console.cloud.tencent.com/autoscaling/group) 或调用接口 [DescribeAutoScalingGroups](https://cloud.tencent.com/document/api/377/20438) ,取返回信息中的 AutoScalingGroupId 获取伸缩组ID。",
7515
7516
  "example": "asg-12yqet78",
7516
7517
  "member": "string",
7517
7518
  "name": "AutoScalingGroupId",
@@ -2035,7 +2035,7 @@
2035
2035
  },
2036
2036
  {
2037
2037
  "disabled": false,
2038
- "document": "支持查询的指标;当前支持查询的任务指标;\n\n- CpuUsage:cpu利用率,单位:%\n- MemUsage:内存利用率,单位:%\n- LanOuttraffic:内网出带宽,单位:Bytes/s\n- LanIntraffic:内网入带宽,单位:Bytes/s",
2038
+ "document": "支持查询的指标;当前支持查询的任务指标;\n\n- CpuUsage:cpu利用率,单位:%\n- MemUsage:内存利用率,单位:%\n- LanOuttraffic:内网出带宽,单位:Bytes/s\n- LanIntraffic:内网入带宽,单位:Bytes/s\n- MaxDiskUsage:所有磁盘中的使用率最高的磁盘使用率,单位:%\n- TargetDiskUsage:指定磁盘的使用率,单位:%;配合Dimensions参数使用",
2039
2039
  "example": "CpuUsage",
2040
2040
  "member": "string",
2041
2041
  "name": "MetricName",
@@ -2059,6 +2059,15 @@
2059
2059
  "name": "EndTime",
2060
2060
  "required": false,
2061
2061
  "type": "string"
2062
+ },
2063
+ {
2064
+ "disabled": false,
2065
+ "document": "查询指标的扩展参数;当前只支持TargetDiskUsage;\n\n- TargetDiskUsage\n -支持的查询维度diskname, 维度值为磁盘挂载名,例如vdb;如果不传此参数,默认查询vdb磁盘的使用率。\n 样例:[{\"Name\":\"diskname\", \"Value\":\"vdb\"}]",
2066
+ "example": "无",
2067
+ "member": "Dimension",
2068
+ "name": "Dimensions",
2069
+ "required": false,
2070
+ "type": "list"
2062
2071
  }
2063
2072
  ],
2064
2073
  "type": "object"
@@ -2769,6 +2778,30 @@
2769
2778
  ],
2770
2779
  "type": "object"
2771
2780
  },
2781
+ "Dimension": {
2782
+ "document": "Job资源监控查询维度",
2783
+ "members": [
2784
+ {
2785
+ "disabled": false,
2786
+ "document": "查询指标的维度名称",
2787
+ "example": "diskname",
2788
+ "member": "string",
2789
+ "name": "Name",
2790
+ "required": true,
2791
+ "type": "string"
2792
+ },
2793
+ {
2794
+ "disabled": false,
2795
+ "document": "查询指标的维度值",
2796
+ "example": "vdb",
2797
+ "member": "string",
2798
+ "name": "Value",
2799
+ "required": true,
2800
+ "type": "string"
2801
+ }
2802
+ ],
2803
+ "usage": "in"
2804
+ },
2772
2805
  "Docker": {
2773
2806
  "document": "Docker容器信息",
2774
2807
  "members": [
@@ -123,7 +123,7 @@
123
123
  "DescribeJobMonitorData": [
124
124
  {
125
125
  "document": "",
126
- "input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstances\n<公共请求参数>\n\n{\n \"JobId\": \"job-1jj9noyr\",\n \"TaskName\": \"demo-1\",\n \"TaskInstanceIndex\": 0,\n \"MetricName\": \"CpuUsage\"\n}",
126
+ "input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeJobMonitorData\n<公共请求参数>\n\n{\n \"JobId\": \"job-1jj9noyr\",\n \"TaskName\": \"demo-1\",\n \"TaskInstanceIndex\": 0,\n \"MetricName\": \"CpuUsage\"\n}",
127
127
  "output": "{\n \"Response\": {\n \"RequestId\": \"a66adf73-110f-49b4-a173-c68c952d4428\",\n \"Period\": 60,\n \"DataPoints\": {\n \"Timestamps\": [\n 1749696420,\n 1749696430,\n 1749696440\n ],\n \"Values\": [\n 0.1,\n 0.2,\n 0.3\n ]\n }\n }\n}",
128
128
  "title": "查询作业实例的资源使用监控信息"
129
129
  }
@@ -16316,7 +16316,7 @@
16316
16316
  {
16317
16317
  "disabled": false,
16318
16318
  "document": "自动备份方式,仅支持:physical - 物理冷备",
16319
- "example": "logical",
16319
+ "example": "physical",
16320
16320
  "member": "string",
16321
16321
  "name": "BackupMethod",
16322
16322
  "required": false,
@@ -16334,7 +16334,7 @@
16334
16334
  {
16335
16335
  "disabled": false,
16336
16336
  "document": "备份时间窗,比如要设置每周二和周日 10:00-14:00之间备份,该参数如下:{\"Monday\": \"\", \"Tuesday\": \"10:00-14:00\", \"Wednesday\": \"\", \"Thursday\": \"\", \"Friday\": \"\", \"Saturday\": \"\", \"Sunday\": \"10:00-14:00\"} (注:可以设置一周的某几天备份,但是每天的备份时间需要设置为相同的时间段。 如果设置了该字段,将忽略StartTime字段的设置)",
16337
- "example": "{\"Monday\": \"\", \"Tuesday\": \"10:00-14:00\", \"Wednesday\": \"\", \"Thursday\": \"\", \"Friday\": \"\", \"Saturday\": \"\", \"Sunday\": \"10:00-14:00\"} ",
16337
+ "example": "",
16338
16338
  "member": "CommonTimeWindow",
16339
16339
  "name": "BackupTimeWindow",
16340
16340
  "required": false,
@@ -17127,7 +17127,7 @@
17127
17127
  {
17128
17128
  "disabled": false,
17129
17129
  "document": "要修改的参数列表。每一个元素是 Name 和 CurrentValue 的组合。Name 是参数名,CurrentValue 是要修改成的值。",
17130
- "example": "[{\"CurrentValue\": \"1\", \"Name\": \"auto_increment_increment\"}]",
17130
+ "example": "",
17131
17131
  "member": "Parameter",
17132
17132
  "name": "ParamList",
17133
17133
  "required": false,
@@ -17135,7 +17135,7 @@
17135
17135
  },
17136
17136
  {
17137
17137
  "disabled": false,
17138
- "document": "模板 ID,ParamList 和 TemplateId 必须至少传其中之一。可通过 [DescribeParamTemplateInfo](https://cloud.tencent.com/document/product/236/32660) 接口获取。",
17138
+ "document": "模板 ID,ParamList 和 TemplateId 必须至少传其中之一。可通过 [DescribeParamTemplates](https://cloud.tencent.com/document/api/236/32659) 接口获取。",
17139
17139
  "example": "99",
17140
17140
  "member": "int64",
17141
17141
  "name": "TemplateId",
@@ -17380,7 +17380,7 @@
17380
17380
  "members": [
17381
17381
  {
17382
17382
  "disabled": false,
17383
- "document": "模板 ID。可通过 [DescribeParamTemplateInfo](https://cloud.tencent.com/document/product/236/32660) 接口获取。",
17383
+ "document": "模板 ID。可通过 [DescribeParamTemplates](https://cloud.tencent.com/document/api/236/32659) 接口获取。",
17384
17384
  "example": "11231",
17385
17385
  "member": "int64",
17386
17386
  "name": "TemplateId",
@@ -17408,7 +17408,7 @@
17408
17408
  {
17409
17409
  "disabled": false,
17410
17410
  "document": "参数列表。",
17411
- "example": " [{\"Name\": auto_increment_increment,\"CurrentValue\": \"1\"}]",
17411
+ "example": "",
17412
17412
  "member": "Parameter",
17413
17413
  "name": "ParamList",
17414
17414
  "required": false,
@@ -1041,7 +1041,7 @@
1041
1041
  "ModifyBackupConfig": [
1042
1042
  {
1043
1043
  "document": "修改数据库备份配置",
1044
- "input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyBackupConfig\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdb-c1nl9rpv\",\n \"ExpireDays\": 10,\n \"BinlogExpireDays\": 8,\n \"BackupMethod\": \"logical\",\n \"StartTime\": \"02:00-06:00\"\n}",
1044
+ "input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyBackupConfig\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdb-c1nl9rpv\",\n \"ExpireDays\": 10,\n \"BinlogExpireDays\": 8,\n \"BackupMethod\": \"physical\",\n \"StartTime\": \"02:00-06:00\"\n}",
1045
1045
  "output": "{\n \"Response\": {\n \"RequestId\": \"6EF60BEC-0242-43AF-BB20-270359FB54A7\"\n }\n}",
1046
1046
  "title": "修改数据库备份配置"
1047
1047
  }
@@ -1145,7 +1145,7 @@
1145
1145
  {
1146
1146
  "disabled": false,
1147
1147
  "document": "计费方式",
1148
- "example": "{\"ChargeType\":\"PREPAID\", \"RenewFlag\":1, \"TimeSpan\":1}",
1148
+ "example": "",
1149
1149
  "member": "Charge",
1150
1150
  "name": "ChargeProperties",
1151
1151
  "required": true,
@@ -1163,7 +1163,7 @@
1163
1163
  {
1164
1164
  "disabled": false,
1165
1165
  "document": "数据节点\nSpecName从DescribeSpec接口中返回的DataSpec.Name获取",
1166
- "example": "{\"SpecName\":\"S_16_64_H\", \"Count\":1, \"DiskSize\":200}",
1166
+ "example": "",
1167
1167
  "member": "NodeSpec",
1168
1168
  "name": "DataSpec",
1169
1169
  "required": true,
@@ -1172,7 +1172,7 @@
1172
1172
  {
1173
1173
  "disabled": true,
1174
1174
  "document": "标签列表(废弃)",
1175
- "example": "{\"TagKey\":\"test_key\",\"TagValue\":\"test_value\"}",
1175
+ "example": "",
1176
1176
  "member": "Tag",
1177
1177
  "name": "Tags",
1178
1178
  "required": false,
@@ -1216,8 +1216,8 @@
1216
1216
  },
1217
1217
  {
1218
1218
  "disabled": false,
1219
- "document": "ZK节点\nSpecName从DescribeSpec接口中返回的CommonSpec.Name(ZK节点)获取",
1220
- "example": "{\"SpecName\":\"S_4_16_P\", \"Count\":1, \"DiskSize\":200}",
1219
+ "document": "ZK节点SpecName从DescribeSpec接口中返回的CommonSpec结构体的Name(ZK节点)获取",
1220
+ "example": "",
1221
1221
  "member": "NodeSpec",
1222
1222
  "name": "CommonSpec",
1223
1223
  "required": false,
@@ -1234,12 +1234,21 @@
1234
1234
  },
1235
1235
  {
1236
1236
  "disabled": false,
1237
- "document": "副可用去信息",
1238
- "example": "[ { \"SecondaryZone\": \"ap-guangzhou-4\", \"SecondarySubnet\": \"subnet-atpdmj7g\", \"SecondaryUserSubnetIPNum\": 223 }, { \"SecondaryZone\": \"ap-guangzhou-6\", \"SecondarySubnet\": \"subnet-e4nl52om\", \"SecondaryUserSubnetIPNum\": 4 } ]",
1237
+ "document": "副可用区信息",
1238
+ "example": "",
1239
1239
  "member": "SecondaryZoneInfo",
1240
1240
  "name": "SecondaryZoneInfo",
1241
1241
  "required": false,
1242
1242
  "type": "list"
1243
+ },
1244
+ {
1245
+ "disabled": false,
1246
+ "document": "default账号登陆实例的密码。8-16个字符,至少包含大写字母、小写字母、数字和特殊字符!@#%^*中的三种,第一个字符不能为特殊字符",
1247
+ "example": "Test@579",
1248
+ "member": "string",
1249
+ "name": "CkDefaultUserPwd",
1250
+ "required": false,
1251
+ "type": "string"
1243
1252
  }
1244
1253
  ],
1245
1254
  "type": "object"
@@ -595,6 +595,15 @@
595
595
  "name": "TaskPauseDuration",
596
596
  "required": false,
597
597
  "type": "int"
598
+ },
599
+ {
600
+ "disabled": false,
601
+ "document": "标签列表",
602
+ "example": "无",
603
+ "member": "TagWithCreate",
604
+ "name": "TaskTags",
605
+ "required": false,
606
+ "type": "list"
598
607
  }
599
608
  ],
600
609
  "type": "object"
@@ -17,6 +17,58 @@ from tencentcloud.cfs.v20190719 import models as models_v20190719
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
+ def doDoDirectoryOperation(args, parsed_globals):
21
+ g_param = parse_global_arg(parsed_globals)
22
+
23
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
24
+ cred = credential.CVMRoleCredential()
25
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
26
+ cred = credential.STSAssumeRoleCredential(
27
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
28
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
29
+ )
30
+ 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):
31
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
32
+ else:
33
+ cred = credential.Credential(
34
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
35
+ )
36
+ http_profile = HttpProfile(
37
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
38
+ reqMethod="POST",
39
+ endpoint=g_param[OptionsDefine.Endpoint],
40
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
41
+ )
42
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
43
+ if g_param[OptionsDefine.Language]:
44
+ profile.language = g_param[OptionsDefine.Language]
45
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
46
+ client = mod.CfsClient(cred, g_param[OptionsDefine.Region], profile)
47
+ client._sdkVersion += ("_CLI_" + __version__)
48
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
+ model = models.DoDirectoryOperationRequest()
50
+ model.from_json_string(json.dumps(args))
51
+ start_time = time.time()
52
+ while True:
53
+ rsp = client.DoDirectoryOperation(model)
54
+ result = rsp.to_json_string()
55
+ try:
56
+ json_obj = json.loads(result)
57
+ except TypeError as e:
58
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
59
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
60
+ break
61
+ cur_time = time.time()
62
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
63
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
64
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
65
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
66
+ else:
67
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
68
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
69
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
+
71
+
20
72
  def doDescribeCfsRules(args, parsed_globals):
21
73
  g_param = parse_global_arg(parsed_globals)
22
74
 
@@ -2513,7 +2565,7 @@ def doStopLifecycleDataTask(args, parsed_globals):
2513
2565
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2514
2566
 
2515
2567
 
2516
- def doCreateCfsSnapshot(args, parsed_globals):
2568
+ def doUnbindAutoSnapshotPolicy(args, parsed_globals):
2517
2569
  g_param = parse_global_arg(parsed_globals)
2518
2570
 
2519
2571
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2542,11 +2594,11 @@ def doCreateCfsSnapshot(args, parsed_globals):
2542
2594
  client = mod.CfsClient(cred, g_param[OptionsDefine.Region], profile)
2543
2595
  client._sdkVersion += ("_CLI_" + __version__)
2544
2596
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2545
- model = models.CreateCfsSnapshotRequest()
2597
+ model = models.UnbindAutoSnapshotPolicyRequest()
2546
2598
  model.from_json_string(json.dumps(args))
2547
2599
  start_time = time.time()
2548
2600
  while True:
2549
- rsp = client.CreateCfsSnapshot(model)
2601
+ rsp = client.UnbindAutoSnapshotPolicy(model)
2550
2602
  result = rsp.to_json_string()
2551
2603
  try:
2552
2604
  json_obj = json.loads(result)
@@ -2617,7 +2669,7 @@ def doUpdateAutoSnapshotPolicy(args, parsed_globals):
2617
2669
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2618
2670
 
2619
2671
 
2620
- def doUnbindAutoSnapshotPolicy(args, parsed_globals):
2672
+ def doCreateCfsSnapshot(args, parsed_globals):
2621
2673
  g_param = parse_global_arg(parsed_globals)
2622
2674
 
2623
2675
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2646,11 +2698,11 @@ def doUnbindAutoSnapshotPolicy(args, parsed_globals):
2646
2698
  client = mod.CfsClient(cred, g_param[OptionsDefine.Region], profile)
2647
2699
  client._sdkVersion += ("_CLI_" + __version__)
2648
2700
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2649
- model = models.UnbindAutoSnapshotPolicyRequest()
2701
+ model = models.CreateCfsSnapshotRequest()
2650
2702
  model.from_json_string(json.dumps(args))
2651
2703
  start_time = time.time()
2652
2704
  while True:
2653
- rsp = client.UnbindAutoSnapshotPolicy(model)
2705
+ rsp = client.CreateCfsSnapshot(model)
2654
2706
  result = rsp.to_json_string()
2655
2707
  try:
2656
2708
  json_obj = json.loads(result)
@@ -2992,6 +3044,7 @@ MODELS_MAP = {
2992
3044
  }
2993
3045
 
2994
3046
  ACTION_MAP = {
3047
+ "DoDirectoryOperation": doDoDirectoryOperation,
2995
3048
  "DescribeCfsRules": doDescribeCfsRules,
2996
3049
  "UpdateCfsFileSystemPGroup": doUpdateCfsFileSystemPGroup,
2997
3050
  "DescribeLifecycleDataTask": doDescribeLifecycleDataTask,
@@ -3040,9 +3093,9 @@ ACTION_MAP = {
3040
3093
  "DescribeAutoSnapshotPolicies": doDescribeAutoSnapshotPolicies,
3041
3094
  "DeleteAutoSnapshotPolicy": doDeleteAutoSnapshotPolicy,
3042
3095
  "StopLifecycleDataTask": doStopLifecycleDataTask,
3043
- "CreateCfsSnapshot": doCreateCfsSnapshot,
3044
- "UpdateAutoSnapshotPolicy": doUpdateAutoSnapshotPolicy,
3045
3096
  "UnbindAutoSnapshotPolicy": doUnbindAutoSnapshotPolicy,
3097
+ "UpdateAutoSnapshotPolicy": doUpdateAutoSnapshotPolicy,
3098
+ "CreateCfsSnapshot": doCreateCfsSnapshot,
3046
3099
  "DescribeSnapshotOperationLogs": doDescribeSnapshotOperationLogs,
3047
3100
  "UpdateCfsFileSystemName": doUpdateCfsFileSystemName,
3048
3101
  "DescribeDataFlow": doDescribeDataFlow,
@@ -280,6 +280,13 @@
280
280
  "output": "DescribeUserQuotaResponse",
281
281
  "status": "online"
282
282
  },
283
+ "DoDirectoryOperation": {
284
+ "document": "文件系统目录操作接口",
285
+ "input": "DoDirectoryOperationRequest",
286
+ "name": "目录操作接口",
287
+ "output": "DoDirectoryOperationResponse",
288
+ "status": "online"
289
+ },
283
290
  "ModifyDataFlow": {
284
291
  "document": "修改数据流动相关参数",
285
292
  "input": "ModifyDataFlowRequest",
@@ -3637,6 +3644,70 @@
3637
3644
  ],
3638
3645
  "type": "object"
3639
3646
  },
3647
+ "DoDirectoryOperationRequest": {
3648
+ "document": "DoDirectoryOperation请求参数结构体",
3649
+ "members": [
3650
+ {
3651
+ "disabled": false,
3652
+ "document": "文件系统Id",
3653
+ "example": "cfs-5xxxyyyzz",
3654
+ "member": "string",
3655
+ "name": "FileSystemId",
3656
+ "required": true,
3657
+ "type": "string"
3658
+ },
3659
+ {
3660
+ "disabled": false,
3661
+ "document": "create:创建目录 check:确认目录是否存在",
3662
+ "example": "check",
3663
+ "member": "string",
3664
+ "name": "OpetationType",
3665
+ "required": true,
3666
+ "type": "string"
3667
+ },
3668
+ {
3669
+ "disabled": false,
3670
+ "document": "目录的绝对路径 默认递归创建(即如果目录中有子目录不存在,则先创建出对应子目录)",
3671
+ "example": "/user1/dir2/",
3672
+ "member": "string",
3673
+ "name": "DirectoryPath",
3674
+ "required": true,
3675
+ "type": "string"
3676
+ },
3677
+ {
3678
+ "disabled": false,
3679
+ "document": "创建目录的权限,若不传,默认为0755 若Operation Type为check,此值无实际意义",
3680
+ "example": "0777",
3681
+ "member": "string",
3682
+ "name": "Mode",
3683
+ "required": false,
3684
+ "type": "string"
3685
+ }
3686
+ ],
3687
+ "type": "object"
3688
+ },
3689
+ "DoDirectoryOperationResponse": {
3690
+ "document": "DoDirectoryOperation返回参数结构体",
3691
+ "members": [
3692
+ {
3693
+ "disabled": false,
3694
+ "document": "1:成功 0:失败 创建目录的操作,1表示创建成功,0表示创建失败。 确认目录是否存在的操作,1表示目录存在,0表示目录不存在。 说明:创建目录操作若目录已存在,也会返回创建成功。",
3695
+ "example": "1",
3696
+ "member": "int64",
3697
+ "name": "Result",
3698
+ "output_required": false,
3699
+ "type": "int",
3700
+ "value_allowed_null": false
3701
+ },
3702
+ {
3703
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
3704
+ "member": "string",
3705
+ "name": "RequestId",
3706
+ "type": "string"
3707
+ }
3708
+ ],
3709
+ "type": "object"
3710
+ },
3640
3711
  "ExstraPerformanceInfo": {
3641
3712
  "document": "购买完额外性能之后的值",
3642
3713
  "members": [
@@ -320,6 +320,14 @@
320
320
  "title": "查询文件系统配额"
321
321
  }
322
322
  ],
323
+ "DoDirectoryOperation": [
324
+ {
325
+ "document": "用于部分类型的文件系统目录操作",
326
+ "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SetUserQuota\n<公共请求参数>\n\n{\n \"FileSystemId\": \"cfs-12345\",\n \"OpetationType\": \"create\",\n \"DirectoryPath\": \"/user1/dir1/\",\n \"Mode\": \"0644\"\n}",
327
+ "output": "{\n \"Response\": {\n \"RequestId\": \"fjo8aejo-fjei-32eu-2je9-fhue83nd81\",\n \"Result\": 1\n }\n}",
328
+ "title": "文件系统目录操作接口"
329
+ }
330
+ ],
323
331
  "ModifyDataFlow": [
324
332
  {
325
333
  "document": "",
@@ -2886,7 +2886,7 @@
2886
2886
  {
2887
2887
  "disabled": false,
2888
2888
  "document": "健康检查相关参数,此参数仅适用于TCP/UDP/TCP_SSL/QUIC监听器。",
2889
- "example": "{\"CheckPort\": -1, \"CheckType\": \"TCP\", \"HealthNum\": 3, \"HealthSwitch\": 1, \"IntervalTime\": 5, \"SourceIpType\": 1, \"TimeOut\": 2, \"UnHealthNum\": 3}",
2889
+ "example": "",
2890
2890
  "member": "HealthCheck",
2891
2891
  "name": "HealthCheck",
2892
2892
  "required": false,
@@ -2895,7 +2895,7 @@
2895
2895
  {
2896
2896
  "disabled": false,
2897
2897
  "document": "证书相关信息。参数限制如下:\n<li>此参数仅适用于TCP_SSL监听器和未开启SNI特性的HTTPS监听器。</li>\n<li>创建TCP_SSL监听器和未开启SNI特性的HTTPS监听器时,此参数和参数MultiCertInfo至少需要传一个, 但不能同时传入。</li>",
2898
- "example": "{\"CertId\": \"PY6XAzZw\", \"SSLMode\": \"UNIDIRECTIONAL\"}",
2898
+ "example": "",
2899
2899
  "member": "CertificateInput",
2900
2900
  "name": "Certificate",
2901
2901
  "required": false,
@@ -2912,7 +2912,7 @@
2912
2912
  },
2913
2913
  {
2914
2914
  "disabled": false,
2915
- "document": "监听器转发的方式。可选值:WRR(按权重轮询)、LEAST_CONN(按最小连接数)、IP_HASH(按 IP 地址哈希)\n默认为 WRR。此参数仅适用于TCP/UDP/TCP_SSL/QUIC监听器。",
2915
+ "document": "监听器转发的方式。可选值:WRR(按权重轮询)、LEAST_CONN(按最小连接数)\n默认为 WRR。此参数仅适用于TCP/UDP/TCP_SSL/QUIC监听器。",
2916
2916
  "example": "WRR",
2917
2917
  "member": "string",
2918
2918
  "name": "Scheduler",
@@ -2967,7 +2967,7 @@
2967
2967
  {
2968
2968
  "disabled": false,
2969
2969
  "document": "解绑后端目标时,是否发RST给两端(客户端和服务器),此参数仅适用于TCP监听器。",
2970
- "example": "False",
2970
+ "example": "false",
2971
2971
  "member": "bool",
2972
2972
  "name": "DeregisterTargetRst",
2973
2973
  "required": false,
@@ -2976,7 +2976,7 @@
2976
2976
  {
2977
2977
  "disabled": false,
2978
2978
  "document": "证书信息,支持同时传入不同算法类型的多本服务端证书,参数限制如下:\n<li>此参数仅适用于TCP_SSL监听器和未开启SNI特性的HTTPS监听器。</li>\n<li>创建TCP_SSL监听器和未开启SNI特性的HTTPS监听器时,此参数和参数Certificate至少需要传一个, 但不能同时传入。</li>",
2979
- "example": "{\"CertList\": [{\"CertId\": \"PY6XAzZw\"}, {\"CertId\": \"OMN6Gek7\"}], \"SSLMode\": \"UNIDIRECTIONAL\"}",
2979
+ "example": "",
2980
2980
  "member": "MultiCertInfo",
2981
2981
  "name": "MultiCertInfo",
2982
2982
  "required": false,
@@ -2985,7 +2985,7 @@
2985
2985
  {
2986
2986
  "disabled": false,
2987
2987
  "document": "监听器最大连接数,当前仅性能容量型实例且仅TCP/UDP/TCP_SSL/QUIC监听器支持,不传或者传-1表示监听器维度不限速。基础网络实例不支持该参数。",
2988
- "example": "-1",
2988
+ "example": "1000",
2989
2989
  "member": "int64",
2990
2990
  "name": "MaxConn",
2991
2991
  "required": false,
@@ -2994,7 +2994,7 @@
2994
2994
  {
2995
2995
  "disabled": false,
2996
2996
  "document": "监听器最大新增连接数,当前仅性能容量型实例且仅TCP/UDP/TCP_SSL/QUIC监听器支持,不传或者传-1表示监听器维度不限速。基础网络实例不支持该参数。",
2997
- "example": "-1",
2997
+ "example": "1000",
2998
2998
  "member": "int64",
2999
2999
  "name": "MaxCps",
3000
3000
  "required": false,
@@ -3012,7 +3012,7 @@
3012
3012
  {
3013
3013
  "disabled": false,
3014
3014
  "document": "TCP_SSL和QUIC是否支持PP",
3015
- "example": "False",
3015
+ "example": "false",
3016
3016
  "member": "bool",
3017
3017
  "name": "ProxyProtocol",
3018
3018
  "required": false,
@@ -3021,7 +3021,7 @@
3021
3021
  {
3022
3022
  "disabled": false,
3023
3023
  "document": "是否开启SNAT,True(开启)、False(关闭)。\n默认为关闭。",
3024
- "example": "False",
3024
+ "example": "false",
3025
3025
  "member": "bool",
3026
3026
  "name": "SnatEnable",
3027
3027
  "required": false,
@@ -3039,7 +3039,7 @@
3039
3039
  {
3040
3040
  "disabled": false,
3041
3041
  "document": "内网http监听器开启h2c开关,True(开启)、False(关闭)。\n默认为关闭。",
3042
- "example": "False",
3042
+ "example": "false",
3043
3043
  "member": "bool",
3044
3044
  "name": "H2cSwitch",
3045
3045
  "required": false,
@@ -3048,7 +3048,7 @@
3048
3048
  {
3049
3049
  "disabled": false,
3050
3050
  "document": "TCP_SSL监听器支持关闭SSL后仍然支持混绑,此参数为关闭开关。True(关闭)、False(开启).\n默认为关闭。",
3051
- "example": "False",
3051
+ "example": "false",
3052
3052
  "member": "bool",
3053
3053
  "name": "SslCloseSwitch",
3054
3054
  "required": false,
@@ -953,6 +953,58 @@ def doDeleteRiskScanTask(args, parsed_globals):
953
953
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
954
954
 
955
955
 
956
+ def doDescribeConfigCheckRules(args, parsed_globals):
957
+ g_param = parse_global_arg(parsed_globals)
958
+
959
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
960
+ cred = credential.CVMRoleCredential()
961
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
962
+ cred = credential.STSAssumeRoleCredential(
963
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
964
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
965
+ )
966
+ 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):
967
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
968
+ else:
969
+ cred = credential.Credential(
970
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
971
+ )
972
+ http_profile = HttpProfile(
973
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
974
+ reqMethod="POST",
975
+ endpoint=g_param[OptionsDefine.Endpoint],
976
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
977
+ )
978
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
979
+ if g_param[OptionsDefine.Language]:
980
+ profile.language = g_param[OptionsDefine.Language]
981
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
982
+ client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
983
+ client._sdkVersion += ("_CLI_" + __version__)
984
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
985
+ model = models.DescribeConfigCheckRulesRequest()
986
+ model.from_json_string(json.dumps(args))
987
+ start_time = time.time()
988
+ while True:
989
+ rsp = client.DescribeConfigCheckRules(model)
990
+ result = rsp.to_json_string()
991
+ try:
992
+ json_obj = json.loads(result)
993
+ except TypeError as e:
994
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
995
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
996
+ break
997
+ cur_time = time.time()
998
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
999
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1000
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1001
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1002
+ else:
1003
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1004
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1005
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
+
1007
+
956
1008
  def doDescribeTaskLogList(args, parsed_globals):
957
1009
  g_param = parse_global_arg(parsed_globals)
958
1010
 
@@ -4258,6 +4310,7 @@ ACTION_MAP = {
4258
4310
  "DescribeListenerList": doDescribeListenerList,
4259
4311
  "DescribeAccessKeyUserDetail": doDescribeAccessKeyUserDetail,
4260
4312
  "DeleteRiskScanTask": doDeleteRiskScanTask,
4313
+ "DescribeConfigCheckRules": doDescribeConfigCheckRules,
4261
4314
  "DescribeTaskLogList": doDescribeTaskLogList,
4262
4315
  "DescribeRiskCenterAssetViewVULRiskList": doDescribeRiskCenterAssetViewVULRiskList,
4263
4316
  "DescribeClusterPodAssets": doDescribeClusterPodAssets,