tccli 3.0.1153.1__py2.py3-none-any.whl → 3.0.1155.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 (36) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/billing/v20180709/api.json +1 -1
  3. tccli/services/ccc/v20200210/api.json +3 -3
  4. tccli/services/cdb/v20170320/api.json +1 -1
  5. tccli/services/ckafka/ckafka_client.py +65 -12
  6. tccli/services/ckafka/v20190819/api.json +134 -0
  7. tccli/services/ckafka/v20190819/examples.json +8 -0
  8. tccli/services/clb/v20180317/api.json +1 -1
  9. tccli/services/cloudapp/v20220530/api.json +3 -3
  10. tccli/services/cvm/cvm_client.py +110 -4
  11. tccli/services/cvm/v20170312/api.json +95 -0
  12. tccli/services/cvm/v20170312/examples.json +16 -0
  13. tccli/services/cynosdb/cynosdb_client.py +110 -4
  14. tccli/services/cynosdb/v20190107/api.json +192 -0
  15. tccli/services/cynosdb/v20190107/examples.json +16 -0
  16. tccli/services/es/v20180416/api.json +36 -0
  17. tccli/services/ess/v20201111/api.json +10 -10
  18. tccli/services/essbasic/v20210526/api.json +17 -17
  19. tccli/services/essbasic/v20210526/examples.json +3 -3
  20. tccli/services/faceid/v20180301/api.json +5 -5
  21. tccli/services/hunyuan/v20230901/api.json +79 -4
  22. tccli/services/lighthouse/v20200324/api.json +2 -2
  23. tccli/services/live/v20180801/api.json +1 -1
  24. tccli/services/lke/v20231130/api.json +3 -3
  25. tccli/services/mna/mna_client.py +322 -4
  26. tccli/services/mna/v20210119/api.json +435 -0
  27. tccli/services/mna/v20210119/examples.json +48 -0
  28. tccli/services/oceanus/v20190422/api.json +20 -0
  29. tccli/services/tke/v20180525/api.json +4 -4
  30. tccli/services/trtc/v20190722/api.json +2 -2
  31. tccli/services/vpc/v20170312/api.json +10 -10
  32. {tccli-3.0.1153.1.dist-info → tccli-3.0.1155.1.dist-info}/METADATA +2 -2
  33. {tccli-3.0.1153.1.dist-info → tccli-3.0.1155.1.dist-info}/RECORD +36 -36
  34. {tccli-3.0.1153.1.dist-info → tccli-3.0.1155.1.dist-info}/WHEEL +0 -0
  35. {tccli-3.0.1153.1.dist-info → tccli-3.0.1155.1.dist-info}/entry_points.txt +0 -0
  36. {tccli-3.0.1153.1.dist-info → tccli-3.0.1155.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1153.1'
1
+ __version__ = '3.0.1155.1'
@@ -183,7 +183,7 @@
183
183
  "status": "online"
184
184
  },
185
185
  "DescribeCostDetail": {
186
- "document": "查询消耗明细",
186
+ "document": "查询消耗明细\n\n注意事项:\n1. 对于消耗明细数据量级很大(例如每月消耗明细量级超过100w)的客户,通过 API 调用明细数据会有超时风险,建议您开通消耗账单数据存储功能,通过存储桶中获取账单文件进行分析。[账单存储至COS桶](https://cloud.tencent.com/document/product/555/61275)",
187
187
  "input": "DescribeCostDetailRequest",
188
188
  "name": "查询消耗明细",
189
189
  "output": "DescribeCostDetailResponse",
@@ -643,7 +643,7 @@
643
643
  },
644
644
  {
645
645
  "disabled": false,
646
- "document": "任务状态0初始 1运行中 2已完成 3结束中 4已结束",
646
+ "document": "任务状态:\n0初始:任务创建,呼叫未开始\n1运行中\n2 已完成:任务中所有呼叫完成\n3结束中:任务到期,但仍有部分呼叫未结束\n4已结束:任务到期终止",
647
647
  "example": "1",
648
648
  "member": "uint64",
649
649
  "name": "State",
@@ -4447,8 +4447,8 @@
4447
4447
  },
