tccli 3.0.1187.1__py2.py3-none-any.whl → 3.0.1189.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/aiart/aiart_client.py +53 -0
  3. tccli/services/aiart/v20221229/api.json +107 -0
  4. tccli/services/aiart/v20221229/examples.json +8 -0
  5. tccli/services/apm/v20210622/api.json +3 -1
  6. tccli/services/billing/v20180709/api.json +3 -0
  7. tccli/services/billing/v20180709/examples.json +1 -1
  8. tccli/services/cfg/v20210820/api.json +19 -4
  9. tccli/services/ckafka/v20190819/api.json +5 -5
  10. tccli/services/cvm/cvm_client.py +53 -0
  11. tccli/services/cvm/v20170312/api.json +107 -0
  12. tccli/services/cvm/v20170312/examples.json +8 -0
  13. tccli/services/dc/v20180410/api.json +19 -19
  14. tccli/services/dc/v20180410/examples.json +5 -5
  15. tccli/services/dcdb/dcdb_client.py +106 -0
  16. tccli/services/dcdb/v20180411/api.json +338 -2
  17. tccli/services/dcdb/v20180411/examples.json +28 -0
  18. tccli/services/dlc/dlc_client.py +106 -0
  19. tccli/services/dlc/v20210125/api.json +87 -0
  20. tccli/services/dlc/v20210125/examples.json +16 -0
  21. tccli/services/dnspod/dnspod_client.py +53 -0
  22. tccli/services/dnspod/v20210323/api.json +118 -0
  23. tccli/services/dnspod/v20210323/examples.json +8 -0
  24. tccli/services/dts/v20211206/api.json +1 -0
  25. tccli/services/emr/emr_client.py +322 -4
  26. tccli/services/emr/v20190103/api.json +862 -10
  27. tccli/services/emr/v20190103/examples.json +54 -0
  28. tccli/services/es/es_client.py +53 -0
  29. tccli/services/es/v20180416/api.json +155 -0
  30. tccli/services/es/v20180416/examples.json +14 -0
  31. tccli/services/ess/ess_client.py +53 -0
  32. tccli/services/ess/v20201111/api.json +147 -0
  33. tccli/services/ess/v20201111/examples.json +8 -0
  34. tccli/services/essbasic/essbasic_client.py +53 -0
  35. tccli/services/essbasic/v20210526/api.json +120 -0
  36. tccli/services/essbasic/v20210526/examples.json +8 -0
  37. tccli/services/mariadb/mariadb_client.py +110 -4
  38. tccli/services/mariadb/v20170312/api.json +339 -3
  39. tccli/services/mariadb/v20170312/examples.json +16 -0
  40. tccli/services/ocr/v20181119/api.json +12 -2
  41. tccli/services/rce/v20201103/api.json +2 -2
  42. tccli/services/redis/redis_client.py +110 -4
  43. tccli/services/redis/v20180412/api.json +209 -0
  44. tccli/services/redis/v20180412/examples.json +16 -0
  45. tccli/services/sms/v20190711/api.json +2 -2
  46. tccli/services/sms/v20210111/api.json +2 -2
  47. tccli/services/teo/v20220901/api.json +14 -14
  48. tccli/services/trtc/v20190722/api.json +11 -0
  49. tccli/services/tse/v20201207/api.json +18 -18
  50. tccli/services/tsf/v20180326/api.json +74 -29
  51. tccli/services/vclm/v20240523/api.json +2 -2
  52. tccli/services/vdb/v20230616/api.json +491 -0
  53. tccli/services/vdb/v20230616/examples.json +46 -0
  54. tccli/services/vdb/vdb_client.py +265 -0
  55. tccli/services/vpc/v20170312/api.json +5 -5
  56. tccli/services/vtc/v20240223/api.json +2 -2
  57. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/METADATA +2 -2
  58. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/RECORD +61 -61
  59. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/WHEEL +0 -0
  60. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/entry_points.txt +0 -0
  61. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/license_files/LICENSE +0 -0
@@ -1111,6 +1111,58 @@ def doChannelCreateFlowApprovers(args, parsed_globals):
1111
1111
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1112
1112
 
1113
1113
 
