tccli 3.0.1099.1__py2.py3-none-any.whl → 3.0.1101.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 (127) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cdb/v20170320/CloseSSL.md +21 -0
  3. tccli/examples/cdb/v20170320/DescribeSSLStatus.md +22 -0
  4. tccli/examples/cdb/v20170320/OpenSSL.md +21 -0
  5. tccli/examples/cls/v20201016/CreateCosRecharge.md +4 -4
  6. tccli/examples/cls/v20201016/CreateDashboardSubscribe.md +18 -0
  7. tccli/examples/cls/v20201016/DeleteConfigExtra.md +1 -1
  8. tccli/examples/cls/v20201016/DeleteDashboardSubscribe.md +18 -0
  9. tccli/examples/cls/v20201016/DescribeDashboardSubscribes.md +18 -0
  10. tccli/examples/cls/v20201016/ModifyCosRecharge.md +3 -3
  11. tccli/examples/cls/v20201016/ModifyDashboardSubscribe.md +18 -0
  12. tccli/examples/cls/v20201016/SearchDashboardSubscribe.md +35 -0
  13. tccli/examples/csip/v20221121/CreateRiskCenterScanTask.md +1 -0
  14. tccli/examples/csip/v20221121/DescribeRiskCenterAssetViewCFGRiskList.md +1 -0
  15. tccli/examples/csip/v20221121/DescribeRiskCenterAssetViewPortRiskList.md +1 -0
  16. tccli/examples/csip/v20221121/DescribeRiskCenterAssetViewVULRiskList.md +1 -0
  17. tccli/examples/csip/v20221121/DescribeRiskCenterAssetViewWeakPasswordRiskList.md +1 -0
  18. tccli/examples/csip/v20221121/DescribeRiskCenterPortViewPortRiskList.md +1 -0
  19. tccli/examples/csip/v20221121/DescribeRiskCenterServerRiskList.md +1 -0
  20. tccli/examples/csip/v20221121/DescribeRiskCenterVULViewVULRiskList.md +1 -0
  21. tccli/examples/csip/v20221121/DescribeRiskCenterWebsiteRiskList.md +1 -0
  22. tccli/examples/csip/v20221121/DescribeScanTaskList.md +1 -0
  23. tccli/examples/csip/v20221121/DescribeTaskLogURL.md +1 -0
  24. tccli/examples/csip/v20221121/ModifyRiskCenterRiskStatus.md +1 -0
  25. tccli/examples/csip/v20221121/ModifyRiskCenterScanTask.md +1 -0
  26. tccli/examples/dlc/v20210125/CreateSparkSessionBatchSQL.md +1 -1
  27. tccli/examples/domain/v20180808/ModifyTemplate.md +73 -0
  28. tccli/examples/ess/v20201111/DescribeBatchOrganizationRegistrationUrls.md +27 -0
  29. tccli/examples/hunyuan/v20230901/ChatCompletions.md +141 -1
  30. tccli/examples/hunyuan/v20230901/ChatPro.md +2 -2
  31. tccli/examples/lke/v20231130/GetEmbedding.md +1 -1
  32. tccli/examples/lke/v20231130/GetMsgRecord.md +4 -1
  33. tccli/examples/ocr/v20181119/RecognizeGeneralTextImageWarn.md +83 -0
  34. tccli/examples/postgres/v20170312/ModifyAccountRemark.md +1 -1
  35. tccli/examples/rum/v20210622/CreateWhitelist.md +2 -2
  36. tccli/examples/rum/v20210622/DescribeRumGroupLog.md +3 -3
  37. tccli/examples/rum/v20210622/DescribeRumLogExport.md +6 -6
  38. tccli/examples/rum/v20210622/DescribeRumStatsLogList.md +2 -2
  39. tccli/examples/teo/v20220901/CreatePlan.md +47 -0
  40. tccli/examples/teo/v20220901/DescribeRulesSetting.md +6 -159
  41. tccli/examples/teo/v20220901/DestroyPlan.md +20 -0
  42. tccli/examples/teo/v20220901/IncreasePlanQuota.md +46 -0
  43. tccli/examples/teo/v20220901/ModifyPlan.md +21 -0
  44. tccli/examples/teo/v20220901/RenewPlan.md +23 -0
  45. tccli/examples/teo/v20220901/UpgradePlan.md +23 -0
  46. tccli/examples/tione/v20191022/UpdateCodeRepository.md +1 -1
  47. tccli/examples/tke/v20180525/CheckInstancesUpgradeAble.md +15 -7
  48. tccli/examples/tke/v20180525/CreateCluster.md +58 -142
  49. tccli/examples/tke/v20180525/DescribeClusterNodePools.md +1 -0
  50. tccli/examples/tke/v20180525/GetUpgradeInstanceProgress.md +18 -19
  51. tccli/examples/tke/v20180525/ModifyClusterAuthenticationOptions.md +3 -0
  52. tccli/examples/tke/v20180525/ModifyNodePoolInstanceTypes.md +1 -1
  53. tccli/examples/tms/v20201229/AnswerQuestion.md +21 -0
  54. tccli/examples/tsf/v20180326/CreateCluster.md +2 -2
  55. tccli/examples/vpc/v20170312/DeleteVpnGateway.md +1 -2
  56. tccli/examples/vpc/v20170312/DescribeVpnGatewayRoutes.md +2 -1
  57. tccli/examples/vpc/v20170312/DescribeVpnGatewaySslServers.md +23 -33
  58. tccli/examples/vpc/v20170312/InquiryPriceCreateVpnGateway.md +11 -3
  59. tccli/examples/vpc/v20170312/InquiryPriceResetVpnGatewayInternetMaxBandwidth.md +14 -7
  60. tccli/examples/vpc/v20170312/ModifyVpnGatewayCcnRoutes.md +1 -1
  61. tccli/examples/vpc/v20170312/ModifyVpnGatewayRoutes.md +8 -4
  62. tccli/examples/wedata/v20210820/DescribeProject.md +58 -1
  63. tccli/services/aiart/v20221229/api.json +5 -5
  64. tccli/services/cdb/cdb_client.py +163 -4
  65. tccli/services/cdb/v20170320/api.json +169 -0
  66. tccli/services/cdb/v20170320/examples.json +24 -0
  67. tccli/services/clb/v20180317/api.json +18 -0
  68. tccli/services/cls/cls_client.py +337 -72
  69. tccli/services/cls/v20201016/api.json +461 -50
  70. tccli/services/cls/v20201016/examples.json +45 -5
  71. tccli/services/csip/v20221121/api.json +157 -4
  72. tccli/services/csip/v20221121/examples.json +13 -13
  73. tccli/services/cvm/v20170312/api.json +3 -3
  74. tccli/services/cwp/cwp_client.py +0 -53
  75. tccli/services/cwp/v20180228/api.json +0 -194
  76. tccli/services/cwp/v20180228/examples.json +0 -8
  77. tccli/services/cynosdb/v20190107/api.json +1 -1
  78. tccli/services/dlc/v20210125/api.json +14 -4
  79. tccli/services/dlc/v20210125/examples.json +1 -1
  80. tccli/services/domain/domain_client.py +53 -0
  81. tccli/services/domain/v20180808/api.json +62 -0
  82. tccli/services/domain/v20180808/examples.json +8 -0
  83. tccli/services/dts/v20211206/api.json +1 -1
  84. tccli/services/ess/ess_client.py +57 -4
  85. tccli/services/ess/v20201111/api.json +88 -0
  86. tccli/services/ess/v20201111/examples.json +8 -0
  87. tccli/services/essbasic/v20210526/api.json +1 -1
  88. tccli/services/hunyuan/v20230901/api.json +10 -10
  89. tccli/services/hunyuan/v20230901/examples.json +26 -2
  90. tccli/services/ims/v20201229/api.json +2 -1
  91. tccli/services/iotvideo/v20211125/api.json +15 -0
  92. tccli/services/lke/lke_client.py +114 -8
  93. tccli/services/lke/v20231130/api.json +492 -0
  94. tccli/services/lke/v20231130/examples.json +18 -2
  95. tccli/services/nlp/v20190408/api.json +13 -0
  96. tccli/services/ocr/ocr_client.py +53 -0
  97. tccli/services/ocr/v20181119/api.json +156 -0
  98. tccli/services/ocr/v20181119/examples.json +8 -0
  99. tccli/services/postgres/v20170312/examples.json +1 -1
  100. tccli/services/rce/v20201103/api.json +9 -9
  101. tccli/services/rum/v20210622/api.json +43 -41
  102. tccli/services/rum/v20210622/examples.json +7 -7
  103. tccli/services/ssl/v20191205/api.json +2 -2
  104. tccli/services/tdmq/v20200217/api.json +6 -6
  105. tccli/services/teo/teo_client.py +338 -20
  106. tccli/services/teo/v20220901/api.json +376 -2
  107. tccli/services/teo/v20220901/examples.json +61 -1
  108. tccli/services/tione/v20191022/api.json +6 -7
  109. tccli/services/tione/v20191022/examples.json +1 -1
  110. tccli/services/tione/v20211111/api.json +2 -0
  111. tccli/services/tke/v20180525/api.json +77 -93
  112. tccli/services/tke/v20180525/examples.json +7 -7
  113. tccli/services/tms/tms_client.py +53 -0
  114. tccli/services/tms/v20201229/api.json +44 -0
  115. tccli/services/tms/v20201229/examples.json +8 -0
  116. tccli/services/tse/v20201207/api.json +49 -1
  117. tccli/services/tsf/v20180326/api.json +80 -42
  118. tccli/services/tsf/v20180326/examples.json +1 -1
  119. tccli/services/vpc/v20170312/api.json +39 -23
  120. tccli/services/vpc/v20170312/examples.json +14 -14
  121. tccli/services/wedata/v20210820/api.json +465 -0
  122. tccli/services/wedata/v20210820/examples.json +1 -1
  123. {tccli-3.0.1099.1.dist-info → tccli-3.0.1101.1.dist-info}/METADATA +2 -2
  124. {tccli-3.0.1099.1.dist-info → tccli-3.0.1101.1.dist-info}/RECORD +127 -109
  125. {tccli-3.0.1099.1.dist-info → tccli-3.0.1101.1.dist-info}/WHEEL +0 -0
  126. {tccli-3.0.1099.1.dist-info → tccli-3.0.1101.1.dist-info}/entry_points.txt +0 -0
  127. {tccli-3.0.1099.1.dist-info → tccli-3.0.1101.1.dist-info}/license_files/LICENSE +0 -0