4448
4448
  {
4449
4449
  "disabled": false,
4450
- "document": "筛选坐席状态列表",
4451
- "example": "[0,100,200,300,400,500,600,700,800]",
4450
+ "document": "筛选坐席状态列表 座席状态 free 示闲 | busy 忙碌 | rest 小休 | notReady 示忙 | afterCallWork 话后调整 | offline 离线 ",
4451
+ "example": "[\"free\"]",
4452
4452
  "member": "string",
4453
4453
  "name": "StatusList",
4454
4454
  "required": false,
@@ -6172,7 +6172,7 @@
6172
6172
  },
6173
6173
  {
6174
6174
  "disabled": false,
6175
- "document": "是否只预检此次请求。true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制等。如果检查不通过,则返回对应错误码;如果检查通过,则返回RequestId.默认为false:发送正常请求,通过检查后直接创建实例。",
6175
+ "document": "是否只预检此次请求。true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制等。如果检查不通过,则返回对应错误码;如果检查通过,则返回 RequestIdfalse:发送正常请求,通过检查后直接创建实例。\n默认为 false。",
6176
6176
  "example": "true",
6177
6177
  "member": "bool",
6178
6178
  "name": "DryRun",
@@ -797,7 +797,7 @@ def doDescribeDatahubGroupOffsets(args, parsed_globals):
797
797
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
798
 
799
799
 
800
- def doCreateCdcCluster(args, parsed_globals):
800
+ def doDescribeDatahubTask(args, parsed_globals):
801
801
  g_param = parse_global_arg(parsed_globals)
802
802
 
803
803
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -826,11 +826,11 @@ def doCreateCdcCluster(args, parsed_globals):
826
826
  client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
827
827
  client._sdkVersion += ("_CLI_" + __version__)
828
828
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
829
- model = models.CreateCdcClusterRequest()
829
+ model = models.DescribeDatahubTaskRequest()
830
830
  model.from_json_string(json.dumps(args))
831
831
  start_time = time.time()
832
832
  while True:
833
- rsp = client.CreateCdcCluster(model)
833
+ rsp = client.DescribeDatahubTask(model)
834
834
  result = rsp.to_json_string()
835
835
  try:
836
836
  json_obj = json.loads(result)
@@ -1629,6 +1629,58 @@ def doDeleteInstancePost(args, parsed_globals):
1629
1629
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1630
 
1631
1631
 
1632
+ def doModifyPassword(args, parsed_globals):
1633
+ g_param = parse_global_arg(parsed_globals)
1634
+
1635
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1636
+ cred = credential.CVMRoleCredential()
1637
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1638
+ cred = credential.STSAssumeRoleCredential(
1639
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1640
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1641
+ )
1642
+ 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):
1643
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1644
+ else:
1645
+ cred = credential.Credential(
1646
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1647
+ )
1648
+ http_profile = HttpProfile(
1649
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1650
+ reqMethod="POST",
1651
+ endpoint=g_param[OptionsDefine.Endpoint],
1652
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1653
+ )
1654
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1655
+ if g_param[OptionsDefine.Language]:
1656
+ profile.language = g_param[OptionsDefine.Language]
1657
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1658
+ client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
1659
+ client._sdkVersion += ("_CLI_" + __version__)
1660
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
+ model = models.ModifyPasswordRequest()
1662
+ model.from_json_string(json.dumps(args))
1663
+ start_time = time.time()
1664
+ while True:
1665
+ rsp = client.ModifyPassword(model)
1666
+ result = rsp.to_json_string()
1667
+ try:
1668
+ json_obj = json.loads(result)
1669
+ except TypeError as e:
1670
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1671
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1672
+ break
1673
+ cur_time = time.time()
1674
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1675
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1676
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1677
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1678
+ else:
1679
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1680
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1681
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1682
+
1683
+
1632
1684
  def doDescribeACL(args, parsed_globals):
1633
1685
  g_param = parse_global_arg(parsed_globals)
