tccli 3.0.1064.1__py2.py3-none-any.whl → 3.0.1067.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/ccc/v20200210/AbortPredictiveDialingCampaign.md +21 -0
  3. tccli/examples/ccc/v20200210/CreatePredictiveDialingCampaign.md +33 -0
  4. tccli/examples/ccc/v20200210/DeletePredictiveDialingCampaign.md +21 -0
  5. tccli/examples/ccc/v20200210/DescribePredictiveDialingCampaign.md +32 -0
  6. tccli/examples/ccc/v20200210/DescribePredictiveDialingCampaigns.md +55 -0
  7. tccli/examples/ccc/v20200210/DescribePredictiveDialingSessions.md +29 -0
  8. tccli/examples/ccc/v20200210/PausePredictiveDialingCampaign.md +21 -0
  9. tccli/examples/ccc/v20200210/ResumePredictiveDialingCampaign.md +21 -0
  10. tccli/examples/ccc/v20200210/UpdatePredictiveDialingCampaign.md +33 -0
  11. tccli/examples/cfw/v20190904/CreateBlockIgnoreRuleNew.md +25 -0
  12. tccli/examples/cfw/v20190904/DeleteBlockIgnoreRuleNew.md +23 -0
  13. tccli/examples/cfw/v20190904/ModifyBlockIgnoreRuleNew.md +24 -0
  14. tccli/examples/cls/v20201016/DescribeConfigMachineGroups.md +1 -0
  15. tccli/examples/cls/v20201016/DescribeMachineGroups.md +1 -0
  16. tccli/examples/csip/v20221121/DescribeTopAttackInfo.md +26 -0
  17. tccli/examples/ecm/v20190719/ModifyPrivateIpAddressesAttribute.md +1 -1
  18. tccli/examples/mna/v20210119/AddDevice.md +1 -1
  19. tccli/examples/mna/v20210119/GetMultiFlowStatistic.md +7 -1
  20. tccli/examples/mna/v20210119/GetNetMonitor.md +7 -49
  21. tccli/examples/mna/v20210119/GetStatisticData.md +5 -3
  22. tccli/examples/omics/v20221128/CreateVolume.md +25 -0
  23. tccli/examples/omics/v20221128/DeleteVolume.md +20 -0
  24. tccli/examples/omics/v20221128/DeleteVolumeData.md +21 -0
  25. tccli/examples/omics/v20221128/DescribeVolumes.md +37 -0
  26. tccli/examples/omics/v20221128/ModifyVolume.md +21 -0
  27. tccli/examples/postgres/v20170312/ModifyDBInstanceSpec.md +1 -0
  28. tccli/examples/tse/v20201207/CreateGovernanceInstances.md +32 -0
  29. tccli/examples/tse/v20201207/DeleteGovernanceInstances.md +35 -0
  30. tccli/examples/tse/v20201207/DescribeGovernanceInstances.md +56 -0
  31. tccli/examples/tse/v20201207/ModifyGovernanceInstances.md +35 -0
  32. tccli/examples/vod/v20180717/CreateDomainVerifyRecord.md +3 -1
  33. tccli/examples/vod/v20180717/DescribeDefaultDistributionConfig.md +22 -0
  34. tccli/examples/vod/v20180717/ModifyDefaultDistributionConfig.md +21 -0
  35. tccli/examples/waf/v20180125/CreateDeals.md +42 -0
  36. tccli/examples/wedata/v20210820/BatchStartIntegrationTasks.md +10 -7
  37. tccli/examples/wedata/v20210820/BatchStopIntegrationTasks.md +37 -6
  38. tccli/services/ccc/ccc_client.py +493 -16
  39. tccli/services/ccc/v20200210/api.json +927 -42
  40. tccli/services/ccc/v20200210/examples.json +72 -0
  41. tccli/services/cdb/v20170320/api.json +1 -1
  42. tccli/services/cfw/cfw_client.py +171 -12
  43. tccli/services/cfw/v20190904/api.json +258 -2
  44. tccli/services/cfw/v20190904/examples.json +24 -0
  45. tccli/services/ckafka/v20190819/api.json +17 -17
  46. tccli/services/cls/v20201016/api.json +45 -17
  47. tccli/services/cls/v20201016/examples.json +2 -2
  48. tccli/services/csip/csip_client.py +57 -4
  49. tccli/services/csip/v20221121/api.json +70 -0
  50. tccli/services/csip/v20221121/examples.json +8 -0
  51. tccli/services/cynosdb/v20190107/api.json +3 -3
  52. tccli/services/ecm/v20190719/api.json +3 -3
  53. tccli/services/ecm/v20190719/examples.json +1 -1
  54. tccli/services/ess/v20201111/api.json +3 -3
  55. tccli/services/essbasic/v20210526/api.json +5 -5
  56. tccli/services/iotvideo/v20211125/api.json +1 -1
  57. tccli/services/lighthouse/v20200324/api.json +1 -1
  58. tccli/services/mna/v20210119/api.json +144 -9
  59. tccli/services/mna/v20210119/examples.json +6 -6
  60. tccli/services/monitor/v20180724/api.json +20 -0
  61. tccli/services/omics/omics_client.py +277 -12
  62. tccli/services/omics/v20221128/api.json +425 -0
  63. tccli/services/omics/v20221128/examples.json +40 -0
  64. tccli/services/postgres/v20170312/api.json +27 -0
  65. tccli/services/postgres/v20170312/examples.json +1 -1
  66. tccli/services/trp/v20210515/api.json +18 -0
  67. tccli/services/trtc/v20190722/api.json +10 -1
  68. tccli/services/tse/tse_client.py +220 -8
  69. tccli/services/tse/v20201207/api.json +779 -42
  70. tccli/services/tse/v20201207/examples.json +32 -0
  71. tccli/services/vod/v20180717/api.json +146 -1
  72. tccli/services/vod/v20180717/examples.json +17 -1
  73. tccli/services/vod/vod_client.py +106 -0
  74. tccli/services/waf/v20180125/api.json +256 -1
  75. tccli/services/waf/v20180125/examples.json +8 -0
  76. tccli/services/waf/waf_client.py +57 -4
  77. tccli/services/wedata/v20210820/api.json +140 -15
  78. tccli/services/wedata/v20210820/examples.json +10 -4
  79. {tccli-3.0.1064.1.dist-info → tccli-3.0.1067.1.dist-info}/METADATA +2 -2
  80. {tccli-3.0.1064.1.dist-info → tccli-3.0.1067.1.dist-info}/RECORD +83 -58
  81. {tccli-3.0.1064.1.dist-info → tccli-3.0.1067.1.dist-info}/WHEEL +0 -0
  82. {tccli-3.0.1064.1.dist-info → tccli-3.0.1067.1.dist-info}/entry_points.txt +0 -0
  83. {tccli-3.0.1064.1.dist-info → tccli-3.0.1067.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,5 +1,13 @@
1
1
  {
2
2
  "actions": {
3
+ "AbortPredictiveDialingCampaign": [
4
+ {
5
+ "document": "停止预测式外呼任务",
6
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AbortPredictiveDialingCampaign\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"CampaignId\": 2569\n}",
7
+ "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
8
+ "title": "停止预测式外呼任务示例"
9
+ }
10
+ ],
3
11
  "BindNumberCallOutSkillGroup": [
4
12
  {
5
13
  "document": "绑定号码和技能组",
@@ -64,6 +72,14 @@
64
72
  "title": "创建话机账号"
65
73
  }
66
74
  ],
75
+ "CreatePredictiveDialingCampaign": [
76
+ {
77
+ "document": "创建预测式外呼任务",
78
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePredictiveDialingCampaign\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"Name\": \"新能源SUV推荐\",\n \"Callees\": [\n \"+8613012345678\",\n \"+8613012345679\",\n \"+8613012345670\"\n ],\n \"Callers\": [\n \"0086075586013388\"\n ],\n \"CallOrder\": 0,\n \"SkillGroupId\": 255,\n \"IVRId\": 4600,\n \"Priority\": 3,\n \"ExpectedAbandonRate\": 10,\n \"RetryTimes\": 1,\n \"RetryInterval\": 1800,\n \"StartTime\": 1708483433,\n \"EndTime\": 1708485433\n}",
79
+ "output": "{\n \"Response\": {\n \"CampaignId\": 2569,\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
80
+ "title": "创建预测式外呼任务示例"
81
+ }
82
+ ],
67
83
  "CreateSDKLoginToken": [
68
84
  {
69
85
  "document": "创建 SDK 登录 Token",
@@ -96,6 +112,14 @@
96
112
  "title": "删除话机账号"
97
113
  }
98
114
  ],
115
+ "DeletePredictiveDialingCampaign": [
116
+ {
117
+ "document": "删除预测式外呼任务",
118
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeletePredictiveDialingCampaign\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"CampaignId\": 2569\n}",
119
+ "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
120
+ "title": "删除预测式外呼任务示例"
121
+ }
122
+ ],
99
123
  "DeleteStaff": [
100
124
  {
101
125
  "document": "",
@@ -208,6 +232,30 @@
208
232
  "title": "获取 PSTN 活动会话列表示例"
209
233
  }
210
234
  ],
235
+ "DescribePredictiveDialingCampaign": [
236
+ {
237
+ "document": "查询预测式外呼任务",
238
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePredictiveDialingCampaign\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"CampaignId\": 2569\n}",
239
+ "output": "{\n \"Response\": {\n \"CampaignId\": 2569,\n \"Name\": \"新能源SUV推荐\",\n \"CallOrder\": 0,\n \"SkillGroupId\": 255,\n \"IVRId\": 4600,\n \"Priority\": 3,\n \"ExpectedAbandonRate\": 10,\n \"RetryTimes\": 1,\n \"RetryInterval\": 1800,\n \"StartTime\": 1708483433,\n \"EndTime\": 1708485433,\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
240
+ "title": "查询预测式外呼任务示例"
241
+ }
242
+ ],
243
+ "DescribePredictiveDialingCampaigns": [
244
+ {
245
+ "document": "查询预测式外呼任务列表",
246
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePredictiveDialingCampaigns\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"PageSize\": 25,\n \"PageNumber\": 0\n}",
247
+ "output": "{\n \"Response\": {\n \"TotalCount\": 66,\n \"CampaignList\": [\n {\n \"CampaignId\": 2567,\n \"Name\": \"新能源SUV推荐1\",\n \"Status\": 0,\n \"StatusReason\": 0,\n \"CalleeCount\": 1000,\n \"FinishedCalleeCount\": 0,\n \"Priority\": 3,\n \"SkillGroupId\": 255\n },\n {\n \"CampaignId\": 2568,\n \"Name\": \"新能源SUV推荐2\",\n \"Status\": 0,\n \"StatusReason\": 0,\n \"CalleeCount\": 1000,\n \"FinishedCalleeCount\": 0,\n \"Priority\": 3,\n \"SkillGroupId\": 255\n },\n {\n \"CampaignId\": 2569,\n \"Name\": \"新能源SUV推荐3\",\n \"Status\": 0,\n \"StatusReason\": 0,\n \"CalleeCount\": 1000,\n \"FinishedCalleeCount\": 0,\n \"Priority\": 3,\n \"SkillGroupId\": 255\n }\n ],\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
248
+ "title": "查询预测式外呼任务列表示例"
249
+ }
250
+ ],
251
+ "DescribePredictiveDialingSessions": [
252
+ {
253
+ "document": "查询预测式外呼呼叫列表",
254
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePredictiveDialingSessions\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"CampaignId\": 2569,\n \"PageSize\": 25,\n \"PageNumber\": 0\n}",
255
+ "output": "{\n \"Response\": {\n \"TotalCount\": 66,\n \"SessionList\": [\n \"a5be1044-e8b0-4f02-9b25-64baee24374b\",\n \"22c3e170-f307-47c8-9f10-1b77413a646f\",\n \"e8557b17-d68b-4475-9a97-639a1108887b\"\n ],\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
256
+ "title": "查询预测式外呼呼叫列表示例"
257
+ }
258
+ ],
211
259
  "DescribeProtectedTelCdr": [
212
260
  {
213
261
  "document": "",
@@ -296,6 +344,14 @@
296
344
  "title": "修改客服示例"
297
345
  }
298
346
  ],
347
+ "PausePredictiveDialingCampaign": [
348
+ {
349
+ "document": "暂停预测式外呼任务",
350
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: PausePredictiveDialingCampaign\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"CampaignId\": 2569\n}",
351
+ "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
352
+ "title": "暂停预测式外呼任务示例"
353
+ }
354
+ ],
299
355
  "ResetExtensionPassword": [
300
356
  {
301
357
  "document": "",
@@ -304,6 +360,14 @@
304
360
  "title": "重置话机注册密码"
305
361
  }
306
362
  ],
363
+ "ResumePredictiveDialingCampaign": [
364
+ {
365
+ "document": "恢复预测式外呼任务",
366
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResumePredictiveCalloutTask\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"CampaignId\": 2569\n}",
367
+ "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
368
+ "title": "恢复预测式外呼任务示例"
369
+ }
370
+ ],
307
371
  "StopAutoCalloutTask": [
308
372
  {
309
373
  "document": "",
@@ -327,6 +391,14 @@
327
391
  "output": "{\n \"Response\": {\n \"RequestId\": \"48edd236-7ef1-45af-9e12-fc376ba355bf\"\n }\n}",
328
392
  "title": "解绑坐席所属技能组示例"
329
393
  }
394
+ ],
395
+ "UpdatePredictiveDialingCampaign": [
396
+ {
397
+ "document": "更新预测式外呼任务",
398
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdatePredictiveDialingCampaign\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"CampaignId\": 2569,\n \"Name\": \"新能源SUV推荐\",\n \"Callees\": [\n \"+8613012345678\",\n \"+8613012345679\",\n \"+8613012345670\"\n ],\n \"Callers\": [\n \"0086075586013388\"\n ],\n \"CallOrder\": 0,\n \"SkillGroupId\": 255,\n \"IVRId\": 4600,\n \"Priority\": 3,\n \"ExpectedAbandonRate\": 10,\n \"RetryTimes\": 1,\n \"RetryInterval\": 1800,\n \"StartTime\": 1708483433,\n \"EndTime\": 1708485433\n}",
399
+ "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
400
+ "title": "更新预测式外呼任务示例"
401
+ }
330
402
  ]
331
403
  },
332
404
  "version": "1.0"
@@ -5239,7 +5239,7 @@
5239
5239
  },
5240
5240
  {
5241
5241
  "disabled": false,
5242
- "document": "设置 root 帐号密码,密码规则:8 - 64 个字符,至少包含字母、数字、字符(支持的字符:_+-&=!@#$%^*())中的两种,购买主实例时可指定该参数,购买只读实例或者灾备实例时指定该参数无意义。",
5242
+ "document": "设置 root 账号密码,密码规则:8 - 64 个字符,至少包含字母、数字、字符(支持的字符:_+-&=!@#$%^*())中的两种,购买主实例时可指定该参数,购买只读实例或者灾备实例时指定该参数无意义。",
5243
5243
  "example": "your_password",
5244
5244
  "member": "string",
5245
5245
  "name": "Password",
@@ -69,7 +69,7 @@ def doRemoveVpcAcRule(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
- def doStopSecurityGroupRuleDispatch(args, parsed_globals):
72
+ def doDeleteBlockIgnoreRuleNew(args, parsed_globals):
73
73
  g_param = parse_global_arg(parsed_globals)
74
74
 
75
75
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -98,11 +98,11 @@ def doStopSecurityGroupRuleDispatch(args, parsed_globals):
98
98
  client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
99
99
  client._sdkVersion += ("_CLI_" + __version__)
100
100
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.StopSecurityGroupRuleDispatchRequest()
101
+ model = models.DeleteBlockIgnoreRuleNewRequest()
102
102
  model.from_json_string(json.dumps(args))
103
103
  start_time = time.time()
104
104
  while True:
105
- rsp = client.StopSecurityGroupRuleDispatch(model)
105
+ rsp = client.DeleteBlockIgnoreRuleNew(model)
106
106
  result = rsp.to_json_string()
107
107
  try:
108
108
  json_obj = json.loads(result)
@@ -225,6 +225,58 @@ def doModifyEWRuleStatus(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
+ def doStopSecurityGroupRuleDispatch(args, parsed_globals):
229
+ g_param = parse_global_arg(parsed_globals)
230
+
231
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
232
+ cred = credential.CVMRoleCredential()
233
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
234
+ cred = credential.STSAssumeRoleCredential(
235
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
236
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
237
+ )
238
+ 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):
239
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
240
+ else:
241
+ cred = credential.Credential(
242
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
243
+ )
244
+ http_profile = HttpProfile(
245
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
246
+ reqMethod="POST",
247
+ endpoint=g_param[OptionsDefine.Endpoint],
248
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
249
+ )
250
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
251
+ if g_param[OptionsDefine.Language]:
252
+ profile.language = g_param[OptionsDefine.Language]
253
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
254
+ client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
255
+ client._sdkVersion += ("_CLI_" + __version__)
256
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
+ model = models.StopSecurityGroupRuleDispatchRequest()
258
+ model.from_json_string(json.dumps(args))
259
+ start_time = time.time()
260
+ while True:
261
+ rsp = client.StopSecurityGroupRuleDispatch(model)
262
+ result = rsp.to_json_string()
263
+ try:
264
+ json_obj = json.loads(result)
265
+ except TypeError as e:
266
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
267
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
268
+ break
269
+ cur_time = time.time()
270
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
271
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
272
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
273
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
274
+ else:
275
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
276
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
277
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
+
279
+
228
280
  def doModifyResourceGroup(args, parsed_globals):
229
281
  g_param = parse_global_arg(parsed_globals)
230
282
 
@@ -1161,6 +1213,58 @@ def doCreateBlockIgnoreRuleList(args, parsed_globals):
1161
1213
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
1214
 
1163
1215
 
1216
+ def doModifyBlockIgnoreRuleNew(args, parsed_globals):
1217
+ g_param = parse_global_arg(parsed_globals)
1218
+
1219
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1220
+ cred = credential.CVMRoleCredential()
1221
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1222
+ cred = credential.STSAssumeRoleCredential(
1223
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1224
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1225
+ )
1226
+ 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):
1227
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1228
+ else:
1229
+ cred = credential.Credential(
1230
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1231
+ )
1232
+ http_profile = HttpProfile(
1233
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1234
+ reqMethod="POST",
1235
+ endpoint=g_param[OptionsDefine.Endpoint],
1236
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1237
+ )
1238
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1239
+ if g_param[OptionsDefine.Language]:
1240
+ profile.language = g_param[OptionsDefine.Language]
1241
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1242
+ client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
1243
+ client._sdkVersion += ("_CLI_" + __version__)
1244
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1245
+ model = models.ModifyBlockIgnoreRuleNewRequest()
1246
+ model.from_json_string(json.dumps(args))
1247
+ start_time = time.time()
1248
+ while True:
1249
+ rsp = client.ModifyBlockIgnoreRuleNew(model)
1250
+ result = rsp.to_json_string()
1251
+ try:
1252
+ json_obj = json.loads(result)
1253
+ except TypeError as e:
1254
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1255
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1256
+ break
1257
+ cur_time = time.time()
1258
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1259
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1260
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1261
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1262
+ else:
1263
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1264
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1265
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1266
+
1267
+
1164
1268
  def doModifyEdgeIpSwitch(args, parsed_globals):
1165
1269
  g_param = parse_global_arg(parsed_globals)
1166
1270
 
@@ -2201,6 +2305,58 @@ def doDeleteAddressTemplate(args, parsed_globals):
2201
2305
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2202
2306
 
2203
2307
 
2308
+ def doCreateBlockIgnoreRuleNew(args, parsed_globals):
2309
+ g_param = parse_global_arg(parsed_globals)
2310
+
2311
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2312
+ cred = credential.CVMRoleCredential()
2313
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2314
+ cred = credential.STSAssumeRoleCredential(
2315
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2316
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2317
+ )
2318
+ 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):
2319
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2320
+ else:
2321
+ cred = credential.Credential(
2322
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2323
+ )
2324
+ http_profile = HttpProfile(
2325
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2326
+ reqMethod="POST",
2327
+ endpoint=g_param[OptionsDefine.Endpoint],
2328
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2329
+ )
2330
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2331
+ if g_param[OptionsDefine.Language]:
2332
+ profile.language = g_param[OptionsDefine.Language]
2333
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2334
+ client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
2335
+ client._sdkVersion += ("_CLI_" + __version__)
2336
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2337
+ model = models.CreateBlockIgnoreRuleNewRequest()
2338
+ model.from_json_string(json.dumps(args))
2339
+ start_time = time.time()
2340
+ while True:
2341
+ rsp = client.CreateBlockIgnoreRuleNew(model)
2342
+ result = rsp.to_json_string()
2343
+ try:
2344
+ json_obj = json.loads(result)
2345
+ except TypeError as e:
2346
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2347
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2348
+ break
2349
+ cur_time = time.time()
2350
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2351
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2352
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2353
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2354
+ else:
2355
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2356
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2357
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2358
+
2359
+
2204
2360
  def doDescribeSourceAsset(args, parsed_globals):
2205
2361
  g_param = parse_global_arg(parsed_globals)
2206
2362
 
@@ -4749,7 +4905,7 @@ def doCreateAcRules(args, parsed_globals):
4749
4905
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4750
4906
 
4751
4907
 
4752
- def doModifyNatFwSwitch(args, parsed_globals):
4908
+ def doModifyEnterpriseSecurityDispatchStatus(args, parsed_globals):
4753
4909
  g_param = parse_global_arg(parsed_globals)
4754
4910
 
4755
4911
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4778,11 +4934,11 @@ def doModifyNatFwSwitch(args, parsed_globals):
4778
4934
  client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
4779
4935
  client._sdkVersion += ("_CLI_" + __version__)
4780
4936
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4781
- model = models.ModifyNatFwSwitchRequest()
4937
+ model = models.ModifyEnterpriseSecurityDispatchStatusRequest()
4782
4938
  model.from_json_string(json.dumps(args))
4783
4939
  start_time = time.time()
4784
4940
  while True:
4785
- rsp = client.ModifyNatFwSwitch(model)
4941
+ rsp = client.ModifyEnterpriseSecurityDispatchStatus(model)
4786
4942
  result = rsp.to_json_string()
4787
4943
  try:
4788
4944
  json_obj = json.loads(result)
@@ -5425,7 +5581,7 @@ def doDescribeIdsWhiteRule(args, parsed_globals):
5425
5581
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5426
5582
 
5427
5583
 
5428
- def doModifyEnterpriseSecurityDispatchStatus(args, parsed_globals):
5584
+ def doModifyNatFwSwitch(args, parsed_globals):
5429
5585
  g_param = parse_global_arg(parsed_globals)
5430
5586
 
5431
5587
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -5454,11 +5610,11 @@ def doModifyEnterpriseSecurityDispatchStatus(args, parsed_globals):
5454
5610
  client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
5455
5611
  client._sdkVersion += ("_CLI_" + __version__)
5456
5612
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
5457
- model = models.ModifyEnterpriseSecurityDispatchStatusRequest()
5613
+ model = models.ModifyNatFwSwitchRequest()
5458
5614
  model.from_json_string(json.dumps(args))
5459
5615
  start_time = time.time()
5460
5616
  while True:
5461
- rsp = client.ModifyEnterpriseSecurityDispatchStatus(model)
5617
+ rsp = client.ModifyNatFwSwitch(model)
5462
5618
  result = rsp.to_json_string()
5463
5619
  try:
5464
5620
  json_obj = json.loads(result)
@@ -5749,9 +5905,10 @@ MODELS_MAP = {
5749
5905
 
5750
5906
  ACTION_MAP = {
5751
5907
  "RemoveVpcAcRule": doRemoveVpcAcRule,
5752
- "StopSecurityGroupRuleDispatch": doStopSecurityGroupRuleDispatch,
5908
+ "DeleteBlockIgnoreRuleNew": doDeleteBlockIgnoreRuleNew,
5753
5909
  "DescribeVpcFwGroupSwitch": doDescribeVpcFwGroupSwitch,
5754
5910
  "ModifyEWRuleStatus": doModifyEWRuleStatus,
5911
+ "StopSecurityGroupRuleDispatch": doStopSecurityGroupRuleDispatch,
5755
5912
  "ModifyResourceGroup": doModifyResourceGroup,
5756
5913
  "DescribeResourceGroupNew": doDescribeResourceGroupNew,
5757
5914
  "ModifyVpcFwGroup": doModifyVpcFwGroup,
@@ -5770,6 +5927,7 @@ ACTION_MAP = {
5770
5927
  "RemoveAclRule": doRemoveAclRule,
5771
5928
  "DeleteNatFwInstance": doDeleteNatFwInstance,
5772
5929
  "CreateBlockIgnoreRuleList": doCreateBlockIgnoreRuleList,
5930
+ "ModifyBlockIgnoreRuleNew": doModifyBlockIgnoreRuleNew,
5773
5931
  "ModifyEdgeIpSwitch": doModifyEdgeIpSwitch,
5774
5932
  "DescribeBlockByIpTimesList": doDescribeBlockByIpTimesList,
5775
5933
  "DescribeEnterpriseSGRuleProgress": doDescribeEnterpriseSGRuleProgress,
@@ -5790,6 +5948,7 @@ ACTION_MAP = {
5790
5948
  "ModifySecurityGroupItemRuleStatus": doModifySecurityGroupItemRuleStatus,
5791
5949
  "DescribeNatFwInstanceWithRegion": doDescribeNatFwInstanceWithRegion,
5792
5950
  "DeleteAddressTemplate": doDeleteAddressTemplate,
5951
+ "CreateBlockIgnoreRuleNew": doCreateBlockIgnoreRuleNew,
5793
5952
  "DescribeSourceAsset": doDescribeSourceAsset,
5794
5953
  "DeleteResourceGroup": doDeleteResourceGroup,
5795
5954
  "RemoveAcRule": doRemoveAcRule,
@@ -5839,7 +5998,7 @@ ACTION_MAP = {
5839
5998
  "CreateDatabaseWhiteListRules": doCreateDatabaseWhiteListRules,
5840
5999
  "CreateNatFwInstanceWithDomain": doCreateNatFwInstanceWithDomain,
5841
6000
  "CreateAcRules": doCreateAcRules,
5842
- "ModifyNatFwSwitch": doModifyNatFwSwitch,
6001
+ "ModifyEnterpriseSecurityDispatchStatus": doModifyEnterpriseSecurityDispatchStatus,
5843
6002
  "DescribeTLogInfo": doDescribeTLogInfo,
5844
6003
  "ModifyRunSyncAsset": doModifyRunSyncAsset,
5845
6004
  "ModifyAllVPCSwitchStatus": doModifyAllVPCSwitchStatus,
@@ -5852,7 +6011,7 @@ ACTION_MAP = {
5852
6011
  "SyncFwOperate": doSyncFwOperate,
5853
6012
  "ModifyAcRule": doModifyAcRule,
5854
6013
  "DescribeIdsWhiteRule": doDescribeIdsWhiteRule,
5855
- "ModifyEnterpriseSecurityDispatchStatus": doModifyEnterpriseSecurityDispatchStatus,
6014
+ "ModifyNatFwSwitch": doModifyNatFwSwitch,
5856
6015
  "DescribeTLogIpList": doDescribeTLogIpList,
5857
6016
  "CreateAddressTemplate": doCreateAddressTemplate,
5858
6017
  "AddNatAcRule": doAddNatAcRule,