@@ -109,7 +109,7 @@
109
109
  "members": [
110
110
  {
111
111
  "disabled": false,
112
- "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 8MB。",
112
+ "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于 8MB。",
113
113
  "example": "无",
114
114
  "member": "string",
115
115
  "name": "InputImage",
@@ -118,7 +118,7 @@
118
118
  },
119
119
  {
120
120
  "disabled": false,
121
- "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于8MB。",
121
+ "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于8MB。",
122
122
  "example": "无",
123
123
  "member": "string",
124
124
  "name": "InputUrl",
@@ -181,7 +181,7 @@
181
181
  },
182
182
  {
183
183
  "disabled": false,
184
- "document": "生成自由度。\nStrength 值越小,生成图和原图越接近,取值范围0 - 1,不传使用模型内置的默认值。\n推荐的取值范围为0.6 - 0.8。",
184
+ "document": "生成自由度。\nStrength 值越小,生成图和原图越接近,取值范围(0, 1],不传使用模型内置的默认值。\n推荐的取值范围为0.6 - 0.8。",
185
185
  "example": "无",
186
186
  "member": "float",
187
187
  "name": "Strength",
@@ -584,7 +584,7 @@
584
584
  },
585
585
  {
586
586
  "disabled": false,
587
- "document": "写真风格模板,支持以下风格:\nzhengjian_female:证件照-长发(女)\nzhengjian_shouthair_female:证件照-短发(女)\nzhengjian_male:证件照(男)\ngrey_suit_male:灰色西装(男)\nbeige_suit_male:米色西装(男)\nwhite_sweater_male:白色毛衣(男)\nhanfu_female:汉服(女)\nhanfu2_female:汉服2(女)\ngreen_female:绿色毛衣(女)\nwhite_sweater_female:白色毛衣(女)\nsports_female:蓝色运动装(女)\nbow_female:蝴蝶结发饰(女)\nwreath_female:头戴花环(女)\nblack_dress1_female:小黑裙1(女)\nblack_dress2_female:小黑裙2(女)\nblack_dress3_female:小黑裙3(女)\nwedding_female:婚纱裙(女)\nwedding2_female:婚纱裙2(女)\nforest_female:树林(女)\nflower_female:花丛(女)\nqipao_female:旗袍(女)\nfeather_female:羽毛(女)\nlolita_female:洛丽塔(女)\nblue_shirt_female:蓝衬衣(女)\ngreen_shirt_female:绿衬衣(女)\npurple_shirt_female:紫衬衣(女)\nfire_female:火焰(女)\nchristmas1_female: 圣诞1(女)\nchristmas2_female: 圣诞2(女)\nchristmas3_female: 圣诞3(适用女性)\nnewyear1_female:新春1(女)\nnewyear2_female:新春2(女)\nnewyear3_female:新春3(女)\nnewyear5_female:新春5(女)\nelderly_female:中老年(女)\nelderly_male:中老年(男)\nlabour_female:田野劳作(女)\nsimple:简洁风格(通用),一般用于写真模型的封面示意图,每个 ModelId 的生成结果固定,多次生成将返回相同图片",
587
+ "document": "写真风格模板。\n请在[ AI 写真风格列表](https://cloud.tencent.com/document/product/1668/105740) 中选择期望的风格,传入风格编号。",
588
588
  "example": "zhengjian_female",
589
589
  "member": "string",
590
590
  "name": "StyleId",
@@ -693,7 +693,7 @@
693
693
  },
694
694
  {
695
695
  "disabled": false,
696
- "document": "文生图模型,默认使用engine1。\nengine1:文生图(高级版)-混元\nengine2:文生图(高级版)",
696
+ "document": "文生图模型,默认使用engine1。\n取值:\nengine1\nengine2",
697
697
  "example": "无",
698
698
  "member": "string",
699
699
  "name": "Engine",
@@ -173,6 +173,58 @@ def doCreateAuditPolicy(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
+ def doDescribeDBInstanceLogToCLS(args, parsed_globals):
177
+ g_param = parse_global_arg(parsed_globals)
178
+
179
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
180
+ cred = credential.CVMRoleCredential()
181
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
182
+ cred = credential.STSAssumeRoleCredential(
183
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
184
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
185
+ )
186
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
187
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
188
+ else:
189
+ cred = credential.Credential(
190
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
191
+ )
192
+ http_profile = HttpProfile(
193
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
194
+ reqMethod="POST",
195
+ endpoint=g_param[OptionsDefine.Endpoint],
196
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
197
+ )
198
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
199
+ if g_param[OptionsDefine.Language]:
200
+ profile.language = g_param[OptionsDefine.Language]
201
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
202
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
203
+ client._sdkVersion += ("_CLI_" + __version__)
204
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
+ model = models.DescribeDBInstanceLogToCLSRequest()
206
+ model.from_json_string(json.dumps(args))
207
+ start_time = time.time()
208
+ while True:
209
+ rsp = client.DescribeDBInstanceLogToCLS(model)
210
+ result = rsp.to_json_string()
211
+ try:
212
+ json_obj = json.loads(result)
213
+ except TypeError as e:
214
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
215
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
216
+ break
217
+ cur_time = time.time()
218
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
219
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
220
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
221
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
222
+ else:
223
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
224
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
225
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
+
227
+
176
228
  def doDescribeDBFeatures(args, parsed_globals):
177
229
  g_param = parse_global_arg(parsed_globals)
178
230
 
@@ -5893,6 +5945,58 @@ def doDescribeDBImportRecords(args, parsed_globals):
5893
5945
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5894
5946
 
5895
5947
 
5948
+ def doDescribeSSLStatus(args, parsed_globals):
5949
+ g_param = parse_global_arg(parsed_globals)
5950
+
5951
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5952
+ cred = credential.CVMRoleCredential()
5953
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5954
+ cred = credential.STSAssumeRoleCredential(
5955
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5956
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5957
+ )
5958
+ 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):
5959
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5960
+ else:
5961
+ cred = credential.Credential(
5962
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5963
+ )
5964
+ http_profile = HttpProfile(
5965
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5966
+ reqMethod="POST",
5967
+ endpoint=g_param[OptionsDefine.Endpoint],
5968
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5969
+ )
5970
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5971
+ if g_param[OptionsDefine.Language]:
5972
+ profile.language = g_param[OptionsDefine.Language]
5973
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5974
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
5975
+ client._sdkVersion += ("_CLI_" + __version__)
5976
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5977
+ model = models.DescribeSSLStatusRequest()
5978
+ model.from_json_string(json.dumps(args))
5979
+ start_time = time.time()
5980
+ while True:
5981
+ rsp = client.DescribeSSLStatus(model)
5982
+ result = rsp.to_json_string()
5983
+ try:
5984
+ json_obj = json.loads(result)
5985
+ except TypeError as e:
5986
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5987
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5988
+ break
5989
+ cur_time = time.time()
5990
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5991
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5992
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5993
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5994
+ else:
5995
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5996
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5997
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5998
+
5999
+
5896
6000
  def doDescribeDBSwitchRecords(args, parsed_globals):
5897
6001
  g_param = parse_global_arg(parsed_globals)
5898
6002
 
@@ -7037,7 +7141,7 @@ def doInitDBInstances(args, parsed_globals):
7037
7141
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
7038
7142
 
7039
7143
 
7040
- def doDescribeDBInstanceLogToCLS(args, parsed_globals):
7144
+ def doOpenSSL(args, parsed_globals):
7041
7145
  g_param = parse_global_arg(parsed_globals)
7042
7146
 
7043
7147
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -7066,11 +7170,11 @@ def doDescribeDBInstanceLogToCLS(args, parsed_globals):
7066
7170
  client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
7067
7171
  client._sdkVersion += ("_CLI_" + __version__)
7068
7172
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
7069
- model = models.DescribeDBInstanceLogToCLSRequest()
7173
+ model = models.OpenSSLRequest()
7070
7174
  model.from_json_string(json.dumps(args))
7071
7175
  start_time = time.time()
7072
7176
  while True:
7073
- rsp = client.DescribeDBInstanceLogToCLS(model)
7177
+ rsp = client.OpenSSL(model)
7074
7178
  result = rsp.to_json_string()
7075
7179
  try:
7076
7180
  json_obj = json.loads(result)
@@ -8233,6 +8337,58 @@ def doUpgradeDBInstance(args, parsed_globals):
8233
8337
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8234
8338
 
8235
8339
 
8340
+ def doCloseSSL(args, parsed_globals):
8341
+ g_param = parse_global_arg(parsed_globals)
8342
+
8343
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
8344
+ cred = credential.CVMRoleCredential()
8345
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
8346
+ cred = credential.STSAssumeRoleCredential(
8347
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
8348
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
8349
+ )
8350
+ 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):
8351
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
8352
+ else:
8353
+ cred = credential.Credential(
8354
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
8355
+ )
8356
+ http_profile = HttpProfile(
8357
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
8358
+ reqMethod="POST",
8359
+ endpoint=g_param[OptionsDefine.Endpoint],
8360
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
8361
+ )
8362
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
8363
+ if g_param[OptionsDefine.Language]:
8364
+ profile.language = g_param[OptionsDefine.Language]
8365
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
8366
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
8367
+ client._sdkVersion += ("_CLI_" + __version__)
8368
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
8369
+ model = models.CloseSSLRequest()
8370
+ model.from_json_string(json.dumps(args))
8371
+ start_time = time.time()
8372
+ while True:
8373
+ rsp = client.CloseSSL(model)
8374
+ result = rsp.to_json_string()
8375
+ try:
8376
+ json_obj = json.loads(result)
8377
+ except TypeError as e:
8378
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
8379
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
8380
+ break
8381
+ cur_time = time.time()
8382
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
8383
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
8384
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
8385
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
8386
+ else:
8387
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
8388
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
8389
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8390
+
8391
+
8236
8392
  def doUpgradeCDBProxyVersion(args, parsed_globals):
8237
8393
  g_param = parse_global_arg(parsed_globals)
8238
8394
 
@@ -8403,6 +8559,7 @@ ACTION_MAP = {
8403
8559
  "DescribeDBInstanceGTID": doDescribeDBInstanceGTID,
8404
8560
  "CreateRoInstanceIp": doCreateRoInstanceIp,
8405
8561
  "CreateAuditPolicy": doCreateAuditPolicy,
8562
+ "DescribeDBInstanceLogToCLS": doDescribeDBInstanceLogToCLS,
8406
8563
  "DescribeDBFeatures": doDescribeDBFeatures,
8407
8564
  "CreateAuditRuleTemplate": doCreateAuditRuleTemplate,
8408
8565
  "BalanceRoGroupLoad": doBalanceRoGroupLoad,
@@ -8513,6 +8670,7 @@ ACTION_MAP = {
8513
8670
  "DescribeDBPrice": doDescribeDBPrice,
8514
8671
  "ModifyAccountPrivileges": doModifyAccountPrivileges,
8515
8672
  "DescribeDBImportRecords": doDescribeDBImportRecords,
8673
+ "DescribeSSLStatus": doDescribeSSLStatus,
8516
8674
  "DescribeDBSwitchRecords": doDescribeDBSwitchRecords,
8517
8675
  "CreateDBImportJob": doCreateDBImportJob,
8518
8676
  "RestartDBInstances": doRestartDBInstances,
@@ -8535,7 +8693,7 @@ ACTION_MAP = {
8535
8693
  "DescribeRemoteBackupConfig": doDescribeRemoteBackupConfig,
8536
8694
  "ModifyCdbProxyAddressVipAndVPort": doModifyCdbProxyAddressVipAndVPort,
8537
8695
  "InitDBInstances": doInitDBInstances,
8538
- "DescribeDBInstanceLogToCLS": doDescribeDBInstanceLogToCLS,
8696
+ "OpenSSL": doOpenSSL,
8539
8697
  "DescribeAuditRuleTemplateModifyHistory": doDescribeAuditRuleTemplateModifyHistory,
8540
8698
  "CreateCdbProxy": doCreateCdbProxy,
8541
8699
  "ModifyAutoRenewFlag": doModifyAutoRenewFlag,
@@ -8558,6 +8716,7 @@ ACTION_MAP = {
8558
8716
  "DescribeCloneList": doDescribeCloneList,
8559
8717
  "ModifyNameOrDescByDpId": doModifyNameOrDescByDpId,
8560
8718
  "UpgradeDBInstance": doUpgradeDBInstance,
8719
+ "CloseSSL": doCloseSSL,
8561
8720
  "UpgradeCDBProxyVersion": doUpgradeCDBProxyVersion,
8562
8721
  "ModifyRemoteBackupConfig": doModifyRemoteBackupConfig,
8563
8722
  "ModifyAccountMaxUserConnections": doModifyAccountMaxUserConnections,
@@ -70,6 +70,13 @@
70
70
  "output": "CloseCdbProxyAddressResponse",
71
71
  "status": "online"
72
72
  },
73
+ "CloseSSL": {
74
+ "document": "关闭SSL连接功能。",
75
+ "input": "CloseSSLRequest",
76
+ "name": "关闭SSL",
77
+ "output": "CloseSSLResponse",
78
+ "status": "online"
79
+ },
73
80
  "CloseWanService": {
74
81
  "document": "本接口(CloseWanService)用于关闭云数据库实例的外网访问。关闭外网访问后,外网地址将不可访问。",
75
82
  "input": "CloseWanServiceRequest",
@@ -658,6 +665,13 @@
658
665
  "output": "DescribeRollbackTaskDetailResponse",
659
666
  "status": "online"
660
667
  },
668
+ "DescribeSSLStatus": {
669
+ "document": "查询 SSL 开通情况。如果已经开通 SSL ,会同步返回证书下载链接。",
670
+ "input": "DescribeSSLStatusRequest",
671
+ "name": "查询 SSL 开通情况",
672
+ "output": "DescribeSSLStatusResponse",
673
+ "status": "online"
674
+ },
661
675
  "DescribeSlowLogData": {
662
676
  "document": "条件检索实例的慢日志。只允许查看一个月之内的慢日志。\n使用时需要注意:可能存在单条慢日志太大,导致整个http请求的回包太大,进而引发接口超时。一旦发生超时,建议您缩小查询时的Limit参数值,从而降低包的大小,让接口能够及时返回内容。",
663
677
  "input": "DescribeSlowLogDataRequest",
@@ -980,6 +994,13 @@
980
994
  "output": "OpenDBInstanceGTIDResponse",
981
995
  "status": "online"
982
996
  },
997
+ "OpenSSL": {
998
+ "document": "开启SSL连接功能。",
999
+ "input": "OpenSSLRequest",
1000
+ "name": "开启SSL",
1001
+ "output": "OpenSSLResponse",
1002
+ "status": "online"
1003
+ },
983
1004
  "OpenWanService": {
984
1005
  "document": "本接口(OpenWanService)用于开通实例外网访问。\n\n注意,实例开通外网访问之前,需要先将实例进行 [实例初始化](https://cloud.tencent.com/document/api/236/15873) 操作。",
985
1006
  "input": "OpenWanServiceRequest",
@@ -4040,6 +4061,52 @@
4040
4061
  ],
4041
4062
  "type": "object"
4042
4063
  },
4064
+ "CloseSSLRequest": {
4065
+ "document": "CloseSSL请求参数结构体",
4066
+ "members": [
4067
+ {
4068
+ "disabled": false,
4069
+ "document": "实例 ID 。只读组 ID为空时必填。",
4070
+ "example": "cdb-test",
4071
+ "member": "string",
4072
+ "name": "InstanceId",
4073
+ "required": false,
4074
+ "type": "string"
4075
+ },
4076
+ {
4077
+ "disabled": false,
4078
+ "document": "只读组 ID。实例 ID为空时必填。",
4079
+ "example": "cdbrg-test",
4080
+ "member": "string",
4081
+ "name": "RoGroupId",
4082
+ "required": false,
4083
+ "type": "string"
4084
+ }
4085
+ ],
4086
+ "type": "object"
4087
+ },
4088
+ "CloseSSLResponse": {
4089
+ "document": "CloseSSL返回参数结构体",
4090
+ "members": [
4091
+ {
4092
+ "disabled": false,
4093
+ "document": "异步请求 ID。",
4094
+ "example": "123asd21-2dasdasd-123qcsdw-313213",
4095
+ "member": "string",
4096
+ "name": "AsyncRequestId",
4097
+ "required": true,
4098
+ "type": "string",
4099
+ "value_allowed_null": false
4100
+ },
4101
+ {
4102
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
4103
+ "member": "string",
4104
+ "name": "RequestId",
4105
+ "type": "string"
4106
+ }
4107
+ ],
4108
+ "type": "object"
4109
+ },
4043
4110
  "CloseWanServiceRequest": {
4044
4111
  "document": "CloseWanService请求参数结构体",
4045
4112
  "members": [
@@ -11507,6 +11574,62 @@
11507
11574
  ],
11508
11575
  "type": "object"
11509
11576
  },
11577
+ "DescribeSSLStatusRequest": {
11578
+ "document": "DescribeSSLStatus请求参数结构体",
11579
+ "members": [
11580
+ {
11581
+ "disabled": false,
11582
+ "document": "实例 ID 。只读组 ID为空时必填。",
11583
+ "example": "cdb-test",
11584
+ "member": "string",
11585
+ "name": "InstanceId",
11586
+ "required": false,
11587
+ "type": "string"
11588
+ },
11589
+ {
11590
+ "disabled": false,
11591
+ "document": "只读组 ID。实例 ID为空时必填。",
11592
+ "example": "cdbrg-test",
11593
+ "member": "string",
11594
+ "name": "RoGroupId",
11595
+ "required": false,
11596
+ "type": "string"
11597
+ }
11598
+ ],
11599
+ "type": "object"
11600
+ },
11601
+ "DescribeSSLStatusResponse": {
11602
+ "document": "DescribeSSLStatus返回参数结构体",
11603
+ "members": [
11604
+ {
11605
+ "disabled": false,
11606
+ "document": "是否开通 SSL 。ON 代表开通 ,OFF 代表未开通。",
11607
+ "example": "ON",
11608
+ "member": "string",
11609
+ "name": "Status",
11610
+ "required": true,
11611
+ "type": "string",
11612
+ "value_allowed_null": false
11613
+ },
11614
+ {
11615
+ "disabled": false,
11616
+ "document": "证书下载链接。",
11617
+ "example": "http://testdownload.url",
11618
+ "member": "string",
11619
+ "name": "Url",
11620
+ "required": true,
11621
+ "type": "string",
11622
+ "value_allowed_null": false
11623
+ },
11624
+ {
11625
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
11626
+ "member": "string",
11627
+ "name": "RequestId",
11628
+ "type": "string"
11629
+ }
11630
+ ],
11631
+ "type": "object"
11632
+ },
11510
11633
  "DescribeSlowLogDataRequest": {
11511
11634
  "document": "DescribeSlowLogData请求参数结构体",
11512
11635
  "members": [
@@ -16093,6 +16216,52 @@
16093
16216
  ],
16094
16217
  "type": "object"
16095
16218
  },
16219
+ "OpenSSLRequest": {
16220
+ "document": "OpenSSL请求参数结构体",
16221
+ "members": [
16222
+ {
16223
+ "disabled": false,
16224
+ "document": "实例 ID 。",
16225
+ "example": "cdb-test",
16226
+ "member": "string",
16227
+ "name": "InstanceId",
16228
+ "required": false,
16229
+ "type": "string"
16230
+ },
16231
+ {
16232
+ "disabled": false,
16233
+ "document": "只读组 ID。",
16234
+ "example": "cdbrg-test",
16235
+ "member": "string",
16236
+ "name": "RoGroupId",
16237
+ "required": false,
16238
+ "type": "string"
16239
+ }
16240
+ ],
16241
+ "type": "object"
16242
+ },
16243
+ "OpenSSLResponse": {
16244
+ "document": "OpenSSL返回参数结构体",
16245
+ "members": [
16246
+ {
16247
+ "disabled": false,
16248
+ "document": "异步请求 ID。",
16249
+ "example": "123asd21-2dasdasd-123qcsdw-313213",
16250
+ "member": "string",
16251
+ "name": "AsyncRequestId",
16252
+ "required": true,
16253
+ "type": "string",
16254
+ "value_allowed_null": false
16255
+ },
16256
+ {
16257
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
16258
+ "member": "string",
16259
+ "name": "RequestId",
16260
+ "type": "string"
16261
+ }
16262
+ ],
16263
+ "type": "object"
16264
+ },
16096
16265
  "OpenWanServiceRequest": {
16097
16266
  "document": "OpenWanService请求参数结构体",
16098
16267
  "members": [
@@ -86,6 +86,14 @@
86
86
  "title": "关闭数据代理地址"
87
87
  }
88
88
  ],
89
+ "CloseSSL": [
90
+ {
91
+ "document": "",
92
+ "input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CloseSSL\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdb-test\"\n}",
93
+ "output": "{\n \"Response\": {\n \"RequestId\": \"xxxx-xxxx-xxxx\",\n \"AsyncRequestId\": \"xxxx-xxxx-xxxx\"\n }\n}",
94
+ "title": "关闭SSL"
95
+ }
96
+ ],
89
97
  "CloseWanService": [
90
98
  {
91
99
  "document": "",
@@ -794,6 +802,14 @@
794
802
  "title": "查询回档任务详情"
795
803
  }
796
804
  ],
805
+ "DescribeSSLStatus": [
806
+ {
807
+ "document": "",
808
+ "input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSSLStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdb-test\"\n}",
809
+ "output": "{\n \"Response\": {\n \"Status\": \"ON\",\n \"Url\": \"http://test\",\n \"RequestId\": \"xxxx-xxxx-xxxxxx\"\n }\n}",
810
+ "title": "获取SSL开通情况以及证书下载链接"
811
+ }
812
+ ],
797
813
  "DescribeSlowLogData": [
798
814
  {
799
815
  "document": "",
@@ -1168,6 +1184,14 @@
1168
1184
  "title": "开启实例的GTID"
1169
1185
  }
1170
1186
  ],
1187
+ "OpenSSL": [
1188
+ {
1189
+ "document": "",
1190
+ "input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: OpenSSL\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdb-test\"\n}",
1191
+ "output": "{\n \"Response\": {\n \"RequestId\": \"xxxx-xxxx-xxxx\",\n \"AsyncRequestId\": \"xxxx-xxxx-xxxx\"\n }\n}",
1192
+ "title": "开启SSL连接功能。"
1193
+ }
1194
+ ],
1171
1195
  "OpenWanService": [
1172
1196
  {
1173
1197
  "document": "",
@@ -2748,6 +2748,15 @@
2748
2748
  "name": "IdleConnectTimeout",
2749
2749
  "required": false,
2750
2750
  "type": "int"
2751
+ },
2752
+ {
2753
+ "disabled": false,
2754
+ "document": "是否开启SNAT。",
2755
+ "example": "False",
2756
+ "member": "bool",
2757
+ "name": "SnatEnable",
2758
+ "required": false,
2759
+ "type": "bool"
2751
2760
  }
2752
2761
  ],
2753
2762
  "type": "object"
@@ -8769,6 +8778,15 @@
8769
8778
  "name": "IdleConnectTimeout",
8770
8779
  "required": false,
8771
8780
  "type": "int"
8781
+ },
8782
+ {
8783
+ "disabled": false,
8784
+ "document": "是否开启SNAT。",
8785
+ "example": "False",
8786
+ "member": "bool",
8787
+ "name": "SnatEnable",
8788
+ "required": false,
8789
+ "type": "bool"
8772
8790
  }
8773
8791
  ],
8774
8792
  "type": "object"