1634
1686
 
@@ -2253,7 +2305,7 @@ def doCreateConnectResource(args, parsed_globals):
2253
2305
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
2306
 
2255
2307
 
2256
- def doDescribeDatahubTask(args, parsed_globals):
2308
+ def doModifyRoutineMaintenanceTask(args, parsed_globals):
2257
2309
  g_param = parse_global_arg(parsed_globals)
2258
2310
 
2259
2311
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2282,11 +2334,11 @@ def doDescribeDatahubTask(args, parsed_globals):
2282
2334
  client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
2283
2335
  client._sdkVersion += ("_CLI_" + __version__)
2284
2336
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2285
- model = models.DescribeDatahubTaskRequest()
2337
+ model = models.ModifyRoutineMaintenanceTaskRequest()
2286
2338
  model.from_json_string(json.dumps(args))
2287
2339
  start_time = time.time()
2288
2340
  while True:
2289
- rsp = client.DescribeDatahubTask(model)
2341
+ rsp = client.ModifyRoutineMaintenanceTask(model)
2290
2342
  result = rsp.to_json_string()
2291
2343
  try:
2292
2344
  json_obj = json.loads(result)
@@ -4177,7 +4229,7 @@ def doDeleteTopic(args, parsed_globals):
4177
4229
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4178
4230
 
4179
4231
 
4180
- def doModifyPassword(args, parsed_globals):
4232
+ def doCreateCdcCluster(args, parsed_globals):
4181
4233
  g_param = parse_global_arg(parsed_globals)
4182
4234
 
4183
4235
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4206,11 +4258,11 @@ def doModifyPassword(args, parsed_globals):
4206
4258
  client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
4207
4259
  client._sdkVersion += ("_CLI_" + __version__)
4208
4260
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4209
- model = models.ModifyPasswordRequest()
4261
+ model = models.CreateCdcClusterRequest()
4210
4262
  model.from_json_string(json.dumps(args))
4211
4263
  start_time = time.time()
4212
4264
  while True:
4213
- rsp = client.ModifyPassword(model)
4265
+ rsp = client.CreateCdcCluster(model)
4214
4266
  result = rsp.to_json_string()
4215
4267
  try:
4216
4268
  json_obj = json.loads(result)