1114
+ def doCreatePersonAuthCertificateImage(args, parsed_globals):
1115
+ g_param = parse_global_arg(parsed_globals)
1116
+
1117
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1118
+ cred = credential.CVMRoleCredential()
1119
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1120
+ cred = credential.STSAssumeRoleCredential(
1121
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1122
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1123
+ )
1124
+ 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):
1125
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1126
+ else:
1127
+ cred = credential.Credential(
1128
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1129
+ )
1130
+ http_profile = HttpProfile(
1131
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1132
+ reqMethod="POST",
1133
+ endpoint=g_param[OptionsDefine.Endpoint],
1134
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1135
+ )
1136
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1137
+ if g_param[OptionsDefine.Language]:
1138
+ profile.language = g_param[OptionsDefine.Language]
1139
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1140
+ client = mod.EssbasicClient(cred, g_param[OptionsDefine.Region], profile)
1141
+ client._sdkVersion += ("_CLI_" + __version__)
1142
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1143
+ model = models.CreatePersonAuthCertificateImageRequest()
1144
+ model.from_json_string(json.dumps(args))
1145
+ start_time = time.time()
1146
+ while True:
1147
+ rsp = client.CreatePersonAuthCertificateImage(model)
1148
+ result = rsp.to_json_string()
1149
+ try:
1150
+ json_obj = json.loads(result)
1151
+ except TypeError as e:
1152
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1153
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1154
+ break
1155
+ cur_time = time.time()
1156
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1157
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1158
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1159
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1160
+ else:
1161
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1162
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1163
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1164
+
1165
+
1114
1166
  def doSignFlow(args, parsed_globals):
1115
1167
  g_param = parse_global_arg(parsed_globals)
1116
1168
 
@@ -6761,6 +6813,7 @@ ACTION_MAP = {
6761
6813
  "ChannelBatchCancelFlows": doChannelBatchCancelFlows,
6762
6814
  "ModifySubOrganizationInfo": doModifySubOrganizationInfo,
6763
6815
  "ChannelCreateFlowApprovers": doChannelCreateFlowApprovers,
6816
+ "CreatePersonAuthCertificateImage": doCreatePersonAuthCertificateImage,
6764
6817
  "SignFlow": doSignFlow,
6765
6818
  "CheckIdCardVerification": doCheckIdCardVerification,
6766
6819
  "ChannelCreatePreparedPersonalEsign": doChannelCreatePreparedPersonalEsign,
@@ -392,6 +392,13 @@
392
392
  "output": "CreatePartnerAutoSignAuthUrlResponse",
393
393
  "status": "online"
394
394
  },
395
+ "CreatePersonAuthCertificateImage": {
396
+ "document": "获取个人用户认证证书图片下载URL\n\n个人用户认证证书图片样式如下图\n\n![image](https://dyn.ess.tencent.cn/guide/capi/CreatePersonAuthCertificateImage.png)\n\n注: \n<ul>\n<li>只能获取个人用户证明图片, 企业员工的暂不支持</li>\n<li>处方单等特殊场景专用,此接口为白名单功能,使用前请联系对接的客户经理沟通。 </li>\n</ul>",
397
+ "input": "CreatePersonAuthCertificateImageRequest",
398
+ "name": "获取个人用户认证证书图片",
399
+ "output": "CreatePersonAuthCertificateImageResponse",
400
+ "status": "online"
401
+ },
395
402
  "CreateSealByImage": {
396
403
  "document": "1. 可以**通过图片**为子客企业代创建印章,图片最大5MB\n\n2. 可以**系统创建**子客企业代创建印章, 系统创建的印章样子下图(样式可以调整)\n\n![image](https://dyn.ess.tencent.cn/guide/capi/CreateSealByImage.png)",
397
404
  "input": "CreateSealByImageRequest",
@@ -6882,6 +6889,119 @@
6882
6889
  ],
6883
6890
  "type": "object"
6884
6891
  },
