From d5fdfd24f75c1e01ec48ada60b1397bc8727fc10 Mon Sep 17 00:00:00 2001 From: tencentcloudapi Date: Wed, 11 Sep 2024 04:09:28 +0800 Subject: [PATCH] release 3.0.1189.1 --- CHANGELOG.md | 328 ++++++++++ SERVICE_CHANGELOG.md | 533 +++++++++++++--- products.md | 40 +- pyproject.toml | 4 +- tccli/__init__.py | 2 +- .../examples/aiart/v20221229/SketchToImage.md | 23 + .../v20180709/DescribeVoucherUsageDetails.md | 118 +++- .../dcdb/v20180411/DescribeBackupConfigs.md | 81 +++ .../dcdb/v20180411/ModifyBackupConfigs.md | 50 ++ .../v20210323/DescribeDomainShareUserList.md | 30 + .../emr/v20190103/CreateSLInstance.md | 37 ++ .../emr/v20190103/DescribeSLInstance.md | 51 ++ .../emr/v20190103/DescribeSLInstanceList.md | 43 ++ .../emr/v20190103/ModifySLInstance.md | 22 + .../emr/v20190103/TerminateSLInstance.md | 40 ++ .../es/v20180416/DescribeSpaceKibanaTools.md | 44 ++ .../DescribeOrganizationAuthStatus.md | 2 +- .../CreatePersonAuthCertificateImage.md | 29 + .../v20170312/DescribeBackupConfigs.md | 41 ++ .../mariadb/v20170312/ModifyBackupConfigs.md | 25 + .../v20180412/DescribeInstanceLogDelivery.md | 26 + .../v20180412/ModifyInstanceLogDelivery.md | 25 + .../vdb/v20230616/AssociateSecurityGroups.md | 21 + .../vdb/v20230616/DescribeDBSecurityGroups.md | 64 ++ .../vdb/v20230616/DescribeInstanceNodes.md | 52 ++ .../v20230616/DisassociateSecurityGroups.md | 21 + .../ModifyDBInstanceSecurityGroups.md | 21 + tccli/services/aiart/aiart_client.py | 53 ++ tccli/services/aiart/v20221229/api.json | 107 ++++ tccli/services/aiart/v20221229/examples.json | 8 + tccli/services/apm/v20210622/api.json | 4 +- tccli/services/billing/v20180709/api.json | 3 + .../services/billing/v20180709/examples.json | 2 +- tccli/services/cfg/v20210820/api.json | 23 +- tccli/services/ckafka/v20190819/api.json | 10 +- tccli/services/dcdb/dcdb_client.py | 106 ++++ tccli/services/dcdb/v20180411/api.json | 318 ++++++++++ tccli/services/dcdb/v20180411/examples.json | 28 + tccli/services/dnspod/dnspod_client.py | 53 ++ tccli/services/dnspod/v20210323/api.json | 118 ++++ tccli/services/dnspod/v20210323/examples.json | 8 + tccli/services/emr/emr_client.py | 273 +++++++- tccli/services/emr/v20190103/api.json | 591 ++++++++++++++++++ tccli/services/emr/v20190103/examples.json | 46 ++ tccli/services/es/es_client.py | 53 ++ tccli/services/es/v20180416/api.json | 54 ++ tccli/services/es/v20180416/examples.json | 14 + tccli/services/ess/v20201111/api.json | 2 +- tccli/services/ess/v20201111/examples.json | 2 +- tccli/services/essbasic/essbasic_client.py | 53 ++ tccli/services/essbasic/v20210526/api.json | 120 ++++ .../services/essbasic/v20210526/examples.json | 8 + tccli/services/mariadb/mariadb_client.py | 114 +++- tccli/services/mariadb/v20170312/api.json | 318 ++++++++++ .../services/mariadb/v20170312/examples.json | 16 + tccli/services/ocr/v20181119/api.json | 14 +- tccli/services/redis/redis_client.py | 114 +++- tccli/services/redis/v20180412/api.json | 209 +++++++ tccli/services/redis/v20180412/examples.json | 16 + tccli/services/teo/v20220901/api.json | 28 +- tccli/services/tsf/v20180326/api.json | 103 ++- tccli/services/vdb/v20230616/api.json | 491 +++++++++++++++ tccli/services/vdb/v20230616/examples.json | 46 ++ tccli/services/vdb/vdb_client.py | 265 ++++++++ tccli/services/vpc/v20170312/api.json | 8 +- 65 files changed, 5392 insertions(+), 180 deletions(-) create mode 100644 tccli/examples/aiart/v20221229/SketchToImage.md create mode 100644 tccli/examples/dcdb/v20180411/DescribeBackupConfigs.md create mode 100644 tccli/examples/dcdb/v20180411/ModifyBackupConfigs.md create mode 100644 tccli/examples/dnspod/v20210323/DescribeDomainShareUserList.md create mode 100644 tccli/examples/emr/v20190103/CreateSLInstance.md create mode 100644 tccli/examples/emr/v20190103/DescribeSLInstance.md create mode 100644 tccli/examples/emr/v20190103/DescribeSLInstanceList.md create mode 100644 tccli/examples/emr/v20190103/ModifySLInstance.md create mode 100644 tccli/examples/emr/v20190103/TerminateSLInstance.md create mode 100644 tccli/examples/es/v20180416/DescribeSpaceKibanaTools.md create mode 100644 tccli/examples/essbasic/v20210526/CreatePersonAuthCertificateImage.md create mode 100644 tccli/examples/mariadb/v20170312/DescribeBackupConfigs.md create mode 100644 tccli/examples/mariadb/v20170312/ModifyBackupConfigs.md create mode 100644 tccli/examples/redis/v20180412/DescribeInstanceLogDelivery.md create mode 100644 tccli/examples/redis/v20180412/ModifyInstanceLogDelivery.md create mode 100644 tccli/examples/vdb/v20230616/AssociateSecurityGroups.md create mode 100644 tccli/examples/vdb/v20230616/DescribeDBSecurityGroups.md create mode 100644 tccli/examples/vdb/v20230616/DescribeInstanceNodes.md create mode 100644 tccli/examples/vdb/v20230616/DisassociateSecurityGroups.md create mode 100644 tccli/examples/vdb/v20230616/ModifyDBInstanceSecurityGroups.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ef240e97..daf954265e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,331 @@ +# Release 3.0.1189.1 + +## 大模型图像创作引擎(aiart) 版本:2022-12-29 + +### 第 13 次发布 + +发布时间:2024-09-11 01:07:24 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [SketchToImage](https://cloud.tencent.com/document/api/1668/110863) + +### 第 12 次发布 + +发布时间:2024-09-10 11:22:26 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [ImageToImage](https://cloud.tencent.com/document/api/1668/88066) + + * 新增入参:EnhanceImage, RestoreFace + + + + +## 混沌演练平台(cfg) 版本:2021-08-20 + +### 第 19 次发布 + +发布时间:2024-09-11 01:19:01 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [Task](https://cloud.tencent.com/document/api/1500/71784#Task) + + * 新增成员:TaskRegionName + + + + +## 消息队列 CKafka 版(ckafka) 版本:2019-08-19 + +### 第 108 次发布 + +发布时间:2024-09-11 01:20:54 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [ModifyInstanceAttributes](https://cloud.tencent.com/document/api/597/40832) + + +修改数据结构: + +* [OperateResponseData](https://cloud.tencent.com/document/api/597/40861#OperateResponseData) + + * **修改成员**:RouteDTO + + + + +## TDSQL MySQL 版(dcdb) 版本:2018-04-11 + +### 第 73 次发布 + +发布时间:2024-09-11 01:32:35 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [DescribeBackupConfigs](https://cloud.tencent.com/document/api/557/110865) +* [ModifyBackupConfigs](https://cloud.tencent.com/document/api/557/110864) + +新增数据结构: + +* [BackupConfig](https://cloud.tencent.com/document/api/557/16142#BackupConfig) +* [NewBackupConfig](https://cloud.tencent.com/document/api/557/16142#NewBackupConfig) + + + +## DNSPod(dnspod) 版本:2021-03-23 + +### 第 33 次发布 + +发布时间:2024-09-11 01:34:34 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [DescribeDomainShareUserList](https://cloud.tencent.com/document/api/1427/110866) + +新增数据结构: + +* [DomainShareUserInfo](https://cloud.tencent.com/document/api/1427/56185#DomainShareUserInfo) + + + +## 弹性 MapReduce(emr) 版本:2019-01-03 + +### 第 76 次发布 + +发布时间:2024-09-11 01:39:43 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [CreateSLInstance](https://cloud.tencent.com/document/api/589/110872) +* [DescribeSLInstance](https://cloud.tencent.com/document/api/589/110871) +* [DescribeSLInstanceList](https://cloud.tencent.com/document/api/589/110870) +* [ModifySLInstance](https://cloud.tencent.com/document/api/589/110869) +* [TerminateSLInstance](https://cloud.tencent.com/document/api/589/110868) + +修改接口: + +* [ModifyAutoRenewFlag](https://cloud.tencent.com/document/api/589/110534) + + * 新增入参:ComputeResourceId + + +新增数据结构: + +* [SLInstanceInfo](https://cloud.tencent.com/document/api/589/33981#SLInstanceInfo) +* [ZoneSetting](https://cloud.tencent.com/document/api/589/33981#ZoneSetting) + + + +## Elasticsearch Service(es) 版本:2018-04-16 + +### 第 69 次发布 + +发布时间:2024-09-10 15:12:32 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [DescribeSpaceKibanaTools](https://cloud.tencent.com/document/api/845/110854) + + + +## 腾讯电子签(基础版)(essbasic) 版本:2021-05-26 + +### 第 182 次发布 + +发布时间:2024-09-11 01:42:03 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [CreatePersonAuthCertificateImage](https://cloud.tencent.com/document/api/1420/110873) + + + +## 腾讯电子签(基础版)(essbasic) 版本:2020-12-22 + + + +## 云数据库 MariaDB(mariadb) 版本:2017-03-12 + +### 第 66 次发布 + +发布时间:2024-09-11 01:55:56 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [DescribeBackupConfigs](https://cloud.tencent.com/document/api/237/110875) +* [ModifyBackupConfigs](https://cloud.tencent.com/document/api/237/110874) + +新增数据结构: + +* [BackupConfig](https://cloud.tencent.com/document/api/237/16191#BackupConfig) +* [NewBackupConfig](https://cloud.tencent.com/document/api/237/16191#NewBackupConfig) + + + +## 文字识别(ocr) 版本:2018-11-19 + +### 第 149 次发布 + +发布时间:2024-09-11 02:01:34 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [PermitOCR](https://cloud.tencent.com/document/api/866/37074) + + * 新增出参:Type + + + + +## 云数据库Redis(redis) 版本:2018-04-12 + +### 第 81 次发布 + +发布时间:2024-09-11 02:05:34 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [DescribeInstanceLogDelivery](https://cloud.tencent.com/document/api/239/110878) +* [ModifyInstanceLogDelivery](https://cloud.tencent.com/document/api/239/110877) + +新增数据结构: + +* [LogDeliveryInfo](https://cloud.tencent.com/document/api/239/20022#LogDeliveryInfo) + + + +## 边缘安全加速平台(teo) 版本:2022-09-01 + +### 第 84 次发布 + +发布时间:2024-09-11 02:18:47 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [OriginDetail](https://cloud.tencent.com/document/api/1552/80721#OriginDetail) + +* [OriginInfo](https://cloud.tencent.com/document/api/1552/80721#OriginInfo) + + + + +## 边缘安全加速平台(teo) 版本:2022-01-06 + + + +## 微服务平台 TSF(tsf) 版本:2018-03-26 + +### 第 113 次发布 + +发布时间:2024-09-11 02:25:39 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [CreateAllGatewayApiAsync](https://cloud.tencent.com/document/api/649/50642) + + * 新增入参:NamespaceId + + +修改数据结构: + +* [ApiRateLimitRule](https://cloud.tencent.com/document/api/649/36099#ApiRateLimitRule) + + * 新增成员:Limit, Offset, AppId + +* [GatewayGroupApiVo](https://cloud.tencent.com/document/api/649/36099#GatewayGroupApiVo) + + * **修改成员**:ApiId, Path, MicroserviceName, Method, NamespaceName + + + + +## 向量数据库(vdb) 版本:2023-06-16 + +### 第 3 次发布 + +发布时间:2024-09-11 02:27:43 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [AssociateSecurityGroups](https://cloud.tencent.com/document/api/1709/110884) +* [DescribeDBSecurityGroups](https://cloud.tencent.com/document/api/1709/110883) +* [DescribeInstanceNodes](https://cloud.tencent.com/document/api/1709/110879) +* [DisassociateSecurityGroups](https://cloud.tencent.com/document/api/1709/110882) +* [ModifyDBInstanceSecurityGroups](https://cloud.tencent.com/document/api/1709/110881) + +新增数据结构: + +* [Inbound](https://cloud.tencent.com/document/api/1709/106757#Inbound) +* [NodeInfo](https://cloud.tencent.com/document/api/1709/106757#NodeInfo) +* [Outbound](https://cloud.tencent.com/document/api/1709/106757#Outbound) +* [SecurityGroup](https://cloud.tencent.com/document/api/1709/106757#SecurityGroup) + + + # Release 3.0.1188.1 ## 云服务器(cvm) 版本:2017-03-12 diff --git a/SERVICE_CHANGELOG.md b/SERVICE_CHANGELOG.md index 9aadf27bbb..241b3c9ebe 100644 --- a/SERVICE_CHANGELOG.md +++ b/SERVICE_CHANGELOG.md @@ -1,10 +1,10 @@ # 本版本更新包含以下内容: -## 云服务器(cvm) 版本:2017-03-12 +## 大模型图像创作引擎(aiart) 版本:2022-12-29 -### 第 129 次发布 +### 第 13 次发布 -发布时间:2024-09-10 01:20:00 +发布时间:2024-09-11 01:07:24 本次发布包含了以下内容: @@ -12,19 +12,49 @@ 新增接口: -* [ConvertOperatingSystems](https://cloud.tencent.com/document/api/213/110841) +* [SketchToImage](https://cloud.tencent.com/document/api/1668/110863) -新增数据结构: +### 第 12 次发布 -* [TargetOS](https://cloud.tencent.com/document/api/213/15753#TargetOS) +发布时间:2024-09-10 11:22:26 +本次发布包含了以下内容: +改善已有的文档。 -## TDSQL MySQL 版(dcdb) 版本:2018-04-11 +修改接口: -### 第 72 次发布 +* [ImageToImage](https://cloud.tencent.com/document/api/1668/88066) -发布时间:2024-09-10 01:27:35 + * 新增入参:EnhanceImage, RestoreFace + + + + +## 混沌演练平台(cfg) 版本:2021-08-20 + +### 第 19 次发布 + +发布时间:2024-09-11 01:19:01 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [Task](https://cloud.tencent.com/document/api/1500/71784#Task) + + * 新增成员:TaskRegionName + + + + +## 消息队列 CKafka 版(ckafka) 版本:2019-08-19 + +### 第 108 次发布 + +发布时间:2024-09-11 01:20:54 本次发布包含了以下内容: @@ -32,26 +62,45 @@ 修改接口: -* [CreateAccount](https://cloud.tencent.com/document/api/557/19996) +* [ModifyInstanceAttributes](https://cloud.tencent.com/document/api/597/40832) - * 新增入参:EncryptedPassword - * **修改入参**:Password +修改数据结构: -* [ResetAccountPassword](https://cloud.tencent.com/document/api/557/19979) +* [OperateResponseData](https://cloud.tencent.com/document/api/597/40861#OperateResponseData) - * 新增入参:EncryptedPassword + * **修改成员**:RouteDTO - * **修改入参**:Password +## TDSQL MySQL 版(dcdb) 版本:2018-04-11 -## 数据湖计算 DLC(dlc) 版本:2021-01-25 +### 第 73 次发布 -### 第 102 次发布 +发布时间:2024-09-11 01:32:35 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [DescribeBackupConfigs](https://cloud.tencent.com/document/api/557/110865) +* [ModifyBackupConfigs](https://cloud.tencent.com/document/api/557/110864) + +新增数据结构: + +* [BackupConfig](https://cloud.tencent.com/document/api/557/16142#BackupConfig) +* [NewBackupConfig](https://cloud.tencent.com/document/api/557/16142#NewBackupConfig) -发布时间:2024-09-10 01:28:17 + + +## DNSPod(dnspod) 版本:2021-03-23 + +### 第 33 次发布 + +发布时间:2024-09-11 01:34:34 本次发布包含了以下内容: @@ -59,16 +108,19 @@ 新增接口: -* [DeleteTable](https://cloud.tencent.com/document/api/1342/110842) -* [QueryInternalTableWarehouse](https://cloud.tencent.com/document/api/1342/110843) +* [DescribeDomainShareUserList](https://cloud.tencent.com/document/api/1427/110866) + +新增数据结构: + +* [DomainShareUserInfo](https://cloud.tencent.com/document/api/1427/56185#DomainShareUserInfo) ## 弹性 MapReduce(emr) 版本:2019-01-03 -### 第 75 次发布 +### 第 76 次发布 -发布时间:2024-09-09 11:32:30 +发布时间:2024-09-11 01:39:43 本次发布包含了以下内容: @@ -76,47 +128,67 @@ 新增接口: -* [DescribeResourceScheduleDiffDetail](https://cloud.tencent.com/document/api/589/110834) +* [CreateSLInstance](https://cloud.tencent.com/document/api/589/110872) +* [DescribeSLInstance](https://cloud.tencent.com/document/api/589/110871) +* [DescribeSLInstanceList](https://cloud.tencent.com/document/api/589/110870) +* [ModifySLInstance](https://cloud.tencent.com/document/api/589/110869) +* [TerminateSLInstance](https://cloud.tencent.com/document/api/589/110868) + +修改接口: + +* [ModifyAutoRenewFlag](https://cloud.tencent.com/document/api/589/110534) + + * 新增入参:ComputeResourceId + 新增数据结构: -* [DiffDetail](https://cloud.tencent.com/document/api/589/33981#DiffDetail) -* [DiffDetailItem](https://cloud.tencent.com/document/api/589/33981#DiffDetailItem) -* [DiffHeader](https://cloud.tencent.com/document/api/589/33981#DiffHeader) +* [SLInstanceInfo](https://cloud.tencent.com/document/api/589/33981#SLInstanceInfo) +* [ZoneSetting](https://cloud.tencent.com/document/api/589/33981#ZoneSetting) ## Elasticsearch Service(es) 版本:2018-04-16 -### 第 68 次发布 +### 第 69 次发布 -发布时间:2024-09-10 01:35:22 +发布时间:2024-09-10 15:12:32 本次发布包含了以下内容: 改善已有的文档。 -修改接口: +新增接口: -* [DescribeServerlessMetrics](https://cloud.tencent.com/document/api/845/108288) +* [DescribeSpaceKibanaTools](https://cloud.tencent.com/document/api/845/110854) - * 新增入参:BatchIndexList - * 新增出参:MetricMapList +## 腾讯电子签(基础版)(essbasic) 版本:2021-05-26 -新增数据结构: +### 第 182 次发布 -* [MetricAllData](https://cloud.tencent.com/document/api/845/30634#MetricAllData) -* [MetricMapByIndexId](https://cloud.tencent.com/document/api/845/30634#MetricMapByIndexId) +发布时间:2024-09-11 01:42:03 +本次发布包含了以下内容: +改善已有的文档。 -## 腾讯电子签企业版(ess) 版本:2020-11-11 +新增接口: -### 第 186 次发布 +* [CreatePersonAuthCertificateImage](https://cloud.tencent.com/document/api/1420/110873) -发布时间:2024-09-10 01:35:59 + + +## 腾讯电子签(基础版)(essbasic) 版本:2020-12-22 + + + +## 云数据库 MariaDB(mariadb) 版本:2017-03-12 + +### 第 66 次发布 + +发布时间:2024-09-11 01:55:56 本次发布包含了以下内容: @@ -124,19 +196,21 @@ 新增接口: -* [DescribeOrganizationAuthStatus](https://cloud.tencent.com/document/api/1323/110844) +* [DescribeBackupConfigs](https://cloud.tencent.com/document/api/237/110875) +* [ModifyBackupConfigs](https://cloud.tencent.com/document/api/237/110874) 新增数据结构: -* [AuthRecord](https://cloud.tencent.com/document/api/1323/70369#AuthRecord) +* [BackupConfig](https://cloud.tencent.com/document/api/237/16191#BackupConfig) +* [NewBackupConfig](https://cloud.tencent.com/document/api/237/16191#NewBackupConfig) -## 云数据库 MariaDB(mariadb) 版本:2017-03-12 +## 文字识别(ocr) 版本:2018-11-19 -### 第 65 次发布 +### 第 149 次发布 -发布时间:2024-09-10 01:50:50 +发布时间:2024-09-11 02:01:34 本次发布包含了以下内容: @@ -144,26 +218,39 @@ 修改接口: -* [CreateAccount](https://cloud.tencent.com/document/api/237/16165) +* [PermitOCR](https://cloud.tencent.com/document/api/866/37074) - * 新增入参:EncryptedPassword + * 新增出参:Type - * **修改入参**:Password -* [ResetAccountPassword](https://cloud.tencent.com/document/api/237/16168) - * 新增入参:EncryptedPassword - * **修改入参**:Password +## 云数据库Redis(redis) 版本:2018-04-12 +### 第 81 次发布 +发布时间:2024-09-11 02:05:34 +本次发布包含了以下内容: -## 实时音视频(trtc) 版本:2019-07-22 +改善已有的文档。 -### 第 90 次发布 +新增接口: -发布时间:2024-09-10 02:18:51 +* [DescribeInstanceLogDelivery](https://cloud.tencent.com/document/api/239/110878) +* [ModifyInstanceLogDelivery](https://cloud.tencent.com/document/api/239/110877) + +新增数据结构: + +* [LogDeliveryInfo](https://cloud.tencent.com/document/api/239/20022#LogDeliveryInfo) + + + +## 边缘安全加速平台(teo) 版本:2022-09-01 + +### 第 84 次发布 + +发布时间:2024-09-11 02:18:47 本次发布包含了以下内容: @@ -171,18 +258,22 @@ 修改数据结构: -* [STTConfig](https://cloud.tencent.com/document/api/647/44055#STTConfig) +* [OriginDetail](https://cloud.tencent.com/document/api/1552/80721#OriginDetail) - * 新增成员:VadSilenceTime +* [OriginInfo](https://cloud.tencent.com/document/api/1552/80721#OriginInfo) -## 微服务引擎(tse) 版本:2020-12-07 +## 边缘安全加速平台(teo) 版本:2022-01-06 -### 第 76 次发布 -发布时间:2024-09-10 02:19:25 + +## 微服务平台 TSF(tsf) 版本:2018-03-26 + +### 第 113 次发布 + +发布时间:2024-09-11 02:25:39 本次发布包含了以下内容: @@ -190,17 +281,51 @@ 修改接口: -* [CreateCloudNativeAPIGatewayService](https://cloud.tencent.com/document/api/1364/94851) +* [CreateAllGatewayApiAsync](https://cloud.tencent.com/document/api/649/50642) - * **修改入参**:Path + * 新增入参:NamespaceId -* [ModifyCloudNativeAPIGatewayService](https://cloud.tencent.com/document/api/1364/94835) - * **修改入参**:Path +修改数据结构: + +* [ApiRateLimitRule](https://cloud.tencent.com/document/api/649/36099#ApiRateLimitRule) + + * 新增成员:Limit, Offset, AppId + +* [GatewayGroupApiVo](https://cloud.tencent.com/document/api/649/36099#GatewayGroupApiVo) + + * **修改成员**:ApiId, Path, MicroserviceName, Method, NamespaceName +## 向量数据库(vdb) 版本:2023-06-16 + +### 第 3 次发布 + +发布时间:2024-09-11 02:27:43 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [AssociateSecurityGroups](https://cloud.tencent.com/document/api/1709/110884) +* [DescribeDBSecurityGroups](https://cloud.tencent.com/document/api/1709/110883) +* [DescribeInstanceNodes](https://cloud.tencent.com/document/api/1709/110879) +* [DisassociateSecurityGroups](https://cloud.tencent.com/document/api/1709/110882) +* [ModifyDBInstanceSecurityGroups](https://cloud.tencent.com/document/api/1709/110881) + +新增数据结构: + +* [Inbound](https://cloud.tencent.com/document/api/1709/106757#Inbound) +* [NodeInfo](https://cloud.tencent.com/document/api/1709/106757#NodeInfo) +* [Outbound](https://cloud.tencent.com/document/api/1709/106757#Outbound) +* [SecurityGroup](https://cloud.tencent.com/document/api/1709/106757#SecurityGroup) + + + # 历次版本更新如下: ## 活动防刷(aa) 版本:2020-02-24 @@ -845,6 +970,33 @@ ## 大模型图像创作引擎(aiart) 版本:2022-12-29 +### 第 13 次发布 + +发布时间:2024-09-11 01:07:24 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[SketchToImage](https://cloud.tencent.com/document/api/1668/110863)](https://cloud.tencent.com/document/api/#/#) + +### 第 12 次发布 + +发布时间:2024-09-10 11:22:26 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [ImageToImage](https://cloud.tencent.com/document/api/1668/88066) + + * 新增入参:EnhanceImage, RestoreFace + + ### 第 11 次发布 发布时间:2024-08-12 01:08:02 @@ -24588,6 +24740,21 @@ ## 混沌演练平台(cfg) 版本:2021-08-20 +### 第 19 次发布 + +发布时间:2024-09-11 01:19:01 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [Task](https://cloud.tencent.com/document/api/1500/71784#Task) + + * 新增成员:TaskRegionName + + ### 第 18 次发布 发布时间:2024-09-03 01:21:59 @@ -27759,6 +27926,26 @@ ## 消息队列 CKafka 版(ckafka) 版本:2019-08-19 +### 第 108 次发布 + +发布时间:2024-09-11 01:20:54 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [ModifyInstanceAttributes](https://cloud.tencent.com/document/api/597/40832) + + +修改数据结构: + +* [OperateResponseData](https://cloud.tencent.com/document/api/597/40861#OperateResponseData) + + * **修改成员**:RouteDTO + + ### 第 107 次发布 发布时间:2024-09-02 01:21:22 @@ -40629,11 +40816,11 @@ 新增接口: -* [[ConvertOperatingSystems](https://cloud.tencent.com/document/api/213/110841)](https://cloud.tencent.com/document/api/#/#) +* [ConvertOperatingSystems](https://cloud.tencent.com/document/api/213/110841) 新增数据结构: -* [[TargetOS](https://cloud.tencent.com/document/api/213/15753#TargetOS)](https://cloud.tencent.com/document/api/213/15753#[TargetOS](https://cloud.tencent.com/document/api/213/15753#TargetOS)) +* [TargetOS](https://cloud.tencent.com/document/api/213/15753#TargetOS) ### 第 128 次发布 @@ -51825,6 +52012,24 @@ ## TDSQL MySQL 版(dcdb) 版本:2018-04-11 +### 第 73 次发布 + +发布时间:2024-09-11 01:32:35 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[DescribeBackupConfigs](https://cloud.tencent.com/document/api/557/110865)](https://cloud.tencent.com/document/api/#/#) +* [[ModifyBackupConfigs](https://cloud.tencent.com/document/api/557/110864)](https://cloud.tencent.com/document/api/#/#) + +新增数据结构: + +* [[BackupConfig](https://cloud.tencent.com/document/api/557/16142#BackupConfig)](https://cloud.tencent.com/document/api/557/16142#[BackupConfig](https://cloud.tencent.com/document/api/557/16142#BackupConfig)) +* [[NewBackupConfig](https://cloud.tencent.com/document/api/557/16142#NewBackupConfig)](https://cloud.tencent.com/document/api/557/16142#[NewBackupConfig](https://cloud.tencent.com/document/api/557/16142#NewBackupConfig)) + ### 第 72 次发布 发布时间:2024-09-10 01:27:35 @@ -53168,8 +53373,8 @@ 新增接口: -* [[DeleteTable](https://cloud.tencent.com/document/api/1342/110842)](https://cloud.tencent.com/document/api/#/#) -* [[QueryInternalTableWarehouse](https://cloud.tencent.com/document/api/1342/110843)](https://cloud.tencent.com/document/api/#/#) +* [DeleteTable](https://cloud.tencent.com/document/api/1342/110842) +* [QueryInternalTableWarehouse](https://cloud.tencent.com/document/api/1342/110843) ### 第 101 次发布 @@ -55354,6 +55559,22 @@ ## DNSPod(dnspod) 版本:2021-03-23 +### 第 33 次发布 + +发布时间:2024-09-11 01:34:34 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[DescribeDomainShareUserList](https://cloud.tencent.com/document/api/1427/110866)](https://cloud.tencent.com/document/api/#/#) + +新增数据结构: + +* [[DomainShareUserInfo](https://cloud.tencent.com/document/api/1427/56185#DomainShareUserInfo)](https://cloud.tencent.com/document/api/1427/56185#[DomainShareUserInfo](https://cloud.tencent.com/document/api/1427/56185#DomainShareUserInfo)) + ### 第 32 次发布 发布时间:2024-07-11 01:14:33 @@ -61871,6 +62092,34 @@ ## 弹性 MapReduce(emr) 版本:2019-01-03 +### 第 76 次发布 + +发布时间:2024-09-11 01:39:43 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[CreateSLInstance](https://cloud.tencent.com/document/api/589/110872)](https://cloud.tencent.com/document/api/#/#) +* [[DescribeSLInstance](https://cloud.tencent.com/document/api/589/110871)](https://cloud.tencent.com/document/api/#/#) +* [[DescribeSLInstanceList](https://cloud.tencent.com/document/api/589/110870)](https://cloud.tencent.com/document/api/#/#) +* [[ModifySLInstance](https://cloud.tencent.com/document/api/589/110869)](https://cloud.tencent.com/document/api/#/#) +* [[TerminateSLInstance](https://cloud.tencent.com/document/api/589/110868)](https://cloud.tencent.com/document/api/#/#) + +修改接口: + +* [ModifyAutoRenewFlag](https://cloud.tencent.com/document/api/589/110534) + + * 新增入参:ComputeResourceId + + +新增数据结构: + +* [[SLInstanceInfo](https://cloud.tencent.com/document/api/589/33981#SLInstanceInfo)](https://cloud.tencent.com/document/api/589/33981#[SLInstanceInfo](https://cloud.tencent.com/document/api/589/33981#SLInstanceInfo)) +* [[ZoneSetting](https://cloud.tencent.com/document/api/589/33981#ZoneSetting)](https://cloud.tencent.com/document/api/589/33981#[ZoneSetting](https://cloud.tencent.com/document/api/589/33981#ZoneSetting)) + ### 第 75 次发布 发布时间:2024-09-09 11:32:30 @@ -61881,13 +62130,13 @@ 新增接口: -* [[DescribeResourceScheduleDiffDetail](https://cloud.tencent.com/document/api/589/110834)](https://cloud.tencent.com/document/api/#/#) +* [DescribeResourceScheduleDiffDetail](https://cloud.tencent.com/document/api/589/110834) 新增数据结构: -* [[DiffDetail](https://cloud.tencent.com/document/api/589/33981#DiffDetail)](https://cloud.tencent.com/document/api/589/33981#[DiffDetail](https://cloud.tencent.com/document/api/589/33981#DiffDetail)) -* [[DiffDetailItem](https://cloud.tencent.com/document/api/589/33981#DiffDetailItem)](https://cloud.tencent.com/document/api/589/33981#[DiffDetailItem](https://cloud.tencent.com/document/api/589/33981#DiffDetailItem)) -* [[DiffHeader](https://cloud.tencent.com/document/api/589/33981#DiffHeader)](https://cloud.tencent.com/document/api/589/33981#[DiffHeader](https://cloud.tencent.com/document/api/589/33981#DiffHeader)) +* [DiffDetail](https://cloud.tencent.com/document/api/589/33981#DiffDetail) +* [DiffDetailItem](https://cloud.tencent.com/document/api/589/33981#DiffDetailItem) +* [DiffHeader](https://cloud.tencent.com/document/api/589/33981#DiffHeader) ### 第 74 次发布 @@ -63627,6 +63876,18 @@ ## Elasticsearch Service(es) 版本:2018-04-16 +### 第 69 次发布 + +发布时间:2024-09-10 15:12:32 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[DescribeSpaceKibanaTools](https://cloud.tencent.com/document/api/845/110854)](https://cloud.tencent.com/document/api/#/#) + ### 第 68 次发布 发布时间:2024-09-10 01:35:22 @@ -63646,8 +63907,8 @@ 新增数据结构: -* [[MetricAllData](https://cloud.tencent.com/document/api/845/30634#MetricAllData)](https://cloud.tencent.com/document/api/845/30634#[MetricAllData](https://cloud.tencent.com/document/api/845/30634#MetricAllData)) -* [[MetricMapByIndexId](https://cloud.tencent.com/document/api/845/30634#MetricMapByIndexId)](https://cloud.tencent.com/document/api/845/30634#[MetricMapByIndexId](https://cloud.tencent.com/document/api/845/30634#MetricMapByIndexId)) +* [MetricAllData](https://cloud.tencent.com/document/api/845/30634#MetricAllData) +* [MetricMapByIndexId](https://cloud.tencent.com/document/api/845/30634#MetricMapByIndexId) ### 第 67 次发布 @@ -65144,11 +65405,11 @@ 新增接口: -* [[DescribeOrganizationAuthStatus](https://cloud.tencent.com/document/api/1323/110844)](https://cloud.tencent.com/document/api/#/#) +* [DescribeOrganizationAuthStatus](https://cloud.tencent.com/document/api/1323/110844) 新增数据结构: -* [[AuthRecord](https://cloud.tencent.com/document/api/1323/70369#AuthRecord)](https://cloud.tencent.com/document/api/1323/70369#[AuthRecord](https://cloud.tencent.com/document/api/1323/70369#AuthRecord)) +* [AuthRecord](https://cloud.tencent.com/document/api/1323/70369#AuthRecord) ### 第 185 次发布 @@ -68662,6 +68923,18 @@ ## 腾讯电子签(基础版)(essbasic) 版本:2021-05-26 +### 第 182 次发布 + +发布时间:2024-09-11 01:42:03 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[CreatePersonAuthCertificateImage](https://cloud.tencent.com/document/api/1420/110873)](https://cloud.tencent.com/document/api/#/#) + ### 第 181 次发布 发布时间:2024-09-03 01:49:10 @@ -91838,6 +92111,24 @@ ## 云数据库 MariaDB(mariadb) 版本:2017-03-12 +### 第 66 次发布 + +发布时间:2024-09-11 01:55:56 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[DescribeBackupConfigs](https://cloud.tencent.com/document/api/237/110875)](https://cloud.tencent.com/document/api/#/#) +* [[ModifyBackupConfigs](https://cloud.tencent.com/document/api/237/110874)](https://cloud.tencent.com/document/api/#/#) + +新增数据结构: + +* [[BackupConfig](https://cloud.tencent.com/document/api/237/16191#BackupConfig)](https://cloud.tencent.com/document/api/237/16191#[BackupConfig](https://cloud.tencent.com/document/api/237/16191#BackupConfig)) +* [[NewBackupConfig](https://cloud.tencent.com/document/api/237/16191#NewBackupConfig)](https://cloud.tencent.com/document/api/237/16191#[NewBackupConfig](https://cloud.tencent.com/document/api/237/16191#NewBackupConfig)) + ### 第 65 次发布 发布时间:2024-09-10 01:50:50 @@ -103489,6 +103780,21 @@ ## 文字识别(ocr) 版本:2018-11-19 +### 第 149 次发布 + +发布时间:2024-09-11 02:01:34 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [PermitOCR](https://cloud.tencent.com/document/api/866/37074) + + * 新增出参:Type + + ### 第 148 次发布 发布时间:2024-08-30 01:56:46 @@ -110041,6 +110347,23 @@ ## 云数据库Redis(redis) 版本:2018-04-12 +### 第 81 次发布 + +发布时间:2024-09-11 02:05:34 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[DescribeInstanceLogDelivery](https://cloud.tencent.com/document/api/239/110878)](https://cloud.tencent.com/document/api/#/#) +* [[ModifyInstanceLogDelivery](https://cloud.tencent.com/document/api/239/110877)](https://cloud.tencent.com/document/api/#/#) + +新增数据结构: + +* [[LogDeliveryInfo](https://cloud.tencent.com/document/api/239/20022#LogDeliveryInfo)](https://cloud.tencent.com/document/api/239/20022#[LogDeliveryInfo](https://cloud.tencent.com/document/api/239/20022#LogDeliveryInfo)) + ### 第 80 次发布 发布时间:2024-08-02 02:00:28 @@ -132928,6 +133251,21 @@ ## 边缘安全加速平台(teo) 版本:2022-09-01 +### 第 84 次发布 + +发布时间:2024-09-11 02:18:47 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [OriginDetail](https://cloud.tencent.com/document/api/1552/80721#OriginDetail) + +* [OriginInfo](https://cloud.tencent.com/document/api/1552/80721#OriginInfo) + + ### 第 83 次发布 发布时间:2024-07-03 01:25:21 @@ -148615,6 +148953,32 @@ ## 微服务平台 TSF(tsf) 版本:2018-03-26 +### 第 113 次发布 + +发布时间:2024-09-11 02:25:39 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [CreateAllGatewayApiAsync](https://cloud.tencent.com/document/api/649/50642) + + * 新增入参:NamespaceId + + +修改数据结构: + +* [ApiRateLimitRule](https://cloud.tencent.com/document/api/649/36099#ApiRateLimitRule) + + * 新增成员:Limit, Offset, AppId + +* [GatewayGroupApiVo](https://cloud.tencent.com/document/api/649/36099#GatewayGroupApiVo) + + * **修改成员**:ApiId, Path, MicroserviceName, Method, NamespaceName + + ### 第 112 次发布 发布时间:2024-07-30 11:37:37 @@ -151999,6 +152363,29 @@ ## 向量数据库(vdb) 版本:2023-06-16 +### 第 3 次发布 + +发布时间:2024-09-11 02:27:43 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[AssociateSecurityGroups](https://cloud.tencent.com/document/api/1709/110884)](https://cloud.tencent.com/document/api/#/#) +* [[DescribeDBSecurityGroups](https://cloud.tencent.com/document/api/1709/110883)](https://cloud.tencent.com/document/api/#/#) +* [[DescribeInstanceNodes](https://cloud.tencent.com/document/api/1709/110879)](https://cloud.tencent.com/document/api/#/#) +* [[DisassociateSecurityGroups](https://cloud.tencent.com/document/api/1709/110882)](https://cloud.tencent.com/document/api/#/#) +* [[ModifyDBInstanceSecurityGroups](https://cloud.tencent.com/document/api/1709/110881)](https://cloud.tencent.com/document/api/#/#) + +新增数据结构: + +* [[Inbound](https://cloud.tencent.com/document/api/1709/106757#Inbound)](https://cloud.tencent.com/document/api/1709/106757#[Inbound](https://cloud.tencent.com/document/api/1709/106757#Inbound)) +* [[NodeInfo](https://cloud.tencent.com/document/api/1709/106757#NodeInfo)](https://cloud.tencent.com/document/api/1709/106757#[NodeInfo](https://cloud.tencent.com/document/api/1709/106757#NodeInfo)) +* [[Outbound](https://cloud.tencent.com/document/api/1709/106757#Outbound)](https://cloud.tencent.com/document/api/1709/106757#[Outbound](https://cloud.tencent.com/document/api/1709/106757#Outbound)) +* [[SecurityGroup](https://cloud.tencent.com/document/api/1709/106757#SecurityGroup)](https://cloud.tencent.com/document/api/1709/106757#[SecurityGroup](https://cloud.tencent.com/document/api/1709/106757#SecurityGroup)) + ### 第 2 次发布 发布时间:2024-06-28 01:22:56 diff --git a/products.md b/products.md index 766815fee5..34f88f7de0 100644 --- a/products.md +++ b/products.md @@ -6,7 +6,7 @@ | advisor | [云顾问](https://cloud.tencent.com/document/product/1264) | 2024-03-20 01:07:31 | | af | [借贷反欺诈](https://cloud.tencent.com/document/product/668) | 2024-05-31 01:07:20 | | afc | [定制建模](https://cloud.tencent.com/document/product/1029) | 2024-05-31 01:07:25 | -| aiart | [大模型图像创作引擎](https://cloud.tencent.com/document/product/1668) | 2024-08-13 01:03:11 | +| aiart | [大模型图像创作引擎](https://cloud.tencent.com/document/product/1668) | 2024-09-11 01:07:24 | | ame | [正版曲库直通车](https://cloud.tencent.com/document/product/1155) | 2023-08-17 01:06:14 | | ams | [音频内容安全](https://cloud.tencent.com/document/product/1219) | 2024-09-03 01:07:31 | | anicloud | [动效素材服务](https://cloud.tencent.com/document/product/1641) | 2023-05-18 01:01:53 | @@ -15,7 +15,7 @@ | ape | [正版图库直通车](https://cloud.tencent.com/document/product/1181) | 2022-04-04 06:05:40 | | api | [云 API](https://cloud.tencent.com/document/product/1278) | 2023-01-05 01:02:52 | | apigateway | [API 网关](https://cloud.tencent.com/document/product/628) | 2024-08-27 22:32:44 | -| apm | [应用性能监控](https://cloud.tencent.com/document/product/1463) | 2024-07-31 01:04:59 | +| apm | [应用性能监控](https://cloud.tencent.com/document/product/1463) | 2024-09-11 01:09:20 | | as | [弹性伸缩](https://cloud.tencent.com/document/product/377) | 2024-08-28 01:05:22 | | asr | [语音识别](https://cloud.tencent.com/document/product/1093) | 2024-09-02 01:09:58 | | asw | [应用与服务编排工作流](https://cloud.tencent.com/document/product/1272) | 2023-05-18 01:04:02 | @@ -23,7 +23,7 @@ | batch | [批量计算](https://cloud.tencent.com/document/product/599) | 2024-08-29 01:10:22 | | bda | [人体分析](https://cloud.tencent.com/document/product/1208) | 2024-03-20 01:08:23 | | bi | [商业智能分析 BI](https://cloud.tencent.com/document/product/590) | 2024-09-05 01:05:48 | -| billing | [费用中心](https://cloud.tencent.com/document/product/555) | 2024-08-29 01:11:13 | +| billing | [费用中心](https://cloud.tencent.com/document/product/555) | 2024-09-11 01:11:08 | | bizlive | [商业直播](https://cloud.tencent.com/document/product) | 2020-03-10 01:08:07 | | bm | [黑石物理服务器CPM](https://cloud.tencent.com/document/product/386) | 2024-03-20 01:08:40 | | bma | [品牌经营管家](https://cloud.tencent.com/document/product/1296) | 2024-04-24 01:05:22 | @@ -48,7 +48,7 @@ | cdwdoris | [腾讯云数据仓库 TCHouse-D](https://cloud.tencent.com/document/product/1387) | 2024-09-04 01:13:34 | | cdwpg | [云数据仓库 PostgreSQL](https://cloud.tencent.com/document/product/878) | 2024-03-28 01:10:53 | | cdz | [专属可用区](https://cloud.tencent.com/document/product/1629) | 2024-08-28 01:17:24 | -| cfg | [混沌演练平台](https://cloud.tencent.com/document/product/1500) | 2024-09-03 01:21:59 | +| cfg | [混沌演练平台](https://cloud.tencent.com/document/product/1500) | 2024-09-11 01:19:01 | | cfs | [文件存储](https://cloud.tencent.com/document/product/582) | 2024-08-28 01:17:42 | | cfw | [云防火墙](https://cloud.tencent.com/document/product/1132) | 2024-09-09 01:19:11 | | chdfs | [云 HDFS](https://cloud.tencent.com/document/product/1105) | 2024-03-20 01:10:55 | @@ -56,7 +56,7 @@ | cii | [智能保险助手](https://cloud.tencent.com/document/product/1368) | 2023-05-18 01:12:07 | | cim | [](https://cloud.tencent.com/document/product) | 2019-05-16 17:21:18 | | cis | [](https://cloud.tencent.com/document/product) | 2018-06-07 15:01:42 | -| ckafka | [消息队列 CKafka 版](https://cloud.tencent.com/document/product/597) | 2024-09-02 01:21:22 | +| ckafka | [消息队列 CKafka 版](https://cloud.tencent.com/document/product/597) | 2024-09-11 01:20:54 | | clb | [负载均衡](https://cloud.tencent.com/document/product/214) | 2024-09-03 01:25:28 | | cloudapp | [云应用](https://cloud.tencent.com/document/product/1689) | 2024-07-18 10:12:45 | | cloudaudit | [操作审计](https://cloud.tencent.com/document/product/629) | 2024-01-15 01:09:37 | @@ -82,9 +82,9 @@ | dbbrain | [数据库智能管家 DBbrain](https://cloud.tencent.com/document/product/1130) | 2024-09-03 01:38:02 | | dbdc | [云数据库独享集群](https://cloud.tencent.com/document/product/1322) | 2024-07-08 01:12:54 | | dc | [专线接入](https://cloud.tencent.com/document/product/216) | 2024-09-10 01:27:21 | -| dcdb | [TDSQL MySQL 版](https://cloud.tencent.com/document/product/557) | 2024-09-10 01:27:35 | +| dcdb | [TDSQL MySQL 版](https://cloud.tencent.com/document/product/557) | 2024-09-11 01:32:35 | | dlc | [数据湖计算 DLC](https://cloud.tencent.com/document/product/1342) | 2024-09-10 01:28:17 | -| dnspod | [DNSPod](https://cloud.tencent.com/document/product/1427) | 2024-08-21 01:31:30 | +| dnspod | [DNSPod](https://cloud.tencent.com/document/product/1427) | 2024-09-11 01:34:34 | | domain | [域名注册](https://cloud.tencent.com/document/product/242) | 2024-07-31 01:30:16 | | drm | [数字版权管理](https://cloud.tencent.com/document/product/1000) | 2024-07-12 01:14:44 | | ds | [文档服务](https://cloud.tencent.com/document/product/869) | 2024-03-20 01:15:13 | @@ -97,11 +97,11 @@ | ecm | [边缘计算机器](https://cloud.tencent.com/document/product/1108) | 2024-08-20 01:35:54 | | eiam | [数字身份管控平台(员工版)](https://cloud.tencent.com/document/product/1442) | 2024-06-25 01:14:34 | | eis | [数据连接器](https://cloud.tencent.com/document/product/1270) | 2023-08-10 01:17:44 | -| emr | [弹性 MapReduce](https://cloud.tencent.com/document/product/589) | 2024-09-10 01:34:43 | -| es | [Elasticsearch Service](https://cloud.tencent.com/document/product/845) | 2024-09-10 01:35:22 | -| ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2024-09-10 01:35:59 | -| essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2024-09-03 01:49:10 | -| facefusion | [人脸融合](https://cloud.tencent.com/document/product/670) | 2024-09-06 01:38:13 | +| emr | [弹性 MapReduce](https://cloud.tencent.com/document/product/589) | 2024-09-11 01:39:43 | +| es | [Elasticsearch Service](https://cloud.tencent.com/document/product/845) | 2024-09-10 15:12:32 | +| ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2024-09-11 01:41:06 | +| essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2024-09-11 01:42:03 | +| facefusion | [人脸融合](https://cloud.tencent.com/document/product/670) | 2024-09-11 01:42:57 | | faceid | [人脸核身](https://cloud.tencent.com/document/product/1007) | 2024-08-28 01:46:34 | | fmu | [人脸试妆](https://cloud.tencent.com/document/product/1172) | 2024-07-05 01:10:44 | | ft | [人像变换](https://cloud.tencent.com/document/product/1202) | 2024-03-20 01:17:13 | @@ -131,7 +131,7 @@ | iotvideo | [物联网智能视频服务](https://cloud.tencent.com/document/product/1131) | 2024-07-08 01:16:48 | | iotvideoindustry | [物联网智能视频服务(行业版)](https://cloud.tencent.com/document/product/1361) | 2024-03-20 01:18:54 | | irp | [智能推荐平台](https://cloud.tencent.com/document/product/1541) | 2024-03-20 01:19:05 | -| iss | [智能视图计算平台](https://cloud.tencent.com/document/product/1344) | 2024-09-10 01:45:57 | +| iss | [智能视图计算平台](https://cloud.tencent.com/document/product/1344) | 2024-09-11 01:51:03 | | ivld | [媒体智能标签](https://cloud.tencent.com/document/product/1509) | 2024-07-09 14:27:21 | | keewidb | [云数据库 KeeWiDB](https://cloud.tencent.com/document/product/1520) | 2024-03-20 01:19:20 | | kms | [密钥管理系统](https://cloud.tencent.com/document/product/573) | 2024-04-17 01:17:16 | @@ -142,7 +142,7 @@ | lowcode | [云开发低码](https://cloud.tencent.com/document/product/1301) | 2022-04-04 06:56:51 | | lp | [登录保护](https://cloud.tencent.com/document/product/1190) | 2022-04-04 06:56:52 | | mall | [商场客留大数据](https://cloud.tencent.com/document/product/1707) | 2024-03-20 01:20:11 | -| mariadb | [云数据库 MariaDB](https://cloud.tencent.com/document/product/237) | 2024-09-10 01:50:50 | +| mariadb | [云数据库 MariaDB](https://cloud.tencent.com/document/product/237) | 2024-09-11 01:55:56 | | market | [云市场](https://cloud.tencent.com/document/product/306) | 2024-03-20 01:20:21 | | memcached | [云数据库Memcached](https://cloud.tencent.com/document/product/241) | 2024-08-28 02:03:45 | | mgobe | [游戏联机对战引擎](https://cloud.tencent.com/document/product/1038) | 2022-07-08 06:11:32 | @@ -158,7 +158,7 @@ | nlp | [NLP 服务](https://cloud.tencent.com/document/product/271) | 2024-05-07 01:22:11 | | npp | [号码保护](https://cloud.tencent.com/document/product) | 2020-04-22 08:00:22 | | oceanus | [流计算 Oceanus](https://cloud.tencent.com/document/product/849) | 2024-09-04 01:54:37 | -| ocr | [文字识别](https://cloud.tencent.com/document/product/866) | 2024-09-10 01:56:25 | +| ocr | [文字识别](https://cloud.tencent.com/document/product/866) | 2024-09-11 02:01:34 | | omics | [腾讯健康组学平台](https://cloud.tencent.com/document/product/1643) | 2024-06-13 02:11:33 | | organization | [集团账号管理](https://cloud.tencent.com/document/product/850) | 2024-08-28 02:12:13 | | partners | [渠道合作伙伴](https://cloud.tencent.com/document/product/563) | 2024-06-26 01:21:35 | @@ -167,7 +167,7 @@ | privatedns | [私有域解析 Private DNS](https://cloud.tencent.com/document/product/1338) | 2024-08-28 02:14:34 | | pts | [云压测](https://cloud.tencent.com/document/product/1484) | 2024-08-09 02:01:53 | | rce | [全栈式风控引擎](https://cloud.tencent.com/document/product/1343) | 2024-09-10 02:00:15 | -| redis | [云数据库Redis](https://cloud.tencent.com/document/product/239) | 2024-09-05 01:59:56 | +| redis | [云数据库Redis](https://cloud.tencent.com/document/product/239) | 2024-09-11 02:05:34 | | region | [地域管理系统](https://cloud.tencent.com/document/product/1596) | 2024-08-28 02:16:37 | | rkp | [风险探针](https://cloud.tencent.com/document/product/1169) | 2023-12-25 00:16:39 | | rp | [注册保护](https://cloud.tencent.com/document/product/1191) | 2022-04-04 07:04:06 | @@ -209,7 +209,7 @@ | tdmq | [消息队列 TDMQ](https://cloud.tencent.com/document/product/1179) | 2024-09-05 02:11:14 | | tds | [设备安全](https://cloud.tencent.com/document/product/1628) | 2024-08-07 02:22:38 | | tem | [弹性微服务](https://cloud.tencent.com/document/product/1371) | 2024-07-24 02:14:59 | -| teo | [边缘安全加速平台](https://cloud.tencent.com/document/product/1552) | 2024-09-09 02:17:49 | +| teo | [边缘安全加速平台](https://cloud.tencent.com/document/product/1552) | 2024-09-11 02:18:47 | | thpc | [高性能计算平台](https://cloud.tencent.com/document/product/1527) | 2024-09-05 02:14:49 | | tia | [智能钛机器学习](https://cloud.tencent.com/document/product/851) | 2021-10-21 11:12:52 | | tic | [资源编排 TIC](https://cloud.tencent.com/document/product/1213) | 2023-08-17 05:26:08 | @@ -230,18 +230,18 @@ | trro | [远程实时操控](https://cloud.tencent.com/document/product/1584) | 2024-07-31 02:17:29 | | trtc | [实时音视频](https://cloud.tencent.com/document/product/647) | 2024-09-10 02:18:51 | | tse | [微服务引擎](https://cloud.tencent.com/document/product/1364) | 2024-09-10 02:19:25 | -| tsf | [微服务平台 TSF](https://cloud.tencent.com/document/product/649) | 2024-07-30 11:37:37 | +| tsf | [微服务平台 TSF](https://cloud.tencent.com/document/product/649) | 2024-09-11 02:25:39 | | tsi | [腾讯同传系统](https://cloud.tencent.com/document/product/1399) | 2024-08-02 02:22:13 | | tsw | [微服务观测平台 TSW](https://cloud.tencent.com/document/product/1311) | 2024-03-20 01:30:06 | | tts | [语音合成](https://cloud.tencent.com/document/product/1073) | 2024-08-21 02:26:53 | | ump | [客流数字化平台](https://cloud.tencent.com/document/product/1320) | 2024-03-20 01:30:08 | | vcg | [视频生成](https://cloud.tencent.com/document/product/1770) | 2024-06-06 02:47:17 | | vclm | [大模型视频创作引擎](https://cloud.tencent.com/document/product/1616) | 2024-09-10 02:22:16 | -| vdb | [向量数据库](https://cloud.tencent.com/document/product/1709) | 2024-08-15 02:35:35 | +| vdb | [向量数据库](https://cloud.tencent.com/document/product/1709) | 2024-09-11 02:27:43 | | vm | [视频内容安全](https://cloud.tencent.com/document/product/1265) | 2024-07-26 02:26:34 | | vms | [语音消息](https://cloud.tencent.com/document/product/1128) | 2024-03-20 01:30:13 | | vod | [云点播](https://cloud.tencent.com/document/product/266) | 2024-09-10 02:22:41 | -| vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2024-09-10 02:24:41 | +| vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2024-09-11 02:30:07 | | vrs | [声音复刻](https://cloud.tencent.com/document/product/1283) | 2024-09-06 02:27:27 | | vtc | [视频转译](https://cloud.tencent.com/document/product/1769) | 2024-09-10 02:27:11 | | waf | [Web 应用防火墙](https://cloud.tencent.com/document/product/627) | 2024-09-09 02:31:32 | diff --git a/pyproject.toml b/pyproject.toml index 2717cc15ff..f2a36f5bb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ exclude = ["tccli/examples"] [project] name = "tccli" -version = "3.0.1188.1" +version = "3.0.1189.1" authors = [ { name="tencentcloudapi", email="tencentcloudapi@tencent.com" }, ] @@ -24,7 +24,7 @@ classifiers = [ dependencies = [ "jmespath==0.10.0", "six==1.16.0", - "tencentcloud-sdk-python>=3.0.1188", + "tencentcloud-sdk-python>=3.0.1189", ] [project.urls] diff --git a/tccli/__init__.py b/tccli/__init__.py index 08eb3ad3e2..8092b892f9 100644 --- a/tccli/__init__.py +++ b/tccli/__init__.py @@ -1 +1 @@ -__version__ = '3.0.1188.1' +__version__ = '3.0.1189.1' diff --git a/tccli/examples/aiart/v20221229/SketchToImage.md b/tccli/examples/aiart/v20221229/SketchToImage.md new file mode 100644 index 0000000000..e5ba6036be --- /dev/null +++ b/tccli/examples/aiart/v20221229/SketchToImage.md @@ -0,0 +1,23 @@ +**Example 1: 成功调用并生成图片** + +成功调用并生成图片 + +Input: + +``` +tccli aiart SketchToImage --cli-unfold-argument \ + --InputUrl https://xxx.com/test.jpg \ + --Prompt backpack,real picture quality, fabric texture, fine, cartoon \ + --RspImgType url +``` + +Output: +``` +{ + "Response": { + "RequestId": "0d0728ed-f777-4861-aa4b-5a6167daa0b6", + "ResultImage": "https://result.jpg" + } +} +``` + diff --git a/tccli/examples/billing/v20180709/DescribeVoucherUsageDetails.md b/tccli/examples/billing/v20180709/DescribeVoucherUsageDetails.md index 536815d8b6..b7cae84c74 100644 --- a/tccli/examples/billing/v20180709/DescribeVoucherUsageDetails.md +++ b/tccli/examples/billing/v20180709/DescribeVoucherUsageDetails.md @@ -16,21 +16,121 @@ Output: ``` { "Response": { - "TotalCount": "1", - "TotalUsedAmount": 18000000000, + "RequestId": "9168e8fe-ed79-4726-9ced-29033e5a7011", + "TotalCount": 5, + "TotalUsedAmount": 5000000, "UsageRecords": [ { - "UsedAmount": 18000000000, - "UsedTime": "2021-01-01 00:00:00", + "PayMode": "prepay", + "PayScene": "", + "SeqId": "20240212840001259973831114", "UsageDetails": [ { - "ProductName": "轻量应用服务器", - "SubProductName": "轻量应用服务器 (通用型-2核2G-50G-500G)" + "Action": "purchase", + "BillingItemCode": "", + "CalcUnit": "", + "ProductCode": "p_cvm", + "ProductEnName": "Cloud Virtual Machine(CVM)", + "ProductName": "云服务器CVM", + "SubBillingItemCode": "", + "SubProductCode": "sp_cvm_s2", + "SubProductEnName": "CVM Standard S2", + "SubProductName": "云服务器CVM-标准型S2" } - ] + ], + "UsedAmount": 1000000, + "UsedTime": "2024-02-12 15:54:56", + "VoucherId": "WFRCNWBQBHNYJTZ3XLGE3T" + }, + { + "PayMode": "postpay", + "PayScene": null, + "SeqId": "20240212799000283860282006", + "UsageDetails": [ + { + "Action": "", + "BillingItemCode": "", + "CalcUnit": "1", + "ProductCode": "p_ccn", + "ProductEnName": "Cloud Connect Network", + "ProductName": "云联网CCN", + "SubBillingItemCode": "", + "SubProductCode": "sp_ccn_connecting_instance", + "SubProductEnName": "Cloud Connect Network-connecting-instance", + "SubProductName": "云联网网络连接实例费" + } + ], + "UsedAmount": 1000000, + "UsedTime": "2024-02-12 15:53:33", + "VoucherId": "WFRCNWBQBHNYJTZ3XLGE3T" + }, + { + "PayMode": "postpay", + "PayScene": null, + "SeqId": "20240212799000283860282005", + "UsageDetails": [ + { + "Action": "", + "BillingItemCode": "", + "CalcUnit": "1", + "ProductCode": "p_ccn", + "ProductEnName": "Cloud Connect Network", + "ProductName": "云联网CCN", + "SubBillingItemCode": "", + "SubProductCode": "sp_ccn_connecting_instance", + "SubProductEnName": "Cloud Connect Network-connecting-instance", + "SubProductName": "云联网网络连接实例费" + } + ], + "UsedAmount": 1000000, + "UsedTime": "2024-02-12 15:36:54", + "VoucherId": "WFRCNWBQBHNYJTZ3XLGE3T" + }, + { + "PayMode": "prepay", + "PayScene": "", + "SeqId": "20240212840001259973831111", + "UsageDetails": [ + { + "Action": "purchase", + "BillingItemCode": "", + "CalcUnit": "", + "ProductCode": "p_cvm", + "ProductEnName": "Cloud Virtual Machine(CVM)", + "ProductName": "云服务器CVM", + "SubBillingItemCode": "", + "SubProductCode": "sp_cvm_s2", + "SubProductEnName": "CVM Standard S2", + "SubProductName": "云服务器CVM-标准型S2" + } + ], + "UsedAmount": 1000000, + "UsedTime": "2024-02-12 15:15:49", + "VoucherId": "WFRCNWBQBHNYJTZ3XLGE3T" + }, + { + "PayMode": "prepay", + "PayScene": "", + "SeqId": "20240212840001259973831109", + "UsageDetails": [ + { + "Action": "purchase", + "BillingItemCode": "", + "CalcUnit": "", + "ProductCode": "p_cvm", + "ProductEnName": "Cloud Virtual Machine(CVM)", + "ProductName": "云服务器CVM", + "SubBillingItemCode": "", + "SubProductCode": "sp_cvm_s2", + "SubProductEnName": "CVM Standard S2", + "SubProductName": "云服务器CVM-标准型S2" + } + ], + "UsedAmount": 1000000, + "UsedTime": "2024-02-12 15:14:18", + "VoucherId": "WFRCNWBQBHNYJTZ3XLGE3T" } - ], - "RequestId": "76cf663e-f683-41b9-b44d-849123783bf4" + ] } } ``` diff --git a/tccli/examples/dcdb/v20180411/DescribeBackupConfigs.md b/tccli/examples/dcdb/v20180411/DescribeBackupConfigs.md new file mode 100644 index 0000000000..1910a1f740 --- /dev/null +++ b/tccli/examples/dcdb/v20180411/DescribeBackupConfigs.md @@ -0,0 +1,81 @@ +**Example 1: 示例** + +获取超期备份策略 + +Input: + +``` +tccli dcdb DescribeBackupConfigs --cli-unfold-argument \ + --InstanceId tdsqlshard-6cmpk1rd +``` + +Output: +``` +{ + "Response": { + "Days": 30, + "StartBackupTime": "03:00", + "EndBackupTime": "05:00", + "WeekDays": [ + "Monday", + "Sunday" + ], + "ArchiveDays": 91, + "BackupConfigSet": [ + { + "BackupCount": 1, + "BeginDate": "2023-06-08", + "EnableBackupPolicy": true, + "Frequency": "monthly", + "MaxRetentionDays": 365, + "WeekDays": [] + } + ], + "InstanceId": "tdsqlshard-6cmpk1rd", + "RequestId": "827d5b16-d464-4f43-af92-06c63d25375e" + } +} +``` + +**Example 2: 示例1** + +示例1 + +Input: + +``` +tccli dcdb DescribeBackupConfigs --cli-unfold-argument \ + --InstanceId tdsqlshard-2500dqmh +``` + +Output: +``` +{ + "Response": { + "Days": 30, + "StartBackupTime": "03:00", + "EndBackupTime": "05:00", + "WeekDays": [ + "Monday", + "Sunday" + ], + "ArchiveDays": 91, + "BackupConfigSet": [ + { + "BackupCount": 0, + "BeginDate": "2023-07-20", + "EnableBackupPolicy": true, + "Frequency": "weekly", + "MaxRetentionDays": 100, + "WeekDays": [ + "Monday", + "Tuesday" + ] + } + ], + "InstanceId": "tdsqlshard-2500dqmh", + "RequestId": "c4712e5d-78f3-4899-b8f4-0b6af5a17b77" + } +} +``` + diff --git a/tccli/examples/dcdb/v20180411/ModifyBackupConfigs.md b/tccli/examples/dcdb/v20180411/ModifyBackupConfigs.md new file mode 100644 index 0000000000..e34f907521 --- /dev/null +++ b/tccli/examples/dcdb/v20180411/ModifyBackupConfigs.md @@ -0,0 +1,50 @@ +**Example 1: 示例** + +近一年每个月保留一个备份 + +Input: + +``` +tccli dcdb ModifyBackupConfigs --cli-unfold-argument \ + --InstanceId tdsqlshard-6cmpk1rd \ + --BackupConfigSet.0.EnableBackupPolicy True \ + --BackupConfigSet.0.BeginDate 2023-06-08 \ + --BackupConfigSet.0.MaxRetentionDays 365 \ + --BackupConfigSet.0.Frequency monthly \ + --BackupConfigSet.0.BackupCount 1 +``` + +Output: +``` +{ + "Response": { + "RequestId": "a0495e38-cd59-420c-8f09-893207d28955" + } +} +``` + +**Example 2: 示例1** + +按周保留备份 + +Input: + +``` +tccli dcdb ModifyBackupConfigs --cli-unfold-argument \ + --InstanceId tdsqlshard-2500dqmh \ + --BackupConfigSet.0.EnableBackupPolicy True \ + --BackupConfigSet.0.BeginDate 2023-07-20 \ + --BackupConfigSet.0.MaxRetentionDays 100 \ + --BackupConfigSet.0.Frequency weekly \ + --BackupConfigSet.0.WeekDays Monday Tuesday +``` + +Output: +``` +{ + "Response": { + "RequestId": "45b034f3-1ace-45c7-b49e-1fca45f89d9e" + } +} +``` + diff --git a/tccli/examples/dnspod/v20210323/DescribeDomainShareUserList.md b/tccli/examples/dnspod/v20210323/DescribeDomainShareUserList.md new file mode 100644 index 0000000000..c32220d5ea --- /dev/null +++ b/tccli/examples/dnspod/v20210323/DescribeDomainShareUserList.md @@ -0,0 +1,30 @@ +**Example 1: 获取指定域名的已共享列表** + +获取指定域名的已共享列表 + +Input: + +``` +tccli dnspod DescribeDomainShareUserList --cli-unfold-argument \ + --Domain example.com +``` + +Output: +``` +{ + "Response": { + "RequestId": "1dbb40a1-8834-43e2-bae0-c5e2d0823944", + "DomainShareList": [ + { + "DomainShareId": 21253, + "Mode": "rw", + "Nickname": "我的测试环境企业", + "QCloudUIN": "700000283316", + "Status": "enabled", + "SubDomain": "" + } + ] + } +} +``` + diff --git a/tccli/examples/emr/v20190103/CreateSLInstance.md b/tccli/examples/emr/v20190103/CreateSLInstance.md new file mode 100644 index 0000000000..edb0a7641b --- /dev/null +++ b/tccli/examples/emr/v20190103/CreateSLInstance.md @@ -0,0 +1,37 @@ +**Example 1: Lite Hbase 创建实例** + +Lite Hbase 创建实例 + +Input: + +``` +tccli emr CreateSLInstance --cli-unfold-argument \ + --InstanceName sl-haoyuhua-test-create \ + --PayMode 0 \ + --DiskType CLOUD_PREMIUM \ + --DiskSize 100 \ + --NodeType 4C16G \ + --ZoneSettings.0.Zone ap-guangzhou-2 \ + --ZoneSettings.0.VPCSettings.VpcId vpc-dcfhrh73 \ + --ZoneSettings.0.VPCSettings.SubnetId subnet-5bhc4kly \ + --ZoneSettings.0.NodeNum 1 \ + --ZoneSettings.1.Zone ap-guangzhou-2 \ + --ZoneSettings.1.VPCSettings.VpcId vpc-dcfhrh73 \ + --ZoneSettings.1.VPCSettings.SubnetId subnet-5bhc4kly \ + --ZoneSettings.1.NodeNum 1 \ + --ZoneSettings.2.Zone ap-guangzhou-2 \ + --ZoneSettings.2.VPCSettings.VpcId vpc-dcfhrh73 \ + --ZoneSettings.2.VPCSettings.SubnetId subnet-5bhc4kly \ + --ZoneSettings.2.NodeNum 1 +``` + +Output: +``` +{ + "Response": { + "InstanceId": "emr-8qrmc34c", + "RequestId": "983e4dae-1cb4-40cb-8476-3231a6849696" + } +} +``` + diff --git a/tccli/examples/emr/v20190103/DescribeSLInstance.md b/tccli/examples/emr/v20190103/DescribeSLInstance.md new file mode 100644 index 0000000000..24eda4c412 --- /dev/null +++ b/tccli/examples/emr/v20190103/DescribeSLInstance.md @@ -0,0 +1,51 @@ +**Example 1: Lite HBase 查询实例信息** + +Lite HBase 查询实例信息 + +Input: + +``` +tccli emr DescribeSLInstance --cli-unfold-argument \ + --InstanceId emr-3o9tms4i +``` + +Output: +``` +{ + "Response": { + "DiskSize": 100, + "DiskType": "性能云存储", + "InstanceName": "sl-haoyuhua-test-create", + "NodeType": "4C16G", + "PayMode": 0, + "RequestId": "a316989f-9316-4205-a2a3-64ab841aee14", + "ZoneSettings": [ + { + "NodeNum": 1, + "VPCSettings": { + "SubnetId": "subnet-5bhc4kly", + "VpcId": "vpc-dcfhrh73" + }, + "Zone": "ap-guangzhou-2" + }, + { + "NodeNum": 1, + "VPCSettings": { + "SubnetId": "subnet-5bhc4kly", + "VpcId": "vpc-dcfhrh73" + }, + "Zone": "ap-guangzhou-2" + }, + { + "NodeNum": 1, + "VPCSettings": { + "SubnetId": "subnet-5bhc4kly", + "VpcId": "vpc-dcfhrh73" + }, + "Zone": "ap-guangzhou-2" + } + ] + } +} +``` + diff --git a/tccli/examples/emr/v20190103/DescribeSLInstanceList.md b/tccli/examples/emr/v20190103/DescribeSLInstanceList.md new file mode 100644 index 0000000000..cf433bde1d --- /dev/null +++ b/tccli/examples/emr/v20190103/DescribeSLInstanceList.md @@ -0,0 +1,43 @@ +**Example 1: Lite HBase 查询实例列表** + +Lite HBase 查询实例列表 + +Input: + +``` +tccli emr DescribeSLInstanceList --cli-unfold-argument \ + --Offset 0 \ + --Limit 10 \ + --OrderField AddTime \ + --Asc 1 \ + --DisplayStrategy clusterList +``` + +Output: +``` +{ + "Response": { + "InstancesList": [ + { + "AddTime": "2024-03-14 17:40:19", + "AppId": 251233704, + "ClusterId": "emr-2ecolb9q", + "ClusterName": "EMR-haosen", + "Id": 126358006, + "PayMode": 0, + "RegionId": 1, + "Status": 3, + "StatusDesc": "集群生产中", + "SubnetId": 2666622, + "Tags": [], + "VpcId": 11406751, + "Zone": "ap-guangzhou-2", + "ZoneId": 100002 + } + ], + "RequestId": "fde6361c-205a-45e5-8bec-34b9100fc5b0", + "TotalCnt": 1 + } +} +``` + diff --git a/tccli/examples/emr/v20190103/ModifySLInstance.md b/tccli/examples/emr/v20190103/ModifySLInstance.md new file mode 100644 index 0000000000..8e29440d80 --- /dev/null +++ b/tccli/examples/emr/v20190103/ModifySLInstance.md @@ -0,0 +1,22 @@ +**Example 1: Lite HBase 修改实例节点数** + +Lite HBase 修改实例节点数 + +Input: + +``` +tccli emr ModifySLInstance --cli-unfold-argument \ + --InstanceId emr-3o9tms4i \ + --Zone ap-guangzhou-2 \ + --NodeNum 2 +``` + +Output: +``` +{ + "Response": { + "RequestId": "7837b979-fcc2-4bfb-b81b-88a532345b82" + } +} +``` + diff --git a/tccli/examples/emr/v20190103/TerminateSLInstance.md b/tccli/examples/emr/v20190103/TerminateSLInstance.md new file mode 100644 index 0000000000..1ab4de0aa7 --- /dev/null +++ b/tccli/examples/emr/v20190103/TerminateSLInstance.md @@ -0,0 +1,40 @@ +**Example 1: 销毁EMR Serverless实例** + + + +Input: + +``` +tccli emr TerminateSLInstance --cli-unfold-argument \ + --InstanceId emr-6vexh3oi +``` + +Output: +``` +{ + "Response": { + "RequestId": "f4163a60-4801-449b-83d0-6f9ec2c7a07f" + } +} +``` + +**Example 2: Lite HBase 销毁实例** + +Lite HBase 销毁实例 + +Input: + +``` +tccli emr TerminateSLInstance --cli-unfold-argument \ + --InstanceId emr-8qrmc34c +``` + +Output: +``` +{ + "Response": { + "RequestId": "a0b8ffca-02eb-47ea-9c93-a4c8db4e4585" + } +} +``` + diff --git a/tccli/examples/es/v20180416/DescribeSpaceKibanaTools.md b/tccli/examples/es/v20180416/DescribeSpaceKibanaTools.md new file mode 100644 index 0000000000..a9c041eed5 --- /dev/null +++ b/tccli/examples/es/v20180416/DescribeSpaceKibanaTools.md @@ -0,0 +1,44 @@ +**Example 1: 索引获取token** + +索引获取token登录space维度的kibana + +Input: + +``` +tccli es DescribeSpaceKibanaTools --cli-unfold-argument \ + --SpaceId abc +``` + +Output: +``` +{ + "Response": { + "KibanaToken": "abc", + "ExpireTime": 0, + "RequestId": "abc" + } +} +``` + +**Example 2: kibana内嵌登录token获取** + +用于登录space维度的内嵌的kibana + +Input: + +``` +tccli es DescribeSpaceKibanaTools --cli-unfold-argument \ + --SpaceId abc +``` + +Output: +``` +{ + "Response": { + "KibanaToken": "abc", + "ExpireTime": 0, + "RequestId": "abc" + } +} +``` + diff --git a/tccli/examples/ess/v20201111/DescribeOrganizationAuthStatus.md b/tccli/examples/ess/v20201111/DescribeOrganizationAuthStatus.md index 42308d26b5..6d29331b47 100644 --- a/tccli/examples/ess/v20201111/DescribeOrganizationAuthStatus.md +++ b/tccli/examples/ess/v20201111/DescribeOrganizationAuthStatus.md @@ -6,7 +6,7 @@ Input: ``` tccli ess DescribeOrganizationAuthStatus --cli-unfold-argument \ - --Operator.UserId xxxxxx \ + --Operator.UserId yDRCLUUgygq2xun5UuO4zjEwg0vjoimj \ --UniformSocialCreditCode \ --LegalName \ --OrganizationName 测试企业 diff --git a/tccli/examples/essbasic/v20210526/CreatePersonAuthCertificateImage.md b/tccli/examples/essbasic/v20210526/CreatePersonAuthCertificateImage.md new file mode 100644 index 0000000000..a8a8bcf098 --- /dev/null +++ b/tccli/examples/essbasic/v20210526/CreatePersonAuthCertificateImage.md @@ -0,0 +1,29 @@ +**Example 1: 创建个人用户证明证书图片** + +创建个人用户证明证书图片 + +Input: + +``` +tccli essbasic CreatePersonAuthCertificateImage --cli-unfold-argument \ + --Agent.ProxyOperator.OpenId test_open_id \ + --Agent.ProxyOrganizationOpenId test_org_open_id \ + --Agent.AppId yDxbWUyKQ*******4zjEB8mxCcDjAyF \ + --UserName 典子谦 \ + --IdCardType ID_CARD \ + --IdCardNumber 620000198802020000 +``` + +Output: +``` +{ + "Response": { + "AuthCertUrl": "https://file.test.ess.tencent.cn/bresource/resource/resource/0/0.JPG?hkey=522d****6cb5", + "RequestId": "69c19f7e7240", + "SerialNumber": "23090411***877319694", + "ValidFrom": 1692788219, + "ValidTo": 1724324219 + } +} +``` + diff --git a/tccli/examples/mariadb/v20170312/DescribeBackupConfigs.md b/tccli/examples/mariadb/v20170312/DescribeBackupConfigs.md new file mode 100644 index 0000000000..b02cd53b2c --- /dev/null +++ b/tccli/examples/mariadb/v20170312/DescribeBackupConfigs.md @@ -0,0 +1,41 @@ +**Example 1: 示例1** + +示例1 + +Input: + +``` +tccli mariadb DescribeBackupConfigs --cli-unfold-argument \ + --InstanceId tdsql-5a6zl9ez +``` + +Output: +``` +{ + "Response": { + "Days": 30, + "StartBackupTime": "03:00", + "EndBackupTime": "05:00", + "WeekDays": [ + "Monday", + "Sunday" + ], + "ArchiveDays": 91, + "BackupConfigSet": [ + { + "BackupCount": 2, + "BeginDate": "2023-07-01", + "EnableBackupPolicy": true, + "Frequency": "annually", + "MaxRetentionDays": 101, + "WeekDays": [ + "Monday" + ] + } + ], + "InstanceId": "tdsql-5a6zl9ez", + "RequestId": "3a2996d9-e46b-4b2c-98d2-d654f3f7db3e" + } +} +``` + diff --git a/tccli/examples/mariadb/v20170312/ModifyBackupConfigs.md b/tccli/examples/mariadb/v20170312/ModifyBackupConfigs.md new file mode 100644 index 0000000000..b41d99dcc2 --- /dev/null +++ b/tccli/examples/mariadb/v20170312/ModifyBackupConfigs.md @@ -0,0 +1,25 @@ +**Example 1: 示例1** + +每年保留2个超期备份 + +Input: + +``` +tccli mariadb ModifyBackupConfigs --cli-unfold-argument \ + --InstanceId tdsql-5a6zl9ez \ + --BackupConfigSet.0.EnableBackupPolicy True \ + --BackupConfigSet.0.BeginDate 2023-07-01 \ + --BackupConfigSet.0.MaxRetentionDays 101 \ + --BackupConfigSet.0.Frequency annually \ + --BackupConfigSet.0.BackupCount 2 +``` + +Output: +``` +{ + "Response": { + "RequestId": "58c161ee-c463-463a-bb5a-b34c81132063" + } +} +``` + diff --git a/tccli/examples/redis/v20180412/DescribeInstanceLogDelivery.md b/tccli/examples/redis/v20180412/DescribeInstanceLogDelivery.md new file mode 100644 index 0000000000..711cdbe7d8 --- /dev/null +++ b/tccli/examples/redis/v20180412/DescribeInstanceLogDelivery.md @@ -0,0 +1,26 @@ +**Example 1: 示例1** + +查询实例日志投递配置 + +Input: + +``` +tccli redis DescribeInstanceLogDelivery --cli-unfold-argument \ + --InstanceId crs-ib4uuh7x +``` + +Output: +``` +{ + "Response": { + "RequestId": "27d4627d-4cc7-4144-af33-ac9f52a36878", + "SlowLog": { + "Enabled": true, + "LogRegion": "ap-guangzhou", + "LogsetId": "5db981e1-473c-4f1b-a2ad-4f480c49698f", + "TopicId": "a78808d4-df0a-44d4-b71d-a111b1ad9170" + } + } +} +``` + diff --git a/tccli/examples/redis/v20180412/ModifyInstanceLogDelivery.md b/tccli/examples/redis/v20180412/ModifyInstanceLogDelivery.md new file mode 100644 index 0000000000..9e85af2831 --- /dev/null +++ b/tccli/examples/redis/v20180412/ModifyInstanceLogDelivery.md @@ -0,0 +1,25 @@ +**Example 1: 示例1** + +开启实例日志投递,并使用新创建的日志集和日志主题 + +Input: + +``` +tccli redis ModifyInstanceLogDelivery --cli-unfold-argument \ + --InstanceId crs-ib4uuh7x \ + --LogType slowlog \ + --Enabled True \ + --LogsetName test-logset-name \ + --TopicName test-topic-name \ + --CreateIndex True +``` + +Output: +``` +{ + "Response": { + "RequestId": "ac46037a-57a0-4fe2-a99d-93c10ef20883" + } +} +``` + diff --git a/tccli/examples/vdb/v20230616/AssociateSecurityGroups.md b/tccli/examples/vdb/v20230616/AssociateSecurityGroups.md new file mode 100644 index 0000000000..096e640b87 --- /dev/null +++ b/tccli/examples/vdb/v20230616/AssociateSecurityGroups.md @@ -0,0 +1,21 @@ +**Example 1: 示例1** + +绑定安全组 + +Input: + +``` +tccli vdb AssociateSecurityGroups --cli-unfold-argument \ + --SecurityGroupIds sg-r6saerpd \ + --InstanceIds vdb-77qt0r46 +``` + +Output: +``` +{ + "Response": { + "RequestId": "c7699436-416b-4d3a-9142-9dee2e5b4e06" + } +} +``` + diff --git a/tccli/examples/vdb/v20230616/DescribeDBSecurityGroups.md b/tccli/examples/vdb/v20230616/DescribeDBSecurityGroups.md new file mode 100644 index 0000000000..97c468b082 --- /dev/null +++ b/tccli/examples/vdb/v20230616/DescribeDBSecurityGroups.md @@ -0,0 +1,64 @@ +**Example 1: 示例1** + +查询实例安全组 + +Input: + +``` +tccli vdb DescribeDBSecurityGroups --cli-unfold-argument \ + --InstanceId vdb-77qt0r46 +``` + +Output: +``` +{ + "Response": { + "Groups": [ + { + "CreateTime": "2023-07-03 11:41:46", + "Inbound": [ + { + "Action": "ACCEPT", + "AddressModule": "", + "CidrIp": "::/0", + "Desc": "放通Windows远程登录", + "Id": "", + "IpProtocol": "tcp", + "PortRange": "3389", + "ServiceModule": "" + }, + { + "Action": "ACCEPT", + "AddressModule": "", + "CidrIp": "::/0", + "Desc": "放通Linux SSH登录", + "Id": "", + "IpProtocol": "tcp", + "PortRange": "22", + "ServiceModule": "" + } + ], + "Outbound": [ + { + "Action": "ACCEPT", + "AddressModule": "", + "CidrIp": "", + "Desc": "", + "Id": "", + "IpProtocol": "ALL", + "PortRange": "ALL", + "ServiceModule": "" + } + ], + "ProjectId": "0", + "SecurityGroupId": "sg-9hb3ijfx", + "SecurityGroupName": "安全组4", + "SecurityGroupRemark": "测试安全组", + "UpdateTime": "2023-07-03 11:41:49" + } + ], + "RequestId": "3bd8eb38-516f-44f3-b127-40e9f83f9793" + } +} +``` + diff --git a/tccli/examples/vdb/v20230616/DescribeInstanceNodes.md b/tccli/examples/vdb/v20230616/DescribeInstanceNodes.md new file mode 100644 index 0000000000..614be0656e --- /dev/null +++ b/tccli/examples/vdb/v20230616/DescribeInstanceNodes.md @@ -0,0 +1,52 @@ +**Example 1: 成功示例** + +调用接口成功 + +Input: + +``` +tccli vdb DescribeInstanceNodes --cli-unfold-argument ``` + +Output: +``` +{ + "Response": { + "Items": [ + { + "Name": "master-0" + }, + { + "Name": "search-0" + }, + { + "Name": "worker-0" + } + ], + "RequestId": "c0c57557-d604-4bfc-abed-5ae659961720", + "TotalCount": 3 + } +} +``` + +**Example 2: 调用失败** + +调用接口失败 + +Input: + +``` +tccli vdb DescribeInstanceNodes --cli-unfold-argument ``` + +Output: +``` +{ + "Response": { + "Error": { + "Code": "FailedOperation", + "Message": "instance \"vdb-ecbgiqwb1\" not found" + }, + "RequestId": "e74de2e6-6f46-4cc3-b77a-15d799fedde9" + } +} +``` + diff --git a/tccli/examples/vdb/v20230616/DisassociateSecurityGroups.md b/tccli/examples/vdb/v20230616/DisassociateSecurityGroups.md new file mode 100644 index 0000000000..be12952acf --- /dev/null +++ b/tccli/examples/vdb/v20230616/DisassociateSecurityGroups.md @@ -0,0 +1,21 @@ +**Example 1: 示例1** + +用于安全组批量解绑实例。 + +Input: + +``` +tccli vdb DisassociateSecurityGroups --cli-unfold-argument \ + --SecurityGroupIds sg-dutt**** \ + --InstanceIds vdb-9clk**** +``` + +Output: +``` +{ + "Response": { + "RequestId": "c7297527-0e7c-43ad-bdb1-b90fc222d43d" + } +} +``` + diff --git a/tccli/examples/vdb/v20230616/ModifyDBInstanceSecurityGroups.md b/tccli/examples/vdb/v20230616/ModifyDBInstanceSecurityGroups.md new file mode 100644 index 0000000000..486bd017b2 --- /dev/null +++ b/tccli/examples/vdb/v20230616/ModifyDBInstanceSecurityGroups.md @@ -0,0 +1,21 @@ +**Example 1: 示例1** + +修改实例绑定的安全组 + +Input: + +``` +tccli vdb ModifyDBInstanceSecurityGroups --cli-unfold-argument \ + --InstanceIds vdb-9clk**** \ + --SecurityGroupIds sg-iqxw**** sg-dutt**** sg-eudo**** +``` + +Output: +``` +{ + "Response": { + "RequestId": "b3a86195-eee7-4e17-8405-e1fc5810c55b" + } +} +``` + diff --git a/tccli/services/aiart/aiart_client.py b/tccli/services/aiart/aiart_client.py index b609c62f69..e6692dfa32 100644 --- a/tccli/services/aiart/aiart_client.py +++ b/tccli/services/aiart/aiart_client.py @@ -17,6 +17,58 @@ from jmespath import search import time +def doSketchToImage(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.SketchToImageRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.SketchToImage(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doSubmitTextToImageProJob(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -652,6 +704,7 @@ def doImageToImage(args, parsed_globals): } ACTION_MAP = { + "SketchToImage": doSketchToImage, "SubmitTextToImageProJob": doSubmitTextToImageProJob, "ReplaceBackground": doReplaceBackground, "SubmitTrainPortraitModelJob": doSubmitTrainPortraitModelJob, diff --git a/tccli/services/aiart/v20221229/api.json b/tccli/services/aiart/v20221229/api.json index bc68a6445f..46e1177c40 100644 --- a/tccli/services/aiart/v20221229/api.json +++ b/tccli/services/aiart/v20221229/api.json @@ -49,6 +49,13 @@ "output": "ReplaceBackgroundResponse", "status": "online" }, + "SketchToImage": { + "document": "线稿生图接口支持上传一张黑白线稿图,按照指定的主体对象以及样式、颜色、材质、风格等的文本描述prompt ,对线稿图进行色彩填充与细节描绘,得到一张完整绘制的图像。生成图分辨率默认为1024:1024。\n线稿生图默认提供1个并发任务数,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。", + "input": "SketchToImageRequest", + "name": "线稿生图", + "output": "SketchToImageResponse", + "status": "online" + }, "SubmitDrawPortraitJob": { "document": "AI 写真提供 AI 写真形象照的训练与生成能力,分为上传训练图片、训练模型、生成图片3个环节,需要依次调用对应接口。\n每个写真模型自训练完成起1年内有效,有效期内可使用写真模型 ID 生成图片,期满后需要重新训练。\n生成图片分为提交任务和查询任务2个接口。\n- 提交生成写真图片任务:完成训练写真模型后,选择风格模板,提交一个生成写真图片异步任务,根据写真模型 ID 开始生成人物形象在指定风格上的写真图片,获得任务 ID。\n- 查询生成写真图片任务:根据任务 ID 查询生成图片任务的处理状态、处理结果。\n\n提交生成写真图片任务默认提供1个并发任务数。", "input": "SubmitDrawPortraitJobRequest", @@ -390,6 +397,24 @@ "name": "RspImgType", "required": false, "type": "string" + }, + { + "disabled": false, + "document": "画质增强开关,默认关闭。\n1:开启\n0:关闭\n开启后将增强图像的画质清晰度,生成耗时有所增加。", + "example": "0", + "member": "int64", + "name": "EnhanceImage", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "细节优化的面部数量上限,支持0 ~ 6,默认为0。\n若上传大于0的值,将以此为上限对每张图片中面积占比较小的面部进行细节修复,生成耗时根据实际优化的面部个数有所增加。", + "example": "0", + "member": "int64", + "name": "RestoreFace", + "required": false, + "type": "int" } ], "type": "object" @@ -871,6 +896,88 @@ ], "usage": "in" }, + "SketchToImageRequest": { + "document": "SketchToImage请求参数结构体", + "members": [ + { + "disabled": false, + "document": "用于线稿生图的文本描述。\n最多支持200个 utf-8 字符。\n建议格式:线稿中的主体对象+画面场景+配色/材质/元素/风格等", + "example": "鞋子,红白配色,皮革材质,真实画质,写实风格,精细,高清摄影,白色背景", + "member": "string", + "name": "Prompt", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "线稿图 Base64 数据。\nBase64 和 Url 必须提供一个,如果都提供以Url 为准。\n图片限制:黑白线稿图片,单边分辨率小于5000且大于512(分辨率过小会导致效果受损),转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。", + "example": "无", + "member": "string", + "name": "InputImage", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "线稿图 Url。\nBase64 和 Url 必须提供一个,如果都提供以Url 为准。\n图片限制:黑白线稿图片,单边分辨率小于5000且大于512(分辨率过小会导致效果受损),转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。", + "example": "无", + "member": "string", + "name": "InputUrl", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "为生成结果图添加标识的开关,默认为1。\n1:添加标识。\n0:不添加标识。\n其他数值:默认按1处理。\n建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。", + "example": "无", + "member": "int64", + "name": "LogoAdd", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "标识内容设置。\n默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。", + "example": "无", + "member": "LogoParam", + "name": "LogoParam", + "required": false, + "type": "object" + }, + { + "disabled": false, + "document": "返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。生成图分辨率较大时建议选择 url,使用 base64 可能因图片过大导致返回失败。", + "example": "base64", + "member": "string", + "name": "RspImgType", + "required": false, + "type": "string" + } + ], + "type": "object" + }, + "SketchToImageResponse": { + "document": "SketchToImage返回参数结构体", + "members": [ + { + "disabled": false, + "document": "根据入参 RspImgType 填入不同,返回不同的内容。\n如果传入 base64 则返回生成图 Base64 编码。\n如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。", + "example": "无", + "member": "string", + "name": "ResultImage", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "SubmitDrawPortraitJobRequest": { "document": "SubmitDrawPortraitJob请求参数结构体", "members": [ diff --git a/tccli/services/aiart/v20221229/examples.json b/tccli/services/aiart/v20221229/examples.json index 60aa3b6ff9..c673b9a44b 100644 --- a/tccli/services/aiart/v20221229/examples.json +++ b/tccli/services/aiart/v20221229/examples.json @@ -56,6 +56,14 @@ "title": "成功调用并生成图片" } ], + "SketchToImage": [ + { + "document": "成功调用并生成图片", + "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SketchToImage\n<公共请求参数>\n\n{\n \"InputUrl\": \"https://xxx.com/test.jpg\",\n \"Prompt\": \"backpack,real picture quality, fabric texture, fine, cartoon\",\n \"RspImgType\": \"url\"\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"0d0728ed-f777-4861-aa4b-5a6167daa0b6\",\n \"ResultImage\": \"https://result.jpg\"\n }\n}", + "title": "成功调用并生成图片" + } + ], "SubmitDrawPortraitJob": [ { "document": "调用成功", diff --git a/tccli/services/apm/v20210622/api.json b/tccli/services/apm/v20210622/api.json index 428b99f78b..f21badd0ea 100644 --- a/tccli/services/apm/v20210622/api.json +++ b/tccli/services/apm/v20210622/api.json @@ -127,6 +127,7 @@ "example": "name", "member": "string", "name": "Key", + "output_required": true, "required": true, "type": "string", "value_allowed_null": true @@ -137,12 +138,13 @@ "example": "xxxx", "member": "string", "name": "Value", + "output_required": true, "required": true, "type": "string", "value_allowed_null": true } ], - "usage": "out" + "usage": "both" }, "ApmAgentInfo": { "document": "apm Agent信息", diff --git a/tccli/services/billing/v20180709/api.json b/tccli/services/billing/v20180709/api.json index 2c49ad5372..854c155e3c 100644 --- a/tccli/services/billing/v20180709/api.json +++ b/tccli/services/billing/v20180709/api.json @@ -13171,6 +13171,7 @@ "example": "0", "member": "int64", "name": "TotalCount", + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -13180,6 +13181,7 @@ "example": "0", "member": "int64", "name": "TotalUsedAmount", + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -13189,6 +13191,7 @@ "example": "无", "member": "UsageRecords", "name": "UsageRecords", + "output_required": true, "type": "list", "value_allowed_null": true }, diff --git a/tccli/services/billing/v20180709/examples.json b/tccli/services/billing/v20180709/examples.json index c2988a1102..c226d0edf5 100644 --- a/tccli/services/billing/v20180709/examples.json +++ b/tccli/services/billing/v20180709/examples.json @@ -402,7 +402,7 @@ { "document": "获取代金券使用记录", "input": "https://billing.tencentcloudapi.com/?Action=DescribeVoucherUsageDetails\n&Limit=10\n&Offset=1\n&VoucherId=\"abc\"\n&Operator=\"abc\"\n&<公共请求参数>", - "output": "{\n \"Response\": {\n \"TotalCount\": \"1\",\n \"TotalUsedAmount\": 18000000000,\n \"UsageRecords\": [\n {\n \"UsedAmount\": 18000000000,\n \"UsedTime\": \"2021-01-01 00:00:00\",\n \"UsageDetails\": [\n {\n \"ProductName\": \"轻量应用服务器\",\n \"SubProductName\": \"轻量应用服务器 (通用型-2核2G-50G-500G)\"\n }\n ]\n }\n ],\n \"RequestId\": \"76cf663e-f683-41b9-b44d-849123783bf4\"\n }\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"9168e8fe-ed79-4726-9ced-29033e5a7011\",\n \"TotalCount\": 5,\n \"TotalUsedAmount\": 5000000,\n \"UsageRecords\": [\n {\n \"PayMode\": \"prepay\",\n \"PayScene\": \"\",\n \"SeqId\": \"20240212840001259973831114\",\n \"UsageDetails\": [\n {\n \"Action\": \"purchase\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"\",\n \"ProductCode\": \"p_cvm\",\n \"ProductEnName\": \"Cloud Virtual Machine(CVM)\",\n \"ProductName\": \"云服务器CVM\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_cvm_s2\",\n \"SubProductEnName\": \"CVM Standard S2\",\n \"SubProductName\": \"云服务器CVM-标准型S2\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:54:56\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n },\n {\n \"PayMode\": \"postpay\",\n \"PayScene\": null,\n \"SeqId\": \"20240212799000283860282006\",\n \"UsageDetails\": [\n {\n \"Action\": \"\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"1\",\n \"ProductCode\": \"p_ccn\",\n \"ProductEnName\": \"Cloud Connect Network\",\n \"ProductName\": \"云联网CCN\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_ccn_connecting_instance\",\n \"SubProductEnName\": \"Cloud Connect Network-connecting-instance\",\n \"SubProductName\": \"云联网网络连接实例费\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:53:33\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n },\n {\n \"PayMode\": \"postpay\",\n \"PayScene\": null,\n \"SeqId\": \"20240212799000283860282005\",\n \"UsageDetails\": [\n {\n \"Action\": \"\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"1\",\n \"ProductCode\": \"p_ccn\",\n \"ProductEnName\": \"Cloud Connect Network\",\n \"ProductName\": \"云联网CCN\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_ccn_connecting_instance\",\n \"SubProductEnName\": \"Cloud Connect Network-connecting-instance\",\n \"SubProductName\": \"云联网网络连接实例费\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:36:54\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n },\n {\n \"PayMode\": \"prepay\",\n \"PayScene\": \"\",\n \"SeqId\": \"20240212840001259973831111\",\n \"UsageDetails\": [\n {\n \"Action\": \"purchase\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"\",\n \"ProductCode\": \"p_cvm\",\n \"ProductEnName\": \"Cloud Virtual Machine(CVM)\",\n \"ProductName\": \"云服务器CVM\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_cvm_s2\",\n \"SubProductEnName\": \"CVM Standard S2\",\n \"SubProductName\": \"云服务器CVM-标准型S2\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:15:49\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n },\n {\n \"PayMode\": \"prepay\",\n \"PayScene\": \"\",\n \"SeqId\": \"20240212840001259973831109\",\n \"UsageDetails\": [\n {\n \"Action\": \"purchase\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"\",\n \"ProductCode\": \"p_cvm\",\n \"ProductEnName\": \"Cloud Virtual Machine(CVM)\",\n \"ProductName\": \"云服务器CVM\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_cvm_s2\",\n \"SubProductEnName\": \"CVM Standard S2\",\n \"SubProductName\": \"云服务器CVM-标准型S2\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:14:18\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n }\n ]\n }\n}", "title": "获取代金券使用记录" } ], diff --git a/tccli/services/cfg/v20210820/api.json b/tccli/services/cfg/v20210820/api.json index 9cb1a29adb..18f6b57003 100644 --- a/tccli/services/cfg/v20210820/api.json +++ b/tccli/services/cfg/v20210820/api.json @@ -726,7 +726,7 @@ { "disabled": false, "document": "资源下线信息\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "{\"ResourceId\": 4, \"ResourceDeleteTime\": \"2023-12-14\",\"ResourceDeleteMessage\": \"由于该动作不具备手动中止能力,已将该动作下线。现有新的故障动作替换,请参考探针管理文档,在实例安装探针后重新创建新的演练执行。\"}", + "example": "{ \"ResourceId\": 4, \"ResourceDeleteTime\": \"2023-12-14\", \"ResourceDeleteMessage\": \"由于该动作不具备手动中止能力,已将该动作下线。现有新的故障动作替换,请参考探针管理文档,在实例安装探针后重新创建新的演练执行。\" }", "member": "ResourceOffline", "name": "ResourceOffline", "output_required": false, @@ -793,7 +793,7 @@ { "disabled": false, "document": "筛选项 -动作ID", - "example": "无", + "example": "1", "member": "uint64", "name": "ActionIds", "required": false, @@ -1681,6 +1681,7 @@ "example": "instanceId", "member": "string", "name": "Key", + "output_required": true, "required": true, "type": "string", "value_allowed_null": false @@ -1691,6 +1692,7 @@ "example": "实例id", "member": "string", "name": "Header", + "output_required": true, "required": true, "type": "string", "value_allowed_null": false @@ -1698,9 +1700,10 @@ { "disabled": false, "document": "字段值是否需要转译,当不需要转译时,此字段返回null\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "无", + "example": "{\"true\": \"是\", \"false\": \"否\"}", "member": "string", "name": "Transfer", + "output_required": true, "required": false, "type": "string", "value_allowed_null": true @@ -1708,9 +1711,10 @@ { "disabled": false, "document": "tke的pod字段信息解析\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "无", + "example": "$.spec.nodeName", "member": "string", "name": "JsonParse", + "output_required": true, "required": false, "type": "string", "value_allowed_null": true @@ -2278,6 +2282,17 @@ "required": false, "type": "string", "value_allowed_null": true + }, + { + "disabled": false, + "document": "region信息\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "string", + "name": "TaskRegionName", + "output_required": false, + "required": false, + "type": "string", + "value_allowed_null": true } ], "usage": "both" diff --git a/tccli/services/ckafka/v20190819/api.json b/tccli/services/ckafka/v20190819/api.json index 9ab0f8ad1a..2a621bafd0 100644 --- a/tccli/services/ckafka/v20190819/api.json +++ b/tccli/services/ckafka/v20190819/api.json @@ -13287,7 +13287,7 @@ "type": "int" }, { - "disabled": false, + "disabled": true, "document": "动态硬盘扩容策略配置", "example": "无", "member": "DynamicDiskConfig", @@ -13480,8 +13480,8 @@ }, { "disabled": false, - "document": "自动化运维子类别", - "example": "INSTANCE_STORAGE_CAPACITY", + "document": "INSTANCE_STORAGE_CAPACITY(磁盘自动扩容)/MESSAGE_RETENTION_PERIOD(磁盘动态消息保留策略)", + "example": "INSTANCE_STORAGE_CAPACITY/MESSAGE_RETENTION_PERIOD", "member": "string", "name": "MaintenanceSubtype", "required": true, @@ -14820,7 +14820,7 @@ "example": "1", "member": "int64", "name": "FlowId", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": true }, @@ -14830,7 +14830,7 @@ "example": "{}", "member": "RouteDTO", "name": "RouteDTO", - "required": false, + "output_required": true, "type": "object", "value_allowed_null": true } diff --git a/tccli/services/dcdb/dcdb_client.py b/tccli/services/dcdb/dcdb_client.py index 42ec9addc4..ce0dfff79b 100644 --- a/tccli/services/dcdb/dcdb_client.py +++ b/tccli/services/dcdb/dcdb_client.py @@ -1629,6 +1629,58 @@ def doIsolateHourDCDBInstance(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doDescribeBackupConfigs(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.DcdbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeBackupConfigsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeBackupConfigs(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doDescribeDBSyncMode(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -3501,6 +3553,58 @@ def doCreateAccount(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doModifyBackupConfigs(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.DcdbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.ModifyBackupConfigsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.ModifyBackupConfigs(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doModifyDBInstanceName(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -3907,6 +4011,7 @@ def doModifyDBInstanceSecurityGroups(args, parsed_globals): "KillSession": doKillSession, "DescribeDBLogFiles": doDescribeDBLogFiles, "IsolateHourDCDBInstance": doIsolateHourDCDBInstance, + "DescribeBackupConfigs": doDescribeBackupConfigs, "DescribeDBSyncMode": doDescribeDBSyncMode, "DescribeDCDBBinlogTime": doDescribeDCDBBinlogTime, "UpgradeHourDCDBInstance": doUpgradeHourDCDBInstance, @@ -3943,6 +4048,7 @@ def doModifyDBInstanceSecurityGroups(args, parsed_globals): "InitDCDBInstances": doInitDCDBInstances, "DescribeDCDBInstanceDetail": doDescribeDCDBInstanceDetail, "CreateAccount": doCreateAccount, + "ModifyBackupConfigs": doModifyBackupConfigs, "ModifyDBInstanceName": doModifyDBInstanceName, "DescribeLogFileRetentionPeriod": doDescribeLogFileRetentionPeriod, "CreateTmpDCDBInstance": doCreateTmpDCDBInstance, diff --git a/tccli/services/dcdb/v20180411/api.json b/tccli/services/dcdb/v20180411/api.json index 0e9d912ac8..3dd27ef8ef 100644 --- a/tccli/services/dcdb/v20180411/api.json +++ b/tccli/services/dcdb/v20180411/api.json @@ -98,6 +98,13 @@ "output": "DescribeAccountsResponse", "status": "online" }, + "DescribeBackupConfigs": { + "document": "本接口(DescribeBackupConfigs)用于查询数据库备份配置信息。", + "input": "DescribeBackupConfigsRequest", + "name": "查询云数据库备份配置信息", + "output": "DescribeBackupConfigsResponse", + "status": "online" + }, "DescribeBackupFiles": { "document": "本接口(DescribeBackupFiles)用于查看备份文件列表。", "input": "DescribeBackupFilesRequest", @@ -392,6 +399,13 @@ "output": "ModifyAccountPrivilegesResponse", "status": "online" }, + "ModifyBackupConfigs": { + "document": "本接口(ModifyBackupConfigs)用于修改数据库备份配置信息。\n\n1. 修改数据库超期备份配置,目前按年、按月、按日只支持一种,存在互斥关系,如当前策略按年备份,如果传入按月备份策略将会覆盖当前的按年备份策略,务必注意。", + "input": "ModifyBackupConfigsRequest", + "name": "修改云数据库备份配置信息", + "output": "ModifyBackupConfigsResponse", + "status": "online" + }, "ModifyDBEncryptAttributes": { "document": "本接口(ModifyDBEncryptAttributes)用于修改实例数据加密。", "input": "ModifyDBEncryptAttributesRequest", @@ -678,6 +692,72 @@ ], "type": "object" }, + "BackupConfig": { + "document": "数据库超期备份配置", + "members": [ + { + "disabled": false, + "document": "备份策略是否启用。", + "example": "true", + "member": "bool", + "name": "EnableBackupPolicy", + "output_required": true, + "type": "bool", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "超期保留开始日期,早于开始日期的超期备份不保留,格式:yyyy-mm-dd。", + "example": "2023-05-30", + "member": "string", + "name": "BeginDate", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "超期备份保留时长,超出保留时间的超期备份将被删除,可填写1-3650整数。", + "example": "180", + "member": "int64", + "name": "MaxRetentionDays", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "备份模式,可选择按年月周模式保存\n* 按年:annually\n* 按月:monthly\n* 按周:weekly", + "example": "monthly", + "member": "string", + "name": "Frequency", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "Frequency等于weekly时生效。\n表示保留特定工作日备份。可选择周一到周日,支持多选,取星期英文:\n* 星期一 :Monday\n* 星期二 :Tuesday\n* 星期三:Wednesday\n* 星期四:Thursday\n* 星期五:Friday\n* 星期六:Saturday\n* 星期日:Sunday", + "example": "Monday", + "member": "string", + "name": "WeekDays", + "output_required": false, + "type": "list", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "保留备份个数,Frequency等于monthly或weekly时生效。\n备份模式选择按月时,可填写1-28整数;\n备份模式选择年时,可填写1-336整数。", + "example": "10", + "member": "int64", + "name": "BackupCount", + "output_required": false, + "type": "int", + "value_allowed_null": false + } + ], + "usage": "out" + }, "BriefNodeInfo": { "document": "描述分片DB节点信息", "members": [ @@ -3605,6 +3685,103 @@ ], "type": "object" }, + "DescribeBackupConfigsRequest": { + "document": "DescribeBackupConfigs请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例 ID,格式如:tdsqlshard-c1nl9rpv,与云数据库控制台页面中显示的实例 ID 相同。", + "example": "tdsqlshard-c1nl9rpv", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "DescribeBackupConfigsResponse": { + "document": "DescribeBackupConfigs返回参数结构体", + "members": [ + { + "disabled": false, + "document": "实例 ID。", + "example": "tdsqlshard-c1nl9rpv", + "member": "string", + "name": "InstanceId", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "常规备份存储时长,范围[1, 3650]。", + "example": "30", + "member": "uint64", + "name": "Days", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "每天备份执行的区间的开始时间,格式 mm:ss,形如 22:00。", + "example": "03:00", + "member": "string", + "name": "StartBackupTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "每天备份执行的区间的结束时间,格式 mm:ss,形如 23:59。", + "example": "05:59", + "member": "string", + "name": "EndBackupTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "执行备份周期,枚举值:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", + "example": "[Saturday, Sunday]", + "member": "string", + "name": "WeekDays", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "沉降到归档存储时长,-1表示关闭归档设置。", + "example": "91", + "member": "int64", + "name": "ArchiveDays", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "超期备份配置。", + "example": "无", + "member": "BackupConfig", + "name": "BackupConfigSet", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeBackupFilesRequest": { "document": "DescribeBackupFiles请求参数结构体", "members": [ @@ -7141,6 +7318,87 @@ ], "type": "object" }, + "ModifyBackupConfigsRequest": { + "document": "ModifyBackupConfigs请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例 ID,格式如:tdsqlshard-c1nl9rpv,与云数据库控制台页面中显示的实例 ID 相同。", + "example": "tdsqlshard-c1nl9rpv", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "常规备份存储时长,范围[1, 3650]。", + "example": "30", + "member": "uint64", + "name": "Days", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "每天备份执行的区间的开始时间,格式 mm:ss,形如 22:00。", + "example": "03:00", + "member": "string", + "name": "StartBackupTime", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "每天备份执行的区间的结束时间,格式 mm:ss,形如 23:59。", + "example": "05:59", + "member": "string", + "name": "EndBackupTime", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "执行备份周期,枚举值:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", + "example": "[Saturday, Sunday]", + "member": "string", + "name": "WeekDays", + "required": false, + "type": "list" + }, + { + "disabled": false, + "document": "沉降到归档存储时长,-1表示关闭归档设置。", + "example": "91", + "member": "int64", + "name": "ArchiveDays", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "超期备份配置。", + "example": "无", + "member": "NewBackupConfig", + "name": "BackupConfigSet", + "required": false, + "type": "list" + } + ], + "type": "object" + }, + "ModifyBackupConfigsResponse": { + "document": "ModifyBackupConfigs返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "ModifyDBEncryptAttributesRequest": { "document": "ModifyDBEncryptAttributes请求参数结构体", "members": [ @@ -7624,6 +7882,66 @@ ], "type": "object" }, + "NewBackupConfig": { + "document": "数据库超期备份配置", + "members": [ + { + "disabled": false, + "document": "备份策略是否启用。", + "example": "true", + "member": "bool", + "name": "EnableBackupPolicy", + "required": true, + "type": "bool" + }, + { + "disabled": false, + "document": "超期保留开始日期,早于开始日期的超期备份不保留,格式:yyyy-mm-dd。", + "example": "2023-05-30", + "member": "string", + "name": "BeginDate", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "超期备份保留时长,超出保留时间的超期备份将被删除,可填写1-3650整数。", + "example": "180", + "member": "int64", + "name": "MaxRetentionDays", + "required": true, + "type": "int" + }, + { + "disabled": false, + "document": "备份模式,可选择按年月周模式保存\n* 按年:annually\n* 按月:monthly\n* 按周:weekly", + "example": "monthly", + "member": "string", + "name": "Frequency", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "Frequency等于weekly时生效。\n表示保留特定工作日备份。可选择周一到周日,支持多选,取星期英文:\n* 星期一 :Monday\n* 星期二 :Tuesday\n* 星期三:Wednesday\n* 星期四:Thursday\n* 星期五:Friday\n* 星期六:Saturday\n* 星期日:Sunday", + "example": "Monday", + "member": "string", + "name": "WeekDays", + "required": false, + "type": "list" + }, + { + "disabled": false, + "document": "保留备份个数,Frequency等于monthly或weekly时生效。\n备份模式选择按月时,可填写1-28整数;\n备份模式选择年时,可填写1-336整数。", + "example": "10", + "member": "int64", + "name": "BackupCount", + "required": false, + "type": "int" + } + ], + "usage": "in" + }, "NodeInfo": { "document": "描述DB节点信息", "members": [ diff --git a/tccli/services/dcdb/v20180411/examples.json b/tccli/services/dcdb/v20180411/examples.json index 2a5cd6a207..50636883e8 100644 --- a/tccli/services/dcdb/v20180411/examples.json +++ b/tccli/services/dcdb/v20180411/examples.json @@ -112,6 +112,20 @@ "title": "无" } ], + "DescribeBackupConfigs": [ + { + "document": "获取超期备份策略", + "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}", + "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}", + "title": "示例" + }, + { + "document": "示例1", + "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}", + "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}", + "title": "示例1" + } + ], "DescribeBackupFiles": [ { "document": "", @@ -448,6 +462,20 @@ "title": "修改云数据库实例账号的权限信息" } ], + "ModifyBackupConfigs": [ + { + "document": "近一年每个月保留一个备份", + "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}", + "output": "{\n \"Response\": {\n \"RequestId\": \"a0495e38-cd59-420c-8f09-893207d28955\"\n }\n}", + "title": "示例" + }, + { + "document": "按周保留备份", + "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}", + "output": "{\n \"Response\": {\n \"RequestId\": \"45b034f3-1ace-45c7-b49e-1fca45f89d9e\"\n }\n}", + "title": "示例1" + } + ], "ModifyDBEncryptAttributes": [ { "document": "用户开启实例的透明加密", diff --git a/tccli/services/dnspod/dnspod_client.py b/tccli/services/dnspod/dnspod_client.py index 02fb978984..e7cfeea603 100644 --- a/tccli/services/dnspod/dnspod_client.py +++ b/tccli/services/dnspod/dnspod_client.py @@ -2617,6 +2617,58 @@ def doDescribeRecord(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doDescribeDomainShareUserList(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeDomainShareUserListRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeDomainShareUserList(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doModifyDomainRemark(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -3926,6 +3978,7 @@ def doCreateDomainAlias(args, parsed_globals): "ModifyRecord": doModifyRecord, "DescribeDomain": doDescribeDomain, "DescribeRecord": doDescribeRecord, + "DescribeDomainShareUserList": doDescribeDomainShareUserList, "ModifyDomainRemark": doModifyDomainRemark, "DescribeRecordExistExceptDefaultNS": doDescribeRecordExistExceptDefaultNS, "ModifyDomainOwner": doModifyDomainOwner, diff --git a/tccli/services/dnspod/v20210323/api.json b/tccli/services/dnspod/v20210323/api.json index 8438954280..9a79dc3ee7 100644 --- a/tccli/services/dnspod/v20210323/api.json +++ b/tccli/services/dnspod/v20210323/api.json @@ -231,6 +231,13 @@ "output": "DescribeDomainShareInfoResponse", "status": "online" }, + "DescribeDomainShareUserList": { + "document": "获取指定域名的已共享列表", + "input": "DescribeDomainShareUserListRequest", + "name": "获取指定域名的已共享列表", + "output": "DescribeDomainShareUserListResponse", + "status": "online" + }, "DescribeDomainWhois": { "document": "获取域名Whois信息", "input": "DescribeDomainWhoisRequest", @@ -3531,6 +3538,51 @@ ], "type": "object" }, + "DescribeDomainShareUserListRequest": { + "document": "DescribeDomainShareUserList请求参数结构体", + "members": [ + { + "disabled": false, + "document": "域名", + "example": "dnspod.cn", + "member": "string", + "name": "Domain", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "域名 ID 。参数 DomainId 优先级比参数 Domain 高,如果传递参数 DomainId 将忽略参数 Domain 。可以通过接口DescribeDomainList查到所有的Domain以及DomainId", + "example": "61", + "member": "uint64", + "name": "DomainId", + "required": false, + "type": "int" + } + ], + "type": "object" + }, + "DescribeDomainShareUserListResponse": { + "document": "DescribeDomainShareUserList返回参数结构体", + "members": [ + { + "disabled": false, + "document": "域名套餐信息", + "example": "无", + "member": "DomainShareUserInfo", + "name": "DomainShareList", + "type": "list", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeDomainWhoisRequest": { "document": "DescribeDomainWhois请求参数结构体", "members": [ @@ -5873,6 +5925,72 @@ ], "usage": "out" }, + "DomainShareUserInfo": { + "document": "域名共享信息", + "members": [ + { + "disabled": false, + "document": "共享记录ID", + "example": "21253", + "member": "uint64", + "name": "DomainShareId", + "required": false, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "共享模式。r-只读;w-可写;rw-可读写。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "rw", + "member": "string", + "name": "Mode", + "required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "共享到的用户昵称\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "张三", + "member": "string", + "name": "Nickname", + "required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "共享到的用户UIN\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "700000283316", + "member": "string", + "name": "QCloudUIN", + "required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "共享状态。enabled-有效;pause-无效。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "enabled", + "member": "string", + "name": "Status", + "required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "共享的子域名\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "api", + "member": "string", + "name": "SubDomain", + "required": false, + "type": "string", + "value_allowed_null": true + } + ], + "usage": "out" + }, "DownloadSnapshotRequest": { "document": "DownloadSnapshot请求参数结构体", "members": [ diff --git a/tccli/services/dnspod/v20210323/examples.json b/tccli/services/dnspod/v20210323/examples.json index 6ca69411c5..5d217acd57 100644 --- a/tccli/services/dnspod/v20210323/examples.json +++ b/tccli/services/dnspod/v20210323/examples.json @@ -276,6 +276,14 @@ "title": "获取域名共享信息" } ], + "DescribeDomainShareUserList": [ + { + "document": "获取指定域名的已共享列表", + "input": "POST / HTTP/1.1\nHost: dnspod.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDomainShareUserList\n<公共请求参数>\n\n{\n \"Domain\": \"example.com\"\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"1dbb40a1-8834-43e2-bae0-c5e2d0823944\",\n \"DomainShareList\": [\n {\n \"DomainShareId\": 21253,\n \"Mode\": \"rw\",\n \"Nickname\": \"我的测试环境企业\",\n \"QCloudUIN\": \"700000283316\",\n \"Status\": \"enabled\",\n \"SubDomain\": \"\"\n }\n ]\n }\n}", + "title": "获取指定域名的已共享列表" + } + ], "DescribeDomainWhois": [ { "document": "获取域名Whois信息", diff --git a/tccli/services/emr/emr_client.py b/tccli/services/emr/emr_client.py index e9e78d95f4..4661abca63 100644 --- a/tccli/services/emr/emr_client.py +++ b/tccli/services/emr/emr_client.py @@ -1213,6 +1213,58 @@ def doDeleteUserManagerUserList(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doTerminateSLInstance(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.TerminateSLInstanceRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.TerminateSLInstance(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doAddUsersForUserManager(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -1317,6 +1369,110 @@ def doModifyAutoRenewFlag(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doCreateSLInstance(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.CreateSLInstanceRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.CreateSLInstance(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + +def doDescribeSLInstanceList(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeSLInstanceListRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeSLInstanceList(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doDescribeJobFlow(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -1681,7 +1837,7 @@ def doDescribeResourceScheduleDiffDetail(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) -def doSyncPodState(args, parsed_globals): +def doDescribeSLInstance(args, parsed_globals): g_param = parse_global_arg(parsed_globals) if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: @@ -1710,11 +1866,63 @@ def doSyncPodState(args, parsed_globals): client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile) client._sdkVersion += ("_CLI_" + __version__) models = MODELS_MAP[g_param[OptionsDefine.Version]] - model = models.SyncPodStateRequest() + model = models.DescribeSLInstanceRequest() model.from_json_string(json.dumps(args)) start_time = time.time() while True: - rsp = client.SyncPodState(model) + rsp = client.DescribeSLInstance(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + +def doModifySLInstance(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.ModifySLInstanceRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.ModifySLInstance(model) result = rsp.to_json_string() try: json_obj = json.loads(result) @@ -2149,6 +2357,58 @@ def doStartStopServiceOrMonitor(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doSyncPodState(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.SyncPodStateRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.SyncPodState(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doTerminateTasks(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -2859,8 +3119,11 @@ def doRunJobFlow(args, parsed_globals): "ResetYarnConfig": doResetYarnConfig, "DescribeUsersForUserManager": doDescribeUsersForUserManager, "DeleteUserManagerUserList": doDeleteUserManagerUserList, + "TerminateSLInstance": doTerminateSLInstance, "AddUsersForUserManager": doAddUsersForUserManager, "ModifyAutoRenewFlag": doModifyAutoRenewFlag, + "CreateSLInstance": doCreateSLInstance, + "DescribeSLInstanceList": doDescribeSLInstanceList, "DescribeJobFlow": doDescribeJobFlow, "ModifyAutoScaleStrategy": doModifyAutoScaleStrategy, "DeleteAutoScaleStrategy": doDeleteAutoScaleStrategy, @@ -2868,7 +3131,8 @@ def doRunJobFlow(args, parsed_globals): "DescribeInstanceRenewNodes": doDescribeInstanceRenewNodes, "ModifyResourceScheduler": doModifyResourceScheduler, "DescribeResourceScheduleDiffDetail": doDescribeResourceScheduleDiffDetail, - "SyncPodState": doSyncPodState, + "DescribeSLInstance": doDescribeSLInstance, + "ModifySLInstance": doModifySLInstance, "CreateInstance": doCreateInstance, "InquiryPriceCreateInstance": doInquiryPriceCreateInstance, "InquirePriceRenewEmr": doInquirePriceRenewEmr, @@ -2877,6 +3141,7 @@ def doRunJobFlow(args, parsed_globals): "ModifyResourceScheduleConfig": doModifyResourceScheduleConfig, "DescribeHiveQueries": doDescribeHiveQueries, "StartStopServiceOrMonitor": doStartStopServiceOrMonitor, + "SyncPodState": doSyncPodState, "TerminateTasks": doTerminateTasks, "TerminateInstance": doTerminateInstance, "DescribeAutoScaleStrategies": doDescribeAutoScaleStrategies, diff --git a/tccli/services/emr/v20190103/api.json b/tccli/services/emr/v20190103/api.json index 4e83e71291..a730676dc2 100644 --- a/tccli/services/emr/v20190103/api.json +++ b/tccli/services/emr/v20190103/api.json @@ -28,6 +28,13 @@ "output": "CreateInstanceResponse", "status": "online" }, + "CreateSLInstance": { + "document": "本接口(CreateSLInstance)用于创建 Lite HBase 实例\n- 接口调用成功,会创建Lite HBase实例,创建实例请求成功会返回创建实例的 InstaceId 和请求的 RequestID。\n- 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用 DescribeInstancesList 查看当前实例的 StatusDesc 状态。", + "input": "CreateSLInstanceRequest", + "name": "Lite HBase 创建实例", + "output": "CreateSLInstanceResponse", + "status": "online" + }, "DeleteAutoScaleStrategy": { "document": "删除自动扩缩容规则,后台销毁根据该规则扩缩容出来的节点", "input": "DeleteAutoScaleStrategyRequest", @@ -175,6 +182,20 @@ "output": "DescribeResourceScheduleDiffDetailResponse", "status": "online" }, + "DescribeSLInstance": { + "document": "本接口(DescribeSLInstance)用于查询 Lite HBase 实例基本信息", + "input": "DescribeSLInstanceRequest", + "name": "Lite HBase 查询实例信息", + "output": "DescribeSLInstanceResponse", + "status": "online" + }, + "DescribeSLInstanceList": { + "document": "本接口(DescribeSLInstanceList)用于查询 Lite HBase 实例列表详细信息", + "input": "DescribeSLInstanceListRequest", + "name": "Lite HBase 查询实例列表", + "output": "DescribeSLInstanceListResponse", + "status": "online" + }, "DescribeServiceNodeInfos": { "document": "查询服务进程信息", "input": "DescribeServiceNodeInfosRequest", @@ -294,6 +315,13 @@ "output": "ModifyResourcesTagsResponse", "status": "online" }, + "ModifySLInstance": { + "document": "本接口(ModifySLInstance)用于修改Lite HBase 实例节点数。\n- 接口调用成功,会创建Lite HBase实例,创建实例请求成功会返回请求的 RequestID。\n- 接口为异步接口,接口返回时操作并未立即完成,实例操作结果可以通过调用 DescribeInstancesList 查看当前实例的 StatusDesc 状态。", + "input": "ModifySLInstanceRequest", + "name": "Lite HBase 修改实例节点数", + "output": "ModifySLInstanceResponse", + "status": "online" + }, "ModifyUserManagerPwd": { "document": "修改用户密码(用户管理)", "input": "ModifyUserManagerPwdRequest", @@ -371,6 +399,13 @@ "output": "TerminateInstanceResponse", "status": "online" }, + "TerminateSLInstance": { + "document": "本接口(TerminateSLInstance)用于销毁 Lite HBase 实例", + "input": "TerminateSLInstanceRequest", + "name": "Lite HBase 销毁实例", + "output": "TerminateSLInstanceResponse", + "status": "online" + }, "TerminateTasks": { "document": "缩容Task节点", "input": "TerminateTasksRequest", @@ -2642,6 +2677,97 @@ ], "type": "object" }, + "CreateSLInstanceRequest": { + "document": "CreateSLInstance请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例名称。", + "example": "无", + "member": "string", + "name": "InstanceName", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "实例计费模式,0表示后付费,即按量计费。", + "example": "0", + "member": "int64", + "name": "PayMode", + "required": true, + "type": "int" + }, + { + "disabled": false, + "document": "实例存储类型,填写CLOUD_HSSD,表示性能云存储。", + "example": "CLOUD_HSSD", + "member": "string", + "name": "DiskType", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "实例单节点磁盘容量,单位GB,单节点磁盘容量需大于等于100,小于等于10000,容量调整步长为20。", + "example": "200", + "member": "int64", + "name": "DiskSize", + "required": true, + "type": "int" + }, + { + "disabled": false, + "document": "实例节点规格,可填写4C16G、8C32G、16C64G、32C128G,不区分大小写。", + "example": "4C16G", + "member": "string", + "name": "NodeType", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "实例可用区详细配置,当前支持多可用区,可用区数量只能为1或3,包含区域名称,VPC信息、节点数量,其中所有区域节点总数需大于等于3,小于等于50。", + "example": "无", + "member": "ZoneSetting", + "name": "ZoneSettings", + "required": true, + "type": "list" + }, + { + "disabled": false, + "document": "实例要绑定的标签列表。", + "example": "无", + "member": "Tag", + "name": "Tags", + "required": false, + "type": "list" + } + ], + "type": "object" + }, + "CreateSLInstanceResponse": { + "document": "CreateSLInstance返回参数结构体", + "members": [ + { + "disabled": false, + "document": "实例唯一标识符(字符串表示)", + "example": "emr-xxxxxxxx", + "member": "string", + "name": "InstanceId", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "CustomMetaDBInfo": { "document": "用户Hive-MetaDB信息", "members": [ @@ -4545,6 +4671,195 @@ ], "type": "object" }, + "DescribeSLInstanceListRequest": { + "document": "DescribeSLInstanceList请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例筛选策略。取值范围:
  • clusterList:表示查询除了已销毁实例之外的实例列表。
  • monitorManage:表示查询除了已销毁、创建中以及创建失败的实例之外的实例列表。
  • ", + "example": "clusterList", + "member": "string", + "name": "DisplayStrategy", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "页编号,默认值为0,表示第一页。", + "example": "0", + "member": "int64", + "name": "Offset", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "每页返回数量,默认值为10,最大值为100。\t", + "example": "10", + "member": "int64", + "name": "Limit", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "排序字段。取值范围:
  • clusterId:表示按照实例ID排序。
  • addTime:表示按照实例创建时间排序。
  • status:表示按照实例的状态码排序。
  • ", + "example": "clusterid", + "member": "string", + "name": "OrderField", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "按照OrderField升序或者降序进行排序。取值范围:
  • 0:表示降序。
  • 1:表示升序。
  • 默认值为0。", + "example": "1", + "member": "int64", + "name": "Asc", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "自定义查询过滤器。", + "example": "无", + "member": "Filters", + "name": "Filters", + "required": false, + "type": "list" + } + ], + "type": "object" + }, + "DescribeSLInstanceListResponse": { + "document": "DescribeSLInstanceList返回参数结构体", + "members": [ + { + "disabled": false, + "document": "符合条件的实例总数。\t", + "example": "1", + "member": "int64", + "name": "TotalCnt", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例信息列表,如果进行了分页,只显示当前分页的示例信息列表。", + "example": "无", + "member": "SLInstanceInfo", + "name": "InstancesList", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, + "DescribeSLInstanceRequest": { + "document": "DescribeSLInstance请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例唯一标识符(字符串表示)", + "example": "emr-xxxxxxxx", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "DescribeSLInstanceResponse": { + "document": "DescribeSLInstance返回参数结构体", + "members": [ + { + "disabled": false, + "document": "实例名称。", + "example": "无", + "member": "string", + "name": "InstanceName", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例计费模式。0表示后付费,即按量计费,1表示预付费,即包年包月。", + "example": "无", + "member": "int64", + "name": "PayMode", + "output_required": false, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例存储类型。", + "example": "无", + "member": "string", + "name": "DiskType", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例单节点磁盘容量,单位GB。", + "example": "无", + "member": "int64", + "name": "DiskSize", + "output_required": false, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例节点规格。", + "example": "无", + "member": "string", + "name": "NodeType", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例可用区详细配置,包含可用区名称,VPC信息、节点数量。", + "example": "无", + "member": "ZoneSetting", + "name": "ZoneSettings", + "output_required": false, + "type": "list", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例绑定的标签列表。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "Tag", + "name": "Tags", + "output_required": false, + "type": "list", + "value_allowed_null": true + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeServiceNodeInfosRequest": { "document": "DescribeServiceNodeInfos请求参数结构体", "members": [ @@ -8461,6 +8776,15 @@ "name": "RenewFlag", "required": true, "type": "string" + }, + { + "disabled": false, + "document": "计算资源id", + "example": "emr-cr-xxxxxxxx", + "member": "string", + "name": "ComputeResourceId", + "required": false, + "type": "string" } ], "type": "object" @@ -8870,6 +9194,51 @@ ], "type": "object" }, + "ModifySLInstanceRequest": { + "document": "ModifySLInstance请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例唯一标识符(字符串表示)。", + "example": "emr-xxxxxxxx", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "需要变更的区域名称。", + "example": "ap-guangzhou-1", + "member": "string", + "name": "Zone", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "该区域变配后的目标节点数量,所有区域节点总数应大于等于3,小于等于50。", + "example": "4", + "member": "int64", + "name": "NodeNum", + "required": true, + "type": "int" + } + ], + "type": "object" + }, + "ModifySLInstanceResponse": { + "document": "ModifySLInstance返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "ModifyUserManagerPwdRequest": { "document": "ModifyUserManagerPwd请求参数结构体", "members": [ @@ -11783,6 +12152,162 @@ ], "type": "object" }, + "SLInstanceInfo": { + "document": "EMR Lite HBase 实例信息", + "members": [ + { + "disabled": false, + "document": "集群实例字符串ID", + "example": "emr-xxxxxxx", + "member": "string", + "name": "ClusterId", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "集群实例数字ID", + "example": "126358002", + "member": "uint64", + "name": "Id", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "状态描述", + "example": "状态描述", + "member": "string", + "name": "StatusDesc", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例名称", + "example": "xxxxxx", + "member": "string", + "name": "ClusterName", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "地域ID", + "example": "1", + "member": "uint64", + "name": "RegionId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "主可用区ID", + "example": "100002", + "member": "int64", + "name": "ZoneId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "主可用区", + "example": "ap-guangzhou-2", + "member": "string", + "name": "Zone", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "用户APPID", + "example": "663622", + "member": "uint64", + "name": "AppId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "主可用区私有网络ID", + "example": "45666", + "member": "uint64", + "name": "VpcId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "主可用区子网ID", + "example": "3422", + "member": "uint64", + "name": "SubnetId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "状态码", + "example": "1", + "member": "uint64", + "name": "Status", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "创建时间", + "example": "创建时间", + "member": "string", + "name": "AddTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "集群计费类型。0表示按量计费,1表示包年包月", + "example": "0", + "member": "int64", + "name": "PayMode", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "多可用区信息\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "ZoneSetting", + "name": "ZoneSettings", + "output_required": false, + "type": "list", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "实例标签\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "Tag", + "name": "Tags", + "output_required": false, + "type": "list", + "value_allowed_null": true + } + ], + "usage": "out" + }, "ScaleOutClusterRequest": { "document": "ScaleOutCluster请求参数结构体", "members": [ @@ -13619,6 +14144,33 @@ ], "type": "object" }, + "TerminateSLInstanceRequest": { + "document": "TerminateSLInstance请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例唯一标识符(字符串表示)", + "example": "emr-xxxxxxxx", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "TerminateSLInstanceResponse": { + "document": "TerminateSLInstance返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "TerminateTasksRequest": { "document": "TerminateTasks请求参数结构体", "members": [ @@ -14995,6 +15547,45 @@ } ], "usage": "both" + }, + "ZoneSetting": { + "document": "可用区配置描述。", + "members": [ + { + "disabled": false, + "document": "可用区名称", + "example": "ap-guangzhou-2", + "member": "string", + "name": "Zone", + "output_required": true, + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "可用区VPC和子网", + "example": "无", + "member": "VPCSettings", + "name": "VPCSettings", + "output_required": true, + "required": true, + "type": "object", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "可用区节点数量", + "example": "3", + "member": "int64", + "name": "NodeNum", + "output_required": true, + "required": true, + "type": "int", + "value_allowed_null": false + } + ], + "usage": "both" } }, "version": "1.0" diff --git a/tccli/services/emr/v20190103/examples.json b/tccli/services/emr/v20190103/examples.json index ac6b753faa..74530a08b1 100644 --- a/tccli/services/emr/v20190103/examples.json +++ b/tccli/services/emr/v20190103/examples.json @@ -32,6 +32,14 @@ "title": "创建实例" } ], + "CreateSLInstance": [ + { + "document": "Lite Hbase 创建实例", + "input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateSLInstance\n<公共请求参数>\n\n{\n \"InstanceName\": \"sl-haoyuhua-test-create\",\n \"PayMode\": 0,\n \"DiskType\": \"CLOUD_PREMIUM\",\n \"DiskSize\": 100,\n \"NodeType\": \"4C16G\",\n \"ZoneSettings\": [\n {\n \"Zone\": \"ap-guangzhou-2\",\n \"VPCSettings\": {\n \"VpcId\": \"vpc-dcfhrh73\",\n \"SubnetId\": \"subnet-5bhc4kly\"\n },\n \"NodeNum\": 1\n },\n {\n \"Zone\": \"ap-guangzhou-2\",\n \"VPCSettings\": {\n \"VpcId\": \"vpc-dcfhrh73\",\n \"SubnetId\": \"subnet-5bhc4kly\"\n },\n \"NodeNum\": 1\n },\n {\n \"Zone\": \"ap-guangzhou-2\",\n \"VPCSettings\": {\n \"VpcId\": \"vpc-dcfhrh73\",\n \"SubnetId\": \"subnet-5bhc4kly\"\n },\n \"NodeNum\": 1\n }\n ],\n \"Tags\": []\n}", + "output": "{\n \"Response\": {\n \"InstanceId\": \"emr-8qrmc34c\",\n \"RequestId\": \"983e4dae-1cb4-40cb-8476-3231a6849696\"\n }\n}", + "title": "Lite Hbase 创建实例" + } + ], "DeleteAutoScaleStrategy": [ { "document": "", @@ -200,6 +208,22 @@ "title": "YARN资源调度-变更详情" } ], + "DescribeSLInstance": [ + { + "document": "Lite HBase 查询实例信息", + "input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSLInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"emr-3o9tms4i\"\n}", + "output": "{\n \"Response\": {\n \"DiskSize\": 100,\n \"DiskType\": \"性能云存储\",\n \"InstanceName\": \"sl-haoyuhua-test-create\",\n \"NodeType\": \"4C16G\",\n \"PayMode\": 0,\n \"RequestId\": \"a316989f-9316-4205-a2a3-64ab841aee14\",\n \"ZoneSettings\": [\n {\n \"NodeNum\": 1,\n \"VPCSettings\": {\n \"SubnetId\": \"subnet-5bhc4kly\",\n \"VpcId\": \"vpc-dcfhrh73\"\n },\n \"Zone\": \"ap-guangzhou-2\"\n },\n {\n \"NodeNum\": 1,\n \"VPCSettings\": {\n \"SubnetId\": \"subnet-5bhc4kly\",\n \"VpcId\": \"vpc-dcfhrh73\"\n },\n \"Zone\": \"ap-guangzhou-2\"\n },\n {\n \"NodeNum\": 1,\n \"VPCSettings\": {\n \"SubnetId\": \"subnet-5bhc4kly\",\n \"VpcId\": \"vpc-dcfhrh73\"\n },\n \"Zone\": \"ap-guangzhou-2\"\n }\n ]\n }\n}", + "title": "Lite HBase 查询实例信息" + } + ], + "DescribeSLInstanceList": [ + { + "document": "Lite HBase 查询实例列表", + "input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSLInstanceList\n<公共请求参数>\n\n{\n \"Offset\": 0,\n \"Limit\": 10,\n \"OrderField\": \"AddTime\",\n \"Asc\": 1,\n \"DisplayStrategy\": \"clusterList\",\n \"Filters\": []\n}", + "output": "{\n \"Response\": {\n \"InstancesList\": [\n {\n \"AddTime\": \"2024-03-14 17:40:19\",\n \"AppId\": 251233704,\n \"ClusterId\": \"emr-2ecolb9q\",\n \"ClusterName\": \"EMR-haosen\",\n \"Id\": 126358006,\n \"PayMode\": 0,\n \"RegionId\": 1,\n \"Status\": 3,\n \"StatusDesc\": \"集群生产中\",\n \"SubnetId\": 2666622,\n \"Tags\": [],\n \"VpcId\": 11406751,\n \"Zone\": \"ap-guangzhou-2\",\n \"ZoneId\": 100002\n }\n ],\n \"RequestId\": \"fde6361c-205a-45e5-8bec-34b9100fc5b0\",\n \"TotalCnt\": 1\n }\n}", + "title": "Lite HBase 查询实例列表" + } + ], "DescribeServiceNodeInfos": [ { "document": "查询服务进程信息", @@ -348,6 +372,14 @@ "title": "test" } ], + "ModifySLInstance": [ + { + "document": "Lite HBase 修改实例节点数", + "input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifySLInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"emr-3o9tms4i\",\n \"Zone\": \"ap-guangzhou-2\",\n \"NodeNum\": 2\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"7837b979-fcc2-4bfb-b81b-88a532345b82\"\n }\n}", + "title": "Lite HBase 修改实例节点数" + } + ], "ModifyUserManagerPwd": [ { "document": "test", @@ -436,6 +468,20 @@ "title": "销毁实例" } ], + "TerminateSLInstance": [ + { + "document": "", + "input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: TerminateSLInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"emr-6vexh3oi\"\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"f4163a60-4801-449b-83d0-6f9ec2c7a07f\"\n }\n}", + "title": "销毁EMR Serverless实例" + }, + { + "document": "Lite HBase 销毁实例", + "input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: TerminateSLInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"emr-8qrmc34c\"\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"a0b8ffca-02eb-47ea-9c93-a4c8db4e4585\"\n }\n}", + "title": "Lite HBase 销毁实例" + } + ], "TerminateTasks": [ { "document": "销毁TASK节点", diff --git a/tccli/services/es/es_client.py b/tccli/services/es/es_client.py index 3857e7c638..8faf60d42e 100644 --- a/tccli/services/es/es_client.py +++ b/tccli/services/es/es_client.py @@ -1577,6 +1577,58 @@ def doDescribeInstanceOperations(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doDescribeSpaceKibanaTools(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.EsClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeSpaceKibanaToolsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeSpaceKibanaTools(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doDescribeLogstashPipelines(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -2970,6 +3022,7 @@ def doInquirePriceRenewInstance(args, parsed_globals): "DescribeViews": doDescribeViews, "UpdateLogstashInstance": doUpdateLogstashInstance, "DescribeInstanceOperations": doDescribeInstanceOperations, + "DescribeSpaceKibanaTools": doDescribeSpaceKibanaTools, "DescribeLogstashPipelines": doDescribeLogstashPipelines, "DescribeLogstashInstances": doDescribeLogstashInstances, "DescribeIndexList": doDescribeIndexList, diff --git a/tccli/services/es/v20180416/api.json b/tccli/services/es/v20180416/api.json index 75408932dd..70e6b67695 100644 --- a/tccli/services/es/v20180416/api.json +++ b/tccli/services/es/v20180416/api.json @@ -196,6 +196,13 @@ "output": "DescribeServerlessSpacesResponse", "status": "online" }, + "DescribeSpaceKibanaTools": { + "document": "space维度的kibana获取登录token", + "input": "DescribeSpaceKibanaToolsRequest", + "name": "space维度的kibana获取登录token", + "output": "DescribeSpaceKibanaToolsResponse", + "status": "online" + }, "DescribeUserCosSnapshotList": { "document": "查询快照信息接口", "input": "DescribeUserCosSnapshotListRequest", @@ -3731,6 +3738,53 @@ ], "type": "object" }, + "DescribeSpaceKibanaToolsRequest": { + "document": "DescribeSpaceKibanaTools请求参数结构体", + "members": [ + { + "disabled": false, + "document": "space的ID", + "example": "space-xxx", + "member": "string", + "name": "SpaceId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "DescribeSpaceKibanaToolsResponse": { + "document": "DescribeSpaceKibanaTools返回参数结构体", + "members": [ + { + "disabled": false, + "document": "该token用于登录内嵌kibana", + "example": "无", + "member": "string", + "name": "KibanaToken", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "token的过期时间", + "example": "无", + "member": "int64", + "name": "ExpireTime", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeUserCosSnapshotListRequest": { "document": "DescribeUserCosSnapshotList请求参数结构体", "members": [ diff --git a/tccli/services/es/v20180416/examples.json b/tccli/services/es/v20180416/examples.json index f7333e3595..c495165538 100644 --- a/tccli/services/es/v20180416/examples.json +++ b/tccli/services/es/v20180416/examples.json @@ -224,6 +224,20 @@ "title": "获取Serverless索引空间列表" } ], + "DescribeSpaceKibanaTools": [ + { + "document": "索引获取token登录space维度的kibana", + "input": "POST / HTTP/1.1\nHost: es.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeKibanaTools\n<公共请求参数>\n\n{\n \"SpaceId\": \"abc\"\n}", + "output": "{\n \"Response\": {\n \"KibanaToken\": \"abc\",\n \"ExpireTime\": 0,\n \"RequestId\": \"abc\"\n }\n}", + "title": "索引获取token" + }, + { + "document": "用于登录space维度的内嵌的kibana", + "input": "POST / HTTP/1.1\nHost: es.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateServerlessInstanceUser\n<公共请求参数>\n\n{\n \"SpaceId\": \"abc\"\n}", + "output": "{\n \"Response\": {\n \"KibanaToken\": \"abc\",\n \"ExpireTime\": 0,\n \"RequestId\": \"abc\"\n }\n}", + "title": "kibana内嵌登录token获取" + } + ], "DescribeUserCosSnapshotList": [ { "document": "", diff --git a/tccli/services/ess/v20201111/api.json b/tccli/services/ess/v20201111/api.json index 361b52bfa1..deb3564ffc 100644 --- a/tccli/services/ess/v20201111/api.json +++ b/tccli/services/ess/v20201111/api.json @@ -491,7 +491,7 @@ "status": "online" }, "DescribeOrganizationAuthStatus": { - "document": "查询企业认证状态", + "document": "查询企业认证状态- 仅通过[CreateOrganizationAuthUrl](https://qian.tencent.com/developers/companyApis/organizations/CreateOrganizationAuthUrl) 和[CreateBatchOrganizationRegistrationTasks](https://qian.tencent.com/developers/companyApis/organizations/CreateBatchOrganizationRegistrationTasks)这两个接口进行引导认证的企业,调用方企业可以依据这个接口,查询认证状态。", "input": "DescribeOrganizationAuthStatusRequest", "name": "查询企业认证状态", "output": "DescribeOrganizationAuthStatusResponse", diff --git a/tccli/services/ess/v20201111/examples.json b/tccli/services/ess/v20201111/examples.json index 106c70afde..5c9438f4b2 100644 --- a/tccli/services/ess/v20201111/examples.json +++ b/tccli/services/ess/v20201111/examples.json @@ -1439,7 +1439,7 @@ "DescribeOrganizationAuthStatus": [ { "document": "查询企业认证状态", - "input": "POST / HTTP/1.1\nHost: ess.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeOrganizationAuthStatus\n<公共请求参数>\n\n{\n \"Operator\": {\n \"UserId\": \"xxxxxx\"\n },\n \"UniformSocialCreditCode\": \"\",\n \"LegalName\": \"\",\n \"OrganizationName\": \"测试企业\"\n}", + "input": "POST / HTTP/1.1\nHost: ess.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeOrganizationAuthStatus\n<公共请求参数>\n\n{\n \"Operator\": {\n \"UserId\": \"yDRCLUUgygq2xun5UuO4zjEwg0vjoimj\"\n },\n \"UniformSocialCreditCode\": \"\",\n \"LegalName\": \"\",\n \"OrganizationName\": \"测试企业\"\n}", "output": "{\n \"Response\": {\n \"AuthRecords\": [\n {\n \"AuditStatus\": 0,\n \"AuthType\": 3,\n \"OperatorMobile\": \"132****0000\",\n \"OperatorName\": \"典*谦\"\n }\n ],\n \"AuthStatus\": 2,\n \"IsVerified\": true,\n \"RequestId\": \"s1687254031099376002\"\n }\n}", "title": "查询企业认证状态" } diff --git a/tccli/services/essbasic/essbasic_client.py b/tccli/services/essbasic/essbasic_client.py index bf5971adbe..26bbf34b83 100644 --- a/tccli/services/essbasic/essbasic_client.py +++ b/tccli/services/essbasic/essbasic_client.py @@ -1111,6 +1111,58 @@ def doChannelCreateFlowApprovers(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doCreatePersonAuthCertificateImage(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.EssbasicClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.CreatePersonAuthCertificateImageRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.CreatePersonAuthCertificateImage(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doSignFlow(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -6761,6 +6813,7 @@ def doCreateServerFlowSign(args, parsed_globals): "ChannelBatchCancelFlows": doChannelBatchCancelFlows, "ModifySubOrganizationInfo": doModifySubOrganizationInfo, "ChannelCreateFlowApprovers": doChannelCreateFlowApprovers, + "CreatePersonAuthCertificateImage": doCreatePersonAuthCertificateImage, "SignFlow": doSignFlow, "CheckIdCardVerification": doCheckIdCardVerification, "ChannelCreatePreparedPersonalEsign": doChannelCreatePreparedPersonalEsign, diff --git a/tccli/services/essbasic/v20210526/api.json b/tccli/services/essbasic/v20210526/api.json index ac1bad0df9..4b2860adc5 100644 --- a/tccli/services/essbasic/v20210526/api.json +++ b/tccli/services/essbasic/v20210526/api.json @@ -392,6 +392,13 @@ "output": "CreatePartnerAutoSignAuthUrlResponse", "status": "online" }, + "CreatePersonAuthCertificateImage": { + "document": "获取个人用户认证证书图片下载URL\n\n个人用户认证证书图片样式如下图\n\n![image](https://dyn.ess.tencent.cn/guide/capi/CreatePersonAuthCertificateImage.png)\n\n注: \n", + "input": "CreatePersonAuthCertificateImageRequest", + "name": "获取个人用户认证证书图片", + "output": "CreatePersonAuthCertificateImageResponse", + "status": "online" + }, "CreateSealByImage": { "document": "1. 可以**通过图片**为子客企业代创建印章,图片最大5MB\n\n2. 可以**系统创建**子客企业代创建印章, 系统创建的印章样子下图(样式可以调整)\n\n![image](https://dyn.ess.tencent.cn/guide/capi/CreateSealByImage.png)", "input": "CreateSealByImageRequest", @@ -6882,6 +6889,119 @@ ], "type": "object" }, + "CreatePersonAuthCertificateImageRequest": { + "document": "CreatePersonAuthCertificateImage请求参数结构体", + "members": [ + { + "disabled": false, + "document": "关于渠道应用的相关信息,包括渠道应用标识、第三方平台子客企业标识及第三方平台子客企业中的员工标识等内容,您可以参阅开发者中心所提供的 Agent 结构体以获取详细定义。", + "example": "无", + "member": "Agent", + "name": "Agent", + "required": true, + "type": "object" + }, + { + "disabled": false, + "document": "个人用户名称", + "example": "无", + "member": "string", + "name": "UserName", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "证件类型,支持以下类型", + "example": "无", + "member": "string", + "name": "IdCardType", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "证件号码,应符合以下规则", + "example": "无", + "member": "string", + "name": "IdCardNumber", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "自动签使用的场景值, 可以选择的场景值如下:注: `不传默认为处方单场景,即E_PRESCRIPTION_AUTO_SIGN`", + "example": "E_PRESCRIPTION_AUTO_SIGN", + "member": "string", + "name": "SceneKey", + "required": false, + "type": "string" + } + ], + "type": "object" + }, + "CreatePersonAuthCertificateImageResponse": { + "document": "CreatePersonAuthCertificateImage返回参数结构体", + "members": [ + { + "disabled": false, + "document": "个人用户认证证书图片下载URL,`有效期为5分钟`,超过有效期后将无法再下载。", + "example": "https://file.ess.tencent.cn/bresource/resource/resource/0/0.JPG?hkey=fcb0d640136f8f47d28e3f4cd5fb8bac321**da99b18e29d28807fc8e", + "member": "string", + "name": "AuthCertUrl", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "个人用户认证证书的编号, 为20位数字组成的字符串, 由腾讯电子签下发此编号 。该编号会合成到个人用户证书证明图片。注: `个人用户认证证书的编号和证明图片绑定, 获取新的证明图片编号会变动`\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "23090411***877319694", + "member": "string", + "name": "ImageCertId", + "output_required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "CA供应商下发给用户的证书编号,在证书到期后自动续期后此证书编号会发生变动,且不会合成到个人用户证书证明图片中。注意:`腾讯电子签接入多家CA供应商以提供容灾能力,不同CA下发的证书编号区别较大,但基本都是由数字和字母组成,长度在200以下。`\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "2206EB**4597742", + "member": "string", + "name": "SerialNumber", + "output_required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "CA证书颁发时间,格式为Unix标准时间戳(秒) 该时间格式化后会合成到个人用户证书证明图片\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "uint64", + "name": "ValidFrom", + "output_required": false, + "type": "int", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "CA证书有效截止时间,格式为Unix标准时间戳(秒)该时间格式化后会合成到个人用户证书证明图片\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "uint64", + "name": "ValidTo", + "output_required": false, + "type": "int", + "value_allowed_null": true + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "CreateSealByImageRequest": { "document": "CreateSealByImage请求参数结构体", "members": [ diff --git a/tccli/services/essbasic/v20210526/examples.json b/tccli/services/essbasic/v20210526/examples.json index b1e1e7a948..3f13ec1ffa 100644 --- a/tccli/services/essbasic/v20210526/examples.json +++ b/tccli/services/essbasic/v20210526/examples.json @@ -844,6 +844,14 @@ "title": "创建他方自动签授权链接-他方授权" } ], + "CreatePersonAuthCertificateImage": [ + { + "document": "创建个人用户证明证书图片", + "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}", + "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}", + "title": "创建个人用户证明证书图片" + } + ], "CreateSealByImage": [ { "document": "GenerateSource为SealGenerateSourceSystem表示系统生成印章", diff --git a/tccli/services/mariadb/mariadb_client.py b/tccli/services/mariadb/mariadb_client.py index 061af82113..c1b81fdf6b 100644 --- a/tccli/services/mariadb/mariadb_client.py +++ b/tccli/services/mariadb/mariadb_client.py @@ -849,7 +849,7 @@ def doModifyDBParameters(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) -def doModifyLogFileRetentionPeriod(args, parsed_globals): +def doDescribeBackupConfigs(args, parsed_globals): g_param = parse_global_arg(parsed_globals) if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: @@ -878,11 +878,11 @@ def doModifyLogFileRetentionPeriod(args, parsed_globals): client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile) client._sdkVersion += ("_CLI_" + __version__) models = MODELS_MAP[g_param[OptionsDefine.Version]] - model = models.ModifyLogFileRetentionPeriodRequest() + model = models.DescribeBackupConfigsRequest() model.from_json_string(json.dumps(args)) start_time = time.time() while True: - rsp = client.ModifyLogFileRetentionPeriod(model) + rsp = client.DescribeBackupConfigs(model) result = rsp.to_json_string() try: json_obj = json.loads(result) @@ -3657,6 +3657,58 @@ def doUpgradeDBInstance(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doModifyBackupConfigs(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.ModifyBackupConfigsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.ModifyBackupConfigs(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doDescribeBinlogTime(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -3865,6 +3917,58 @@ def doDescribeDBEncryptAttributes(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doModifyLogFileRetentionPeriod(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.ModifyLogFileRetentionPeriodRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.ModifyLogFileRetentionPeriod(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + CLIENT_MAP = { "v20170312": mariadb_client_v20170312, @@ -3892,7 +3996,7 @@ def doDescribeDBEncryptAttributes(args, parsed_globals): "ActivateHourDBInstance": doActivateHourDBInstance, "ResetAccountPassword": doResetAccountPassword, "ModifyDBParameters": doModifyDBParameters, - "ModifyLogFileRetentionPeriod": doModifyLogFileRetentionPeriod, + "DescribeBackupConfigs": doDescribeBackupConfigs, "DescribeDBInstanceDetail": doDescribeDBInstanceDetail, "DescribeDBSlowLogs": doDescribeDBSlowLogs, "DescribeFlow": doDescribeFlow, @@ -3946,10 +4050,12 @@ def doDescribeDBEncryptAttributes(args, parsed_globals): "TerminateDedicatedDBInstance": doTerminateDedicatedDBInstance, "CloneAccount": doCloneAccount, "UpgradeDBInstance": doUpgradeDBInstance, + "ModifyBackupConfigs": doModifyBackupConfigs, "DescribeBinlogTime": doDescribeBinlogTime, "DescribeLogFileRetentionPeriod": doDescribeLogFileRetentionPeriod, "AssociateSecurityGroups": doAssociateSecurityGroups, "DescribeDBEncryptAttributes": doDescribeDBEncryptAttributes, + "ModifyLogFileRetentionPeriod": doModifyLogFileRetentionPeriod, } diff --git a/tccli/services/mariadb/v20170312/api.json b/tccli/services/mariadb/v20170312/api.json index b6e8d31140..15aa8cc04f 100644 --- a/tccli/services/mariadb/v20170312/api.json +++ b/tccli/services/mariadb/v20170312/api.json @@ -98,6 +98,13 @@ "output": "DescribeAccountsResponse", "status": "online" }, + "DescribeBackupConfigs": { + "document": "本接口(DescribeBackupConfigs)用于查询数据库备份配置信息。", + "input": "DescribeBackupConfigsRequest", + "name": "查询云数据库备份配置信息", + "output": "DescribeBackupConfigsResponse", + "status": "online" + }, "DescribeBackupFiles": { "document": "本接口(DescribeBackupFiles)用于查看备份文件列表。", "input": "DescribeBackupFilesRequest", @@ -364,6 +371,13 @@ "output": "ModifyAccountPrivilegesResponse", "status": "online" }, + "ModifyBackupConfigs": { + "document": "本接口(ModifyBackupConfigs)用于修改数据库备份配置信息。\n\n1. 修改数据库超期备份配置,目前按年、按月、按日只支持一种,存在互斥关系,如当前策略按年备份,如果传入按月备份策略将会覆盖当前的按年备份策略,务必注意。", + "input": "ModifyBackupConfigsRequest", + "name": "修改云数据库备份配置信息", + "output": "ModifyBackupConfigsResponse", + "status": "online" + }, "ModifyBackupTime": { "document": "本接口(ModifyBackupTime)用于设置云数据库实例的备份时间。后台系统将根据此配置定期进行实例备份。", "input": "ModifyBackupTimeRequest", @@ -642,6 +656,72 @@ ], "type": "object" }, + "BackupConfig": { + "document": "数据库超期备份配置", + "members": [ + { + "disabled": false, + "document": "备份策略是否启用。", + "example": "true", + "member": "bool", + "name": "EnableBackupPolicy", + "output_required": true, + "type": "bool", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "超期保留开始日期,早于开始日期的超期备份不保留,格式:yyyy-mm-dd。", + "example": "2023-05-30", + "member": "string", + "name": "BeginDate", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "超期备份保留时长,超出保留时间的超期备份将被删除,可填写1-3650整数。", + "example": "180", + "member": "int64", + "name": "MaxRetentionDays", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "备份模式,可选择按年月周模式保存\n* 按年:annually\n* 按月:monthly\n* 按周:weekly", + "example": "monthly", + "member": "string", + "name": "Frequency", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "Frequency等于weekly时生效。\n表示保留特定工作日备份。可选择周一到周日,支持多选,取星期英文:\n* 星期一 :Monday\n* 星期二 :Tuesday\n* 星期三:Wednesday\n* 星期四:Thursday\n* 星期五:Friday\n* 星期六:Saturday\n* 星期日:Sunday", + "example": "Monday", + "member": "string", + "name": "WeekDays", + "output_required": false, + "type": "list", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "保留备份个数,Frequency等于monthly或weekly时生效。\n备份模式选择按月时,可填写1-28整数;\n备份模式选择年时,可填写1-336整数。", + "example": "10", + "member": "int64", + "name": "BackupCount", + "output_required": false, + "type": "int", + "value_allowed_null": false + } + ], + "usage": "out" + }, "CancelDcnJobRequest": { "document": "CancelDcnJob请求参数结构体", "members": [ @@ -3315,6 +3395,103 @@ ], "type": "object" }, + "DescribeBackupConfigsRequest": { + "document": "DescribeBackupConfigs请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例 ID,格式如:tdsql-c1nl9rpv,与云数据库控制台页面中显示的实例 ID 相同。", + "example": "tdsql-c1nl9rpv", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "DescribeBackupConfigsResponse": { + "document": "DescribeBackupConfigs返回参数结构体", + "members": [ + { + "disabled": false, + "document": "实例 ID。", + "example": "tdsql-c1nl9rpv", + "member": "string", + "name": "InstanceId", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "常规备份存储时长,范围[1, 3650]。", + "example": "30", + "member": "uint64", + "name": "Days", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "每天备份执行的区间的开始时间,格式 mm:ss,形如 22:00。", + "example": "03:00", + "member": "string", + "name": "StartBackupTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "每天备份执行的区间的结束时间,格式 mm:ss,形如 23:59。", + "example": "05:59", + "member": "string", + "name": "EndBackupTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "执行备份周期,枚举值:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", + "example": "[Saturday, Sunday]", + "member": "string", + "name": "WeekDays", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "沉降到归档存储时长,-1表示关闭归档设置。", + "example": "91", + "member": "int64", + "name": "ArchiveDays", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "超期备份配置。", + "example": "无", + "member": "BackupConfig", + "name": "BackupConfigSet", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeBackupFilesRequest": { "document": "DescribeBackupFiles请求参数结构体", "members": [ @@ -6567,6 +6744,87 @@ ], "type": "object" }, + "ModifyBackupConfigsRequest": { + "document": "ModifyBackupConfigs请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例 ID,格式如:tdsql-c1nl9rpv,与云数据库控制台页面中显示的实例 ID 相同。", + "example": "tdsql-c1nl9rpv", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "常规备份存储时长,范围[1, 3650]。", + "example": "30", + "member": "uint64", + "name": "Days", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "每天备份执行的区间的开始时间,格式 mm:ss,形如 22:00。", + "example": "03:00", + "member": "string", + "name": "StartBackupTime", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "每天备份执行的区间的结束时间,格式 mm:ss,形如 23:59。", + "example": "05:59", + "member": "string", + "name": "EndBackupTime", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "执行备份周期,枚举值:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", + "example": "[Saturday, Sunday]", + "member": "string", + "name": "WeekDays", + "required": false, + "type": "list" + }, + { + "disabled": false, + "document": "沉降到归档存储时长,-1表示关闭归档设置。", + "example": "91", + "member": "int64", + "name": "ArchiveDays", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "超期备份配置。", + "example": "无", + "member": "NewBackupConfig", + "name": "BackupConfigSet", + "required": false, + "type": "list" + } + ], + "type": "object" + }, + "ModifyBackupConfigsResponse": { + "document": "ModifyBackupConfigs返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "ModifyBackupTimeRequest": { "document": "ModifyBackupTime请求参数结构体", "members": [ @@ -7187,6 +7445,66 @@ ], "type": "object" }, + "NewBackupConfig": { + "document": "数据库超期备份配置", + "members": [ + { + "disabled": false, + "document": "备份策略是否启用。", + "example": "true", + "member": "bool", + "name": "EnableBackupPolicy", + "required": true, + "type": "bool" + }, + { + "disabled": false, + "document": "超期保留开始日期,早于开始日期的超期备份不保留,格式:yyyy-mm-dd。", + "example": "2023-05-30", + "member": "string", + "name": "BeginDate", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "超期备份保留时长,超出保留时间的超期备份将被删除,可填写1-3650整数。", + "example": "180", + "member": "int64", + "name": "MaxRetentionDays", + "required": true, + "type": "int" + }, + { + "disabled": false, + "document": "备份模式,可选择按年月周模式保存\n* 按年:annually\n* 按月:monthly\n* 按周:weekly", + "example": "monthly", + "member": "string", + "name": "Frequency", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "Frequency等于weekly时生效。\n表示保留特定工作日备份。可选择周一到周日,支持多选,取星期英文: \n* 星期一 :Monday \n* 星期二 :Tuesday \n* 星期三:Wednesday\n* 星期四:Thursday \n* 星期五:Friday\n* 星期六:Saturday\n* 星期日:Sunday", + "example": "Monday", + "member": "string", + "name": "WeekDays", + "required": false, + "type": "list" + }, + { + "disabled": false, + "document": "保留备份个数,Frequency等于monthly或weekly时生效。\n备份模式选择按月时,可填写1-28整数;\n备份模式选择年时,可填写1-336整数。", + "example": "10", + "member": "int64", + "name": "BackupCount", + "required": false, + "type": "int" + } + ], + "usage": "in" + }, "NodeInfo": { "document": "描述实例的各个DB节点信息", "members": [ diff --git a/tccli/services/mariadb/v20170312/examples.json b/tccli/services/mariadb/v20170312/examples.json index c2b9931e44..30fb6062a0 100644 --- a/tccli/services/mariadb/v20170312/examples.json +++ b/tccli/services/mariadb/v20170312/examples.json @@ -112,6 +112,14 @@ "title": "无" } ], + "DescribeBackupConfigs": [ + { + "document": "示例1", + "input": "POST / HTTP/1.1\nHost: mariadb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBackupConfigs\n<公共请求参数>\n\n{\n \"InstanceId\": \"tdsql-5a6zl9ez\"\n}", + "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\": 2,\n \"BeginDate\": \"2023-07-01\",\n \"EnableBackupPolicy\": true,\n \"Frequency\": \"annually\",\n \"MaxRetentionDays\": 101,\n \"WeekDays\": [\n \"Monday\"\n ]\n }\n ],\n \"InstanceId\": \"tdsql-5a6zl9ez\",\n \"RequestId\": \"3a2996d9-e46b-4b2c-98d2-d654f3f7db3e\"\n }\n}", + "title": "示例1" + } + ], "DescribeBackupFiles": [ { "document": "", @@ -416,6 +424,14 @@ "title": "修改云数据库实例账号的权限信息" } ], + "ModifyBackupConfigs": [ + { + "document": "每年保留2个超期备份", + "input": "POST / HTTP/1.1\nHost: mariadb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyBackupConfigs\n<公共请求参数>\n\n{\n \"InstanceId\": \"tdsql-5a6zl9ez\",\n \"BackupConfigSet\": [\n {\n \"EnableBackupPolicy\": true,\n \"BeginDate\": \"2023-07-01\",\n \"MaxRetentionDays\": 101,\n \"Frequency\": \"annually\",\n \"BackupCount\": 2\n }\n ]\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"58c161ee-c463-463a-bb5a-b34c81132063\"\n }\n}", + "title": "示例1" + } + ], "ModifyBackupTime": [ { "document": "", diff --git a/tccli/services/ocr/v20181119/api.json b/tccli/services/ocr/v20181119/api.json index d4b032556e..bb6ed327d7 100644 --- a/tccli/services/ocr/v20181119/api.json +++ b/tccli/services/ocr/v20181119/api.json @@ -5793,7 +5793,7 @@ "members": [ { "disabled": false, - "document": "图片/PDF的 Base64 值。\n要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。\n图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。", + "document": "图片/PDF的 Base64 值。要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。", "example": "无", "member": "string", "name": "ImageBase64", @@ -5802,7 +5802,7 @@ }, { "disabled": false, - "document": "图片/PDF的 Url 地址。\n要求图片/PDF经Base64编码后不超过 7M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。\n图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。", + "document": "图片/PDF的 Url 地址。要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。", "example": "https://xx/a.jpg", "member": "string", "name": "ImageUrl", @@ -10451,6 +10451,16 @@ "type": "string", "value_allowed_null": false }, + { + "disabled": false, + "document": "返回类型", + "example": "往来港澳通行证", + "member": "string", + "name": "Type", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, { "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", "member": "string", diff --git a/tccli/services/redis/redis_client.py b/tccli/services/redis/redis_client.py index 7f100430da..2403fa7a14 100644 --- a/tccli/services/redis/redis_client.py +++ b/tccli/services/redis/redis_client.py @@ -2045,6 +2045,58 @@ def doRenewInstance(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doModifyInstanceLogDelivery(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.ModifyInstanceLogDeliveryRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.ModifyInstanceLogDelivery(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doDescribeBackupUrl(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -3761,6 +3813,58 @@ def doDescribeInstanceMonitorBigKey(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doDescribeReplicationGroupInstance(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeReplicationGroupInstanceRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeReplicationGroupInstance(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doDescribeRedisClusters(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -4697,7 +4801,7 @@ def doDescribeBandwidthRange(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) -def doDescribeReplicationGroupInstance(args, parsed_globals): +def doDescribeInstanceLogDelivery(args, parsed_globals): g_param = parse_global_arg(parsed_globals) if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: @@ -4726,11 +4830,11 @@ def doDescribeReplicationGroupInstance(args, parsed_globals): client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile) client._sdkVersion += ("_CLI_" + __version__) models = MODELS_MAP[g_param[OptionsDefine.Version]] - model = models.DescribeReplicationGroupInstanceRequest() + model = models.DescribeInstanceLogDeliveryRequest() model.from_json_string(json.dumps(args)) start_time = time.time() while True: - rsp = client.DescribeReplicationGroupInstance(model) + rsp = client.DescribeInstanceLogDelivery(model) result = rsp.to_json_string() try: json_obj = json.loads(result) @@ -5475,6 +5579,7 @@ def doCloseSSL(args, parsed_globals): "DescribeInstanceDTSInfo": doDescribeInstanceDTSInfo, "InquiryPriceUpgradeInstance": doInquiryPriceUpgradeInstance, "RenewInstance": doRenewInstance, + "ModifyInstanceLogDelivery": doModifyInstanceLogDelivery, "DescribeBackupUrl": doDescribeBackupUrl, "DescribeProjectSecurityGroups": doDescribeProjectSecurityGroups, "DescribeTendisSlowLog": doDescribeTendisSlowLog, @@ -5508,6 +5613,7 @@ def doCloseSSL(args, parsed_globals): "AssociateSecurityGroups": doAssociateSecurityGroups, "DescribeSSLStatus": doDescribeSSLStatus, "DescribeInstanceMonitorBigKey": doDescribeInstanceMonitorBigKey, + "DescribeReplicationGroupInstance": doDescribeReplicationGroupInstance, "DescribeRedisClusters": doDescribeRedisClusters, "KillMasterGroup": doKillMasterGroup, "DescribeCommonDBInstances": doDescribeCommonDBInstances, @@ -5526,7 +5632,7 @@ def doCloseSSL(args, parsed_globals): "OpenSSL": doOpenSSL, "DescribeAutoBackupConfig": doDescribeAutoBackupConfig, "DescribeBandwidthRange": doDescribeBandwidthRange, - "DescribeReplicationGroupInstance": doDescribeReplicationGroupInstance, + "DescribeInstanceLogDelivery": doDescribeInstanceLogDelivery, "DescribeProxySlowLog": doDescribeProxySlowLog, "ModifyInstanceAvailabilityZones": doModifyInstanceAvailabilityZones, "DescribeInstanceDealDetail": doDescribeInstanceDealDetail, diff --git a/tccli/services/redis/v20180412/api.json b/tccli/services/redis/v20180412/api.json index 73011dbd03..7946232c5c 100644 --- a/tccli/services/redis/v20180412/api.json +++ b/tccli/services/redis/v20180412/api.json @@ -217,6 +217,13 @@ "output": "DescribeInstanceEventsResponse", "status": "online" }, + "DescribeInstanceLogDelivery": { + "document": "本接口(DescribeInstanceLogDelivery)用于查询实例的日志投递配置。", + "input": "DescribeInstanceLogDeliveryRequest", + "name": "查询实例日志投递配置", + "output": "DescribeInstanceLogDeliveryResponse", + "status": "online" + }, "DescribeInstanceMonitorBigKey": { "document": "腾讯云数据库 Redis 已经于2022年10月31日下线查询实例大 Key 接口。具体公告,请参见[查询实例大 Key 接口下线公告](https://cloud.tencent.com/document/product/239/81005)。", "input": "DescribeInstanceMonitorBigKeyRequest", @@ -581,6 +588,13 @@ "output": "ModifyInstanceEventResponse", "status": "online" }, + "ModifyInstanceLogDelivery": { + "document": "本接口(ModifyInstanceLogDelivery)用于开启或关闭投递实例日志到CLS。", + "input": "ModifyInstanceLogDeliveryRequest", + "name": "修改实例日志投递配置", + "output": "ModifyInstanceLogDeliveryResponse", + "status": "online" + }, "ModifyInstanceParams": { "document": "本接口(ModifyInstanceParams)用于修改Redis实例的参数配置。", "input": "ModifyInstanceParamsRequest", @@ -3758,6 +3772,43 @@ ], "type": "object" }, + "DescribeInstanceLogDeliveryRequest": { + "document": "DescribeInstanceLogDelivery请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例ID。", + "example": "crs-d8ej0xn2", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "DescribeInstanceLogDeliveryResponse": { + "document": "DescribeInstanceLogDelivery返回参数结构体", + "members": [ + { + "disabled": false, + "document": "实例慢日志投递信息。", + "example": "无", + "member": "LogDeliveryInfo", + "name": "SlowLog", + "output_required": true, + "type": "object", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeInstanceMonitorBigKeyRequest": { "document": "DescribeInstanceMonitorBigKey请求参数结构体", "members": [ @@ -8549,6 +8600,56 @@ ], "type": "object" }, + "LogDeliveryInfo": { + "document": "日志投递信息", + "members": [ + { + "disabled": false, + "document": "日志投递开启状态,开启:true,关闭:false\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "true", + "member": "bool", + "name": "Enabled", + "output_required": true, + "required": false, + "type": "bool", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "日志集ID。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "4ae3d686-0dcf-4db3-9867-482def442c9a", + "member": "string", + "name": "LogsetId", + "output_required": true, + "required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "日志主题ID。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "27197b72-e1cb-4fc1-ab21-3865f589136f", + "member": "string", + "name": "TopicId", + "output_required": true, + "required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "日志集所在地域\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "ap-guangzhou", + "member": "string", + "name": "LogRegion", + "output_required": true, + "required": false, + "type": "string", + "value_allowed_null": true + } + ], + "usage": "both" + }, "ManualBackupInstanceRequest": { "document": "ManualBackupInstance请求参数结构体", "members": [ @@ -9144,6 +9245,114 @@ ], "type": "object" }, + "ModifyInstanceLogDeliveryRequest": { + "document": "ModifyInstanceLogDelivery请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例ID。", + "example": "crs-d8ej0xn2", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "日志类型。当前仅支持设置为slowlog,指慢查询日志。", + "example": "slowlog", + "member": "string", + "name": "LogType", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "日志投递开启状态。\n- true:开启。\n- false:关闭。", + "example": "true", + "member": "bool", + "name": "Enabled", + "required": true, + "type": "bool" + }, + { + "disabled": false, + "document": "投递的日志集ID。", + "example": "4ae3d686-0dcf-4db3-9867-482def442c9a", + "member": "string", + "name": "LogsetId", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "投递的日志主题ID。", + "example": "27197b72-e1cb-4fc1-ab21-3865f589136f", + "member": "string", + "name": "TopicId", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "日志集名称。若**LogsetId**未指定具体的日志集ID,请配置该参数,设置日志集名称,系统会以设置的日志集名称自动创建新的日志集。", + "example": "test-set-name", + "member": "string", + "name": "LogsetName", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "日志主题名称,TopicId为空时必传,会自动创建新的日志主题。", + "example": "test-topic-name", + "member": "string", + "name": "TopicName", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "日志集所在地域,不传默认使用实例所在地域。", + "example": "无", + "member": "string", + "name": "LogRegion", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "日志存储时间,默认为30天,可选范围1-3600天。", + "example": "30", + "member": "int64", + "name": "Period", + "required": false, + "type": "int" + }, + { + "disabled": false, + "document": "创建日志主题时,是否创建索引。", + "example": "true", + "member": "bool", + "name": "CreateIndex", + "required": false, + "type": "bool" + } + ], + "type": "object" + }, + "ModifyInstanceLogDeliveryResponse": { + "document": "ModifyInstanceLogDelivery返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "ModifyInstanceParamsRequest": { "document": "ModifyInstanceParams请求参数结构体", "members": [ diff --git a/tccli/services/redis/v20180412/examples.json b/tccli/services/redis/v20180412/examples.json index f94b83414b..2182508790 100644 --- a/tccli/services/redis/v20180412/examples.json +++ b/tccli/services/redis/v20180412/examples.json @@ -254,6 +254,14 @@ "title": "查询实例事件" } ], + "DescribeInstanceLogDelivery": [ + { + "document": "查询实例日志投递配置", + "input": "POST / HTTP/1.1\nHost: redis.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstanceLogDelivery\n<公共请求参数>\n\n{\n \"InstanceId\": \"crs-ib4uuh7x\"\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"27d4627d-4cc7-4144-af33-ac9f52a36878\",\n \"SlowLog\": {\n \"Enabled\": true,\n \"LogRegion\": \"ap-guangzhou\",\n \"LogsetId\": \"5db981e1-473c-4f1b-a2ad-4f480c49698f\",\n \"TopicId\": \"a78808d4-df0a-44d4-b71d-a111b1ad9170\"\n }\n }\n}", + "title": "示例1" + } + ], "DescribeInstanceMonitorBigKey": [ { "document": "请求示例", @@ -670,6 +678,14 @@ "title": "修改实例事件信息" } ], + "ModifyInstanceLogDelivery": [ + { + "document": "开启实例日志投递,并使用新创建的日志集和日志主题", + "input": "POST / HTTP/1.1\nHost: redis.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyInstanceLogDelivery\n<公共请求参数>\n\n{\n \"InstanceId\": \"crs-ib4uuh7x\",\n \"LogType\": \"slowlog\",\n \"Enabled\": true,\n \"LogsetName\": \"test-logset-name\",\n \"TopicName\": \"test-topic-name\",\n \"CreateIndex\": true\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"ac46037a-57a0-4fe2-a99d-93c10ef20883\"\n }\n}", + "title": "示例1" + } + ], "ModifyInstanceParams": [ { "document": "", diff --git a/tccli/services/teo/v20220901/api.json b/tccli/services/teo/v20220901/api.json index a72d4b504a..5689c42282 100644 --- a/tccli/services/teo/v20220901/api.json +++ b/tccli/services/teo/v20220901/api.json @@ -5850,7 +5850,7 @@ }, { "disabled": false, - "document": "过滤条件,Filters.Values 的上限为 20。该参数不填写时,返回当前 zone-id 下所有域名信息。详细的过滤条件如下:\n
  • domain-name:按照加速域名进行过滤;
  • \n
  • origin-type:按照源站类型进行过滤;
  • \n
  • origin:按照主源站地址进行过滤;
  • \n
  • backup-origin: 按照备用源站地址进行过滤;
  • \n
  • domain-cname:按照 CNAME 进行过滤;
  • \n
  • share-cname:按照共享 CNAME 进行过滤;
  • \n
  • vodeo-sub-app-id:按照【 vodeo 子应用 ID】进行过滤;
  • \n
  • vodeo-distribution-range:按照【 vodeo 分发范围】进行过滤;
  • \n
  • vodeo-bucket-id:按照【vodeo 存储桶 ID】进行过滤;
  • ", + "document": "过滤条件,Filters.Values 的上限为 20。该参数不填写时,返回当前 zone-id 下所有域名信息。详细的过滤条件如下:\n
  • domain-name:按照加速域名进行过滤;
  • \n
  • origin-type:按照源站类型进行过滤;
  • \n
  • origin:按照主源站地址进行过滤;
  • \n
  • backup-origin: 按照备用源站地址进行过滤;
  • \n
  • domain-cname:按照 CNAME 进行过滤;
  • \n
  • share-cname:按照共享 CNAME 进行过滤;
  • ", "example": "无", "member": "AdvancedFilter", "name": "Filters", @@ -8126,7 +8126,7 @@ }, { "disabled": false, - "document": "过滤条件,详细的过滤条件Key值如下:\n
  • ruleId
       按照【转发规则ID】进行过滤。
  • \n
  • proxyId
       按照【四层代理实例ID】进行过滤。
  • ", + "document": "过滤条件,详细的过滤条件Key值如下:\n
  • ruleId:按照转发规则 ID 进行过滤。
  • \n
  • proxyId:按照四层代理实例 ID 进行过滤。
  • ", "example": "无", "member": "QueryCondition", "name": "Filters", @@ -12870,7 +12870,7 @@ "members": [ { "disabled": false, - "document": "源站类型,取值有:\n
  • IP_DOMAIN:IPV4、IPV6 或域名类型源站;
  • \n
  • COS:腾讯云 COS 对象存储源站;
  • \n
  • AWS_S3:AWS S3 对象存储源站;
  • \n
  • ORIGIN_GROUP:源站组类型源站;
  • \n
  • VODEO:云点播-混合云版;
  • \n
  • VOD:云点播;
  • \n
  • SPACE:源站卸载,当前仅白名单开放;
  • \n
  • LB:负载均衡,当前仅白名单开放。
  • ", + "document": "源站类型,取值有:\n
  • IP_DOMAIN:IPV4、IPV6 或域名类型源站;
  • \n
  • COS:腾讯云 COS 对象存储源站;
  • \n
  • AWS_S3:AWS S3 对象存储源站;
  • \n
  • ORIGIN_GROUP:源站组类型源站;
  • \n
  • VOD:云点播;
  • \n
  • SPACE:源站卸载,当前仅白名单开放;
  • \n
  • LB:负载均衡,当前仅白名单开放。
  • ", "example": "ip_domain", "member": "string", "name": "OriginType", @@ -12880,7 +12880,7 @@ }, { "disabled": false, - "document": "源站地址,根据 OriginType 的取值分为以下情况:\n
  • 当 OriginType = IP_DOMAIN 时,该参数为 IPv4、IPv6 地址或域名;
  • \n
  • 当 OriginType = COS 时,该参数为 COS 桶的访问域名;
  • \n
  • 当 OriginType = AWS_S3,该参数为 S3 桶的访问域名;
  • \n
  • 当 OriginType = ORIGIN_GROUP 时,该参数为源站组 ID;
  • \n
  • 当 OriginType = VOD 时,该参数请填写云点播应用 ID ;
  • \n
  • 当 OriginType = VODEO 时,如果 VodeoDistributionRange = ALL,则该参数为 \"all-buckets-in-vodeo-application\";如果 VodeoDistributionRange = Bucket,则该参数为对应存储桶域名。
  • ", + "document": "源站地址,根据 OriginType 的取值分为以下情况:\n
  • 当 OriginType = IP_DOMAIN 时,该参数为 IPv4、IPv6 地址或域名;
  • \n
  • 当 OriginType = COS 时,该参数为 COS 桶的访问域名;
  • \n
  • 当 OriginType = AWS_S3,该参数为 S3 桶的访问域名;
  • \n
  • 当 OriginType = ORIGIN_GROUP 时,该参数为源站组 ID;
  • \n
  • 当 OriginType = VOD 时,该参数请填写云点播应用 ID ;
  • ", "example": "qq.com", "member": "string", "name": "Origin", @@ -12939,7 +12939,7 @@ "value_allowed_null": true }, { - "disabled": false, + "disabled": true, "document": "MO 子应用 ID", "example": "无", "member": "int64", @@ -12949,7 +12949,7 @@ "value_allowed_null": false }, { - "disabled": false, + "disabled": true, "document": "MO 分发范围,取值有:
  • All:全部
  • Bucket:存储桶
  • ", "example": "无", "member": "string", @@ -12959,7 +12959,7 @@ "value_allowed_null": false }, { - "disabled": false, + "disabled": true, "document": "MO 存储桶 ID,分发范围(DistributionRange)为存储桶(Bucket)时必填", "example": "无", "member": "string", @@ -13142,7 +13142,7 @@ "type": "list" }, { - "disabled": false, + "disabled": true, "document": "VODEO 子应用 ID。该参数当 OriginType = VODEO 时必填。", "example": "无", "member": "int64", @@ -13151,7 +13151,7 @@ "type": "int" }, { - "disabled": false, + "disabled": true, "document": "VODEO 分发范围,该参数当 OriginType = VODEO 时必填。取值有: \n
  • All:当前应用下所有存储桶;
  • \n
  • Bucket:指定的某一个存储桶。
  • ", "example": "无", "member": "string", @@ -13160,7 +13160,7 @@ "type": "string" }, { - "disabled": false, + "disabled": true, "document": "VODEO 存储桶 ID,该参数当 OriginType = VODEO 且 VodeoDistributionRange = Bucket 时必填。", "example": "无", "member": "string", @@ -15931,11 +15931,11 @@ "members": [ { "disabled": false, - "document": "返回数据对应时间点,采用unix秒级时间戳。", + "document": "返回数据对应时间点,采用 unix 秒级时间戳。", "example": "1652659200", "member": "int64", "name": "Timestamp", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -15945,7 +15945,7 @@ "example": "100", "member": "int64", "name": "Value", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false } @@ -16507,7 +16507,7 @@ }, { "disabled": false, - "document": "站点接入方式,取值有:\n
  • full:NS 接入;
  • \n
  • partial:CNAME 接入;
  • \n
  • noDomainAccess:无域名接入;
  • \n
  • vodeo:开启 VODEO 后默认接入。
  • ", + "document": "站点接入方式,取值有:\n
  • full:NS 接入;
  • \n
  • partial:CNAME 接入;
  • \n
  • noDomainAccess:无域名接入;
  • ", "example": "full", "member": "string", "name": "Type", diff --git a/tccli/services/tsf/v20180326/api.json b/tccli/services/tsf/v20180326/api.json index c7bc2925cb..c0dd1c7150 100644 --- a/tccli/services/tsf/v20180326/api.json +++ b/tccli/services/tsf/v20180326/api.json @@ -2537,100 +2537,130 @@ { "disabled": false, "document": "rule Id\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "RuleId", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, { "disabled": false, "document": "API ID\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "ApiId", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, { "disabled": false, "document": "限流名称\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "RuleName", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, { "disabled": false, "document": "最大限流qps\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "uint64", "name": "MaxQps", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": true }, { "disabled": false, "document": "生效/禁用, enabled/disabled\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "UsableStatus", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, { "disabled": false, "document": "规则内容\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "RuleContent", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, { "disabled": false, "document": "Tsf Rule ID\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "TsfRuleId", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, { "disabled": false, "document": "描述\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "Description", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, { "disabled": false, "document": "创建时间\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "CreatedTime", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, { "disabled": false, "document": "更新时间\n注意:此字段可能返回 null,表示取不到有效值。", - "example": "", + "example": "无", "member": "string", "name": "UpdatedTime", - "required": true, + "output_required": true, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "分页参数limit\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "int64", + "name": "Limit", + "output_required": false, + "type": "int", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "分页参数offset\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "int64", + "name": "Offset", + "output_required": false, + "type": "int", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "AppId\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "string", + "name": "AppId", + "output_required": false, "type": "string", "value_allowed_null": true } @@ -6403,7 +6433,7 @@ { "disabled": false, "document": "API分组ID", - "example": "", + "example": "无", "member": "string", "name": "GroupId", "required": true, @@ -6412,11 +6442,20 @@ { "disabled": false, "document": "微服务ID", - "example": "", + "example": "无", "member": "string", "name": "MicroserviceId", "required": true, "type": "string" + }, + { + "disabled": false, + "document": "命名空间ID", + "example": "无", + "member": "string", + "name": "NamespaceId", + "required": false, + "type": "string" } ], "type": "object" @@ -6427,9 +6466,10 @@ { "disabled": false, "document": "是否成功", - "example": "", + "example": "无", "member": "bool", "name": "Result", + "output_required": true, "type": "bool", "value_allowed_null": false }, @@ -18482,7 +18522,8 @@ "example": "api-sadasf", "member": "string", "name": "ApiId", - "required": true, + "output_required": true, + "required": false, "type": "string", "value_allowed_null": false }, @@ -18492,7 +18533,8 @@ "example": "/test/echo/xxx", "member": "string", "name": "Path", - "required": true, + "output_required": true, + "required": false, "type": "string", "value_allowed_null": false }, @@ -18502,7 +18544,8 @@ "example": "ms1", "member": "string", "name": "MicroserviceName", - "required": true, + "output_required": true, + "required": false, "type": "string", "value_allowed_null": false }, @@ -18512,7 +18555,8 @@ "example": "GET", "member": "string", "name": "Method", - "required": true, + "output_required": true, + "required": false, "type": "string", "value_allowed_null": true }, @@ -18522,12 +18566,13 @@ "example": "ns-test", "member": "string", "name": "NamespaceName", - "required": true, + "output_required": true, + "required": false, "type": "string", "value_allowed_null": true } ], - "usage": "out" + "usage": "both" }, "GatewayGroupIds": { "document": "网关部署组ID和网关API分组ID元组", diff --git a/tccli/services/vdb/v20230616/api.json b/tccli/services/vdb/v20230616/api.json index ef2d6a20c3..33a83384a0 100644 --- a/tccli/services/vdb/v20230616/api.json +++ b/tccli/services/vdb/v20230616/api.json @@ -1,11 +1,46 @@ { "actions": { + "AssociateSecurityGroups": { + "document": "本接口 (AssociateSecurityGroups) 用于安全组批量绑定多个指定实例。", + "input": "AssociateSecurityGroupsRequest", + "name": "绑定安全组", + "output": "AssociateSecurityGroupsResponse", + "status": "online" + }, + "DescribeDBSecurityGroups": { + "document": "本接口(DescribeDBSecurityGroups)用于查询实例的安全组详情。", + "input": "DescribeDBSecurityGroupsRequest", + "name": "查询实例安全组详情", + "output": "DescribeDBSecurityGroupsResponse", + "status": "online" + }, + "DescribeInstanceNodes": { + "document": "实例节点列表", + "input": "DescribeInstanceNodesRequest", + "name": "实例pod列表(仅返回 pod 名称)", + "output": "DescribeInstanceNodesResponse", + "status": "online" + }, "DescribeInstances": { "document": "查询实例列表", "input": "DescribeInstancesRequest", "name": "查询实例列表", "output": "DescribeInstancesResponse", "status": "online" + }, + "DisassociateSecurityGroups": { + "document": "本接口(DisassociateSecurityGroups)用于安全组批量解绑实例。", + "input": "DisassociateSecurityGroupsRequest", + "name": "安全组批量解绑云资源", + "output": "DisassociateSecurityGroupsResponse", + "status": "online" + }, + "ModifyDBInstanceSecurityGroups": { + "document": "本接口(ModifyDBInstanceSecurityGroups)用于修改实例绑定的安全组。", + "input": "ModifyDBInstanceSecurityGroupsRequest", + "name": "修改云数据库安全组", + "output": "ModifyDBInstanceSecurityGroupsResponse", + "status": "online" } }, "metadata": { @@ -15,6 +50,116 @@ "serviceShortName": "vdb" }, "objects": { + "AssociateSecurityGroupsRequest": { + "document": "AssociateSecurityGroups请求参数结构体", + "members": [ + { + "disabled": false, + "document": "要绑定的安全组 ID,类似sg-efil7***。", + "example": "[\"sg-ajr1jzgj\"]", + "member": "string", + "name": "SecurityGroupIds", + "required": true, + "type": "list" + }, + { + "disabled": false, + "document": "实例 ID,格式如:vdb-c1nl9***,支持指定多个实例", + "example": "[\"vdb-eb2w7dto\"]", + "member": "string", + "name": "InstanceIds", + "required": true, + "type": "list" + } + ], + "type": "object" + }, + "AssociateSecurityGroupsResponse": { + "document": "AssociateSecurityGroups返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, + "DescribeDBSecurityGroupsRequest": { + "document": "DescribeDBSecurityGroups请求参数结构体", + "members": [ + { + "disabled": false, + "document": "实例ID,格式如:vdb-c1nl9***。", + "example": "vdb-c1nl9rpv", + "member": "string", + "name": "InstanceId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "DescribeDBSecurityGroupsResponse": { + "document": "DescribeDBSecurityGroups返回参数结构体", + "members": [ + { + "disabled": false, + "document": "安全组规则。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "SecurityGroup", + "name": "Groups", + "output_required": true, + "type": "list", + "value_allowed_null": true + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, + "DescribeInstanceNodesRequest": { + "document": "DescribeInstanceNodes请求参数结构体", + "members": [], + "type": "object" + }, + "DescribeInstanceNodesResponse": { + "document": "DescribeInstanceNodes返回参数结构体", + "members": [ + { + "disabled": false, + "document": "实例pod列表。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "[\"worker-0\", \"search-0\", \"master-0\"]", + "member": "NodeInfo", + "name": "Items", + "output_required": false, + "type": "list", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "查询结果总数量。", + "example": "3", + "member": "uint64", + "name": "TotalCount", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeInstancesRequest": { "document": "DescribeInstances请求参数结构体", "members": [ @@ -170,6 +315,128 @@ ], "type": "object" }, + "DisassociateSecurityGroupsRequest": { + "document": "DisassociateSecurityGroups请求参数结构体", + "members": [ + { + "disabled": false, + "document": "要绑定的安全组 ID,类似sg-efil****。", + "example": "{\"sg-ajr1jzgj\"]", + "member": "string", + "name": "SecurityGroupIds", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "实例 ID,格式如:vdb-c1nl****,支持指定多个实例。", + "example": "[\"vdb-eb2w7dto\"]", + "member": "string", + "name": "InstanceIds", + "required": true, + "type": "list" + } + ], + "type": "object" + }, + "DisassociateSecurityGroupsResponse": { + "document": "DisassociateSecurityGroups返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, + "Inbound": { + "document": "安全组入站规则", + "members": [ + { + "disabled": false, + "document": "策略,ACCEPT或者DROP。", + "example": "无", + "member": "string", + "name": "Action", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "地址组id代表的地址集合。", + "example": "无", + "member": "string", + "name": "AddressModule", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "来源Ip或Ip段,例如192.168.0.0/16。", + "example": "无", + "member": "string", + "name": "CidrIp", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "描述。", + "example": "无", + "member": "string", + "name": "Desc", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "网络协议,支持udp、tcp等。", + "example": "无", + "member": "string", + "name": "IpProtocol", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "端口。", + "example": "无", + "member": "string", + "name": "PortRange", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "服务组id代表的协议和端口集合。", + "example": "无", + "member": "string", + "name": "ServiceModule", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "安全组id代表的地址集合。", + "example": "无", + "member": "string", + "name": "Id", + "required": true, + "type": "string", + "value_allowed_null": false + } + ], + "usage": "out" + }, "InstanceInfo": { "document": "实例信息,用于实例列表", "members": [ @@ -446,6 +713,42 @@ ], "usage": "out" }, + "ModifyDBInstanceSecurityGroupsRequest": { + "document": "ModifyDBInstanceSecurityGroups请求参数结构体", + "members": [ + { + "disabled": false, + "document": "要修改的安全组ID列表,一个或者多个安全组 ID 组成的数组。", + "example": "[\"sg-ajr1jzgj\\n\"]", + "member": "string", + "name": "SecurityGroupIds", + "required": true, + "type": "list" + }, + { + "disabled": false, + "document": "实例ID,格式如:vdb-c9s3****。", + "example": "[\"vdb-c9s3b1h4\"]", + "member": "string", + "name": "InstanceIds", + "required": true, + "type": "list" + } + ], + "type": "object" + }, + "ModifyDBInstanceSecurityGroupsResponse": { + "document": "ModifyDBInstanceSecurityGroups返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "Network": { "document": "网络信息", "members": [ @@ -492,6 +795,194 @@ ], "usage": "out" }, + "NodeInfo": { + "document": "实例pod信息,仅包含 pod 名称", + "members": [ + { + "disabled": false, + "document": "Pod名称。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "string", + "name": "Name", + "output_required": false, + "type": "string", + "value_allowed_null": true + } + ], + "usage": "out" + }, + "Outbound": { + "document": "安全组出站规则", + "members": [ + { + "disabled": false, + "document": "策略,ACCEPT或者DROP。", + "example": "无", + "member": "string", + "name": "Action", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "地址组id代表的地址集合。", + "example": "无", + "member": "string", + "name": "AddressModule", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "来源Ip或Ip段,例如192.168.0.0/16。", + "example": "无", + "member": "string", + "name": "CidrIp", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "描述。", + "example": "无", + "member": "string", + "name": "Desc", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "网络协议,支持udp、tcp等。", + "example": "无", + "member": "string", + "name": "IpProtocol", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "端口。", + "example": "无", + "member": "string", + "name": "PortRange", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "服务组id代表的协议和端口集合。", + "example": "无", + "member": "string", + "name": "ServiceModule", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "安全组id代表的地址集合。", + "example": "无", + "member": "string", + "name": "Id", + "required": true, + "type": "string", + "value_allowed_null": false + } + ], + "usage": "out" + }, + "SecurityGroup": { + "document": "安全组规则", + "members": [ + { + "disabled": false, + "document": "创建时间,时间格式:yyyy-mm-dd hh:mm:ss。", + "example": "无", + "member": "string", + "name": "CreateTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "项目ID。", + "example": "无", + "member": "string", + "name": "ProjectId", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "安全组ID。", + "example": "无", + "member": "string", + "name": "SecurityGroupId", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "安全组名称。", + "example": "无", + "member": "string", + "name": "SecurityGroupName", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "安全组备注。", + "example": "无", + "member": "string", + "name": "SecurityGroupRemark", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "出站规则。", + "example": "无", + "member": "Outbound", + "name": "Outbound", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "入站规则。", + "example": "无", + "member": "Inbound", + "name": "Inbound", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "修改时间,时间格式:yyyy-mm-dd hh:mm:ss。", + "example": "无", + "member": "string", + "name": "UpdateTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + } + ], + "usage": "out" + }, "Tag": { "document": "标签键值对", "members": [ diff --git a/tccli/services/vdb/v20230616/examples.json b/tccli/services/vdb/v20230616/examples.json index b672362f2e..14dbfce9bf 100644 --- a/tccli/services/vdb/v20230616/examples.json +++ b/tccli/services/vdb/v20230616/examples.json @@ -1,5 +1,35 @@ { "actions": { + "AssociateSecurityGroups": [ + { + "document": "绑定安全组", + "input": "POST / HTTP/1.1\nHost: vdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AssociateSecurityGroups\n<公共请求参数>\n\n{\n \"SecurityGroupIds\": [\n \"sg-r6saerpd\"\n ],\n \"InstanceIds\": [\n \"vdb-77qt0r46\"\n ]\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"c7699436-416b-4d3a-9142-9dee2e5b4e06\"\n }\n}", + "title": "示例1" + } + ], + "DescribeDBSecurityGroups": [ + { + "document": "查询实例安全组", + "input": "POST / HTTP/1.1\nHost: vdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDBSecurityGroups\n<公共请求参数>\n\n{\n \"InstanceId\": \"vdb-77qt0r46\"\n}", + "output": "{\n \"Response\": {\n \"Groups\": [\n {\n \"CreateTime\": \"2023-07-03 11:41:46\",\n \"Inbound\": [\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"\",\n \"CidrIp\": \"::/0\",\n \"Desc\": \"放通Windows远程登录\",\n \"Id\": \"\",\n \"IpProtocol\": \"tcp\",\n \"PortRange\": \"3389\",\n \"ServiceModule\": \"\"\n },\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"\",\n \"CidrIp\": \"::/0\",\n \"Desc\": \"放通Linux SSH登录\",\n \"Id\": \"\",\n \"IpProtocol\": \"tcp\",\n \"PortRange\": \"22\",\n \"ServiceModule\": \"\"\n }\n ],\n \"Outbound\": [\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"\",\n \"CidrIp\": \"\",\n \"Desc\": \"\",\n \"Id\": \"\",\n \"IpProtocol\": \"ALL\",\n \"PortRange\": \"ALL\",\n \"ServiceModule\": \"\"\n }\n ],\n \"ProjectId\": \"0\",\n \"SecurityGroupId\": \"sg-9hb3ijfx\",\n \"SecurityGroupName\": \"安全组4\",\n \"SecurityGroupRemark\": \"测试安全组\",\n \"UpdateTime\": \"2023-07-03 11:41:49\"\n }\n ],\n \"RequestId\": \"3bd8eb38-516f-44f3-b127-40e9f83f9793\"\n }\n}", + "title": "示例1" + } + ], + "DescribeInstanceNodes": [ + { + "document": "调用接口成功", + "input": "POST / HTTP/1.1\nHost: vdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstanceNodes\n<公共请求参数>\n\n{}", + "output": "{\n \"Response\": {\n \"Items\": [\n {\n \"Name\": \"master-0\"\n },\n {\n \"Name\": \"search-0\"\n },\n {\n \"Name\": \"worker-0\"\n }\n ],\n \"RequestId\": \"c0c57557-d604-4bfc-abed-5ae659961720\",\n \"TotalCount\": 3\n }\n}", + "title": "成功示例" + }, + { + "document": "调用接口失败", + "input": "POST / HTTP/1.1\nHost: vdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstanceNodes\n<公共请求参数>\n\n{}", + "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"FailedOperation\",\n \"Message\": \"instance \\\"vdb-ecbgiqwb1\\\" not found\"\n },\n \"RequestId\": \"e74de2e6-6f46-4cc3-b77a-15d799fedde9\"\n }\n}", + "title": "调用失败" + } + ], "DescribeInstances": [ { "document": "查询实例列表", @@ -7,6 +37,22 @@ "output": "{\n \"Response\": {\n \"Items\": [\n {\n \"AppId\": 251223614,\n \"Cpu\": 1,\n \"CreatedAt\": \"2023-07-07\",\n \"Disk\": 20,\n \"EngineName\": \"\",\n \"EngineVersion\": \"\",\n \"ExpiredAt\": \"2023-08-07\",\n \"Extend\": \"{\\\"Port\\\": \\\"8100\\\", \\\"DiskType\\\": \\\"CLOUD_SSD\\\", \\\"NodeType\\\": \\\"Store\\\", \\\"Platform\\\": \\\"vdb-cd\\\", \\\"NodeSpecs\\\": \\\"{\\\\\\\"Cpu\\\\\\\":1,\\\\\\\"Memory\\\\\\\":8}\\\", \\\"NodeNumber\\\": \\\"3\\\", \\\"DiskCapacity\\\": \\\"20\\\", \\\"DiskTypeValue\\\": \\\"云硬盘\\\", \\\"EngineVersion\\\": \\\"v1.0.0\\\", \\\"NodeTypeValue\\\": \\\"存储型\\\", \\\"NodeSpecsValue\\\": \\\"S.2SMALL\\\", \\\"NodeNumberValue\\\": \\\"\\\", \\\"DiskCapacityValue\\\": \\\"\\\"}\",\n \"HealthScore\": 0,\n \"InstanceId\": \"vdb-77qt0r46\",\n \"IsNoExpired\": false,\n \"Memory\": 8,\n \"Name\": \"benyqhuang_测试\",\n \"Networks\": [\n {\n \"Port\": 8100,\n \"SubnetId\": \"subnet-02bwnv4i\",\n \"Vip\": \"10.0.7.132\",\n \"VpcId\": \"vpc-kddx224l\"\n }\n ],\n \"PayMode\": 1,\n \"Product\": \"vdb\",\n \"Project\": \"vdb\",\n \"Region\": \"ap-guangzhou\",\n \"ReplicaNum\": 3,\n \"ResourceTags\": [],\n \"ShardNum\": 1,\n \"Status\": \"online\",\n \"Warning\": 0,\n \"Zone\": \"ap-guangzhou-3\"\n },\n {\n \"AppId\": 251223614,\n \"Cpu\": 1,\n \"CreatedAt\": \"2023-07-06\",\n \"Disk\": 20,\n \"EngineName\": \"\",\n \"EngineVersion\": \"\",\n \"ExpiredAt\": \"2023-08-06\",\n \"Extend\": \"{\\\"Port\\\": \\\"8100\\\", \\\"DiskType\\\": \\\"CLOUD_SSD\\\", \\\"NodeType\\\": \\\"Store\\\", \\\"Platform\\\": \\\"vdb-cd\\\", \\\"NodeSpecs\\\": \\\"{\\\\\\\"Cpu\\\\\\\":1,\\\\\\\"Memory\\\\\\\":8}\\\", \\\"NodeNumber\\\": \\\"3\\\", \\\"DiskCapacity\\\": \\\"20\\\", \\\"DiskTypeValue\\\": \\\"云硬盘\\\", \\\"EngineVersion\\\": \\\"v1.0.0\\\", \\\"NodeTypeValue\\\": \\\"存储型\\\", \\\"NodeSpecsValue\\\": \\\"S.2SMALL\\\", \\\"NodeNumberValue\\\": \\\"\\\", \\\"DiskCapacityValue\\\": \\\"\\\"}\",\n \"HealthScore\": 0,\n \"InstanceId\": \"vdb-o2ovx6ko\",\n \"IsNoExpired\": false,\n \"Memory\": 8,\n \"Name\": \"ha-test\",\n \"Networks\": [\n {\n \"Port\": 8100,\n \"SubnetId\": \"subnet-02bwnv4i\",\n \"Vip\": \"10.0.7.115\",\n \"VpcId\": \"vpc-kddx224l\"\n }\n ],\n \"PayMode\": 1,\n \"Product\": \"vdb\",\n \"Project\": \"vdb\",\n \"Region\": \"ap-guangzhou\",\n \"ReplicaNum\": 3,\n \"ResourceTags\": [],\n \"ShardNum\": 1,\n \"Status\": \"online\",\n \"Warning\": 0,\n \"Zone\": \"ap-guangzhou-3\"\n }\n ],\n \"RequestId\": \"2757e3ad-427f-45dc-9119-8c9cfb4ae614\",\n \"TotalCount\": 2\n }\n}", "title": "示例1" } + ], + "DisassociateSecurityGroups": [ + { + "document": "用于安全组批量解绑实例。", + "input": "POST / HTTP/1.1\nHost: vdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DisassociateSecurityGroups\n<公共请求参数>\n\n{\n \"SecurityGroupIds\": \"sg-dutt****\",\n \"InstanceIds\": [\n \"vdb-9clk****\"\n ]\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"c7297527-0e7c-43ad-bdb1-b90fc222d43d\"\n }\n}", + "title": "示例1" + } + ], + "ModifyDBInstanceSecurityGroups": [ + { + "document": "修改实例绑定的安全组", + "input": "POST / HTTP/1.1\nHost: vdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDBInstanceSecurityGroups\n<公共请求参数>\n\n{\n \"InstanceIds\": [\n \"vdb-9clk****\"\n ],\n \"SecurityGroupIds\": [\n \"sg-iqxw****\",\n \"sg-dutt****\",\n \"sg-eudo****\"\n ]\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"b3a86195-eee7-4e17-8405-e1fc5810c55b\"\n }\n}", + "title": "示例1" + } ] }, "version": "1.0" diff --git a/tccli/services/vdb/vdb_client.py b/tccli/services/vdb/vdb_client.py index 1cebb1acf9..0af3a0b5af 100644 --- a/tccli/services/vdb/vdb_client.py +++ b/tccli/services/vdb/vdb_client.py @@ -17,6 +17,58 @@ from jmespath import search import time +def doAssociateSecurityGroups(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.VdbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.AssociateSecurityGroupsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.AssociateSecurityGroups(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + def doDescribeInstances(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -69,6 +121,214 @@ def doDescribeInstances(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doDescribeDBSecurityGroups(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.VdbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeDBSecurityGroupsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeDBSecurityGroups(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + +def doModifyDBInstanceSecurityGroups(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.VdbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.ModifyDBInstanceSecurityGroupsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.ModifyDBInstanceSecurityGroups(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + +def doDescribeInstanceNodes(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.VdbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeInstanceNodesRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeInstanceNodes(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + +def doDisassociateSecurityGroups(args, parsed_globals): + g_param = parse_global_arg(parsed_globals) + + if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: + cred = credential.CVMRoleCredential() + elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: + cred = credential.STSAssumeRoleCredential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')], + g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"] + ) + 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): + cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials() + else: + cred = credential.Credential( + g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token] + ) + http_profile = HttpProfile( + reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]), + reqMethod="POST", + endpoint=g_param[OptionsDefine.Endpoint], + proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')] + ) + profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256") + if g_param[OptionsDefine.Language]: + profile.language = g_param[OptionsDefine.Language] + mod = CLIENT_MAP[g_param[OptionsDefine.Version]] + client = mod.VdbClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DisassociateSecurityGroupsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DisassociateSecurityGroups(model) + result = rsp.to_json_string() + try: + json_obj = json.loads(result) + except TypeError as e: + json_obj = json.loads(result.decode('utf-8')) # python3.3 + if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']: + break + cur_time = time.time() + if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']: + raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' % + (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'], + search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))) + else: + print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)) + time.sleep(g_param['OptionsDefine.WaiterInfo']['interval']) + FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) + + CLIENT_MAP = { "v20230616": vdb_client_v20230616, @@ -80,7 +340,12 @@ def doDescribeInstances(args, parsed_globals): } ACTION_MAP = { + "AssociateSecurityGroups": doAssociateSecurityGroups, "DescribeInstances": doDescribeInstances, + "DescribeDBSecurityGroups": doDescribeDBSecurityGroups, + "ModifyDBInstanceSecurityGroups": doModifyDBInstanceSecurityGroups, + "DescribeInstanceNodes": doDescribeInstanceNodes, + "DisassociateSecurityGroups": doDisassociateSecurityGroups, } diff --git a/tccli/services/vpc/v20170312/api.json b/tccli/services/vpc/v20170312/api.json index e26f2e69f1..3525b0139e 100644 --- a/tccli/services/vpc/v20170312/api.json +++ b/tccli/services/vpc/v20170312/api.json @@ -29341,7 +29341,7 @@ "members": [ { "disabled": false, - "document": "目的网段,取值不能在私有网络网段内,例如:112.20.51.0/24。", + "document": "创建IPv4目的网段,取值不能在私有网络网段内,例如:112.20.51.0/24。", "example": "-", "member": "string", "name": "DestinationCidrBlock", @@ -29352,7 +29352,7 @@ }, { "disabled": false, - "document": "下一跳类型,目前我们支持的类型有:\nCVM:公网网关类型的云服务器;\nVPN:VPN网关;\nDIRECTCONNECT:专线网关;\nPEERCONNECTION:对等连接;\nHAVIP:高可用虚拟IP;\nNAT:NAT网关; \nNORMAL_CVM:普通云服务器;\nEIP:云服务器的公网IP;\nLOCAL_GATEWAY:本地网关。", + "document": "下一跳类型,目前我们支持的类型有:\nCVM:公网网关类型的云服务器;\nVPN:VPN网关;\nDIRECTCONNECT:专线网关;\nPEERCONNECTION:对等连接;\nHAVIP:高可用虚拟IP;\nNAT:公网NAT网关; \nNORMAL_CVM:普通云服务器;\nEIP:云服务器的公网IP;\nLOCAL_GATEWAY:CDC本地网关;\nINTRANAT:私网NAT网关;\nUSER_CCN;云联网(自定义路由)。\n", "example": "-", "member": "string", "name": "GatewayType", @@ -29429,7 +29429,7 @@ }, { "disabled": false, - "document": "目的IPv6网段,取值不能在私有网络网段内,例如:2402:4e00:1000:810b::/64。\n注意:此字段可能返回 null,表示取不到有效值。", + "document": "创建IPv6目的网段,取值不能在私有网络网段内,例如:2402:4e00:1000:810b::/64。\n注意:此字段可能返回 null,表示取不到有效值。", "example": "-", "member": "string", "name": "DestinationIpv6CidrBlock", @@ -29451,7 +29451,7 @@ }, { "disabled": false, - "document": "路由策略是否发布到云联网。\n注意:此字段可能返回 null,表示取不到有效值。", + "document": "路由策略是否发布到云联网。该字段仅做出参使用,作为入参字段时此参数不生效。\n注意:此字段可能返回 null,表示取不到有效值。", "example": "True", "member": "bool", "name": "PublishedToVbc",