@@ -4359,7 +4411,7 @@ ACTION_MAP = {
4359
4411
  "SendMessage": doSendMessage,
4360
4412
  "DescribeUser": doDescribeUser,
4361
4413
  "DescribeDatahubGroupOffsets": doDescribeDatahubGroupOffsets,
4362
- "CreateCdcCluster": doCreateCdcCluster,
4414
+ "DescribeDatahubTask": doDescribeDatahubTask,
4363
4415
  "CreateTopicIpWhiteList": doCreateTopicIpWhiteList,
4364
4416
  "DeleteConnectResource": doDeleteConnectResource,
4365
4417
  "DescribeGroup": doDescribeGroup,
@@ -4375,6 +4427,7 @@ ACTION_MAP = {
4375
4427
  "FetchMessageListByOffset": doFetchMessageListByOffset,
4376
4428
  "CreateDatahubTopic": doCreateDatahubTopic,
4377
4429
  "DeleteInstancePost": doDeleteInstancePost,
4430
+ "ModifyPassword": doModifyPassword,
4378
4431
  "DescribeACL": doDescribeACL,
4379
4432
  "DescribeDatahubTopics": doDescribeDatahubTopics,
4380
4433
  "DescribeTopicDetail": doDescribeTopicDetail,
@@ -4387,7 +4440,7 @@ ACTION_MAP = {
4387
4440
  "DescribeConsumerGroup": doDescribeConsumerGroup,
4388
4441
  "DescribeTopicSubscribeGroup": doDescribeTopicSubscribeGroup,
4389
4442
  "CreateConnectResource": doCreateConnectResource,
4390
- "DescribeDatahubTask": doDescribeDatahubTask,
4443
+ "ModifyRoutineMaintenanceTask": doModifyRoutineMaintenanceTask,
4391
4444
  "CheckCdcCluster": doCheckCdcCluster,
4392
4445
  "DescribeTopicFlowRanking": doDescribeTopicFlowRanking,
4393
4446
  "DeleteRouteTriggerTime": doDeleteRouteTriggerTime,
@@ -4424,7 +4477,7 @@ ACTION_MAP = {
4424
4477
  "DescribeConnectResources": doDescribeConnectResources,
4425
4478
  "DescribeTopic": doDescribeTopic,
4426
4479
  "DeleteTopic": doDeleteTopic,
4427
- "ModifyPassword": doModifyPassword,
4480
+ "CreateCdcCluster": doCreateCdcCluster,
4428
4481
  "InquireCkafkaPrice": doInquireCkafkaPrice,
4429
4482
  "ModifyTopicAttributes": doModifyTopicAttributes,
4430
4483
 
@@ -560,6 +560,13 @@
560
560
  "output": "ModifyPasswordResponse",
561
561
  "status": "online"
562
562
  },
563
+ "ModifyRoutineMaintenanceTask": {
564
+ "document": "设置自动化运维属性",
565
+ "input": "ModifyRoutineMaintenanceTaskRequest",
566
+ "name": "设置自动化运维属性",
567
+ "output": "ModifyRoutineMaintenanceTaskResponse",
568
+ "status": "online"
569
+ },
563
570
  "ModifyTopicAttributes": {
564
571
  "document": "本接口用于修改主题属性。",
565
572
  "input": "ModifyTopicAttributesRequest",
@@ -13421,6 +13428,133 @@
13421
13428
  ],
13422
13429
  "type": "object"
13423
13430
  },
13431
+ "ModifyRoutineMaintenanceTaskRequest": {
13432
+ "document": "ModifyRoutineMaintenanceTask请求参数结构体",
13433
+ "members": [
13434
+ {
13435
+ "disabled": false,
13436
+ "document": "实例id",
13437
+ "example": "ckafka-pkbw2qkq",
13438
+ "member": "string",
13439
+ "name": "InstanceId",
13440
+ "required": true,
13441
+ "type": "string"
13442
+ },
13443
+ {
13444
+ "disabled": false,
13445
+ "document": "自动化运维类别",
13446
+ "example": "QUOTA",
13447
+ "member": "string",
13448
+ "name": "MaintenanceType",
13449
+ "required": true,
13450
+ "type": "string"
13451
+ },
13452
+ {
13453
+ "disabled": false,
13454
+ "document": "自动化运维子类别",
13455
+ "example": "INSTANCE_STORAGE_CAPACITY",
13456
+ "member": "string",
13457
+ "name": "MaintenanceSubtype",
13458
+ "required": true,
13459
+ "type": "string"
13460
+ },
13461
+ {
13462
+ "disabled": false,
13463
+ "document": "主题名称",
13464
+ "example": "test",
13465
+ "member": "string",
13466
+ "name": "TopicName",
13467
+ "required": false,
13468
+ "type": "string"
13469
+ },
13470
+ {
13471
+ "disabled": false,
13472
+ "document": "任务触发阈值",
13473
+ "example": "60",
13474
+ "member": "int64",
13475
+ "name": "ConfigureThreshold",
13476
+ "required": false,
13477
+ "type": "int"
13478
+ },
13479
+ {
13480
+ "disabled": false,
13481
+ "document": "任务调整步长",
13482
+ "example": "30",
13483
+ "member": "int64",
13484
+ "name": "ConfigureStepSize",
13485
+ "required": false,
13486
+ "type": "int"
13487
+ },
13488
+ {
13489
+ "disabled": false,
13490
+ "document": "任务调整上限",
13491
+ "example": "70",
13492
+ "member": "int64",
13493
+ "name": "ConfigureLimit",
13494
+ "required": false,
13495
+ "type": "int"
13496
+ },
13497
+ {
13498
+ "disabled": false,
13499
+ "document": "任务预期触发时间,存储从当日 0AM 开始偏移的秒数",
13500
+ "example": "9600",
13501
+ "member": "int64",
13502
+ "name": "PlannedTime",
13503
+ "required": false,
13504
+ "type": "int"
13505
+ },
13506
+ {
13507
+ "disabled": false,
13508
+ "document": "任务额外信息",
13509
+ "example": "{\"key\":\"value\"}",
13510
+ "member": "string",
13511
+ "name": "ExtraConfig",
13512
+ "required": false,
13513
+ "type": "string"
13514
+ },
13515
+ {
13516
+ "disabled": false,
13517
+ "document": "任务状态",
13518
+ "example": "1",
13519
+ "member": "int64",
13520
+ "name": "Status",
13521
+ "required": false,
13522
+ "type": "int"
13523
+ },
13524
+ {
13525
+ "disabled": false,
13526
+ "document": "执行week day",
13527
+ "example": "1,2,3,4,5,6,7",
13528
+ "member": "string",
13529
+ "name": "Week",
13530
+ "required": false,
13531
+ "type": "string"
13532
+ }
13533
+ ],
13534
+ "type": "object"
13535
+ },
13536
+ "ModifyRoutineMaintenanceTaskResponse": {
13537
+ "document": "ModifyRoutineMaintenanceTask返回参数结构体",
13538
+ "members": [
13539
+ {
13540
+ "disabled": false,
13541
+ "document": "返回结果",
13542
+ "example": "无",
13543
+ "member": "JgwOperateResponse",
13544
+ "name": "Result",
13545
+ "output_required": true,
13546
+ "type": "object",
13547
+ "value_allowed_null": false
13548
+ },
13549
+ {
13550
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
13551
+ "member": "string",
13552
+ "name": "RequestId",
13553
+ "type": "string"
13554
+ }
13555
+ ],
13556
+ "type": "object"
13557
+ },
13424
13558
  "ModifyTopicAttributesRequest": {
13425
13559
  "document": "ModifyTopicAttributes请求参数结构体",
13426
13560
  "members": [
@@ -682,6 +682,14 @@
682
682
  "title": "修改密码"
683
683
  }
684
684
  ],
685
+ "ModifyRoutineMaintenanceTask": [
686
+ {
687
+ "document": "",
688
+ "input": "POST / HTTP/1.1\nHost: ckafka.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyRoutineMaintenanceTask\n<公共请求参数>\n\n{\n \"InstanceId\": \"ckafka-9jnejnb9\",\n \"MaintenanceType\": \"RE_BALANCE\",\n \"MaintenanceSubtype\": \"INSTANCE_PARTITION_RE_BALANCE\",\n \"PlannedTime\": 79200,\n \"Status\": 1,\n \"Week\": \"1,2,3,4,5,6,7\"\n}",
689
+ "output": "{\n \"Response\": {\n \"Result\": {\n \"ReturnCode\": \"abc\",\n \"ReturnMessage\": \"abc\",\n \"Data\": {\n \"FlowId\": 0,\n \"RouteDTO\": {\n \"RouteId\": 0\n }\n }\n },\n \"RequestId\": \"abc\"\n }\n}",
690
+ "title": "设置实例属性"
691
+ }
692
+ ],
685
693
  "ModifyTopicAttributes": [
686
694
  {
687
695
  "document": "",
@@ -463,7 +463,7 @@
463
463
  "status": "online"
464
464
  },
465
465
  "ModifyLoadBalancerAttributes": {
466
- "document": "修改负载均衡实例的属性。支持修改负载均衡实例的名称、设置负载均衡的跨域属性。\n本接口为异步接口,接口返回成功后,需以得到的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。",
466
+ "document": "修改负载均衡实例的属性。支持修改负载均衡实例的名称、设置负载均衡的跨域属性。\n注意:非带宽上移用户的 CLB 实例必须加入带宽包才可以设置跨域属性。\n本接口为异步接口,接口返回成功后,需以得到的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。",
467
467
  "input": "ModifyLoadBalancerAttributesRequest",
468
468
  "name": "修改负载均衡实例的属性",
469
469
  "output": "ModifyLoadBalancerAttributesResponse",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  {
32
32
  "disabled": false,
33
- "document": "软件授权模式。\n\n<table>\n<thead>\n<tr>\n<th>枚举值</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Permanent</td>\n<td>永久授权。该授权不受有效期限制。</td>\n</tr>\n<tr>\n<td>Subscription</td>\n<td>订阅授权。授权如果过了有效期,则会进入过期状态。</td>\n</tr>\n</tbody></table>",
33
+ "document": "软件授权模式。<table><thead><tr><th>枚举值</th><th>说明</th></tr></thead><tbody><tr><td>Permanent</td><td>永久授权。该授权不受有效期限制。</td></tr><tr><td>Subscription</td><td>订阅授权。授权如果过了有效期,则会进入过期状态。</td></tr></tbody></table>",
34
34
  "example": "Subscription",
35
35
  "member": "string",
36
36
  "name": "LicenseMode",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  {
42
42
  "disabled": false,
43
- "document": "软件的授权状态。\n\n<table>\n<thead>\n<tr>\n<th>枚举值</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Issued</td>\n<td>已颁发,等待激活。一般来说,如果软件已经在运行,不会出现该状态。</td>\n</tr>\n<tr>\n<td>Active</td>\n<td>授权在有效期内,这是软件运行期间最常见的状态。</td>\n</tr>\n<tr>\n<td>Expired</td>\n<td>授权已过期。订阅类的软件授权有有效期,如果服务器时间已晚于有效期,则会进入过期状态。</td>\n</tr>\n<tr>\n<td>Deactivated</td>\n<td>授权已失效。用户如果退货软件,则授权会自动失效。</td>\n</tr>\n</tbody></table>",
43
+ "document": "软件的授权状态。<table><thead><tr><th>枚举值</th><th>说明</th></tr></thead><tbody><tr><td>Issued</td><td>已颁发,等待激活。一般来说,如果软件已经在运行,不会出现该状态。</td></tr><tr><td>Active</td><td>授权在有效期内,这是软件运行期间最常见的状态。</td></tr><tr><td>Expired</td><td>授权已过期。订阅类的软件授权有有效期,如果服务器时间已晚于有效期,则会进入过期状态。</td></tr><tr><td>Deactivated</td><td>授权已失效。用户如果退货软件,则授权会自动失效。</td></tr></tbody></table>",
44
44
  "example": "Active",
45
45
  "member": "string",
46
46
  "name": "LicenseStatus",
@@ -120,7 +120,7 @@
120
120
  },
121
121
  {
122
122
  "disabled": false,
123
- "document": "被授权的软件的计费模式。\n\n<table>\n<thead>\n<tr>\n<th>枚举值</th>\n<th>说明</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>1</td>\n<td>线上计费,软件的授权从腾讯云线上购买,支持续费、退款等操作。</td>\n</tr>\n<tr>\n<td>2</td>\n<td>线下计费,软件的授权线下签订合同购买,定向客户交付,无法从线上续费和退款。</td>\n</tr>\n<tr>\n<td>4</td>\n<td>免费</td>\n</tr>\n</tbody></table>",
123
+ "document": "被授权的软件的计费模式。<table><thead><tr><th>枚举值</th><th>说明</th></tr></thead><tbody><tr><td>1</td><td>线上计费,软件的授权从腾讯云线上购买,支持续费、退款等操作。</td></tr><tr><td>2</td><td>线下计费,软件的授权线下签订合同购买,定向客户交付,无法从线上续费和退款。</td></tr><tr><td>4</td><td>免费</td></tr></tbody></table>",
124
124
  "example": "1",
125
125
  "member": "int64",
126
126
  "name": "BillingMode",
@@ -1421,6 +1421,58 @@ def doDescribeInstancesModification(args, parsed_globals):
1421
1421
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1422
1422
 
1423
1423
 
1424
+ def doCreateKeyPair(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.CvmClient(cred, g_param[OptionsDefine.Region], profile)
1451
+ client._sdkVersion += ("_CLI_" + __version__)
1452
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1453
+ model = models.CreateKeyPairRequest()
1454
+ model.from_json_string(json.dumps(args))
1455
+ start_time = time.time()
1456
+ while True:
1457
+ rsp = client.CreateKeyPair(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 doAssociateInstancesKeyPairs(args, parsed_globals):
1425
1477
  g_param = parse_global_arg(parsed_globals)
1426
1478
 
@@ -2253,6 +2305,58 @@ def doDescribeHosts(args, parsed_globals):
2253
2305
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
2306
 
2255
2307
 
2308
+ def doEnterRescueMode(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.CvmClient(cred, g_param[OptionsDefine.Region], profile)
2335
+ client._sdkVersion += ("_CLI_" + __version__)
2336
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2337
+ model = models.EnterRescueModeRequest()
2338
+ model.from_json_string(json.dumps(args))
2339
+ start_time = time.time()
2340
+ while True:
2341
+ rsp = client.EnterRescueMode(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
+
2256
2360
  def doDescribeInstancesStatus(args, parsed_globals):
2257
2361
  g_param = parse_global_arg(parsed_globals)
2258
2362
 
@@ -2461,7 +2565,7 @@ def doModifyLaunchTemplateDefaultVersion(args, parsed_globals):
2461
2565
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
2566
 
2463
2567
 
2464
- def doCreateKeyPair(args, parsed_globals):
2568
+ def doExitRescueMode(args, parsed_globals):
2465
2569
  g_param = parse_global_arg(parsed_globals)
2466
2570
 
2467
2571
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2490,11 +2594,11 @@ def doCreateKeyPair(args, parsed_globals):
2490
2594
  client = mod.CvmClient(cred, g_param[OptionsDefine.Region], profile)
2491
2595
  client._sdkVersion += ("_CLI_" + __version__)
2492
2596
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2493
- model = models.CreateKeyPairRequest()
2597
+ model = models.ExitRescueModeRequest()
2494
2598
  model.from_json_string(json.dumps(args))
2495
2599
  start_time = time.time()
2496
2600
  while True:
2497
- rsp = client.CreateKeyPair(model)
2601
+ rsp = client.ExitRescueMode(model)
2498
2602
  result = rsp.to_json_string()
2499
2603
  try:
2500
2604
  json_obj = json.loads(result)
@@ -5099,6 +5203,7 @@ ACTION_MAP = {
5099
5203
  "DescribeImageSharePermission": doDescribeImageSharePermission,
5100
5204
  "DescribeRegions": doDescribeRegions,
5101
5205
  "DescribeInstancesModification": doDescribeInstancesModification,
5206
+ "CreateKeyPair": doCreateKeyPair,
5102
5207
  "AssociateInstancesKeyPairs": doAssociateInstancesKeyPairs,
5103
5208
  "DisassociateInstancesKeyPairs": doDisassociateInstancesKeyPairs,
5104
5209
  "DeleteInstancesActionTimer": doDeleteInstancesActionTimer,
@@ -5115,11 +5220,12 @@ ACTION_MAP = {
5115
5220
  "RenewHosts": doRenewHosts,
5116
5221
  "RepairTaskControl": doRepairTaskControl,
5117
5222
  "DescribeHosts": doDescribeHosts,
5223
+ "EnterRescueMode": doEnterRescueMode,
5118
5224
  "DescribeInstancesStatus": doDescribeInstancesStatus,
5119
5225
  "ModifyImageSharePermission": doModifyImageSharePermission,
5120
5226
  "ImportInstancesActionTimer": doImportInstancesActionTimer,
5121
5227
  "ModifyLaunchTemplateDefaultVersion": doModifyLaunchTemplateDefaultVersion,
5122
- "CreateKeyPair": doCreateKeyPair,
5228
+ "ExitRescueMode": doExitRescueMode,
5123
5229
  "DescribeInstancesActionTimer": doDescribeInstancesActionTimer,
5124
5230
  "InquiryPriceResizeInstanceDisks": doInquiryPriceResizeInstanceDisks,
5125
5231
  "InquiryPriceResetInstance": doInquiryPriceResetInstance,