tccli 3.0.1188.1__py2.py3-none-any.whl → 3.0.1190.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 (61) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +2 -1
  3. tccli/services/aiart/aiart_client.py +53 -0
  4. tccli/services/aiart/v20221229/api.json +107 -0
  5. tccli/services/aiart/v20221229/examples.json +8 -0
  6. tccli/services/apm/v20210622/api.json +3 -1
  7. tccli/services/billing/v20180709/api.json +3 -0
  8. tccli/services/billing/v20180709/examples.json +1 -1
  9. tccli/services/cfg/v20210820/api.json +20 -5
  10. tccli/services/cfw/v20190904/api.json +82 -2
  11. tccli/services/ckafka/v20190819/api.json +5 -5
  12. tccli/services/dcdb/dcdb_client.py +106 -0
  13. tccli/services/dcdb/v20180411/api.json +318 -0
  14. tccli/services/dcdb/v20180411/examples.json +28 -0
  15. tccli/services/dnspod/dnspod_client.py +53 -0
  16. tccli/services/dnspod/v20210323/api.json +118 -0
  17. tccli/services/dnspod/v20210323/examples.json +8 -0
  18. tccli/services/emr/emr_client.py +269 -4
  19. tccli/services/emr/v20190103/api.json +591 -0
  20. tccli/services/emr/v20190103/examples.json +46 -0
  21. tccli/services/es/es_client.py +53 -0
  22. tccli/services/es/v20180416/api.json +54 -0
  23. tccli/services/es/v20180416/examples.json +14 -0
  24. tccli/services/ess/v20201111/api.json +9 -9
  25. tccli/services/ess/v20201111/examples.json +7 -1
  26. tccli/services/essbasic/essbasic_client.py +53 -0
  27. tccli/services/essbasic/v20210526/api.json +120 -0
  28. tccli/services/essbasic/v20210526/examples.json +14 -0
  29. tccli/services/iotexplorer/v20190423/api.json +2 -2
  30. tccli/services/iss/iss_client.py +118 -65
  31. tccli/services/iss/v20230517/api.json +78 -0
  32. tccli/services/iss/v20230517/examples.json +8 -0
  33. tccli/services/mariadb/mariadb_client.py +110 -4
  34. tccli/services/mariadb/v20170312/api.json +318 -0
  35. tccli/services/mariadb/v20170312/examples.json +16 -0
  36. tccli/services/mps/v20190612/api.json +131 -3
  37. tccli/services/ocr/v20181119/api.json +22 -2
  38. tccli/services/redis/redis_client.py +110 -4
  39. tccli/services/redis/v20180412/api.json +209 -0
  40. tccli/services/redis/v20180412/examples.json +16 -0
  41. tccli/services/sms/v20210111/api.json +9 -9
  42. tccli/services/ssl/v20191205/api.json +3 -3
  43. tccli/services/ssl/v20191205/examples.json +2 -2
  44. tccli/services/teo/v20220901/api.json +14 -14
  45. tccli/services/tke/tke_client.py +364 -46
  46. tccli/services/tke/v20180525/api.json +9 -0
  47. tccli/services/tke/v20220501/api.json +525 -0
  48. tccli/services/tke/v20220501/examples.json +54 -0
  49. tccli/services/tsf/v20180326/api.json +74 -29
  50. tccli/services/vdb/v20230616/api.json +491 -0
  51. tccli/services/vdb/v20230616/examples.json +46 -0
  52. tccli/services/vdb/vdb_client.py +265 -0
  53. tccli/services/vod/v20240718/api.json +121 -0
  54. tccli/services/vod/v20240718/examples.json +31 -0
  55. tccli/services/vod/vod_client.py +58 -0
  56. tccli/services/vpc/v20170312/api.json +13 -4
  57. {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/METADATA +2 -2
  58. {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/RECORD +61 -59
  59. {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/WHEEL +0 -0
  60. {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/entry_points.txt +0 -0
  61. {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/license_files/LICENSE +0 -0
@@ -1629,6 +1629,58 @@ def doIsolateHourDCDBInstance(args, parsed_globals):
1629
1629
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1630
 
1631
1631
 
1632
+ def doDescribeBackupConfigs(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.DcdbClient(cred, g_param[OptionsDefine.Region], profile)
1659
+ client._sdkVersion += ("_CLI_" + __version__)
1660
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
+ model = models.DescribeBackupConfigsRequest()
1662
+ model.from_json_string(json.dumps(args))
1663
+ start_time = time.time()
1664
+ while True:
1665
+ rsp = client.DescribeBackupConfigs(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 doDescribeDBSyncMode(args, parsed_globals):
1633
1685
  g_param = parse_global_arg(parsed_globals)
1634
1686
 
@@ -3501,6 +3553,58 @@ def doCreateAccount(args, parsed_globals):
3501
3553
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3502
3554
 
3503
3555
 
3556
+ def doModifyBackupConfigs(args, parsed_globals):
3557
+ g_param = parse_global_arg(parsed_globals)
3558
+
3559
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3560
+ cred = credential.CVMRoleCredential()
3561
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3562
+ cred = credential.STSAssumeRoleCredential(
3563
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3564
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3565
+ )
3566
+ 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):
3567
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3568
+ else:
3569
+ cred = credential.Credential(
3570
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3571
+ )
3572
+ http_profile = HttpProfile(
3573
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3574
+ reqMethod="POST",
3575
+ endpoint=g_param[OptionsDefine.Endpoint],
3576
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3577
+ )
3578
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3579
+ if g_param[OptionsDefine.Language]:
3580
+ profile.language = g_param[OptionsDefine.Language]
3581
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3582
+ client = mod.DcdbClient(cred, g_param[OptionsDefine.Region], profile)
3583
+ client._sdkVersion += ("_CLI_" + __version__)
3584
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3585
+ model = models.ModifyBackupConfigsRequest()
3586
+ model.from_json_string(json.dumps(args))
3587
+ start_time = time.time()
3588
+ while True:
3589
+ rsp = client.ModifyBackupConfigs(model)
3590
+ result = rsp.to_json_string()
3591
+ try:
3592
+ json_obj = json.loads(result)
3593
+ except TypeError as e:
3594
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3595
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3596
+ break
3597
+ cur_time = time.time()
3598
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3599
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3600
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3601
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3602
+ else:
3603
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3604
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3605
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3606
+
3607
+
3504
3608
  def doModifyDBInstanceName(args, parsed_globals):
3505
3609
  g_param = parse_global_arg(parsed_globals)
3506
3610
 
@@ -3907,6 +4011,7 @@ ACTION_MAP = {
3907
4011
  "KillSession": doKillSession,
3908
4012
  "DescribeDBLogFiles": doDescribeDBLogFiles,
3909
4013
  "IsolateHourDCDBInstance": doIsolateHourDCDBInstance,
4014
+ "DescribeBackupConfigs": doDescribeBackupConfigs,
3910
4015
  "DescribeDBSyncMode": doDescribeDBSyncMode,
3911
4016
  "DescribeDCDBBinlogTime": doDescribeDCDBBinlogTime,
3912
4017
  "UpgradeHourDCDBInstance": doUpgradeHourDCDBInstance,
@@ -3943,6 +4048,7 @@ ACTION_MAP = {
3943
4048
  "InitDCDBInstances": doInitDCDBInstances,
3944
4049
  "DescribeDCDBInstanceDetail": doDescribeDCDBInstanceDetail,
3945
4050
  "CreateAccount": doCreateAccount,
4051
+ "ModifyBackupConfigs": doModifyBackupConfigs,
3946
4052
  "ModifyDBInstanceName": doModifyDBInstanceName,
3947
4053
  "DescribeLogFileRetentionPeriod": doDescribeLogFileRetentionPeriod,
3948
4054
  "CreateTmpDCDBInstance": doCreateTmpDCDBInstance,
@@ -98,6 +98,13 @@
98
98
  "output": "DescribeAccountsResponse",
99
99
  "status": "online"
100
100
  },
101
+ "DescribeBackupConfigs": {
102
+ "document": "本接口(DescribeBackupConfigs)用于查询数据库备份配置信息。",
103
+ "input": "DescribeBackupConfigsRequest",
104
+ "name": "查询云数据库备份配置信息",
105
+ "output": "DescribeBackupConfigsResponse",
106
+ "status": "online"
107
+ },
101
108
  "DescribeBackupFiles": {
102
109
  "document": "本接口(DescribeBackupFiles)用于查看备份文件列表。",
103
110
  "input": "DescribeBackupFilesRequest",
@@ -392,6 +399,13 @@
392
399
  "output": "ModifyAccountPrivilegesResponse",
393
400
  "status": "online"
394
401
  },
402
+ "ModifyBackupConfigs": {
403
+ "document": "本接口(ModifyBackupConfigs)用于修改数据库备份配置信息。\n\n1. 修改数据库超期备份配置,目前按年、按月、按日只支持一种,存在互斥关系,如当前策略按年备份,如果传入按月备份策略将会覆盖当前的按年备份策略,务必注意。",
404
+ "input": "ModifyBackupConfigsRequest",
405
+ "name": "修改云数据库备份配置信息",
406
+ "output": "ModifyBackupConfigsResponse",
407
+ "status": "online"
408
+ },
395
409
  "ModifyDBEncryptAttributes": {
396
410
  "document": "本接口(ModifyDBEncryptAttributes)用于修改实例数据加密。",
397
411
  "input": "ModifyDBEncryptAttributesRequest",
@@ -678,6 +692,72 @@
678
692
  ],
679
693
  "type": "object"
680
694
  },
695
+ "BackupConfig": {
696
+ "document": "数据库超期备份配置",
697
+ "members": [
698
+ {
699
+ "disabled": false,
700
+ "document": "备份策略是否启用。",
701
+ "example": "true",
702
+ "member": "bool",
703
+ "name": "EnableBackupPolicy",
704
+ "output_required": true,
705
+ "type": "bool",
706
+ "value_allowed_null": false
707
+ },
708
+ {
709
+ "disabled": false,
710
+ "document": "超期保留开始日期,早于开始日期的超期备份不保留,格式:yyyy-mm-dd。",
711
+ "example": "2023-05-30",
712
+ "member": "string",
713
+ "name": "BeginDate",
714
+ "output_required": true,
715
+ "type": "string",
716
+ "value_allowed_null": false
717
+ },
718
+ {
719
+ "disabled": false,
720
+ "document": "超期备份保留时长,超出保留时间的超期备份将被删除,可填写1-3650整数。",
721
+ "example": "180",
722
+ "member": "int64",
723
+ "name": "MaxRetentionDays",
724
+ "output_required": true,
725
+ "type": "int",
726
+ "value_allowed_null": false
727
+ },
728
+ {
729
+ "disabled": false,
730
+ "document": "备份模式,可选择按年月周模式保存\n* 按年:annually\n* 按月:monthly\n* 按周:weekly",
731
+ "example": "monthly",
732
+ "member": "string",
733
+ "name": "Frequency",
734
+ "output_required": true,
735
+ "type": "string",
736
+ "value_allowed_null": false
737
+ },
738
+ {
739
+ "disabled": false,
740
+ "document": "Frequency等于weekly时生效。\n表示保留特定工作日备份。可选择周一到周日,支持多选,取星期英文:\n* 星期一 :Monday\n* 星期二 :Tuesday\n* 星期三:Wednesday\n* 星期四:Thursday\n* 星期五:Friday\n* 星期六:Saturday\n* 星期日:Sunday",
741
+ "example": "Monday",
742
+ "member": "string",
743
+ "name": "WeekDays",
744
+ "output_required": false,
745
+ "type": "list",
746
+ "value_allowed_null": false
747
+ },
748
+ {
749
+ "disabled": false,
750
+ "document": "保留备份个数,Frequency等于monthly或weekly时生效。\n备份模式选择按月时,可填写1-28整数;\n备份模式选择年时,可填写1-336整数。",
751
+ "example": "10",
752
+ "member": "int64",
753
+ "name": "BackupCount",
754
+ "output_required": false,
755
+ "type": "int",
756
+ "value_allowed_null": false
757
+ }
758
+ ],
759
+ "usage": "out"
760
+ },
681
761
  "BriefNodeInfo": {
682
762
  "document": "描述分片DB节点信息",
683
763
  "members": [
@@ -3605,6 +3685,103 @@
3605
3685
  ],
3606
3686
  "type": "object"
3607
3687
  },
3688
+ "DescribeBackupConfigsRequest": {
3689
+ "document": "DescribeBackupConfigs请求参数结构体",
3690
+ "members": [
3691
+ {
3692
+ "disabled": false,
3693
+ "document": "实例 ID,格式如:tdsqlshard-c1nl9rpv,与云数据库控制台页面中显示的实例 ID 相同。",
3694
+ "example": "tdsqlshard-c1nl9rpv",
3695
+ "member": "string",
3696
+ "name": "InstanceId",
3697
+ "required": true,
3698
+ "type": "string"
3699
+ }
3700
+ ],
3701
+ "type": "object"
3702
+ },
3703
+ "DescribeBackupConfigsResponse": {
3704
+ "document": "DescribeBackupConfigs返回参数结构体",
3705
+ "members": [
3706
+ {
3707
+ "disabled": false,
3708
+ "document": "实例 ID。",
3709
+ "example": "tdsqlshard-c1nl9rpv",
3710
+ "member": "string",
3711
+ "name": "InstanceId",
3712
+ "output_required": true,
3713
+ "type": "string",
3714
+ "value_allowed_null": false
3715
+ },
3716
+ {
3717
+ "disabled": false,
3718
+ "document": "常规备份存储时长,范围[1, 3650]。",
3719
+ "example": "30",
3720
+ "member": "uint64",
3721
+ "name": "Days",
3722
+ "output_required": true,
3723
+ "type": "int",
3724
+ "value_allowed_null": false
3725
+ },
3726
+ {
3727
+ "disabled": false,
3728
+ "document": "每天备份执行的区间的开始时间,格式 mm:ss,形如 22:00。",
3729
+ "example": "03:00",
3730
+ "member": "string",
3731
+ "name": "StartBackupTime",
3732
+ "output_required": true,
3733
+ "type": "string",
3734
+ "value_allowed_null": false
3735
+ },
3736
+ {
3737
+ "disabled": false,
3738
+ "document": "每天备份执行的区间的结束时间,格式 mm:ss,形如 23:59。",
3739
+ "example": "05:59",
3740
+ "member": "string",
3741
+ "name": "EndBackupTime",
3742
+ "output_required": true,
3743
+ "type": "string",
3744
+ "value_allowed_null": false
3745
+ },
3746
+ {
3747
+ "disabled": false,
3748
+ "document": "执行备份周期,枚举值:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
3749
+ "example": "[Saturday, Sunday]",
3750
+ "member": "string",
3751
+ "name": "WeekDays",
3752
+ "output_required": true,
3753
+ "type": "list",
3754
+ "value_allowed_null": false
3755
+ },
3756
+ {
3757
+ "disabled": false,
3758
+ "document": "沉降到归档存储时长,-1表示关闭归档设置。",
3759
+ "example": "91",
3760
+ "member": "int64",
3761
+ "name": "ArchiveDays",
3762
+ "output_required": true,
3763
+ "type": "int",
3764
+ "value_allowed_null": false
3765
+ },
3766
+ {
3767
+ "disabled": false,
3768
+ "document": "超期备份配置。",
3769
+ "example": "无",
3770
+ "member": "BackupConfig",
3771
+ "name": "BackupConfigSet",
3772
+ "output_required": true,
3773
+ "type": "list",
3774
+ "value_allowed_null": false
3775
+ },
3776
+ {
3777
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
3778
+ "member": "string",
3779
+ "name": "RequestId",
3780
+ "type": "string"
3781
+ }
3782
+ ],
3783
+ "type": "object"
3784
+ },
3608
3785
  "DescribeBackupFilesRequest": {
3609
3786
  "document": "DescribeBackupFiles请求参数结构体",
3610
3787
  "members": [
@@ -7141,6 +7318,87 @@
7141
7318
  ],
7142
7319
  "type": "object"
7143
7320
  },
7321
+ "ModifyBackupConfigsRequest": {
7322
+ "document": "ModifyBackupConfigs请求参数结构体",
7323
+ "members": [
7324
+ {
7325
+ "disabled": false,
7326
+ "document": "实例 ID,格式如:tdsqlshard-c1nl9rpv,与云数据库控制台页面中显示的实例 ID 相同。",
7327
+ "example": "tdsqlshard-c1nl9rpv",
7328
+ "member": "string",
7329
+ "name": "InstanceId",
7330
+ "required": true,
7331
+ "type": "string"
7332
+ },
7333
+ {
7334
+ "disabled": false,
7335
+ "document": "常规备份存储时长,范围[1, 3650]。",
7336
+ "example": "30",
7337
+ "member": "uint64",
7338
+ "name": "Days",
7339
+ "required": false,
7340
+ "type": "int"
7341
+ },
7342
+ {
7343
+ "disabled": false,
7344
+ "document": "每天备份执行的区间的开始时间,格式 mm:ss,形如 22:00。",
7345
+ "example": "03:00",
7346
+ "member": "string",
7347
+ "name": "StartBackupTime",
7348
+ "required": false,
7349
+ "type": "string"
7350
+ },
7351
+ {
7352
+ "disabled": false,
7353
+ "document": "每天备份执行的区间的结束时间,格式 mm:ss,形如 23:59。",
7354
+ "example": "05:59",
7355
+ "member": "string",
7356
+ "name": "EndBackupTime",
7357
+ "required": false,
7358
+ "type": "string"
7359
+ },
7360
+ {
7361
+ "disabled": false,
7362
+ "document": "执行备份周期,枚举值:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
7363
+ "example": "[Saturday, Sunday]",
7364
+ "member": "string",
7365
+ "name": "WeekDays",
7366
+ "required": false,
7367
+ "type": "list"
7368
+ },
7369
+ {
7370
+ "disabled": false,
7371
+ "document": "沉降到归档存储时长,-1表示关闭归档设置。",
7372
+ "example": "91",
7373
+ "member": "int64",
7374
+ "name": "ArchiveDays",
7375
+ "required": false,
7376
+ "type": "int"
7377
+ },
7378
+ {
7379
+ "disabled": false,
7380
+ "document": "超期备份配置。",
7381
+ "example": "无",
7382
+ "member": "NewBackupConfig",
7383
+ "name": "BackupConfigSet",
7384
+ "required": false,
7385
+ "type": "list"
7386
+ }
7387
+ ],
7388
+ "type": "object"
7389
+ },
7390
+ "ModifyBackupConfigsResponse": {
7391
+ "document": "ModifyBackupConfigs返回参数结构体",
7392
+ "members": [
7393
+ {
7394
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
7395
+ "member": "string",
7396
+ "name": "RequestId",
7397
+ "type": "string"
7398
+ }
7399
+ ],
7400
+ "type": "object"
7401
+ },
7144
7402
  "ModifyDBEncryptAttributesRequest": {
7145
7403
  "document": "ModifyDBEncryptAttributes请求参数结构体",
7146
7404
  "members": [
@@ -7624,6 +7882,66 @@
7624
7882
  ],
7625
7883
  "type": "object"
7626
7884
  },
7885
+ "NewBackupConfig": {
7886
+ "document": "数据库超期备份配置",
7887
+ "members": [
7888
+ {
7889
+ "disabled": false,
7890
+ "document": "备份策略是否启用。",
7891
+ "example": "true",
7892
+ "member": "bool",
7893
+ "name": "EnableBackupPolicy",
7894
+ "required": true,
7895
+ "type": "bool"
7896
+ },
7897
+ {
7898
+ "disabled": false,
7899
+ "document": "超期保留开始日期,早于开始日期的超期备份不保留,格式:yyyy-mm-dd。",
7900
+ "example": "2023-05-30",
7901
+ "member": "string",
7902
+ "name": "BeginDate",
7903
+ "required": true,
7904
+ "type": "string"
7905
+ },
7906
+ {
7907
+ "disabled": false,
7908
+ "document": "超期备份保留时长,超出保留时间的超期备份将被删除,可填写1-3650整数。",
7909
+ "example": "180",
7910
+ "member": "int64",
7911
+ "name": "MaxRetentionDays",
7912
+ "required": true,
7913
+ "type": "int"
7914
+ },
7915
+ {
7916
+ "disabled": false,
7917
+ "document": "备份模式,可选择按年月周模式保存\n* 按年:annually\n* 按月:monthly\n* 按周:weekly",
7918
+ "example": "monthly",
7919
+ "member": "string",
7920
+ "name": "Frequency",
7921
+ "required": true,
7922
+ "type": "string"
7923
+ },
7924
+ {
7925
+ "disabled": false,
7926
+ "document": "Frequency等于weekly时生效。\n表示保留特定工作日备份。可选择周一到周日,支持多选,取星期英文:\n* 星期一 :Monday\n* 星期二 :Tuesday\n* 星期三:Wednesday\n* 星期四:Thursday\n* 星期五:Friday\n* 星期六:Saturday\n* 星期日:Sunday",
7927
+ "example": "Monday",
7928
+ "member": "string",
7929
+ "name": "WeekDays",
7930
+ "required": false,
7931
+ "type": "list"
7932
+ },
7933
+ {
7934
+ "disabled": false,
7935
+ "document": "保留备份个数,Frequency等于monthly或weekly时生效。\n备份模式选择按月时,可填写1-28整数;\n备份模式选择年时,可填写1-336整数。",
7936
+ "example": "10",
7937
+ "member": "int64",
7938
+ "name": "BackupCount",
7939
+ "required": false,
7940
+ "type": "int"
7941
+ }
7942
+ ],
7943
+ "usage": "in"
7944
+ },
7627
7945
  "NodeInfo": {
7628
7946
  "document": "描述DB节点信息",
7629
7947
  "members": [
@@ -112,6 +112,20 @@
112
112
  "title": "无"
113
113
  }
114
114
  ],
115
+ "DescribeBackupConfigs": [
116
+ {
117
+ "document": "获取超期备份策略",
118
+ "input": "POST / HTTP/1.1\nHost: dcdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBackupConfigs\n<公共请求参数>\n\n{\n \"InstanceId\": \"tdsqlshard-6cmpk1rd\"\n}",
119
+ "output": "{\n \"Response\": {\n \"Days\": 30,\n \"StartBackupTime\": \"03:00\",\n \"EndBackupTime\": \"05:00\",\n \"WeekDays\": [\n \"Monday\",\n \"Sunday\"\n ],\n \"ArchiveDays\": 91,\n \"BackupConfigSet\": [\n {\n \"BackupCount\": 1,\n \"BeginDate\": \"2023-06-08\",\n \"EnableBackupPolicy\": true,\n \"Frequency\": \"monthly\",\n \"MaxRetentionDays\": 365,\n \"WeekDays\": []\n }\n ],\n \"InstanceId\": \"tdsqlshard-6cmpk1rd\",\n \"RequestId\": \"827d5b16-d464-4f43-af92-06c63d25375e\"\n }\n}",
120
+ "title": "示例"
121
+ },
122
+ {
123
+ "document": "示例1",
124
+ "input": "POST / HTTP/1.1\nHost: dcdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBackupConfigs\n<公共请求参数>\n\n{\n \"InstanceId\": \"tdsqlshard-2500dqmh\"\n}",
125
+ "output": "{\n \"Response\": {\n \"Days\": 30,\n \"StartBackupTime\": \"03:00\",\n \"EndBackupTime\": \"05:00\",\n \"WeekDays\": [\n \"Monday\",\n \"Sunday\"\n ],\n \"ArchiveDays\": 91,\n \"BackupConfigSet\": [\n {\n \"BackupCount\": 0,\n \"BeginDate\": \"2023-07-20\",\n \"EnableBackupPolicy\": true,\n \"Frequency\": \"weekly\",\n \"MaxRetentionDays\": 100,\n \"WeekDays\": [\n \"Monday\",\n \"Tuesday\"\n ]\n }\n ],\n \"InstanceId\": \"tdsqlshard-2500dqmh\",\n \"RequestId\": \"c4712e5d-78f3-4899-b8f4-0b6af5a17b77\"\n }\n}",
126
+ "title": "示例1"
127
+ }
128
+ ],
115
129
  "DescribeBackupFiles": [
116
130
  {
117
131
  "document": "",
@@ -448,6 +462,20 @@
448
462
  "title": "修改云数据库实例账号的权限信息"
449
463
  }
450
464
  ],
465
+ "ModifyBackupConfigs": [
466
+ {
467
+ "document": "近一年每个月保留一个备份",
468
+ "input": "POST / HTTP/1.1\nHost: dcdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyBackupConfigs\n<公共请求参数>\n\n{\n \"InstanceId\": \"tdsqlshard-6cmpk1rd\",\n \"BackupConfigSet\": [\n {\n \"EnableBackupPolicy\": true,\n \"BeginDate\": \"2023-06-08\",\n \"MaxRetentionDays\": 365,\n \"Frequency\": \"monthly\",\n \"BackupCount\": 1\n }\n ]\n}",
469
+ "output": "{\n \"Response\": {\n \"RequestId\": \"a0495e38-cd59-420c-8f09-893207d28955\"\n }\n}",
470
+ "title": "示例"
471
+ },
472
+ {
473
+ "document": "按周保留备份",
474
+ "input": "POST / HTTP/1.1\nHost: dcdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyBackupConfigs\n<公共请求参数>\n\n{\n \"InstanceId\": \"tdsqlshard-2500dqmh\",\n \"BackupConfigSet\": [\n {\n \"EnableBackupPolicy\": true,\n \"BeginDate\": \"2023-07-20\",\n \"MaxRetentionDays\": 100,\n \"Frequency\": \"weekly\",\n \"WeekDays\": [\n \"Monday\",\n \"Tuesday\"\n ]\n }\n ]\n}",
475
+ "output": "{\n \"Response\": {\n \"RequestId\": \"45b034f3-1ace-45c7-b49e-1fca45f89d9e\"\n }\n}",
476
+ "title": "示例1"
477
+ }
478
+ ],
451
479
  "ModifyDBEncryptAttributes": [
452
480
  {
453
481
  "document": "用户开启实例的透明加密",
@@ -2617,6 +2617,58 @@ def doDescribeRecord(args, parsed_globals):
2617
2617
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2618
2618
 
2619
2619
 
2620
+ def doDescribeDomainShareUserList(args, parsed_globals):
2621
+ g_param = parse_global_arg(parsed_globals)
2622
+
2623
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2624
+ cred = credential.CVMRoleCredential()
2625
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2626
+ cred = credential.STSAssumeRoleCredential(
2627
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2628
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2629
+ )
2630
+ 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):
2631
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2632
+ else:
2633
+ cred = credential.Credential(
2634
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2635
+ )
2636
+ http_profile = HttpProfile(
2637
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2638
+ reqMethod="POST",
2639
+ endpoint=g_param[OptionsDefine.Endpoint],
2640
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2641
+ )
2642
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2643
+ if g_param[OptionsDefine.Language]:
2644
+ profile.language = g_param[OptionsDefine.Language]
2645
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2646
+ client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
2647
+ client._sdkVersion += ("_CLI_" + __version__)
2648
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2649
+ model = models.DescribeDomainShareUserListRequest()
2650
+ model.from_json_string(json.dumps(args))
2651
+ start_time = time.time()
2652
+ while True:
2653
+ rsp = client.DescribeDomainShareUserList(model)
2654
+ result = rsp.to_json_string()
2655
+ try:
2656
+ json_obj = json.loads(result)
2657
+ except TypeError as e:
2658
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2659
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2660
+ break
2661
+ cur_time = time.time()
2662
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2663
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2664
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2665
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2666
+ else:
2667
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2668
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2669
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2670
+
2671
+
2620
2672
  def doModifyDomainRemark(args, parsed_globals):
2621
2673
  g_param = parse_global_arg(parsed_globals)
2622
2674
 
@@ -3926,6 +3978,7 @@ ACTION_MAP = {
3926
3978
  "ModifyRecord": doModifyRecord,
3927
3979
  "DescribeDomain": doDescribeDomain,
3928
3980
  "DescribeRecord": doDescribeRecord,
3981
+ "DescribeDomainShareUserList": doDescribeDomainShareUserList,
3929
3982
  "ModifyDomainRemark": doModifyDomainRemark,
3930
3983
  "DescribeRecordExistExceptDefaultNS": doDescribeRecordExistExceptDefaultNS,
3931
3984
  "ModifyDomainOwner": doModifyDomainOwner,