6892
+ "CreatePersonAuthCertificateImageRequest": {
6893
+ "document": "CreatePersonAuthCertificateImage请求参数结构体",
6894
+ "members": [
6895
+ {
6896
+ "disabled": false,
6897
+ "document": "关于渠道应用的相关信息,包括渠道应用标识、第三方平台子客企业标识及第三方平台子客企业中的员工标识等内容,您可以参阅开发者中心所提供的 Agent 结构体以获取详细定义。",
6898
+ "example": "无",
6899
+ "member": "Agent",
6900
+ "name": "Agent",
6901
+ "required": true,
6902
+ "type": "object"
6903
+ },
6904
+ {
6905
+ "disabled": false,
6906
+ "document": "个人用户名称",
6907
+ "example": "无",
6908
+ "member": "string",
6909
+ "name": "UserName",
6910
+ "required": true,
6911
+ "type": "string"
6912
+ },
6913
+ {
6914
+ "disabled": false,
6915
+ "document": "证件类型,支持以下类型<ul><li> ID_CARD : 居民身份证 (默认值)</li><li> HONGKONG_AND_MACAO : 港澳居民来往内地通行证</li><li> HONGKONG_MACAO_AND_TAIWAN : 港澳台居民居住证(格式同居民身份证)</li></ul>",
6916
+ "example": "无",
6917
+ "member": "string",
6918
+ "name": "IdCardType",
6919
+ "required": true,
6920
+ "type": "string"
6921
+ },
6922
+ {
6923
+ "disabled": false,
6924
+ "document": "证件号码,应符合以下规则<ul><li>居民身份证号码应为18位字符串,由数字和大写字母X组成(如存在X,请大写)。</li><li>港澳居民来往内地通行证号码共11位。第1位为字母,“H”字头签发给香港居民,“M”字头签发给澳门居民;第2位至第11位为数字。</li><li>港澳台居民居住证号码编码规则与中国大陆身份证相同,应为18位字符串。</li></ul>",
6925
+ "example": "无",
6926
+ "member": "string",
6927
+ "name": "IdCardNumber",
6928
+ "required": true,
6929
+ "type": "string"
6930
+ },
6931
+ {
6932
+ "disabled": false,
6933
+ "document": "自动签使用的场景值, 可以选择的场景值如下:<ul><li> **E_PRESCRIPTION_AUTO_SIGN** : 电子处方场景</li><li> **OTHER** : 通用场景</li></ul>注: `不传默认为处方单场景,即E_PRESCRIPTION_AUTO_SIGN`",
6934
+ "example": "E_PRESCRIPTION_AUTO_SIGN",
6935
+ "member": "string",
6936
+ "name": "SceneKey",
6937
+ "required": false,
6938
+ "type": "string"
6939
+ }
6940
+ ],
6941
+ "type": "object"
6942
+ },
6943
+ "CreatePersonAuthCertificateImageResponse": {
6944
+ "document": "CreatePersonAuthCertificateImage返回参数结构体",
6945
+ "members": [
6946
+ {
6947
+ "disabled": false,
6948
+ "document": "个人用户认证证书图片下载URL,`有效期为5分钟`,超过有效期后将无法再下载。",
6949
+ "example": "https://file.ess.tencent.cn/bresource/resource/resource/0/0.JPG?hkey=fcb0d640136f8f47d28e3f4cd5fb8bac321**da99b18e29d28807fc8e",
6950
+ "member": "string",
6951
+ "name": "AuthCertUrl",
6952
+ "output_required": true,
6953
+ "type": "string",
6954
+ "value_allowed_null": false
6955
+ },
6956
+ {
6957
+ "disabled": false,
6958
+ "document": "个人用户认证证书的编号, 为20位数字组成的字符串, 由腾讯电子签下发此编号 。该编号会合成到个人用户证书证明图片。注: `个人用户认证证书的编号和证明图片绑定, 获取新的证明图片编号会变动`\n注意:此字段可能返回 null,表示取不到有效值。",
6959
+ "example": "23090411***877319694",
6960
+ "member": "string",
6961
+ "name": "ImageCertId",
6962
+ "output_required": false,
6963
+ "type": "string",
6964
+ "value_allowed_null": true
6965
+ },
6966
+ {
6967
+ "disabled": false,
6968
+ "document": "CA供应商下发给用户的证书编号,在证书到期后自动续期后此证书编号会发生变动,且不会合成到个人用户证书证明图片中。注意:`腾讯电子签接入多家CA供应商以提供容灾能力,不同CA下发的证书编号区别较大,但基本都是由数字和字母组成,长度在200以下。`\n注意:此字段可能返回 null,表示取不到有效值。",
6969
+ "example": "2206EB**4597742",
6970
+ "member": "string",
6971
+ "name": "SerialNumber",
6972
+ "output_required": false,
6973
+ "type": "string",
6974
+ "value_allowed_null": true
6975
+ },
6976
+ {
6977
+ "disabled": false,
6978
+ "document": "CA证书颁发时间,格式为Unix标准时间戳(秒) 该时间格式化后会合成到个人用户证书证明图片\n注意:此字段可能返回 null,表示取不到有效值。",
6979
+ "example": "无",
6980
+ "member": "uint64",
6981
+ "name": "ValidFrom",
6982
+ "output_required": false,
6983
+ "type": "int",
6984
+ "value_allowed_null": true
6985
+ },
6986
+ {
6987
+ "disabled": false,
6988
+ "document": "CA证书有效截止时间,格式为Unix标准时间戳(秒)该时间格式化后会合成到个人用户证书证明图片\n注意:此字段可能返回 null,表示取不到有效值。",
6989
+ "example": "无",
6990
+ "member": "uint64",
6991
+ "name": "ValidTo",
6992
+ "output_required": false,
6993
+ "type": "int",
6994
+ "value_allowed_null": true
6995
+ },
6996
+ {
6997
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
6998
+ "member": "string",
6999
+ "name": "RequestId",
7000
+ "type": "string"
7001
+ }
7002
+ ],
7003
+ "type": "object"
7004
+ },
6885
7005
  "CreateSealByImageRequest": {
6886
7006
  "document": "CreateSealByImage请求参数结构体",
6887
7007
  "members": [
@@ -844,6 +844,14 @@
844
844
  "title": "创建他方自动签授权链接-他方授权"
845
845
  }
846
846
  ],
