tccli 3.0.1138.1__py2.py3-none-any.whl → 3.0.1140.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 (49) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +3 -0
  3. tccli/services/aiart/aiart_client.py +53 -0
  4. tccli/services/aiart/v20221229/api.json +98 -0
  5. tccli/services/aiart/v20221229/examples.json +8 -0
  6. tccli/services/cbs/v20170312/api.json +5 -8
  7. tccli/services/cls/v20201016/api.json +20 -0
  8. tccli/services/cwp/cwp_client.py +61 -114
  9. tccli/services/cwp/v20180228/api.json +0 -70
  10. tccli/services/cwp/v20180228/examples.json +0 -8
  11. tccli/services/emr/v20190103/api.json +543 -15
  12. tccli/services/emr/v20190103/examples.json +4 -4
  13. tccli/services/ess/v20201111/api.json +13 -13
  14. tccli/services/ess/v20201111/examples.json +2 -2
  15. tccli/services/essbasic/v20210526/api.json +14 -14
  16. tccli/services/essbasic/v20210526/examples.json +2 -2
  17. tccli/services/ims/v20201229/api.json +2 -2
  18. tccli/services/ioa/v20220601/api.json +132 -92
  19. tccli/services/iotexplorer/v20190423/api.json +49 -0
  20. tccli/services/iss/iss_client.py +114 -8
  21. tccli/services/iss/v20230517/api.json +221 -0
  22. tccli/services/iss/v20230517/examples.json +16 -0
  23. tccli/services/mps/v20190612/api.json +163 -115
  24. tccli/services/mps/v20190612/examples.json +11 -11
  25. tccli/services/ocr/v20181119/api.json +19 -0
  26. tccli/services/rum/v20210622/api.json +1 -0
  27. tccli/services/scf/v20180416/examples.json +1 -1
  28. tccli/services/ses/ses_client.py +228 -16
  29. tccli/services/ses/v20201002/api.json +266 -0
  30. tccli/services/ses/v20201002/examples.json +32 -0
  31. tccli/services/ssl/ssl_client.py +53 -0
  32. tccli/services/ssl/v20191205/api.json +93 -3
  33. tccli/services/ssl/v20191205/examples.json +9 -1
  34. tccli/services/tcr/v20190924/api.json +5 -1
  35. tccli/services/tcr/v20190924/examples.json +1 -1
  36. tccli/services/tdmq/v20200217/api.json +166 -19
  37. tccli/services/tdmq/v20200217/examples.json +6 -6
  38. tccli/services/vclm/__init__.py +4 -0
  39. tccli/services/vclm/v20240523/api.json +695 -0
  40. tccli/services/vclm/v20240523/examples.json +73 -0
  41. tccli/services/vclm/vclm_client.py +513 -0
  42. tccli/services/vdb/v20230616/api.json +20 -0
  43. tccli/services/vpc/v20170312/api.json +5 -5
  44. tccli/services/vpc/v20170312/examples.json +1 -1
  45. {tccli-3.0.1138.1.dist-info → tccli-3.0.1140.1.dist-info}/METADATA +2 -2
  46. {tccli-3.0.1138.1.dist-info → tccli-3.0.1140.1.dist-info}/RECORD +49 -45
  47. {tccli-3.0.1138.1.dist-info → tccli-3.0.1140.1.dist-info}/WHEEL +0 -0
  48. {tccli-3.0.1138.1.dist-info → tccli-3.0.1140.1.dist-info}/entry_points.txt +0 -0
  49. {tccli-3.0.1138.1.dist-info → tccli-3.0.1140.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1138.1'
1
+ __version__ = '3.0.1140.1'
@@ -749,6 +749,9 @@ SERVICE_VERSIONS = {
749
749
  "vcg": [
750
750
  "2024-04-04"
751
751
  ],
752
+ "vclm": [
753
+ "2024-05-23"
754
+ ],
752
755
  "vdb": [
753
756
  "2023-06-16"
754
757
  ],
@@ -173,6 +173,58 @@ def doQueryTextToImageProJob(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
+ def doGenerateAvatar(args, parsed_globals):
177
+ g_param = parse_global_arg(parsed_globals)
178
+
179
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
180
+ cred = credential.CVMRoleCredential()
181
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
182
+ cred = credential.STSAssumeRoleCredential(
183
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
184
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
185
+ )
186
+ 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):
187
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
188
+ else:
189
+ cred = credential.Credential(
190
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
191
+ )
192
+ http_profile = HttpProfile(
193
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
194
+ reqMethod="POST",
195
+ endpoint=g_param[OptionsDefine.Endpoint],
196
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
197
+ )
198
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
199
+ if g_param[OptionsDefine.Language]:
200
+ profile.language = g_param[OptionsDefine.Language]
201
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
202
+ client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
203
+ client._sdkVersion += ("_CLI_" + __version__)
204
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
+ model = models.GenerateAvatarRequest()
206
+ model.from_json_string(json.dumps(args))
207
+ start_time = time.time()
208
+ while True:
209
+ rsp = client.GenerateAvatar(model)
210
+ result = rsp.to_json_string()
211
+ try:
212
+ json_obj = json.loads(result)
213
+ except TypeError as e:
214
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
215
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
216
+ break
217
+ cur_time = time.time()
218
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
219
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
220
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
221
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
222
+ else:
223
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
224
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
225
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
+
227
+
176
228
  def doQueryTrainPortraitModelJob(args, parsed_globals):
177
229
  g_param = parse_global_arg(parsed_globals)
178
230
 
@@ -499,6 +551,7 @@ ACTION_MAP = {
499
551
  "SubmitTextToImageProJob": doSubmitTextToImageProJob,
500
552
  "SubmitTrainPortraitModelJob": doSubmitTrainPortraitModelJob,
501
553
  "QueryTextToImageProJob": doQueryTextToImageProJob,
554
+ "GenerateAvatar": doGenerateAvatar,
502
555
  "QueryTrainPortraitModelJob": doQueryTrainPortraitModelJob,
503
556
  "UploadTrainPortraitImages": doUploadTrainPortraitImages,
504
557
  "QueryDrawPortraitJob": doQueryDrawPortraitJob,
@@ -1,5 +1,12 @@
1
1
  {
2
2
  "actions": {
3
+ "GenerateAvatar": {
4
+ "document": "百变头像接口将根据输入的人像照片,生成风格百变的头像。\n百变头像默认提供1个并发任务数,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
5
+ "input": "GenerateAvatarRequest",
6
+ "name": "百变头像",
7
+ "output": "GenerateAvatarResponse",
8
+ "status": "online"
9
+ },
3
10
  "ImageToImage": {
4
11
  "document": "图像风格化(图生图)接口提供生成式的图生图风格转化能力,将根据输入的图像及文本描述,智能生成风格转化后的图像。建议避免输入人像过小、姿势复杂、人数较多的人像图片。\n图像风格化(图生图)默认提供3个并发任务数,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
5
12
  "input": "ImageToImageRequest",
@@ -104,6 +111,97 @@
104
111
  ],
105
112
  "usage": "in"
106
113
  },
114
+ "GenerateAvatarRequest": {
115
+ "document": "GenerateAvatar请求参数结构体",
116
+ "members": [
117
+ {
118
+ "disabled": false,
119
+ "document": "头像风格。\n请在 [百变头像风格列表](https://cloud.tencent.com/document/product/1668/107741) 中选择期望的风格,必须传入风格编号。",
120
+ "example": "无",
121
+ "member": "string",
122
+ "name": "Style",
123
+ "required": true,
124
+ "type": "string"
125
+ },
126
+ {
127
+ "disabled": false,
128
+ "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
129
+ "example": "无",
130
+ "member": "string",
131
+ "name": "InputImage",
132
+ "required": false,
133
+ "type": "string"
134
+ },
135
+ {
136
+ "disabled": false,
137
+ "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
138
+ "example": "无",
139
+ "member": "string",
140
+ "name": "InputUrl",
141
+ "required": false,
142
+ "type": "string"
143
+ },
144
+ {
145
+ "disabled": false,
146
+ "document": "输入图像质量检测开关,默认开启。\n1:开启\n0:关闭\n建议开启检测,可提升生成效果,关闭检测可能因输入图像质量较差导致生成效果受损。\n开启后,将增强对输入图像的质量要求,如果输入图像单边分辨率<500、图像中人脸占比较小、存在多人、没有检测到人脸、人脸不完整、人脸遮挡等,将被拦截。\n关闭后,将降低对输入图像的质量要求,如果图像中没有检测到人脸或人脸占比过小等,将被拦截。",
147
+ "example": "无",
148
+ "member": "int64",
149
+ "name": "Filter",
150
+ "required": false,
151
+ "type": "int"
152
+ },
153
+ {
154
+ "disabled": false,
155
+ "document": "为生成结果图添加标识的开关,默认为1。\n1:添加标识。\n0:不添加标识。\n其他数值:默认按1处理。\n建议您使用显著标识来提示结果图是 AI 生成的图片。",
156
+ "example": "无",
157
+ "member": "int64",
158
+ "name": "LogoAdd",
159
+ "required": false,
160
+ "type": "int"
161
+ },
162
+ {
163
+ "disabled": false,
164
+ "document": "标识内容设置。\n默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。",
165
+ "example": "无",
166
+ "member": "LogoParam",
167
+ "name": "LogoParam",
168
+ "required": false,
169
+ "type": "object"
170
+ },
171
+ {
172
+ "disabled": false,
173
+ "document": "返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。",
174
+ "example": "base64",
175
+ "member": "string",
176
+ "name": "RspImgType",
177
+ "required": false,
178
+ "type": "string"
179
+ }
180
+ ],
181
+ "type": "object"
182
+ },
183
+ "GenerateAvatarResponse": {
184
+ "document": "GenerateAvatar返回参数结构体",
185
+ "members": [
186
+ {
187
+ "disabled": false,
188
+ "document": "根据入参 RspImgType 填入不同,返回不同的内容。\n如果传入 base64 则返回生成图 Base64 编码。\n如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。",
189
+ "example": "无",
190
+ "member": "string",
191
+ "name": "ResultImage",
192
+ "output_required": true,
193
+ "type": "string",
194
+ "value_allowed_null": false
195
+ },
196
+ {
197
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
198
+ "member": "string",
199
+ "name": "RequestId",
200
+ "type": "string"
201
+ }
202
+ ],
203
+ "type": "object"
204
+ },
107
205
  "ImageToImageRequest": {
108
206
  "document": "ImageToImage请求参数结构体",
109
207
  "members": [
@@ -1,5 +1,13 @@
1
1
  {
2
2
  "actions": {
3
+ "GenerateAvatar": [
4
+ {
5
+ "document": "",
6
+ "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GenerateAvatar\n<公共请求参数>\n\n{\n \"InputUrl\": \"http://url\",\n \"Style\": \"water\"\n}",
7
+ "output": "{\n \"Response\": {\n \"ResultImage\": \"url or base64\",\n \"RequestId\": \"301bfc25-61ca-4ece-b03e-f6aefb547969\"\n }\n}",
8
+ "title": "调用成功示例"
9
+ }
10
+ ],
3
11
  "ImageToImage": [
4
12
  {
5
13
  "document": "调用成功示例",
@@ -531,8 +531,7 @@
531
531
  "member": "string",
532
532
  "name": "InstanceId",
533
533
  "required": true,
534
- "type": "list",
535
- "value_allowed_null": false
534
+ "type": "list"
536
535
  },
537
536
  {
538
537
  "disabled": false,
@@ -540,9 +539,8 @@
540
539
  "example": "[\"/mnt/datadisk0\"]",
541
540
  "member": "string",
542
541
  "name": "MountPoint",
543
- "required": true,
544
- "type": "list",
545
- "value_allowed_null": false
542
+ "required": false,
543
+ "type": "list"
546
544
  },
547
545
  {
548
546
  "disabled": false,
@@ -550,9 +548,8 @@
550
548
  "example": "ext4",
551
549
  "member": "string",
552
550
  "name": "FileSystemType",
553
- "required": true,
554
- "type": "string",
555
- "value_allowed_null": false
551
+ "required": false,
552
+ "type": "string"
556
553
  }
557
554
  ],
558
555
  "usage": "in"
@@ -1350,6 +1350,26 @@
1350
1350
  "output_required": true,
1351
1351
  "type": "int",
1352
1352
  "value_allowed_null": false
1353
+ },
1354
+ {
1355
+ "disabled": false,
1356
+ "document": "检索语法规则,默认值为0。\n0:Lucene语法,1:CQL语法。\n详细说明参见<a href=\"https://cloud.tencent.com/document/product/614/47044#RetrievesConditionalRules\" target=\"_blank\">检索条件语法规则</a>\n注意:此字段可能返回 null,表示取不到有效值。",
1357
+ "example": "0",
1358
+ "member": "uint64",
1359
+ "name": "SyntaxRule",
1360
+ "output_required": true,
1361
+ "type": "int",
1362
+ "value_allowed_null": true
1363
+ },
1364
+ {
1365
+ "disabled": false,
1366
+ "document": "主题类型。\n0: 日志主题,1: 指标主题\n注意:此字段可能返回 null,表示取不到有效值。",
1367
+ "example": "0",
1368
+ "member": "uint64",
1369
+ "name": "BizType",
1370
+ "output_required": false,
1371
+ "type": "int",
1372
+ "value_allowed_null": true
1353
1373
  }
1354
1374
  ],
1355
1375
  "usage": "out"
@@ -14837,58 +14837,6 @@ def doSetLocalStorageExpire(args, parsed_globals):
14837
14837
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
14838
14838
 
14839
14839
 
14840
- def doExportAttackLogs(args, parsed_globals):
14841
- g_param = parse_global_arg(parsed_globals)
14842
-
14843
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
14844
- cred = credential.CVMRoleCredential()
14845
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
14846
- cred = credential.STSAssumeRoleCredential(
14847
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
14848
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
14849
- )
14850
- 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):
14851
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
14852
- else:
14853
- cred = credential.Credential(
14854
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
14855
- )
14856
- http_profile = HttpProfile(
14857
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
14858
- reqMethod="POST",
14859
- endpoint=g_param[OptionsDefine.Endpoint],
14860
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
14861
- )
14862
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
14863
- if g_param[OptionsDefine.Language]:
14864
- profile.language = g_param[OptionsDefine.Language]
14865
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
14866
- client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
14867
- client._sdkVersion += ("_CLI_" + __version__)
14868
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
14869
- model = models.ExportAttackLogsRequest()
14870
- model.from_json_string(json.dumps(args))
14871
- start_time = time.time()
14872
- while True:
14873
- rsp = client.ExportAttackLogs(model)
14874
- result = rsp.to_json_string()
14875
- try:
14876
- json_obj = json.loads(result)
14877
- except TypeError as e:
14878
- json_obj = json.loads(result.decode('utf-8')) # python3.3
14879
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
14880
- break
14881
- cur_time = time.time()
14882
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
14883
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
14884
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
14885
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
14886
- else:
14887
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
14888
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
14889
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
14890
-
14891
-
14892
14840
  def doDescribeUsualLoginPlaces(args, parsed_globals):
14893
14841
  g_param = parse_global_arg(parsed_globals)
14894
14842
 
@@ -17749,7 +17697,7 @@ def doDescribeBaselineStrategyList(args, parsed_globals):
17749
17697
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
17750
17698
 
17751
17699
 
17752
- def doModifyBaselineRuleIgnore(args, parsed_globals):
17700
+ def doDescribeScanMalwareSchedule(args, parsed_globals):
17753
17701
  g_param = parse_global_arg(parsed_globals)
17754
17702
 
17755
17703
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -17778,11 +17726,11 @@ def doModifyBaselineRuleIgnore(args, parsed_globals):
17778
17726
  client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
17779
17727
  client._sdkVersion += ("_CLI_" + __version__)
17780
17728
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
17781
- model = models.ModifyBaselineRuleIgnoreRequest()
17729
+ model = models.DescribeScanMalwareScheduleRequest()
17782
17730
  model.from_json_string(json.dumps(args))
17783
17731
  start_time = time.time()
17784
17732
  while True:
17785
- rsp = client.ModifyBaselineRuleIgnore(model)
17733
+ rsp = client.DescribeScanMalwareSchedule(model)
17786
17734
  result = rsp.to_json_string()
17787
17735
  try:
17788
17736
  json_obj = json.loads(result)
@@ -20089,6 +20037,58 @@ def doDescribeRansomDefenseEventsList(args, parsed_globals):
20089
20037
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
20090
20038
 
20091
20039
 
20040
+ def doExportLicenseDetail(args, parsed_globals):
20041
+ g_param = parse_global_arg(parsed_globals)
20042
+
20043
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
20044
+ cred = credential.CVMRoleCredential()
20045
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
20046
+ cred = credential.STSAssumeRoleCredential(
20047
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
20048
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
20049
+ )
20050
+ 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):
20051
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
20052
+ else:
20053
+ cred = credential.Credential(
20054
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
20055
+ )
20056
+ http_profile = HttpProfile(
20057
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
20058
+ reqMethod="POST",
20059
+ endpoint=g_param[OptionsDefine.Endpoint],
20060
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
20061
+ )
20062
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
20063
+ if g_param[OptionsDefine.Language]:
20064
+ profile.language = g_param[OptionsDefine.Language]
20065
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
20066
+ client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
20067
+ client._sdkVersion += ("_CLI_" + __version__)
20068
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
20069
+ model = models.ExportLicenseDetailRequest()
20070
+ model.from_json_string(json.dumps(args))
20071
+ start_time = time.time()
20072
+ while True:
20073
+ rsp = client.ExportLicenseDetail(model)
20074
+ result = rsp.to_json_string()
20075
+ try:
20076
+ json_obj = json.loads(result)
20077
+ except TypeError as e:
20078
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
20079
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
20080
+ break
20081
+ cur_time = time.time()
20082
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
20083
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
20084
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
20085
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
20086
+ else:
20087
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
20088
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
20089
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
20090
+
20091
+
20092
20092
  def doExportAssetProcessInfoList(args, parsed_globals):
20093
20093
  g_param = parse_global_arg(parsed_globals)
20094
20094
 
@@ -22429,58 +22429,6 @@ def doDeleteBaselineWeakPassword(args, parsed_globals):
22429
22429
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
22430
22430
 
22431
22431
 
22432
- def doDescribeScanMalwareSchedule(args, parsed_globals):
22433
- g_param = parse_global_arg(parsed_globals)
22434
-
22435
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
22436
- cred = credential.CVMRoleCredential()
22437
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
22438
- cred = credential.STSAssumeRoleCredential(
22439
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
22440
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
22441
- )
22442
- 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):
22443
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
22444
- else:
22445
- cred = credential.Credential(
22446
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
22447
- )
22448
- http_profile = HttpProfile(
22449
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
22450
- reqMethod="POST",
22451
- endpoint=g_param[OptionsDefine.Endpoint],
22452
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
22453
- )
22454
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
22455
- if g_param[OptionsDefine.Language]:
22456
- profile.language = g_param[OptionsDefine.Language]
22457
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
22458
- client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
22459
- client._sdkVersion += ("_CLI_" + __version__)
22460
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
22461
- model = models.DescribeScanMalwareScheduleRequest()
22462
- model.from_json_string(json.dumps(args))
22463
- start_time = time.time()
22464
- while True:
22465
- rsp = client.DescribeScanMalwareSchedule(model)
22466
- result = rsp.to_json_string()
22467
- try:
22468
- json_obj = json.loads(result)
22469
- except TypeError as e:
22470
- json_obj = json.loads(result.decode('utf-8')) # python3.3
22471
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
22472
- break
22473
- cur_time = time.time()
22474
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
22475
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
22476
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
22477
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
22478
- else:
22479
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
22480
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
22481
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
22482
-
22483
-
22484
22432
  def doDeleteNonlocalLoginPlaces(args, parsed_globals):
22485
22433
  g_param = parse_global_arg(parsed_globals)
22486
22434
 
@@ -23729,7 +23677,7 @@ def doExportRiskDnsEventList(args, parsed_globals):
23729
23677
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
23730
23678
 
23731
23679
 
23732
- def doExportLicenseDetail(args, parsed_globals):
23680
+ def doModifyBaselineRuleIgnore(args, parsed_globals):
23733
23681
  g_param = parse_global_arg(parsed_globals)
23734
23682
 
23735
23683
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -23758,11 +23706,11 @@ def doExportLicenseDetail(args, parsed_globals):
23758
23706
  client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
23759
23707
  client._sdkVersion += ("_CLI_" + __version__)
23760
23708
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
23761
- model = models.ExportLicenseDetailRequest()
23709
+ model = models.ModifyBaselineRuleIgnoreRequest()
23762
23710
  model.from_json_string(json.dumps(args))
23763
23711
  start_time = time.time()
23764
23712
  while True:
23765
- rsp = client.ExportLicenseDetail(model)
23713
+ rsp = client.ModifyBaselineRuleIgnore(model)
23766
23714
  result = rsp.to_json_string()
23767
23715
  try:
23768
23716
  json_obj = json.loads(result)
@@ -27145,7 +27093,6 @@ ACTION_MAP = {
27145
27093
  "DescribeBaselineTop": doDescribeBaselineTop,
27146
27094
  "DescribeFastAnalysis": doDescribeFastAnalysis,
27147
27095
  "SetLocalStorageExpire": doSetLocalStorageExpire,
27148
- "ExportAttackLogs": doExportAttackLogs,
27149
27096
  "DescribeUsualLoginPlaces": doDescribeUsualLoginPlaces,
27150
27097
  "ExportFileTamperEvents": doExportFileTamperEvents,
27151
27098
  "AddLoginWhiteLists": doAddLoginWhiteLists,
@@ -27201,7 +27148,7 @@ ACTION_MAP = {
27201
27148
  "DescribeBashRules": doDescribeBashRules,
27202
27149
  "DescribeAttackStatistics": doDescribeAttackStatistics,
27203
27150
  "DescribeBaselineStrategyList": doDescribeBaselineStrategyList,
27204
- "ModifyBaselineRuleIgnore": doModifyBaselineRuleIgnore,
27151
+ "DescribeScanMalwareSchedule": doDescribeScanMalwareSchedule,
27205
27152
  "ModifyMalwareWhiteList": doModifyMalwareWhiteList,
27206
27153
  "DescribeWebHookRule": doDescribeWebHookRule,
27207
27154
  "RetryVulFix": doRetryVulFix,
@@ -27246,6 +27193,7 @@ ACTION_MAP = {
27246
27193
  "GetLocalStorageItem": doGetLocalStorageItem,
27247
27194
  "ExportRansomDefenseMachineList": doExportRansomDefenseMachineList,
27248
27195
  "DescribeRansomDefenseEventsList": doDescribeRansomDefenseEventsList,
27196
+ "ExportLicenseDetail": doExportLicenseDetail,
27249
27197
  "ExportAssetProcessInfoList": doExportAssetProcessInfoList,
27250
27198
  "DescribeMachinesSimple": doDescribeMachinesSimple,
27251
27199
  "DescribeBashEvents": doDescribeBashEvents,
@@ -27291,7 +27239,6 @@ ACTION_MAP = {
27291
27239
  "DescribeAssetTotalCount": doDescribeAssetTotalCount,
27292
27240
  "DescribeHotVulTop": doDescribeHotVulTop,
27293
27241
  "DeleteBaselineWeakPassword": doDeleteBaselineWeakPassword,
27294
- "DescribeScanMalwareSchedule": doDescribeScanMalwareSchedule,
27295
27242
  "DeleteNonlocalLoginPlaces": doDeleteNonlocalLoginPlaces,
27296
27243
  "ExportAssetSystemPackageList": doExportAssetSystemPackageList,
27297
27244
  "EditReverseShellRules": doEditReverseShellRules,
@@ -27316,7 +27263,7 @@ ACTION_MAP = {
27316
27263
  "ExportWebPageEventList": doExportWebPageEventList,
27317
27264
  "DescribeBaselineHostRiskTop": doDescribeBaselineHostRiskTop,
27318
27265
  "ExportRiskDnsEventList": doExportRiskDnsEventList,
27319
- "ExportLicenseDetail": doExportLicenseDetail,
27266
+ "ModifyBaselineRuleIgnore": doModifyBaselineRuleIgnore,
27320
27267
  "DescribeEmergencyResponseList": doDescribeEmergencyResponseList,
27321
27268
  "DescribeAttackTrends": doDescribeAttackTrends,
27322
27269
  "DescribeScreenDefenseTrends": doDescribeScreenDefenseTrends,
@@ -2681,13 +2681,6 @@
2681
2681
  "output": "ExportAttackEventsResponse",
2682
2682
  "status": "online"
2683
2683
  },
2684
- "ExportAttackLogs": {
2685
- "document": "ExportAttackEvents接口替代\n\n导出网络攻击日志",
2686
- "input": "ExportAttackLogsRequest",
2687
- "name": "导出网络攻击日志",
2688
- "output": "ExportAttackLogsResponse",
2689
- "status": "deprecated"
2690
- },
2691
2684
  "ExportBaselineEffectHostList": {
2692
2685
  "document": "导出基线影响主机列表",
2693
2686
  "input": "ExportBaselineEffectHostListRequest",
@@ -38792,69 +38785,6 @@
38792
38785
  ],
38793
38786
  "type": "object"
38794
38787
  },
38795
- "ExportAttackLogsRequest": {
38796
- "document": "ExportAttackLogs请求参数结构体",
38797
- "members": [
38798
- {
38799
- "disabled": false,
38800
- "document": "过滤条件。\n<li>HttpMethod - String - 是否必填:否 - 攻击方法(POST|GET)</li>\n<li>DateRange - String - 是否必填:否 - 时间范围(存储最近3个月的数据),如最近一个月[\"2019-11-17\", \"2019-12-17\"]</li>\n<li>VulType - String 威胁类型 - 是否必填: 否</li>\n<li>SrcIp - String 攻击源IP - 是否必填: 否</li>\n<li>DstIp - String 攻击目标IP - 是否必填: 否</li>\n<li>SrcPort - String 攻击源端口 - 是否必填: 否</li>\n<li>DstPort - String 攻击目标端口 - 是否必填: 否</li>",
38801
- "example": "[]",
38802
- "member": "Filters",
38803
- "name": "Filters",
38804
- "required": false,
38805
- "type": "list"
38806
- },
38807
- {
38808
- "disabled": false,
38809
- "document": "主机安全客户端ID",
38810
- "example": "uuid",
38811
- "member": "string",
38812
- "name": "Uuid",
38813
- "required": false,
38814
- "type": "string"
38815
- },
38816
- {
38817
- "disabled": false,
38818
- "document": "云主机机器ID",
38819
- "example": "quuid",
38820
- "member": "string",
38821
- "name": "Quuid",
38822
- "required": false,
38823
- "type": "string"
38824
- }
38825
- ],
38826
- "type": "object"
38827
- },
38828
- "ExportAttackLogsResponse": {
38829
- "document": "ExportAttackLogs返回参数结构体",
38830
- "members": [
38831
- {
38832
- "disabled": false,
38833
- "document": "已废弃",
38834
- "example": "xxx",
38835
- "member": "string",
38836
- "name": "DownloadUrl",
38837
- "type": "string",
38838
- "value_allowed_null": false
38839
- },
38840
- {
38841
- "disabled": false,
38842
- "document": "任务ID,需要到接口“异步导出任务”ExportTasks获取DownloadUrl下载地址",
38843
- "example": "123456",
38844
- "member": "string",
38845
- "name": "TaskId",
38846
- "type": "string",
38847
- "value_allowed_null": false
38848
- },
38849
- {
38850
- "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
38851
- "member": "string",
38852
- "name": "RequestId",
38853
- "type": "string"
38854
- }
38855
- ],
38856
- "type": "object"
38857
- },
38858
38788
  "ExportBaselineEffectHostListRequest": {
38859
38789
  "document": "ExportBaselineEffectHostList请求参数结构体",
38860
38790
  "members": [
@@ -3100,14 +3100,6 @@
3100
3100
  "title": "导出网络攻击事件"
3101
3101
  }
3102
3102
  ],
3103
- "ExportAttackLogs": [
3104
- {
3105
- "document": "导出网络攻击日志",
3106
- "input": "https://cwp.tencentcloudapi.com/?Action=ExportAttackLogs\n&<公共请求参数>",
3107
- "output": "{\n \"Response\": {\n \"RequestId\": \"354f4ac3-8546-4516-8c8a-69e3ab73aa8a\",\n \"DownloadUrl\": \"http://download.url/xxx.csv\",\n \"TaskId\": \"1596595610\"\n }\n}",
3108
- "title": "导出网络攻击日志"
3109
- }
3110
- ],
3111
3103
  "ExportBaselineEffectHostList": [
3112
3104
  {
3113
3105
  "document": "导出漏洞影响主机列表数据",