847
+ "CreatePersonAuthCertificateImage": [
848
+ {
849
+ "document": "创建个人用户证明证书图片",
850
+ "input": "POST / HTTP / 1.1\nHost: essbasic.tencentcloudapi.com\nContent - Type: application / json\nX - TC - Action: CreatePersonAuthCertificateImage\n<公共请求参数>\n\n{\n \"Agent\": {\n \"ProxyOperator\": {\n \"OpenId\": \"test_open_id\"\n },\n \"ProxyOrganizationOpenId\": \"test_org_open_id\",\n \"AppId\": \"yDxbWUyKQ*******4zjEB8mxCcDjAyF\"\n },\n \"UserName\": \"典子谦\",\n \"IdCardType\": \"ID_CARD\",\n \"IdCardNumber\": \"620000198802020000\"\n}",
851
+ "output": "{\n \"Response\": {\n \"AuthCertUrl\": \"https://file.test.ess.tencent.cn/bresource/resource/resource/0/0.JPG?hkey=522d****6cb5\",\n \"RequestId\": \"69c19f7e7240\",\n \"SerialNumber\": \"23090411***877319694\",\n \"ValidFrom\": 1692788219,\n \"ValidTo\": 1724324219\n }\n}",
852
+ "title": "创建个人用户证明证书图片"
853
+ }
854
+ ],
847
855
  "CreateSealByImage": [
848
856
  {
849
857
  "document": "GenerateSource为SealGenerateSourceSystem表示系统生成印章",
@@ -849,7 +849,7 @@ def doModifyDBParameters(args, parsed_globals):
849
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
850
 
851
851
 
852
- def doModifyLogFileRetentionPeriod(args, parsed_globals):
852
+ def doDescribeBackupConfigs(args, parsed_globals):
853
853
  g_param = parse_global_arg(parsed_globals)
854
854
 
855
855
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -878,11 +878,11 @@ def doModifyLogFileRetentionPeriod(args, parsed_globals):
878
878
  client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
879
879
  client._sdkVersion += ("_CLI_" + __version__)
880
880
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
- model = models.ModifyLogFileRetentionPeriodRequest()
881
+ model = models.DescribeBackupConfigsRequest()
882
882
  model.from_json_string(json.dumps(args))
883
883
  start_time = time.time()
884
884
  while True:
885
- rsp = client.ModifyLogFileRetentionPeriod(model)
885
+ rsp = client.DescribeBackupConfigs(model)
886
886
  result = rsp.to_json_string()
887
887
  try:
888
888
  json_obj = json.loads(result)
@@ -3657,6 +3657,58 @@ def doUpgradeDBInstance(args, parsed_globals):
3657
3657
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3658
3658
 
3659
3659
 
3660
+ def doModifyBackupConfigs(args, parsed_globals):
3661
+ g_param = parse_global_arg(parsed_globals)
3662
+
3663
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3664
+ cred = credential.CVMRoleCredential()
3665
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3666
+ cred = credential.STSAssumeRoleCredential(
3667
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3668
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3669
+ )
3670
+ 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):
3671
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3672
+ else:
3673
+ cred = credential.Credential(
3674
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3675
+ )
3676
+ http_profile = HttpProfile(
3677
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3678
+ reqMethod="POST",
3679
+ endpoint=g_param[OptionsDefine.Endpoint],
3680
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3681
+ )
3682
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3683
+ if g_param[OptionsDefine.Language]:
3684
+ profile.language = g_param[OptionsDefine.Language]
3685
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3686
+ client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
3687
+ client._sdkVersion += ("_CLI_" + __version__)
3688
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3689
+ model = models.ModifyBackupConfigsRequest()
3690
+ model.from_json_string(json.dumps(args))
3691
+ start_time = time.time()
3692
+ while True:
3693
+ rsp = client.ModifyBackupConfigs(model)
3694
+ result = rsp.to_json_string()
3695
+ try:
3696
+ json_obj = json.loads(result)
3697
+ except TypeError as e:
3698
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3699
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3700
+ break
3701
+ cur_time = time.time()
3702
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3703
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3704
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3705
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3706
+ else:
3707
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3708
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3709
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3710
+
3711
+
3660
3712
  def doDescribeBinlogTime(args, parsed_globals):
3661
3713
  g_param = parse_global_arg(parsed_globals)
3662
3714
 
@@ -3865,6 +3917,58 @@ def doDescribeDBEncryptAttributes(args, parsed_globals):
3865
3917
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3866
3918
 
3867
3919
 
3920
+ def doModifyLogFileRetentionPeriod(args, parsed_globals):
3921
+ g_param = parse_global_arg(parsed_globals)
3922
+
3923
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3924
+ cred = credential.CVMRoleCredential()
3925
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3926
+ cred = credential.STSAssumeRoleCredential(
3927
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3928
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3929
+ )
3930
+ 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):
3931
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3932
+ else:
3933
+ cred = credential.Credential(
3934
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3935
+ )
3936
+ http_profile = HttpProfile(
3937
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3938
+ reqMethod="POST",
3939
+ endpoint=g_param[OptionsDefine.Endpoint],
3940
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3941
+ )
3942
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3943
+ if g_param[OptionsDefine.Language]:
3944
+ profile.language = g_param[OptionsDefine.Language]
3945
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3946
+ client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
3947
+ client._sdkVersion += ("_CLI_" + __version__)
3948
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3949
+ model = models.ModifyLogFileRetentionPeriodRequest()
3950
+ model.from_json_string(json.dumps(args))
3951
+ start_time = time.time()
3952
+ while True:
3953
+ rsp = client.ModifyLogFileRetentionPeriod(model)
3954
+ result = rsp.to_json_string()
3955
+ try:
3956
+ json_obj = json.loads(result)
3957
+ except TypeError as e:
3958
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3959
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3960
+ break
3961
+ cur_time = time.time()
3962
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3963
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3964
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3965
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3966
+ else:
3967
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3968
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3969
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3970
+
3971
+
3868
3972
  CLIENT_MAP = {
3869
3973
  "v20170312": mariadb_client_v20170312,
3870
3974
 
@@ -3892,7 +3996,7 @@ ACTION_MAP = {
3892
3996
  "ActivateHourDBInstance": doActivateHourDBInstance,
3893
3997
  "ResetAccountPassword": doResetAccountPassword,
3894
3998
  "ModifyDBParameters": doModifyDBParameters,
3895
- "ModifyLogFileRetentionPeriod": doModifyLogFileRetentionPeriod,
3999
+ "DescribeBackupConfigs": doDescribeBackupConfigs,
3896
4000
  "DescribeDBInstanceDetail": doDescribeDBInstanceDetail,
3897
4001
  "DescribeDBSlowLogs": doDescribeDBSlowLogs,
3898
4002
  "DescribeFlow": doDescribeFlow,
@@ -3946,10 +4050,12 @@ ACTION_MAP = {
3946
4050
  "TerminateDedicatedDBInstance": doTerminateDedicatedDBInstance,
3947
4051
  "CloneAccount": doCloneAccount,
3948
4052
  "UpgradeDBInstance": doUpgradeDBInstance,
4053
+ "ModifyBackupConfigs": doModifyBackupConfigs,
3949
4054
  "DescribeBinlogTime": doDescribeBinlogTime,
3950
4055
  "DescribeLogFileRetentionPeriod": doDescribeLogFileRetentionPeriod,
3951
4056
  "AssociateSecurityGroups": doAssociateSecurityGroups,
3952
4057
  "DescribeDBEncryptAttributes": doDescribeDBEncryptAttributes,
4058
+ "ModifyLogFileRetentionPeriod": doModifyLogFileRetentionPeriod,
3953
4059
 
3954
4060
  }
3955
4061