diff --git a/CHANGELOG.md b/CHANGELOG.md index f87de9abb8..a283c2bab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,102 @@ +# Release 3.0.1160.1 + +## 云防火墙(cfw) 版本:2019-09-04 + +### 第 61 次发布 + +发布时间:2024-07-30 01:19:22 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [DescAcItem](https://cloud.tencent.com/document/api/1132/49071#DescAcItem) + + * 新增成员:LastHitTime + + + + +## 日志服务(cls) 版本:2020-10-16 + +### 第 101 次发布 + +发布时间:2024-07-30 01:22:32 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [DataTransformTaskInfo](https://cloud.tencent.com/document/api/614/56471#DataTransformTaskInfo) + + * 新增成员:DataTransformType + + + + +## 云安全一体化平台(csip) 版本:2022-11-21 + +### 第 42 次发布 + +发布时间:2024-07-30 01:24:16 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [DescribeCFWAssetStatistics](https://cloud.tencent.com/document/api/664/109405) + + + +## 主机安全(cwp) 版本:2018-02-28 + +### 第 118 次发布 + +发布时间:2024-07-30 01:25:44 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [BashEvent](https://cloud.tencent.com/document/api/296/19867#BashEvent) + + * 新增成员:HostName + +* [BashEventsInfo](https://cloud.tencent.com/document/api/296/19867#BashEventsInfo) + + * 新增成员:DetectBy + + + + +## 实时音视频(trtc) 版本:2019-07-22 + +### 第 83 次发布 + +发布时间:2024-07-30 02:22:25 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [ControlAIConversation](https://cloud.tencent.com/document/api/647/109408) + +新增数据结构: + +* [ServerPushText](https://cloud.tencent.com/document/api/647/44055#ServerPushText) + + + # Release 3.0.1159.1 ## 音频内容安全(ams) 版本:2020-12-29 diff --git a/SERVICE_CHANGELOG.md b/SERVICE_CHANGELOG.md index a976b08d07..d63fc15bbc 100644 --- a/SERVICE_CHANGELOG.md +++ b/SERVICE_CHANGELOG.md @@ -1,221 +1,48 @@ # 本版本更新包含以下内容: -## 音频内容安全(ams) 版本:2020-12-29 - -### 第 11 次发布 - -发布时间:2024-07-26 01:08:05 - -本次发布包含了以下内容: - -改善已有的文档。 - -修改接口: - -* [DescribeTaskDetail](https://cloud.tencent.com/document/api/1219/53256) - - * 新增出参:MediaInfo - - -新增数据结构: - -* [LabelResults](https://cloud.tencent.com/document/api/1219/53259#LabelResults) -* [SpeakerResults](https://cloud.tencent.com/document/api/1219/53259#SpeakerResults) -* [TravelResults](https://cloud.tencent.com/document/api/1219/53259#TravelResults) - -修改数据结构: - -* [AudioResult](https://cloud.tencent.com/document/api/1219/53259#AudioResult) - - * 新增成员:SpeakerResults, LabelResults, TravelResults - -* [AudioResultDetailMoanResult](https://cloud.tencent.com/document/api/1219/53259#AudioResultDetailMoanResult) - -* [AudioSegments](https://cloud.tencent.com/document/api/1219/53259#AudioSegments) - - * 新增成员:CreatedAt - -* [TaskData](https://cloud.tencent.com/document/api/1219/53259#TaskData) - - * 新增成员:InputInfo - - - - -## 音频内容安全(ams) 版本:2020-06-08 - - - -## 云拨测(cat) 版本:2018-04-09 - -### 第 18 次发布 - -发布时间:2024-07-26 01:15:04 - -本次发布包含了以下内容: - -改善已有的文档。 - -修改接口: - -* [CreateProbeTasks](https://cloud.tencent.com/document/api/280/66213) - - * 新增入参:SubSyncFlag - - - - -## 云数据库 MySQL(cdb) 版本:2017-03-20 - -### 第 162 次发布 - -发布时间:2024-07-26 01:16:06 - -本次发布包含了以下内容: - -改善已有的文档。 - -修改接口: - -* [CreateCloneInstance](https://cloud.tencent.com/document/api/236/50424) - - * 新增入参:ClusterTopology - -* [CreateDBInstance](https://cloud.tencent.com/document/api/236/15871) - - * 新增入参:ClusterTopology - -* [CreateDBInstanceHour](https://cloud.tencent.com/document/api/236/15865) - - * 新增入参:ClusterTopology - - - - -## 内容分发网络 CDN(cdn) 版本:2018-06-06 - -### 第 128 次发布 - -发布时间:2024-07-26 01:17:46 - -本次发布包含了以下内容: - -改善已有的文档。 - -修改接口: - -* [UpdateDomainConfig](https://cloud.tencent.com/document/api/228/41116) - - * 新增入参:ParamFilter - - -新增数据结构: - -* [ParamFilter](https://cloud.tencent.com/document/api/228/30987#ParamFilter) -* [ParamFilterRule](https://cloud.tencent.com/document/api/228/30987#ParamFilterRule) - -修改数据结构: - -* [DetailDomain](https://cloud.tencent.com/document/api/228/30987#DetailDomain) - - * 新增成员:ParamFilter - - - - ## 云防火墙(cfw) 版本:2019-09-04 -### 第 60 次发布 +### 第 61 次发布 -发布时间:2024-07-26 01:19:51 +发布时间:2024-07-30 01:19:22 本次发布包含了以下内容: 改善已有的文档。 -新增接口: - -* [DescribeNatFwDnatRule](https://cloud.tencent.com/document/api/1132/109336) - -新增数据结构: - -* [DescNatDnatRule](https://cloud.tencent.com/document/api/1132/49071#DescNatDnatRule) - 修改数据结构: -* [VpcFwGroupInfo](https://cloud.tencent.com/document/api/1132/49071#VpcFwGroupInfo) +* [DescAcItem](https://cloud.tencent.com/document/api/1132/49071#DescAcItem) - * 新增成员:NeedSwitchCcnOverlap, CcnId + * 新增成员:LastHitTime -## TDSQL-C MySQL 版(cynosdb) 版本:2019-01-07 +## 日志服务(cls) 版本:2020-10-16 -### 第 98 次发布 +### 第 101 次发布 -发布时间:2024-07-26 01:29:47 +发布时间:2024-07-30 01:22:32 本次发布包含了以下内容: 改善已有的文档。 -修改接口: - -* [CreateCLSDelivery](https://cloud.tencent.com/document/api/1003/106079) - - * 新增入参:LogType, IsInMaintainPeriod - -* [DeleteCLSDelivery](https://cloud.tencent.com/document/api/1003/106078) - - * 新增入参:LogType, IsInMaintainPeriod - -* [DescribeInstanceCLSLogDelivery](https://cloud.tencent.com/document/api/1003/106077) - - * 新增入参:LogType - -* [StartCLSDelivery](https://cloud.tencent.com/document/api/1003/106076) - - * 新增入参:LogType, IsInMaintainPeriod - -* [StopCLSDelivery](https://cloud.tencent.com/document/api/1003/106075) - - * 新增入参:LogType, IsInMaintainPeriod - - 修改数据结构: -* [InstanceCLSDeliveryInfo](https://cloud.tencent.com/document/api/1003/48097#InstanceCLSDeliveryInfo) - - * 新增成员:LogType - - - - -## 边缘计算机器(ecm) 版本:2019-07-19 - -### 第 75 次发布 - -发布时间:2024-07-26 01:38:19 - -本次发布包含了以下内容: - -改善已有的文档。 - -修改接口: +* [DataTransformTaskInfo](https://cloud.tencent.com/document/api/614/56471#DataTransformTaskInfo) -* [ModifyVpcAttribute](https://cloud.tencent.com/document/api/1108/43567) + * 新增成员:DataTransformType - * 新增入参:DnsServers, DomainName +## 云安全一体化平台(csip) 版本:2022-11-21 -## 弹性 MapReduce(emr) 版本:2019-01-03 - -### 第 69 次发布 +### 第 42 次发布 -发布时间:2024-07-25 14:51:25 +发布时间:2024-07-30 01:24:16 本次发布包含了以下内容: @@ -223,76 +50,38 @@ 新增接口: -* [DescribeTrinoQueryInfo](https://cloud.tencent.com/document/api/589/109323) - -修改接口: +* [DescribeCFWAssetStatistics](https://cloud.tencent.com/document/api/664/109405) -* [InquiryPriceRenewInstance](https://cloud.tencent.com/document/api/589/38064) - * **修改入参**:Placement -* [InquiryPriceUpdateInstance](https://cloud.tencent.com/document/api/589/38063) - - * **修改入参**:UpdateSpec, Placement - - * 新增出参:NewConfigPrice - - -新增数据结构: - -* [PriceResult](https://cloud.tencent.com/document/api/589/33981#PriceResult) -* [TrinoQueryInfo](https://cloud.tencent.com/document/api/589/33981#TrinoQueryInfo) - -**删除数据结构**: - -* TriggerConditions - -修改数据结构: - -* [LoadAutoScaleStrategy](https://cloud.tencent.com/document/api/589/33981#LoadAutoScaleStrategy) - - * **删除成员**:LoadMetrics, MetricId, StatisticPeriod, TriggerThreshold, TriggerConditions - - - - -## 腾讯混元大模型(hunyuan) 版本:2023-09-01 +## 主机安全(cwp) 版本:2018-02-28 -### 第 14 次发布 +### 第 118 次发布 -发布时间:2024-07-26 01:44:41 +发布时间:2024-07-30 01:25:44 本次发布包含了以下内容: 改善已有的文档。 -修改接口: - -* [SubmitHunyuanImageJob](https://cloud.tencent.com/document/api/1729/105969) - - * 新增入参:Num, Seed, LogoParam - -* [TextToImageLite](https://cloud.tencent.com/document/api/1729/108738) - - * 新增入参:LogoParam - +修改数据结构: -新增数据结构: +* [BashEvent](https://cloud.tencent.com/document/api/296/19867#BashEvent) -* [LogoParam](https://cloud.tencent.com/document/api/1729/101838#LogoParam) -* [LogoRect](https://cloud.tencent.com/document/api/1729/101838#LogoRect) + * 新增成员:HostName +* [BashEventsInfo](https://cloud.tencent.com/document/api/296/19867#BashEventsInfo) + * 新增成员:DetectBy -## 容器服务(tke) 版本:2022-05-01 -## 容器服务(tke) 版本:2018-05-25 +## 实时音视频(trtc) 版本:2019-07-22 -### 第 176 次发布 +### 第 83 次发布 -发布时间:2024-07-26 02:19:58 +发布时间:2024-07-30 02:22:25 本次发布包含了以下内容: @@ -300,58 +89,11 @@ 新增接口: -* [DescribeReservedInstanceUtilizationRate](https://cloud.tencent.com/document/api/457/109337) +* [ControlAIConversation](https://cloud.tencent.com/document/api/647/109408) 新增数据结构: -* [ReservedInstanceUtilizationRate](https://cloud.tencent.com/document/api/457/31866#ReservedInstanceUtilizationRate) - - - -## 视频内容安全(vm) 版本:2021-09-22 - - - -## 视频内容安全(vm) 版本:2020-12-29 - -### 第 8 次发布 - -发布时间:2024-07-26 02:26:27 - -本次发布包含了以下内容: - -改善已有的文档。 - -修改接口: - -* [DescribeTaskDetail](https://cloud.tencent.com/document/api/1265/51878) - - * 新增出参:SegmentCosUrlList, AudioText, TryInSeconds, Asrs - - -新增数据结构: - -* [RcbAsr](https://cloud.tencent.com/document/api/1265/51881#RcbAsr) -* [SegmentCosUrlList](https://cloud.tencent.com/document/api/1265/51881#SegmentCosUrlList) - -修改数据结构: - -* [ImageResult](https://cloud.tencent.com/document/api/1265/51881#ImageResult) - - * 新增成员:RecognitionResults - -* [ImageResultsResultDetail](https://cloud.tencent.com/document/api/1265/51881#ImageResultsResultDetail) - - * 新增成员:SubLabel - -* [ImageSegments](https://cloud.tencent.com/document/api/1265/51881#ImageSegments) - - * 新增成员:CreatedAt, OffsetusTime - - - - -## 视频内容安全(vm) 版本:2020-07-09 +* [ServerPushText](https://cloud.tencent.com/document/api/647/44055#ServerPushText) @@ -1995,9 +1737,9 @@ 新增数据结构: -* [[LabelResults](https://cloud.tencent.com/document/api/1219/53259#LabelResults)](https://cloud.tencent.com/document/api/1219/53259#[LabelResults](https://cloud.tencent.com/document/api/1219/53259#LabelResults)) -* [[SpeakerResults](https://cloud.tencent.com/document/api/1219/53259#SpeakerResults)](https://cloud.tencent.com/document/api/1219/53259#[SpeakerResults](https://cloud.tencent.com/document/api/1219/53259#SpeakerResults)) -* [[TravelResults](https://cloud.tencent.com/document/api/1219/53259#TravelResults)](https://cloud.tencent.com/document/api/1219/53259#[TravelResults](https://cloud.tencent.com/document/api/1219/53259#TravelResults)) +* [LabelResults](https://cloud.tencent.com/document/api/1219/53259#LabelResults) +* [SpeakerResults](https://cloud.tencent.com/document/api/1219/53259#SpeakerResults) +* [TravelResults](https://cloud.tencent.com/document/api/1219/53259#TravelResults) 修改数据结构: @@ -20456,8 +20198,8 @@ 新增数据结构: -* [[ParamFilter](https://cloud.tencent.com/document/api/228/30987#ParamFilter)](https://cloud.tencent.com/document/api/228/30987#[ParamFilter](https://cloud.tencent.com/document/api/228/30987#ParamFilter)) -* [[ParamFilterRule](https://cloud.tencent.com/document/api/228/30987#ParamFilterRule)](https://cloud.tencent.com/document/api/228/30987#[ParamFilterRule](https://cloud.tencent.com/document/api/228/30987#ParamFilterRule)) +* [ParamFilter](https://cloud.tencent.com/document/api/228/30987#ParamFilter) +* [ParamFilterRule](https://cloud.tencent.com/document/api/228/30987#ParamFilterRule) 修改数据结构: @@ -24142,6 +23884,32 @@ ## 混沌演练平台(cfg) 版本:2021-08-20 +### 第 16 次发布 + +发布时间:2024-07-26 14:53:06 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [CreateTaskFromAction](https://cloud.tencent.com/document/api/1500/109362) +* [DescribeActionFieldConfigList](https://cloud.tencent.com/document/api/1500/109361) +* [DescribeActionLibraryList](https://cloud.tencent.com/document/api/1500/109360) +* [DescribeObjectTypeList](https://cloud.tencent.com/document/api/1500/109359) + +新增数据结构: + +* [ActionFieldConfigDetail](https://cloud.tencent.com/document/api/1500/71784#ActionFieldConfigDetail) +* [ActionFieldConfigResult](https://cloud.tencent.com/document/api/1500/71784#ActionFieldConfigResult) +* [ActionLibraryListResult](https://cloud.tencent.com/document/api/1500/71784#ActionLibraryListResult) +* [ObjectType](https://cloud.tencent.com/document/api/1500/71784#ObjectType) +* [ObjectTypeConfig](https://cloud.tencent.com/document/api/1500/71784#ObjectTypeConfig) +* [ObjectTypeConfigFields](https://cloud.tencent.com/document/api/1500/71784#ObjectTypeConfigFields) +* [ObjectTypeJsonParse](https://cloud.tencent.com/document/api/1500/71784#ObjectTypeJsonParse) +* [ResourceOffline](https://cloud.tencent.com/document/api/1500/71784#ResourceOffline) + ### 第 15 次发布 发布时间:2024-01-19 01:08:39 @@ -25010,6 +24778,21 @@ ## 云防火墙(cfw) 版本:2019-09-04 +### 第 61 次发布 + +发布时间:2024-07-30 01:19:22 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [DescAcItem](https://cloud.tencent.com/document/api/1132/49071#DescAcItem) + + * 新增成员:LastHitTime + + ### 第 60 次发布 发布时间:2024-07-26 01:19:51 @@ -25020,11 +24803,11 @@ 新增接口: -* [[DescribeNatFwDnatRule](https://cloud.tencent.com/document/api/1132/109336)](https://cloud.tencent.com/document/api/#/#) +* [DescribeNatFwDnatRule](https://cloud.tencent.com/document/api/1132/109336) 新增数据结构: -* [[DescNatDnatRule](https://cloud.tencent.com/document/api/1132/49071#DescNatDnatRule)](https://cloud.tencent.com/document/api/1132/49071#[DescNatDnatRule](https://cloud.tencent.com/document/api/1132/49071#DescNatDnatRule)) +* [DescNatDnatRule](https://cloud.tencent.com/document/api/1132/49071#DescNatDnatRule) 修改数据结构: @@ -32132,6 +31915,21 @@ ## 日志服务(cls) 版本:2020-10-16 +### 第 101 次发布 + +发布时间:2024-07-30 01:22:32 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [DataTransformTaskInfo](https://cloud.tencent.com/document/api/614/56471#DataTransformTaskInfo) + + * 新增成员:DataTransformType + + ### 第 100 次发布 发布时间:2024-07-25 01:22:39 @@ -34132,6 +33930,21 @@ ## 多媒体创作引擎(cme) 版本:2019-10-29 +### 第 58 次发布 + +发布时间:2024-07-29 01:23:21 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [VideoEditProjectOutput](https://cloud.tencent.com/document/api/1156/40360#VideoEditProjectOutput) + + * **修改成员**:CoverURL + + ### 第 57 次发布 发布时间:2023-10-19 16:00:29 @@ -38702,6 +38515,18 @@ ## 云安全一体化平台(csip) 版本:2022-11-21 +### 第 42 次发布 + +发布时间:2024-07-30 01:24:16 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[DescribeCFWAssetStatistics](https://cloud.tencent.com/document/api/664/109405)](https://cloud.tencent.com/document/api/#/#) + ### 第 41 次发布 发布时间:2024-07-03 01:12:26 @@ -42117,6 +41942,25 @@ ## 主机安全(cwp) 版本:2018-02-28 +### 第 118 次发布 + +发布时间:2024-07-30 01:25:44 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改数据结构: + +* [BashEvent](https://cloud.tencent.com/document/api/296/19867#BashEvent) + + * 新增成员:HostName + +* [BashEventsInfo](https://cloud.tencent.com/document/api/296/19867#BashEventsInfo) + + * 新增成员:DetectBy + + ### 第 117 次发布 发布时间:2024-07-12 01:12:13 @@ -60464,7 +60308,7 @@ 新增接口: -* [[DescribeTrinoQueryInfo](https://cloud.tencent.com/document/api/589/109323)](https://cloud.tencent.com/document/api/#/#) +* [DescribeTrinoQueryInfo](https://cloud.tencent.com/document/api/589/109323) 修改接口: @@ -60481,8 +60325,8 @@ 新增数据结构: -* [[PriceResult](https://cloud.tencent.com/document/api/589/33981#PriceResult)](https://cloud.tencent.com/document/api/589/33981#[PriceResult](https://cloud.tencent.com/document/api/589/33981#PriceResult)) -* [[TrinoQueryInfo](https://cloud.tencent.com/document/api/589/33981#TrinoQueryInfo)](https://cloud.tencent.com/document/api/589/33981#[TrinoQueryInfo](https://cloud.tencent.com/document/api/589/33981#TrinoQueryInfo)) +* [PriceResult](https://cloud.tencent.com/document/api/589/33981#PriceResult) +* [TrinoQueryInfo](https://cloud.tencent.com/document/api/589/33981#TrinoQueryInfo) **删除数据结构**: @@ -66937,6 +66781,21 @@ ## 腾讯电子签(基础版)(essbasic) 版本:2021-05-26 +### 第 176 次发布 + +发布时间:2024-07-29 01:41:10 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [CreatePartnerAutoSignAuthUrl](https://cloud.tencent.com/document/api/1420/102515) + + * 新增入参:AuthToMe + + ### 第 175 次发布 发布时间:2024-07-18 01:11:43 @@ -75554,8 +75413,8 @@ 新增数据结构: -* [[LogoParam](https://cloud.tencent.com/document/api/1729/101838#LogoParam)](https://cloud.tencent.com/document/api/1729/101838#[LogoParam](https://cloud.tencent.com/document/api/1729/101838#LogoParam)) -* [[LogoRect](https://cloud.tencent.com/document/api/1729/101838#LogoRect)](https://cloud.tencent.com/document/api/1729/101838#[LogoRect](https://cloud.tencent.com/document/api/1729/101838#LogoRect)) +* [LogoParam](https://cloud.tencent.com/document/api/1729/101838#LogoParam) +* [LogoRect](https://cloud.tencent.com/document/api/1729/101838#LogoRect) ### 第 13 次发布 @@ -84156,6 +84015,18 @@ ## 实时互动-教育版(lcic) 版本:2022-08-17 +### 第 58 次发布 + +发布时间:2024-07-29 01:51:41 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [UnblockKickedUser](https://cloud.tencent.com/document/api/1639/109376) + ### 第 57 次发布 发布时间:2024-07-17 01:19:12 @@ -101082,6 +100953,21 @@ ## 文字识别(ocr) 版本:2018-11-19 +### 第 144 次发布 + +发布时间:2024-07-29 02:00:34 + +本次发布包含了以下内容: + +改善已有的文档。 + +修改接口: + +* [VerifyOfdVatInvoiceOCR](https://cloud.tencent.com/document/api/866/52296) + + * 新增出参:InvoiceTitle + + ### 第 143 次发布 发布时间:2024-07-25 02:00:21 @@ -136684,11 +136570,11 @@ 新增接口: -* [[DescribeReservedInstanceUtilizationRate](https://cloud.tencent.com/document/api/457/109337)](https://cloud.tencent.com/document/api/#/#) +* [DescribeReservedInstanceUtilizationRate](https://cloud.tencent.com/document/api/457/109337) 新增数据结构: -* [[ReservedInstanceUtilizationRate](https://cloud.tencent.com/document/api/457/31866#ReservedInstanceUtilizationRate)](https://cloud.tencent.com/document/api/457/31866#[ReservedInstanceUtilizationRate](https://cloud.tencent.com/document/api/457/31866#ReservedInstanceUtilizationRate)) +* [ReservedInstanceUtilizationRate](https://cloud.tencent.com/document/api/457/31866#ReservedInstanceUtilizationRate) ### 第 175 次发布 @@ -142144,6 +142030,22 @@ ## 实时音视频(trtc) 版本:2019-07-22 +### 第 83 次发布 + +发布时间:2024-07-30 02:22:25 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [[ControlAIConversation](https://cloud.tencent.com/document/api/647/109408)](https://cloud.tencent.com/document/api/#/#) + +新增数据结构: + +* [[ServerPushText](https://cloud.tencent.com/document/api/647/44055#ServerPushText)](https://cloud.tencent.com/document/api/647/44055#[ServerPushText](https://cloud.tencent.com/document/api/647/44055#ServerPushText)) + ### 第 82 次发布 发布时间:2024-07-12 01:27:45 @@ -148457,6 +148359,19 @@ ## 大模型视频创作引擎(vclm) 版本:2024-05-23 +### 第 4 次发布 + +发布时间:2024-07-29 02:25:41 + +本次发布包含了以下内容: + +改善已有的文档。 + +新增接口: + +* [DescribePortraitSingJob](https://cloud.tencent.com/document/api/1616/109379) +* [SubmitPortraitSingJob](https://cloud.tencent.com/document/api/1616/109378) + ### 第 3 次发布 发布时间:2024-07-24 02:24:15 @@ -148612,8 +148527,8 @@ 新增数据结构: -* [[RcbAsr](https://cloud.tencent.com/document/api/1265/51881#RcbAsr)](https://cloud.tencent.com/document/api/1265/51881#[RcbAsr](https://cloud.tencent.com/document/api/1265/51881#RcbAsr)) -* [[SegmentCosUrlList](https://cloud.tencent.com/document/api/1265/51881#SegmentCosUrlList)](https://cloud.tencent.com/document/api/1265/51881#[SegmentCosUrlList](https://cloud.tencent.com/document/api/1265/51881#SegmentCosUrlList)) +* [RcbAsr](https://cloud.tencent.com/document/api/1265/51881#RcbAsr) +* [SegmentCosUrlList](https://cloud.tencent.com/document/api/1265/51881#SegmentCosUrlList) 修改数据结构: diff --git a/products.md b/products.md index fa78ae3b78..f127fd5368 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-07-11 01:07:23 | +| aiart | [大模型图像创作引擎](https://cloud.tencent.com/document/product/1668) | 2024-07-29 01:07:39 | | ame | [正版曲库直通车](https://cloud.tencent.com/document/product/1155) | 2023-08-17 01:06:14 | | ams | [音频内容安全](https://cloud.tencent.com/document/product/1219) | 2024-07-26 01:08:05 | | anicloud | [动效素材服务](https://cloud.tencent.com/document/product/1641) | 2023-05-18 01:01:53 | @@ -40,7 +40,7 @@ | cat | [云拨测](https://cloud.tencent.com/document/product/280) | 2024-07-26 01:15:04 | | cbs | [云硬盘](https://cloud.tencent.com/document/product/362) | 2024-07-22 01:14:47 | | ccc | [云联络中心](https://cloud.tencent.com/document/product/679) | 2024-07-25 01:15:18 | -| cdb | [云数据库 MySQL](https://cloud.tencent.com/document/product/236) | 2024-07-26 01:16:06 | +| cdb | [云数据库 MySQL](https://cloud.tencent.com/document/product/236) | 2024-07-30 01:15:40 | | cdc | [本地专用集群](https://cloud.tencent.com/document/product/1346) | 2024-07-17 01:09:51 | | cdn | [内容分发网络 CDN](https://cloud.tencent.com/document/product/228) | 2024-07-26 01:17:46 | | cds | [T-Sec-数据安全审计(DSA)](https://cloud.tencent.com/document/product/856) | 2024-06-18 01:18:51 | @@ -48,9 +48,9 @@ | cdwdoris | [腾讯云数据仓库 TCHouse-D](https://cloud.tencent.com/document/product/1387) | 2024-07-24 01:18:18 | | cdwpg | [云数据仓库 PostgreSQL](https://cloud.tencent.com/document/product/878) | 2024-03-28 01:10:53 | | cdz | [专属可用区](https://cloud.tencent.com/document/product/1629) | 2024-07-15 09:37:14 | -| cfg | [混沌演练平台](https://cloud.tencent.com/document/product/1500) | 2024-07-19 01:20:33 | +| cfg | [混沌演练平台](https://cloud.tencent.com/document/product/1500) | 2024-07-26 14:53:06 | | cfs | [文件存储](https://cloud.tencent.com/document/product/582) | 2024-04-26 01:10:32 | -| cfw | [云防火墙](https://cloud.tencent.com/document/product/1132) | 2024-07-26 01:19:51 | +| cfw | [云防火墙](https://cloud.tencent.com/document/product/1132) | 2024-07-30 01:19:22 | | chdfs | [云 HDFS](https://cloud.tencent.com/document/product/1105) | 2024-03-20 01:10:55 | | ciam | [账号风控平台](https://cloud.tencent.com/document/product/1441) | 2024-06-17 01:21:02 | | cii | [智能保险助手](https://cloud.tencent.com/document/product/1368) | 2023-05-18 01:12:07 | @@ -62,19 +62,19 @@ | cloudaudit | [操作审计](https://cloud.tencent.com/document/product/629) | 2024-01-15 01:09:37 | | cloudhsm | [云加密机](https://cloud.tencent.com/document/product/639) | 2024-03-20 01:11:31 | | cloudstudio | [Cloud Studio(云端 IDE)](https://cloud.tencent.com/document/product/1039) | 2024-05-29 01:21:54 | -| cls | [日志服务](https://cloud.tencent.com/document/product/614) | 2024-07-25 01:22:39 | -| cme | [多媒体创作引擎](https://cloud.tencent.com/document/product/1156) | 2024-03-20 01:12:05 | +| cls | [日志服务](https://cloud.tencent.com/document/product/614) | 2024-07-30 01:22:32 | +| cme | [多媒体创作引擎](https://cloud.tencent.com/document/product/1156) | 2024-07-29 01:23:21 | | cmq | [消息队列 CMQ](https://cloud.tencent.com/document/product/406) | 2024-06-21 01:24:31 | | cms | [内容安全](https://cloud.tencent.com/document/product/669) | 2024-06-20 01:24:47 | | config | [配置审计](https://cloud.tencent.com/document/product/1579) | 2024-03-20 01:12:18 | | cpdp | [企业收付平台](https://cloud.tencent.com/document/product/1122) | 2023-09-21 02:09:54 | | cr | [金融联络机器人](https://cloud.tencent.com/document/product/656) | 2021-02-24 08:03:24 | -| csip | [云安全一体化平台](https://cloud.tencent.com/document/product/664) | 2024-07-03 01:12:26 | +| csip | [云安全一体化平台](https://cloud.tencent.com/document/product/664) | 2024-07-30 01:24:16 | | csxg | [5G入云服务](https://cloud.tencent.com/document/product/1687) | 2024-03-20 01:12:25 | | cvm | [云服务器](https://cloud.tencent.com/document/product/213) | 2024-07-22 01:24:41 | -| cwp | [主机安全](https://cloud.tencent.com/document/product/296) | 2024-07-12 01:12:13 | +| cwp | [主机安全](https://cloud.tencent.com/document/product/296) | 2024-07-30 01:25:44 | | cws | [漏洞扫描服务](https://cloud.tencent.com/document/product) | 2019-11-22 12:16:15 | -| cynosdb | [TDSQL-C MySQL 版](https://cloud.tencent.com/document/product/1003) | 2024-07-26 01:29:47 | +| cynosdb | [TDSQL-C MySQL 版](https://cloud.tencent.com/document/product/1003) | 2024-07-29 01:29:15 | | dasb | [运维安全中心(堡垒机)](https://cloud.tencent.com/document/product/1025) | 2024-07-16 01:13:41 | | dataintegration | [数据接入平台](https://cloud.tencent.com/document/product/1591) | 2022-07-26 15:32:15 | | dayu | [DDoS 高防包](https://cloud.tencent.com/document/product/1021) | 2023-05-18 01:20:11 | @@ -83,7 +83,7 @@ | dc | [专线接入](https://cloud.tencent.com/document/product/216) | 2024-07-15 01:09:18 | | dcdb | [TDSQL MySQL 版](https://cloud.tencent.com/document/product/557) | 2024-07-11 01:14:04 | | dlc | [数据湖计算 DLC](https://cloud.tencent.com/document/product/1342) | 2024-07-17 01:14:09 | -| dnspod | [DNSPod](https://cloud.tencent.com/document/product/1427) | 2024-07-11 01:14:33 | +| dnspod | [DNSPod](https://cloud.tencent.com/document/product/1427) | 2024-07-29 01:33:59 | | domain | [域名注册](https://cloud.tencent.com/document/product/242) | 2024-07-02 01:14:51 | | 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 | @@ -98,8 +98,8 @@ | eis | [数据连接器](https://cloud.tencent.com/document/product/1270) | 2023-08-10 01:17:44 | | emr | [弹性 MapReduce](https://cloud.tencent.com/document/product/589) | 2024-07-25 14:51:25 | | es | [Elasticsearch Service](https://cloud.tencent.com/document/product/845) | 2024-07-22 01:39:08 | -| ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2024-07-25 01:39:56 | -| essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2024-07-25 01:40:54 | +| ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2024-07-29 01:40:13 | +| essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2024-07-29 01:41:10 | | facefusion | [人脸融合](https://cloud.tencent.com/document/product/670) | 2024-07-16 01:16:45 | | faceid | [人脸核身](https://cloud.tencent.com/document/product/1007) | 2024-07-19 01:47:20 | | fmu | [人脸试妆](https://cloud.tencent.com/document/product/1172) | 2024-07-05 01:10:44 | @@ -125,7 +125,7 @@ | ioa | [iOA 零信任安全管理系统](https://cloud.tencent.com/document/product/1092) | 2024-06-28 01:12:56 | | iot | [加速物联网套件](https://cloud.tencent.com/document/product/568) | 2023-07-17 01:22:28 | | iotcloud | [物联网通信](https://cloud.tencent.com/document/product/634) | 2024-06-05 01:47:50 | -| iotexplorer | [物联网开发平台](https://cloud.tencent.com/document/product/1081) | 2024-07-15 01:13:08 | +| iotexplorer | [物联网开发平台](https://cloud.tencent.com/document/product/1081) | 2024-07-30 01:46:29 | | iottid | [物联网设备身份认证](https://cloud.tencent.com/document/product/1086) | 2023-05-18 01:33:02 | | 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 | @@ -134,10 +134,10 @@ | 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 | -| lcic | [实时互动-教育版](https://cloud.tencent.com/document/product/1639) | 2024-07-17 01:19:12 | +| lcic | [实时互动-教育版](https://cloud.tencent.com/document/product/1639) | 2024-07-29 01:51:41 | | lighthouse | [轻量应用服务器](https://cloud.tencent.com/document/product/1207) | 2024-07-26 01:52:51 | -| live | [云直播CSS](https://cloud.tencent.com/document/product/267) | 2024-07-26 01:53:38 | -| lke | [大模型知识引擎](https://cloud.tencent.com/document/product/1759) | 2024-07-19 02:01:23 | +| live | [云直播CSS](https://cloud.tencent.com/document/product/267) | 2024-07-30 01:53:06 | +| lke | [大模型知识引擎](https://cloud.tencent.com/document/product/1759) | 2024-07-29 01:54:14 | | 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 | @@ -157,7 +157,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-07-23 01:53:12 | -| ocr | [文字识别](https://cloud.tencent.com/document/product/866) | 2024-07-25 02:00:21 | +| ocr | [文字识别](https://cloud.tencent.com/document/product/866) | 2024-07-29 02:00:34 | | omics | [腾讯健康组学平台](https://cloud.tencent.com/document/product/1643) | 2024-06-13 02:11:33 | | organization | [集团账号管理](https://cloud.tencent.com/document/product/850) | 2024-07-12 01:22:08 | | partners | [渠道合作伙伴](https://cloud.tencent.com/document/product/563) | 2024-06-26 01:21:35 | @@ -179,7 +179,7 @@ | sms | [短信](https://cloud.tencent.com/document/product/382) | 2024-06-20 02:08:58 | | soe | [智聆口语评测](https://cloud.tencent.com/document/product/884) | 2024-04-11 01:20:45 | | solar | [智汇零售](https://cloud.tencent.com/document/product) | 2020-03-19 08:01:59 | -| sqlserver | [云数据库 SQL Server](https://cloud.tencent.com/document/product/238) | 2024-06-06 02:22:45 | +| sqlserver | [云数据库 SQL Server](https://cloud.tencent.com/document/product/238) | 2024-07-29 02:06:40 | | ssa | [安全运营中心](https://cloud.tencent.com/document/product/664) | 2023-11-15 02:18:28 | | ssl | [SSL 证书](https://cloud.tencent.com/document/product/400) | 2024-07-05 01:16:31 | | sslpod | [证书监控 SSLPod](https://cloud.tencent.com/document/product/1084) | 2024-03-20 01:24:03 | @@ -194,7 +194,7 @@ | tbaas | [腾讯云区块链服务平台 TBaaS](https://cloud.tencent.com/document/product/663) | 2024-05-14 02:28:40 | | tbm | [](https://cloud.tencent.com/document/product) | 2019-03-29 14:49:11 | | tbp | [腾讯智能对话平台](https://cloud.tencent.com/document/product/1060) | 2024-03-20 01:24:24 | -| tcaplusdb | [游戏数据库 TcaplusDB](https://cloud.tencent.com/document/product/596) | 2024-06-18 02:11:49 | +| tcaplusdb | [游戏数据库 TcaplusDB](https://cloud.tencent.com/document/product/596) | 2024-07-30 02:09:55 | | tcb | [云开发 CloudBase](https://cloud.tencent.com/document/product/876) | 2024-06-04 02:12:41 | | tcbr | [云托管 CloudBase Run](https://cloud.tencent.com/document/product/1243) | 2024-06-18 02:13:09 | | tcex | [腾讯云释义](https://cloud.tencent.com/document/product/1266) | 2022-07-21 06:17:29 | @@ -202,7 +202,7 @@ | tci | [腾讯智学课堂分析](https://cloud.tencent.com/document/product) | 2020-08-24 08:06:03 | | tcm | [服务网格](https://cloud.tencent.com/document/product/1261) | 2024-06-18 02:13:19 | | tcr | [容器镜像服务](https://cloud.tencent.com/document/product/1141) | 2024-07-23 02:04:12 | -| tcss | [容器安全服务](https://cloud.tencent.com/document/product/1285) | 2024-06-26 01:23:56 | +| tcss | [容器安全服务](https://cloud.tencent.com/document/product/1285) | 2024-07-30 02:12:20 | | tdcpg | [TDSQL-C PostgreSQL 版](https://cloud.tencent.com/document/product/1556) | 2024-07-10 01:25:35 | | tdid | [分布式身份](https://cloud.tencent.com/document/product/1439) | 2024-06-04 02:17:43 | | tdmq | [消息队列 TDMQ](https://cloud.tencent.com/document/product/1179) | 2024-07-17 01:25:48 | @@ -226,8 +226,8 @@ | trdp | [流量风险决策平台](https://cloud.tencent.com/document/product/1604) | 2023-05-18 02:01:19 | | trocket | [消息队列 RocketMQ 版](https://cloud.tencent.com/document/product/1493) | 2024-07-05 01:19:38 | | trp | [T-Sec-安心平台(RP)](https://cloud.tencent.com/document/product/1458) | 2024-06-06 02:42:14 | -| trro | [远程实时操控](https://cloud.tencent.com/document/product/1584) | 2024-06-21 02:25:01 | -| trtc | [实时音视频](https://cloud.tencent.com/document/product/647) | 2024-07-25 02:22:11 | +| trro | [远程实时操控](https://cloud.tencent.com/document/product/1584) | 2024-07-29 02:22:08 | +| trtc | [实时音视频](https://cloud.tencent.com/document/product/647) | 2024-07-30 02:22:25 | | tse | [微服务引擎](https://cloud.tencent.com/document/product/1364) | 2024-07-10 01:27:48 | | tsf | [微服务平台 TSF](https://cloud.tencent.com/document/product/649) | 2024-07-11 01:28:05 | | tsi | [腾讯同传系统](https://cloud.tencent.com/document/product/1399) | 2024-07-17 01:28:37 | @@ -235,15 +235,15 @@ | tts | [语音合成](https://cloud.tencent.com/document/product/1073) | 2024-07-08 01:25:23 | | 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-07-24 02:24:15 | +| vclm | [大模型视频创作引擎](https://cloud.tencent.com/document/product/1616) | 2024-07-29 02:25:41 | | vdb | [向量数据库](https://cloud.tencent.com/document/product/1709) | 2024-07-09 01:25:36 | | 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-07-23 11:34:10 | -| vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2024-07-25 02:28:03 | +| vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2024-07-30 02:28:21 | | vrs | [声音复刻](https://cloud.tencent.com/document/product/1283) | 2024-04-02 01:27:45 | | vtc | [视频转译](https://cloud.tencent.com/document/product/1769) | 2024-06-07 02:52:58 | -| waf | [Web 应用防火墙](https://cloud.tencent.com/document/product/627) | 2024-07-25 02:30:39 | +| waf | [Web 应用防火墙](https://cloud.tencent.com/document/product/627) | 2024-07-29 02:30:48 | | wav | [企业微信汽车行业版](https://cloud.tencent.com/document/product/1318) | 2024-03-20 01:32:09 | | wedata | [数据开发治理平台 WeData](https://cloud.tencent.com/document/product/1267) | 2024-07-25 02:32:09 | | weilingwith | [微瓴同业开放平台](https://cloud.tencent.com/document/product/1693) | 2024-05-15 01:38:36 | diff --git a/pyproject.toml b/pyproject.toml index 11e40ac8db..9b8c8b412a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ exclude = ["tccli/examples"] [project] name = "tccli" -version = "3.0.1159.1" +version = "3.0.1160.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.1159", + "tencentcloud-sdk-python>=3.0.1160", ] [project.urls] diff --git a/tccli/__init__.py b/tccli/__init__.py index f0850b0f78..f10773792d 100644 --- a/tccli/__init__.py +++ b/tccli/__init__.py @@ -1 +1 @@ -__version__ = '3.0.1159.1' +__version__ = '3.0.1160.1' diff --git a/tccli/examples/cfg/v20210820/CreateTaskFromAction.md b/tccli/examples/cfg/v20210820/CreateTaskFromAction.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tccli/examples/cfg/v20210820/DescribeActionFieldConfigList.md b/tccli/examples/cfg/v20210820/DescribeActionFieldConfigList.md new file mode 100644 index 0000000000..af9ebd9a36 --- /dev/null +++ b/tccli/examples/cfg/v20210820/DescribeActionFieldConfigList.md @@ -0,0 +1,70 @@ +**Example 1: 示例** + + + +Input: + +``` +tccli cfg DescribeActionFieldConfigList --cli-unfold-argument \ + --ObjectTypeId 1 \ + --ActionIds 1 +``` + +Output: +``` +{ + "Response": { + "RequestId": "f3433a9a-e8fd-40b9-88e7-dd8b3f1a181f", + "Common": [ + { + "ActionId": 1, + "ActionName": "关机", + "ConfigDetail": [ + { + "Type": "input", + "Lable": "动作别名", + "Field": "AliasTitle", + "DefaultValue": "", + "Config": "{}", + "Required": 0, + "Validate": "{}", + "Visible": "{}" + }, + { + "Type": "number", + "Lable": "前置等待时间(s)", + "Field": "PreTimeWait", + "DefaultValue": "0", + "Config": "{\"max\": 86400, \"min\": 0, \"tooltip\": \"仅限用于自动推进模式\"}", + "Required": 1, + "Validate": "{}", + "Visible": "{}" + }, + { + "Type": "number", + "Lable": "后置等待时间(s)", + "Field": "AfterTimeWait", + "DefaultValue": "0", + "Config": "{\"max\": 86400, \"min\": 0, \"tooltip\": \"仅限用于自动推进模式\"}", + "Required": 1, + "Validate": "{}", + "Visible": "{}" + }, + { + "Type": "number", + "Lable": "动作超时时间(s)", + "Field": "ActionTimeout", + "DefaultValue": "1800", + "Config": "{\"max\": 86400, \"min\": 0, \"tooltip\": \"动作的超时时间\"}", + "Required": 1, + "Validate": "{}", + "Visible": "{}" + } + ] + } + ], + "Results": [] + } +} +``` + diff --git a/tccli/examples/cfg/v20210820/DescribeActionLibraryList.md b/tccli/examples/cfg/v20210820/DescribeActionLibraryList.md new file mode 100644 index 0000000000..c58fb8040a --- /dev/null +++ b/tccli/examples/cfg/v20210820/DescribeActionLibraryList.md @@ -0,0 +1,241 @@ +**Example 1: 动作库列表查询** + +动作库列表数据查询 + +Input: + +``` +tccli cfg DescribeActionLibraryList --cli-unfold-argument \ + --Limit 10 \ + --Offset 0 \ + --Filters.0.Keyword a_type \ + --Filters.0.Values 1 \ + --ObjectType 1 \ + --Attribute 1 +``` + +Output: +``` +{ + "Response": { + "RequestId": "cZ6m0xYnnDreBNJm", + "Results": [ + { + "ActionName": "关机(测试)", + "Desc": "对CVM进行关机操作", + "ActionType": "平台", + "CreateTime": "2023-07-04 11:20:43", + "Creator": "系统", + "UpdateTime": "2023-07-04 11:20:43", + "RiskDesc": "高风险", + "ActionId": 1, + "AttributeId": 1, + "RelationActionId": 2, + "ActionCommand": "调用腾讯云对应产品的API接口", + "ActionContent": "调用云api StopInstances", + "ActionCommandType": 1, + "ActionDetail": "

调用云api StopInstances关机

", + "ResourceType": "服务器资源", + "IsAllowed": true, + "ActionBestCase": "https://cloud.tencent.com/document/product/1500/74357", + "ObjectType": "CVM", + "MetricIdList": [ + 614, + 615 + ] + }, + { + "ActionName": "开机", + "Desc": "对CVM进行开机操作", + "ActionType": "平台", + "CreateTime": "2022-11-29 18:08:46", + "Creator": "系统", + "UpdateTime": "2022-11-29 18:08:46", + "RiskDesc": "高风险", + "ActionId": 2, + "AttributeId": 2, + "RelationActionId": 1, + "ActionCommand": "调用腾讯云对应产品的API接口", + "ActionContent": "调用云api StartInstances", + "ActionCommandType": 1, + "ActionDetail": "

调用云api StartInstances开机

", + "ResourceType": "服务器资源", + "IsAllowed": true, + "ActionBestCase": "", + "ObjectType": "CVM", + "MetricIdList": [] + }, + { + "ActionName": "重启", + "Desc": "重启", + "ActionType": "平台", + "CreateTime": "2023-05-24 15:33:39", + "Creator": "系统", + "UpdateTime": "2023-05-24 15:33:39", + "RiskDesc": "高风险", + "ActionId": 3, + "AttributeId": 1, + "RelationActionId": 0, + "ActionCommand": "调用腾讯云对应产品的API接口", + "ActionContent": "调用云api RebootInstances", + "ActionCommandType": 1, + "ActionDetail": "

调用云api RebootInstances重启

", + "ResourceType": "服务器资源", + "IsAllowed": true, + "ActionBestCase": "https://tcloud4api.woa.com/document/product/1607/88863?!preview&!document=1", + "ObjectType": "CVM", + "MetricIdList": [] + }, + { + "ActionName": "CPU利用率高", + "Desc": "使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上", + "ActionType": "平台", + "CreateTime": "2022-11-29 18:08:46", + "Creator": "系统", + "UpdateTime": "2022-11-29 18:08:46", + "RiskDesc": "高风险", + "ActionId": 4, + "AttributeId": 1, + "RelationActionId": 0, + "ActionCommand": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test.\"\nif [ $os_name == \"CoreOS\" ]\nthen\n docker run --rm alexeiled/stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\nelse\n stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\nfi\n\nif [[ !$? -eq 0 ]]\nthen\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"failed\"\n exit 1\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"completed\"\n exit 0\nfi", + "ActionContent": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test.\"\nif [ $os_name == \"CoreOS\" ]\nthen\n docker run --rm alexeiled/stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\nelse\n stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\nfi\n\nif [[ !$? -eq 0 ]]\nthen\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"failed\"\n exit 1\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"completed\"\n exit 0\nfi", + "ActionCommandType": 0, + "ActionDetail": "

使用tat通道下发stress-ng命令进行压测

\n

命令内容:stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}

\n

tat官方文档

\n

stress-ng官方文档

\n", + "ResourceType": "CPU资源", + "IsAllowed": true, + "ActionBestCase": "", + "ObjectType": "CVM", + "MetricIdList": [] + }, + { + "ActionName": "内存利用率高", + "Desc": "使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上", + "ActionType": "平台", + "CreateTime": "2022-11-29 18:08:46", + "Creator": "系统", + "UpdateTime": "2022-11-29 18:08:46", + "RiskDesc": "高风险", + "ActionId": 7, + "AttributeId": 1, + "RelationActionId": 0, + "ActionCommand": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test\"\nif [ $os_name == \"CoreOS\" ]\nthen\n docker run --rm alexeiled/stress-ng --vm-bytes $(awk '/MemAvailable/{printf \"%d\\n\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}\nelse\n avaliable_mem=$(awk '/^MemAvailable:/{printf \"%d\\n\", $2;}' < /proc/meminfo)\n free_mem=$(awk '/^MemFree:/{printf \"%d\\n\", $2;}' < /proc/meminfo)\n buffer=$(awk '/^Buffers:/{printf \"%d\\n\", $2;}' < /proc/meminfo)\n cache=$(awk '/^Cached:/{printf \"%d\\n\", $2;}' < /proc/meminfo)\n if [ -n \"$avaliable_mem\" ]\n then\n stress-ng --vm-bytes $[$avaliable_mem*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\n else\n stress-ng --vm-bytes $[($free_mem+$buffer+$cache)*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\n fi\nfi\n\nif [[ !$? -eq 0 ]]\nthen\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Failed\"\n exit 1\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Completed\"\n exit 0\nfi", + "ActionContent": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test\"\nif [ $os_name == \"CoreOS\" ]\nthen\n docker run --rm alexeiled/stress-ng --vm-bytes $(awk '/MemAvailable/{printf \"%d\\n\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}\nelse\n avaliable_mem=$(awk '/^MemAvailable:/{printf \"%d\\n\", $2;}' < /proc/meminfo)\n free_mem=$(awk '/^MemFree:/{printf \"%d\\n\", $2;}' < /proc/meminfo)\n buffer=$(awk '/^Buffers:/{printf \"%d\\n\", $2;}' < /proc/meminfo)\n cache=$(awk '/^Cached:/{printf \"%d\\n\", $2;}' < /proc/meminfo)\n if [ -n \"$avaliable_mem\" ]\n then\n stress-ng --vm-bytes $[$avaliable_mem*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\n else\n stress-ng --vm-bytes $[($free_mem+$buffer+$cache)*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\n fi\nfi\n\nif [[ !$? -eq 0 ]]\nthen\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Failed\"\n exit 1\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Completed\"\n exit 0\nfi", + "ActionCommandType": 0, + "ActionDetail": "

使用tat通道下发stress-ng命令进行压测

\n

命令内容:stress-ng --vm-bytes $(awk '/MemAvailable/{printf \"%d\\n\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}

\n

tat官方文档

\n

stress-ng官方文档

", + "ResourceType": "内存资源", + "IsAllowed": true, + "ActionBestCase": "", + "ObjectType": "CVM", + "MetricIdList": [] + }, + { + "ActionName": "磁盘分区使用率高", + "Desc": "使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上", + "ActionType": "平台", + "CreateTime": "2022-11-29 18:08:46", + "Creator": "系统", + "UpdateTime": "2022-11-29 18:08:46", + "RiskDesc": "高风险", + "ActionId": 8, + "AttributeId": 1, + "RelationActionId": 0, + "ActionCommand": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test.\"\nif [ $os_name == \"CoreOS\" ]\nthen\n cd {{dir}} && docker run --rm alexeiled/stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\"%d\\n\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\nelse\n cd {{dir}} && stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\"%d\\n\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\nfi\n\nif [[ !$? -eq 0 ]]\nthen\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Failed\"\n exit 1\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Completed\"\n exit 0\nfi", + "ActionContent": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test.\"\nif [ $os_name == \"CoreOS\" ]\nthen\n cd {{dir}} && docker run --rm alexeiled/stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\"%d\\n\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\nelse\n cd {{dir}} && stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\"%d\\n\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\nfi\n\nif [[ !$? -eq 0 ]]\nthen\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Failed\"\n exit 1\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Completed\"\n exit 0\nfi", + "ActionCommandType": 0, + "ActionDetail": "

使用tat通道下发stress-ng命令进行压测

\n

命令内容:stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\"%d\\n\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}

\n

tat官方文档

\n

stress-ng官方文档

\n", + "ResourceType": "磁盘资源", + "IsAllowed": true, + "ActionBestCase": "", + "ObjectType": "CVM", + "MetricIdList": [] + }, + { + "ActionName": "内核故障", + "Desc": "会触发实例重启", + "ActionType": "平台", + "CreateTime": "2022-11-29 18:08:46", + "Creator": "系统", + "UpdateTime": "2022-11-29 18:08:46", + "RiskDesc": "高风险", + "ActionId": 9, + "AttributeId": 1, + "RelationActionId": 24, + "ActionCommand": "echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\" && echo 'inject kernel error success!' && echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\" && sleep 5 && echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\" && echo c > /proc/sysrq-trigger &", + "ActionContent": "echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\" && echo 'inject kernel error success!' && echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\" && sleep 5 && echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\" && echo c > /proc/sysrq-trigger &", + "ActionCommandType": 0, + "ActionDetail": "

使用tat通道下发内核故障命令

\n

命令内容:echo c > /proc/sysrq-trigger

\n

tat官方文档

", + "ResourceType": "CPU资源", + "IsAllowed": true, + "ActionBestCase": "", + "ObjectType": "CVM", + "MetricIdList": [] + }, + { + "ActionName": "磁盘IO负载", + "Desc": "使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上", + "ActionType": "平台", + "CreateTime": "2022-11-29 18:08:46", + "Creator": "系统", + "UpdateTime": "2022-11-29 18:08:46", + "RiskDesc": "高风险", + "ActionId": 10, + "AttributeId": 1, + "RelationActionId": 0, + "ActionCommand": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test.\"\nif [ $os_name == \"CoreOS\" ]\nthen\n docker run --rm alexeiled/stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\nelse\n stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\nfi\n\nif [[ !$? -eq 0 ]]\nthen\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Failed\"\n exit 1\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Completed\"\n exit 0\nfi", + "ActionContent": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test.\"\nif [ $os_name == \"CoreOS\" ]\nthen\n docker run --rm alexeiled/stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\nelse\n stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\nfi\n\nif [[ !$? -eq 0 ]]\nthen\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Failed\"\n exit 1\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Completed\"\n exit 0\nfi", + "ActionCommandType": 0, + "ActionDetail": "

使用tat通道下发stress-ng命令进行压测

\n

命令内容:stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}

\n

tat官方文档

", + "ResourceType": "IO资源", + "IsAllowed": true, + "ActionBestCase": "", + "ObjectType": "CVM", + "MetricIdList": [] + }, + { + "ActionName": "内存OOM", + "Desc": "使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上", + "ActionType": "平台", + "CreateTime": "2023-07-04 11:20:43", + "Creator": "系统", + "UpdateTime": "2023-07-04 11:20:43", + "RiskDesc": "高风险", + "ActionId": 11, + "AttributeId": 1, + "RelationActionId": 0, + "ActionCommand": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test.\"\nif [ $os_name == \"CoreOS\" ]\nthen\n docker run --rm alexeiled/stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\nelse\n stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\nfi\necho \"Completed\"\n\n", + "ActionContent": "#!/bin/bash\n\nuser=$(whoami)\nif [ !$user == 'root' ]\nthen\n sudo -i\nfi\n\nfunction command_exists(){\n if command -v $1 > /dev/null 2>&1; then\n return 1\n else\n return 0\n fi\n}\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n\nos_desc=$(cat /etc/*release)\n# echo $os_desc\n\ndeclare -A os_dic\nos_dic=([CentOS]=\"yum install stress-ng -y\" \\\n [CoreOS]=\"docker pull alexeiled/stress-ng\" \\\n [Debian]=\"apt-get install -y stress-ng\" \\\n [Ubuntu]=\"apt-get install -y stress-ng\")\n\nos_name='N/A'\n\nfor key in $(echo ${!os_dic[*]})\ndo\n if [[ $os_desc =~ $key ]]\n then\n os_name=$key\n echo $key\n fi\ndone\n\nif [ $os_name == 'N/A' ]\nthen\n echo \"Unsupported Linux distributions\"\n exit 1\nfi\n\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"installing stress-ng...\"\ncommand_exists stress-ng\n\nif [[ $? -eq 0 ]]\nthen\n ${os_dic[$os_name]}\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Checking the installation status...\"\n command_exists stress-ng\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\n then\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"Fail to install\"\n exit 1\n else\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\n fi\nelse\n echo -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\n echo \"stress-ng has already installed\"\nfi\n\necho -e \"[\"`date +\"%Y-%m-%d %H:%M:%S\"`\"] \\c\"\necho \"Starting to perform stress test.\"\nif [ $os_name == \"CoreOS\" ]\nthen\n docker run --rm alexeiled/stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\nelse\n stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\nfi\necho \"Completed\"\n\n", + "ActionCommandType": 0, + "ActionDetail": "

使用tat通道下发stress-ng命令进行压测

\n

命令内容:stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}

\n

tat官方文档

", + "ResourceType": "内存资源", + "IsAllowed": true, + "ActionBestCase": "https://cloud.tencent.com/document/product/1500/81504", + "ObjectType": "CVM", + "MetricIdList": [] + }, + { + "ActionName": "空操作", + "Desc": "空操作,用于测试流程,不做实际注入操作", + "ActionType": "平台", + "CreateTime": "2022-11-29 18:08:46", + "Creator": "系统", + "UpdateTime": "2022-11-29 18:08:46", + "RiskDesc": "低风险", + "ActionId": 12, + "AttributeId": 1, + "RelationActionId": 13, + "ActionCommand": "调用腾讯云对应产品的API接口", + "ActionContent": "空操作", + "ActionCommandType": 1, + "ActionDetail": null, + "ResourceType": "其他", + "IsAllowed": true, + "ActionBestCase": "", + "ObjectType": "CVM", + "MetricIdList": [] + } + ], + "Total": 45 + } +} +``` + diff --git a/tccli/examples/cfg/v20210820/DescribeObjectTypeList.md b/tccli/examples/cfg/v20210820/DescribeObjectTypeList.md new file mode 100644 index 0000000000..11834f6340 --- /dev/null +++ b/tccli/examples/cfg/v20210820/DescribeObjectTypeList.md @@ -0,0 +1,40 @@ +**Example 1: 请求对象类型列表** + + + +Input: + +``` +tccli cfg DescribeObjectTypeList --cli-unfold-argument ``` + +Output: +``` +{ + "Response": { + "ObjectTypeList": [ + { + "ObjectTypeId": 0, + "ObjectTypeTitle": "abc", + "ObjectTypeLevelOne": "abc", + "ObjectTypeParams": { + "Key": "abc", + "Fields": [ + { + "Key": "abc", + "Header": "abc", + "Transfer": "abc", + "JsonParse": "abc" + } + ] + }, + "ObjectTypeJsonParse": { + "NameSpace": "abc", + "WorkloadName": "abc" + } + } + ], + "RequestId": "abc" + } +} +``` + diff --git a/tccli/examples/cme/v20191029/DescribeTaskDetail.md b/tccli/examples/cme/v20191029/DescribeTaskDetail.md index ffd8c48cc0..d608bf2742 100644 --- a/tccli/examples/cme/v20191029/DescribeTaskDetail.md +++ b/tccli/examples/cme/v20191029/DescribeTaskDetail.md @@ -49,6 +49,7 @@ Output: "Width": 1920 }, "URL": "http://cmedemo.vod2.myqcloud.com/xxxxx/cemdemo.mp4", + "CoverURL": "http://cmedemo.vod2.myqcloud.com/xxxxx/cemdemo.jpg", "VodFileId": "5285890802029089" } } diff --git a/tccli/examples/csip/v20221121/DescribeCFWAssetStatistics.md b/tccli/examples/csip/v20221121/DescribeCFWAssetStatistics.md new file mode 100644 index 0000000000..3caf36d8f7 --- /dev/null +++ b/tccli/examples/csip/v20221121/DescribeCFWAssetStatistics.md @@ -0,0 +1,29 @@ +**Example 1: 资产中心统计** + +资产中心统计 + +Input: + +``` +tccli csip DescribeCFWAssetStatistics --cli-unfold-argument ``` + +Output: +``` +{ + "Response": { + "NetworkTotal": 0, + "ClbTotal": 0, + "NatTotal": 0, + "PublicAssetTotal": 0, + "CVMAssetTotal": 0, + "CFGTotal": 0, + "PortTotal": 0, + "WebsiteTotal": 0, + "ServerTotal": 0, + "WeakPasswordTotal": 0, + "VULTotal": 0, + "RequestId": "abc" + } +} +``` + diff --git a/tccli/examples/cwp/v20180228/ExportAssetRecentMachineInfo.md b/tccli/examples/cwp/v20180228/ExportAssetRecentMachineInfo.md index e669fbf62b..3a5041020d 100644 --- a/tccli/examples/cwp/v20180228/ExportAssetRecentMachineInfo.md +++ b/tccli/examples/cwp/v20180228/ExportAssetRecentMachineInfo.md @@ -14,8 +14,8 @@ Output: ``` { "Response": { - "DownloadUrl": "xx", - "RequestId": "xx" + "DownloadUrl": "http://xx/xxx", + "RequestId": "abcs12434" } } ``` diff --git a/tccli/examples/ess/v20201111/CreateFlowSignUrl.md b/tccli/examples/ess/v20201111/CreateFlowSignUrl.md index cbf082095d..a71c58426a 100644 --- a/tccli/examples/ess/v20201111/CreateFlowSignUrl.md +++ b/tccli/examples/ess/v20201111/CreateFlowSignUrl.md @@ -168,10 +168,10 @@ Output: } ``` -**Example 6: 错误示例-创建个人用户签署链接,传错签署人姓名** +**Example 6: 创建个人用户H5签署链接(签署完成后跳转到指定地址)** 1. 给个人用户创建签署链接 -2. 用户姓名不是合同的参与人 +2. 签署完成后跳转到指定页面地址(设置跳转地址JumpUrl) Input: @@ -180,7 +180,8 @@ tccli ess CreateFlowSignUrl --cli-unfold-argument \ --Operator.UserId yDRCLUUgygq2xun5UuO4zjEwg0vjoimj \ --FlowApproverInfos.0.ApproverType 1 \ --FlowApproverInfos.0.ApproverMobile 13200000000 \ - --FlowApproverInfos.0.ApproverName 张三 \ + --FlowApproverInfos.0.ApproverName 典子谦 \ + --JumpUrl https://www.example.com \ --FlowId yDwFmUUckpstqfvzUE1h3jo1f3cqjkGm ``` @@ -188,19 +189,24 @@ Output: ``` { "Response": { - "Error": { - "Code": "ResourceNotFound", - "Message": "无法找到参与人" - }, - "RequestId": "s1693832578941223891" + "FlowApproverUrlInfos": [ + { + "ApproverMobile": "13200000000", + "ApproverName": "典子谦", + "ApproverType": 1, + "LongUrl": "https://quick.test.qian.tencent.cn/home?ApproverIdCardNumber=MioqKi**Kio2&ApproverMobile=MTk***NjA%3D&ApproverName=%25**A&ApproverType=1&Code=yDwJCUUck****V2R5K&CodeType=QUICK&FlowId=yDwF**1f3cqjkGm&ShowHeader=1&shortKey=yDwq5**M5GlG1c&token=bR8**HA", + "SignUrl": "https://essurl.cn/bR8**HA" + } + ], + "RequestId": "s1693832180480950012" } } ``` -**Example 7: 创建个人用户H5签署链接(签署完成后跳转到指定地址)** +**Example 7: 错误示例-创建个人用户签署链接,传错签署人姓名** 1. 给个人用户创建签署链接 -2. 签署完成后跳转到指定页面地址(设置跳转地址JumpUrl) +2. 用户姓名不是合同的参与人 Input: @@ -209,8 +215,7 @@ tccli ess CreateFlowSignUrl --cli-unfold-argument \ --Operator.UserId yDRCLUUgygq2xun5UuO4zjEwg0vjoimj \ --FlowApproverInfos.0.ApproverType 1 \ --FlowApproverInfos.0.ApproverMobile 13200000000 \ - --FlowApproverInfos.0.ApproverName 典子谦 \ - --JumpUrl https://www.example.com \ + --FlowApproverInfos.0.ApproverName 张三 \ --FlowId yDwFmUUckpstqfvzUE1h3jo1f3cqjkGm ``` @@ -218,16 +223,11 @@ Output: ``` { "Response": { - "FlowApproverUrlInfos": [ - { - "ApproverMobile": "13200000000", - "ApproverName": "典子谦", - "ApproverType": 1, - "LongUrl": "https://quick.test.qian.tencent.cn/home?ApproverIdCardNumber=MioqKi**Kio2&ApproverMobile=MTk***NjA%3D&ApproverName=%25**A&ApproverType=1&Code=yDwJCUUck****V2R5K&CodeType=QUICK&FlowId=yDwF**1f3cqjkGm&ShowHeader=1&shortKey=yDwq5**M5GlG1c&token=bR8**HA", - "SignUrl": "https://essurl.cn/bR8**HA" - } - ], - "RequestId": "s1693832180480950012" + "Error": { + "Code": "ResourceNotFound", + "Message": "无法找到参与人" + }, + "RequestId": "s1693832578941223891" } } ``` diff --git a/tccli/examples/essbasic/v20210526/CreatePartnerAutoSignAuthUrl.md b/tccli/examples/essbasic/v20210526/CreatePartnerAutoSignAuthUrl.md index 8718f273ce..4633ca0ee6 100644 --- a/tccli/examples/essbasic/v20210526/CreatePartnerAutoSignAuthUrl.md +++ b/tccli/examples/essbasic/v20210526/CreatePartnerAutoSignAuthUrl.md @@ -26,7 +26,7 @@ Output: } ``` -**Example 2: 创建他方自动签授权链接** +**Example 2: 创建他方自动签授权链接-我方授权** @@ -54,3 +54,32 @@ Output: } ``` +**Example 3: 创建他方自动签授权链接-他方授权** + + + +Input: + +``` +tccli essbasic CreatePartnerAutoSignAuthUrl --cli-unfold-argument \ + --Agent.AppId yDSxxxxxxxxxOnHtH51 \ + --Agent.ProxyOrganizationOpenId org_open_id \ + --Agent.ProxyOperator.OpenId user_open_id \ + --AuthorizedOrganizationId org_open_id_another \ + --AuthorizedOrganizationName 典子谦子客企业 \ + --AuthToMe True \ + --SealTypes OFFICIAL +``` + +Output: +``` +{ + "Response": { + "ExpireTime": 1702982931, + "MiniAppPath": "/pages/guide/index?shortKey=yDSxxxxxxxxxOnHtH51", + "RequestId": "s1702378131281988373", + "Url": "https://test.essurl.cn/WxxxxxwH" + } +} +``` + diff --git a/tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIService.md b/tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIService.md index fd62cbddd5..f5d2fa064b 100644 --- a/tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIService.md +++ b/tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIService.md @@ -8,7 +8,7 @@ Input: tccli iotexplorer DescribeCloudStorageAIService --cli-unfold-argument \ --ProductId KH6Q8C4N0D \ --DeviceName aaa_31400554_1 \ - --ServiceType PackageDetect + --ServiceType Highlight ``` Output: diff --git a/tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md b/tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md index 76276c0e54..9322206dcb 100644 --- a/tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md +++ b/tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md @@ -8,7 +8,7 @@ Input: tccli iotexplorer DescribeCloudStorageAIServiceTasks --cli-unfold-argument \ --ProductId KH6Q8C4N0D \ --DeviceName aaa_31400554_1 \ - --ServiceType PackageDetect \ + --ServiceType Highlight \ --Offset 0 \ --Limit 20 ``` diff --git a/tccli/examples/iotexplorer/v20190423/ModifyCloudStorageAIService.md b/tccli/examples/iotexplorer/v20190423/ModifyCloudStorageAIService.md index 80644ad796..b52f88a42a 100644 --- a/tccli/examples/iotexplorer/v20190423/ModifyCloudStorageAIService.md +++ b/tccli/examples/iotexplorer/v20190423/ModifyCloudStorageAIService.md @@ -1,4 +1,4 @@ -**Example 1: 修改设备云存AI服务开通状态** +**Example 1: 修改云存AI服务启用状态** @@ -8,7 +8,7 @@ Input: tccli iotexplorer ModifyCloudStorageAIService --cli-unfold-argument \ --ProductId KH6Q8C4N0D \ --DeviceName aaa_31400554_1 \ - --ServiceType PackageDetect \ + --ServiceType Highlight \ --Enabled True ``` @@ -21,3 +21,26 @@ Output: } ``` +**Example 2: 修改云存AI服务配置参数** + + + +Input: + +``` +tccli iotexplorer ModifyCloudStorageAIService --cli-unfold-argument \ + --ProductId KH6Q8C4N0D \ + --DeviceName aaa_31400554_1 \ + --ServiceType Highlight \ + --Config {"param1":"value1"} +``` + +Output: +``` +{ + "Response": { + "RequestId": "3c140219-cfe9-470e-b241-907877d6fb03" + } +} +``` + diff --git a/tccli/examples/lcic/v20220817/UnblockKickedUser.md b/tccli/examples/lcic/v20220817/UnblockKickedUser.md new file mode 100644 index 0000000000..e3f83901b8 --- /dev/null +++ b/tccli/examples/lcic/v20220817/UnblockKickedUser.md @@ -0,0 +1,22 @@ +**Example 1: 解禁房间踢出的用户** + +示例 + +Input: + +``` +tccli lcic UnblockKickedUser --cli-unfold-argument \ + --RoomId 313337981 \ + --SdkAppId 3520371 \ + --UserId 2PMcgEVHi9CMWq6tmfNnPGUkEGn +``` + +Output: +``` +{ + "Response": { + "RequestId": "3f156f86-9939-4ea0-aee7-81d32fa46c3f" + } +} +``` + diff --git a/tccli/examples/trtc/v20190722/ControlAIConversation.md b/tccli/examples/trtc/v20190722/ControlAIConversation.md new file mode 100644 index 0000000000..42fd0e8f41 --- /dev/null +++ b/tccli/examples/trtc/v20190722/ControlAIConversation.md @@ -0,0 +1,23 @@ +**Example 1: 发送播报文本** + +当您想让机器人主动播报文本的时候,可以使用该接口 + +Input: + +``` +tccli trtc ControlAIConversation --cli-unfold-argument \ + --TaskId your-taskid \ + --Command ServerPushText \ + --ServerPushText.Text 你好很高兴为您服务 \ + --ServerPushText.Interrupt True +``` + +Output: +``` +{ + "Response": { + "RequestId": "xxx-xxx" + } +} +``` + diff --git a/tccli/examples/vclm/v20240523/DescribePortraitSingJob.md b/tccli/examples/vclm/v20240523/DescribePortraitSingJob.md new file mode 100644 index 0000000000..9e43ba7417 --- /dev/null +++ b/tccli/examples/vclm/v20240523/DescribePortraitSingJob.md @@ -0,0 +1,48 @@ +**Example 1: 调用示例-处理中** + +处理中 + +Input: + +``` +tccli vclm DescribePortraitSingJob --cli-unfold-argument \ + --JobId 1199964964965990400 +``` + +Output: +``` +{ + "Response": { + "JobId": "1199964964965990400", + "RequestId": "0819265a-1bd7-4e0a-94a6-18463ae9b20e", + "ResultVideoUrl": "", + "StatusCode": "RUN", + "StatusMsg": "处理中" + } +} +``` + +**Example 2: 调用成功-任务完成** + +任务完成 + +Input: + +``` +tccli vclm DescribePortraitSingJob --cli-unfold-argument \ + --JobId 1199964964965990400 +``` + +Output: +``` +{ + "Response": { + "JobId": "1199964964965990400", + "RequestId": "2564192f-1af0-4d1d-ac92-fac0f5844f73", + "ResultVideoUrl": "https://***.mp4", + "StatusCode": "DONE", + "StatusMsg": "处理完成" + } +} +``` + diff --git a/tccli/examples/vclm/v20240523/SubmitPortraitSingJob.md b/tccli/examples/vclm/v20240523/SubmitPortraitSingJob.md new file mode 100644 index 0000000000..134b6be95d --- /dev/null +++ b/tccli/examples/vclm/v20240523/SubmitPortraitSingJob.md @@ -0,0 +1,122 @@ +**Example 1: 调用成功-图片url地址** + +调用成功 + +Input: + +``` +tccli vclm SubmitPortraitSingJob --cli-unfold-argument \ + --AudioUrl https://***/test.mp3 \ + --ImageUrl https://***/test.png +``` + +Output: +``` +{ + "Response": { + "JobId": "1199964964965990400", + "RequestId": "79655032-c347-4f05-af23-ae80f7ff47eb" + } +} +``` + +**Example 2: 调用失败-音频时长超限** + +音频时长超限 + +Input: + +``` +tccli vclm SubmitPortraitSingJob --cli-unfold-argument \ + --AudioUrl https://***/durationInvalid.m4a \ + --ImageUrl https://***/aj.jpg +``` + +Output: +``` +{ + "Response": { + "Error": { + "Code": "InvalidParameterValue.InvalidAudioDuration", + "Message": "音频时长超出限定范围。上传音频的时长要求:在1秒到60秒范围内" + }, + "RequestId": "9d314f18-3670-4793-bf4b-619b43494ac7" + } +} +``` + +**Example 3: 调用失败-图片分辨率超限** + +图片分辨率超限 + +Input: + +``` +tccli vclm SubmitPortraitSingJob --cli-unfold-argument \ + --AudioUrl https://***/test.mp3 \ + --ImageUrl https://***/resolutionInvalid.jpg +``` + +Output: +``` +{ + "Response": { + "Error": { + "Code": "InvalidParameterValue.InvalidImageResolution", + "Message": "图片分辨率超出限定范围。上传图片的长边分辨率要求:在0到2560范围内" + }, + "RequestId": "29498231-20eb-43d1-bb3b-cc9e07978699" + } +} +``` + +**Example 4: 调用失败-图片宽高比超限** + +图片宽高比超限 + +Input: + +``` +tccli vclm SubmitPortraitSingJob --cli-unfold-argument \ + --AudioUrl https://***/test.mp3 \ + --ImageUrl https://***/ratioInvalid.jpg +``` + +Output: +``` +{ + "Response": { + "Error": { + "Code": "InvalidParameterValue.InvalidImageAspectRatio", + "Message": "图片宽高比超出限定范围。上传图片的宽高比要求:在0.5到2.0范围内" + }, + "RequestId": "3c9cb9bd-5b2a-4b18-a890-73f7712ca2ce" + } +} +``` + +**Example 5: 调用失败-图片大小超限** + +图片大小超限 + +Input: + +``` +tccli vclm SubmitPortraitSingJob --cli-unfold-argument \ + --AudioUrl https://***/test.mp3 \ + --ImageUrl https://***/storageInvalid.jpg +``` + +Output: +``` +{ + "Response": { + "Error": { + "Code": "InvalidParameterValue.InvalidImageSize", + "Message": "图片大小超出限定范围。上传图片的大小要求:在0MB到10MB范围内" + }, + "RequestId": "cd17e6bb-afdb-4bed-8a15-55c461333104" + } +} +``` + diff --git a/tccli/services/aiart/v20221229/api.json b/tccli/services/aiart/v20221229/api.json index a82104c66f..0ef6e56f4c 100644 --- a/tccli/services/aiart/v20221229/api.json +++ b/tccli/services/aiart/v20221229/api.json @@ -212,7 +212,7 @@ }, { "disabled": false, - "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。", + "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。", "example": "无", "member": "string", "name": "InputImage", @@ -221,7 +221,7 @@ }, { "disabled": false, - "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。", + "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。", "example": "无", "member": "string", "name": "InputUrl", @@ -294,7 +294,7 @@ "members": [ { "disabled": false, - "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于 8MB。", + "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于 8MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。", "example": "无", "member": "string", "name": "InputImage", @@ -303,7 +303,7 @@ }, { "disabled": false, - "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于8MB。", + "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于 8MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。", "example": "无", "member": "string", "name": "InputUrl", @@ -412,33 +412,30 @@ "members": [ { "disabled": false, - "document": "水印url", + "document": "水印 Url", "example": "无", "member": "string", "name": "LogoUrl", "required": false, - "type": "string", - "value_allowed_null": true + "type": "string" }, { "disabled": false, - "document": "水印base64,url和base64二选一传入", + "document": "水印 Base64,Url 和 Base64 二选一传入,如果都提供以 Url 为准", "example": "无", "member": "string", "name": "LogoImage", "required": false, - "type": "string", - "value_allowed_null": true + "type": "string" }, { "disabled": false, - "document": "水印图片位于融合结果图中的坐标,将按照坐标对标识图片进行位置和大小的拉伸匹配", + "document": "水印图片位于生成结果图中的坐标,将按照坐标对标识图片进行位置和大小的拉伸匹配", "example": "无", "member": "LogoRect", "name": "LogoRect", "required": false, - "type": "object", - "value_allowed_null": true + "type": "object" } ], "usage": "in" @@ -846,7 +843,7 @@ "members": [ { "disabled": false, - "document": "生成图分辨率\n\n智能文生图支持生成以下分辨率的图片:768:768(1:1)、768:1024(3:4)、1024:768(4:3)、1024:1024(1:1)、720:1280(9:16)、1280:720(16:9)、768:1280(3:5)、1280:768(5:3)、1080:1920(9:16)、1920:1080(16:9),不传默认使用768:768。\n\n智能图生图支持生成以下分辨率的图片:origin(与输入图分辨率一致,长边最高为2000,超出将做等比例缩小)、768:768(1:1)、768:1024(3:4)、1024:768(4:3),不传默认使用origin,如果指定生成的长宽比与输入图长宽比差异过大可能导致图片内容被裁剪。", + "document": "生成图分辨率\n\n图像风格化(图生图)支持生成以下分辨率的图片:origin(与输入图分辨率一致,长边最高为2000,超出将做等比例缩小)、768:768(1:1)、768:1024(3:4)、1024:768(4:3),不传默认使用origin,如果指定生成的长宽比与输入图长宽比差异过大可能导致图片内容被裁剪。", "example": "768:768", "member": "string", "name": "Resolution", diff --git a/tccli/services/cdb/v20170320/api.json b/tccli/services/cdb/v20170320/api.json index c83e79a14e..9145398f03 100644 --- a/tccli/services/cdb/v20170320/api.json +++ b/tccli/services/cdb/v20170320/api.json @@ -20012,6 +20012,7 @@ "example": "‘’", "member": "string", "name": "TagKey", + "output_required": true, "required": true, "type": "string", "value_allowed_null": true @@ -20022,12 +20023,13 @@ "example": "‘’", "member": "string", "name": "TagValue", + "output_required": true, "required": true, "type": "string", "value_allowed_null": true } ], - "usage": "out" + "usage": "both" }, "TagInfoUnit": { "document": "tag信息单元", diff --git a/tccli/services/cfg/cfg_client.py b/tccli/services/cfg/cfg_client.py index 9e8e4b7ba3..6dddaad329 100644 --- a/tccli/services/cfg/cfg_client.py +++ b/tccli/services/cfg/cfg_client.py @@ -17,6 +17,58 @@ from jmespath import search import time +def doDescribeObjectTypeList(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.CfgClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeObjectTypeListRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeObjectTypeList(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 doCreateTaskFromTemplate(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -173,7 +225,7 @@ def doExecuteTaskInstance(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) -def doDescribeTemplateList(args, parsed_globals): +def doModifyTaskRunStatus(args, parsed_globals): g_param = parse_global_arg(parsed_globals) if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: @@ -202,11 +254,115 @@ def doDescribeTemplateList(args, parsed_globals): client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile) client._sdkVersion += ("_CLI_" + __version__) models = MODELS_MAP[g_param[OptionsDefine.Version]] - model = models.DescribeTemplateListRequest() + model = models.ModifyTaskRunStatusRequest() model.from_json_string(json.dumps(args)) start_time = time.time() while True: - rsp = client.DescribeTemplateList(model) + rsp = client.ModifyTaskRunStatus(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 doDescribeActionLibraryList(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.CfgClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeActionLibraryListRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeActionLibraryList(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 doCreateTaskFromAction(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.CfgClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.CreateTaskFromActionRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.CreateTaskFromAction(model) result = rsp.to_json_string() try: json_obj = json.loads(result) @@ -329,7 +485,7 @@ def doDescribeTaskList(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) -def doDescribeTaskPolicyTriggerLog(args, parsed_globals): +def doDescribeActionFieldConfigList(args, parsed_globals): g_param = parse_global_arg(parsed_globals) if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: @@ -358,11 +514,11 @@ def doDescribeTaskPolicyTriggerLog(args, parsed_globals): client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile) client._sdkVersion += ("_CLI_" + __version__) models = MODELS_MAP[g_param[OptionsDefine.Version]] - model = models.DescribeTaskPolicyTriggerLogRequest() + model = models.DescribeActionFieldConfigListRequest() model.from_json_string(json.dumps(args)) start_time = time.time() while True: - rsp = client.DescribeTaskPolicyTriggerLog(model) + rsp = client.DescribeActionFieldConfigList(model) result = rsp.to_json_string() try: json_obj = json.loads(result) @@ -433,6 +589,58 @@ def doDescribeTaskExecuteLogs(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doDescribeTaskPolicyTriggerLog(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.CfgClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeTaskPolicyTriggerLogRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeTaskPolicyTriggerLog(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 doDescribeTask(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -485,7 +693,7 @@ def doDescribeTask(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) -def doModifyTaskRunStatus(args, parsed_globals): +def doDescribeTemplateList(args, parsed_globals): g_param = parse_global_arg(parsed_globals) if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: @@ -514,11 +722,11 @@ def doModifyTaskRunStatus(args, parsed_globals): client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile) client._sdkVersion += ("_CLI_" + __version__) models = MODELS_MAP[g_param[OptionsDefine.Version]] - model = models.ModifyTaskRunStatusRequest() + model = models.DescribeTemplateListRequest() model.from_json_string(json.dumps(args)) start_time = time.time() while True: - rsp = client.ModifyTaskRunStatus(model) + rsp = client.DescribeTemplateList(model) result = rsp.to_json_string() try: json_obj = json.loads(result) @@ -652,16 +860,20 @@ def doDeleteTask(args, parsed_globals): } ACTION_MAP = { + "DescribeObjectTypeList": doDescribeObjectTypeList, "CreateTaskFromTemplate": doCreateTaskFromTemplate, "DescribeTemplate": doDescribeTemplate, "ExecuteTaskInstance": doExecuteTaskInstance, - "DescribeTemplateList": doDescribeTemplateList, + "ModifyTaskRunStatus": doModifyTaskRunStatus, + "DescribeActionLibraryList": doDescribeActionLibraryList, + "CreateTaskFromAction": doCreateTaskFromAction, "TriggerPolicy": doTriggerPolicy, "DescribeTaskList": doDescribeTaskList, - "DescribeTaskPolicyTriggerLog": doDescribeTaskPolicyTriggerLog, + "DescribeActionFieldConfigList": doDescribeActionFieldConfigList, "DescribeTaskExecuteLogs": doDescribeTaskExecuteLogs, + "DescribeTaskPolicyTriggerLog": doDescribeTaskPolicyTriggerLog, "DescribeTask": doDescribeTask, - "ModifyTaskRunStatus": doModifyTaskRunStatus, + "DescribeTemplateList": doDescribeTemplateList, "ExecuteTask": doExecuteTask, "DeleteTask": doDeleteTask, diff --git a/tccli/services/cfg/v20210820/api.json b/tccli/services/cfg/v20210820/api.json index 173e989233..491c808825 100644 --- a/tccli/services/cfg/v20210820/api.json +++ b/tccli/services/cfg/v20210820/api.json @@ -1,5 +1,12 @@ { "actions": { + "CreateTaskFromAction": { + "document": "从动作创建演练", + "input": "CreateTaskFromActionRequest", + "name": "从动作创建演练", + "output": "CreateTaskFromActionResponse", + "status": "online" + }, "CreateTaskFromTemplate": { "document": "从经验库创建演练", "input": "CreateTaskFromTemplateRequest", @@ -14,6 +21,27 @@ "output": "DeleteTaskResponse", "status": "online" }, + "DescribeActionFieldConfigList": { + "document": "根据动作ID获取动作栏位动态配置参数信息,里面包含动作自有和通用两部分参数。", + "input": "DescribeActionFieldConfigListRequest", + "name": "获取动作栏位配置参数列表", + "output": "DescribeActionFieldConfigListResponse", + "status": "online" + }, + "DescribeActionLibraryList": { + "document": "获取混沌演练平台的动作库列表", + "input": "DescribeActionLibraryListRequest", + "name": "获取动作库列表", + "output": "DescribeActionLibraryListResponse", + "status": "online" + }, + "DescribeObjectTypeList": { + "document": "查询对象类型列表", + "input": "DescribeObjectTypeListRequest", + "name": "查询对象类型列表", + "output": "DescribeObjectTypeListResponse", + "status": "online" + }, "DescribeTask": { "document": "查询任务", "input": "DescribeTaskRequest", @@ -92,6 +120,128 @@ "serviceShortName": "cfg" }, "objects": { + "ActionFieldConfigDetail": { + "document": "动作动态参数返回格式", + "members": [ + { + "disabled": false, + "document": "组件类型\n可选项如下:\ninput 文本框\ntextarea 多行文本框\nnumber 数值输入框\nselect 选择器\ncascader 级联选择器\nradio 单选\ntime 时间选择", + "example": "input", + "member": "string", + "name": "Type", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "组件label", + "example": "开机时间", + "member": "string", + "name": "Lable", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "组件唯一标识, 传回后端时的key", + "example": "open_time", + "member": "string", + "name": "Field", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "默认值\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "默认值", + "member": "string", + "name": "DefaultValue", + "required": true, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "支持配置项如下,可根据需要选择配置项,不需要配置是设置空{}:\n\n{\n\n placeholder: string (占位符)\n\n tooltip: string (提示信息)\n\n reg: RegExp (对输入内容格式进行正则校验的规则)\n\n max: number (对于输入框,限制最大输入字符数,对于数值输入框,设置上限)\n\n min: number (对于数值输入框,设置下限)\n\n step: number (设置数值输入框的步长,默认为1)\n\n format: string (时间选择的格式,如YYYY-MM-DD表示年月日, YYYY-MM-DD HH:mm:ss 表示时分秒)\n\n separator: string[] (多行输入框的分隔符,不传或者为空时表示不分隔,直接返回用户输入的文本字符串)\n\n multiple: boolean (是否多选,对选择器和级联选择器有效)\n\n options: 选择器的选项【支持以下两种形式】\n\n直接给定选项数组 { value: string; label: string }[]\n通过调接口获取选项 { api: string(接口地址), params: string[] (接口参数,对应于参数配置的field,前端根据field对应的所有组件的输入值作为参数查询数据, 为空时在组件加载时直接请求数据) }\n}", + "example": "{}", + "member": "string", + "name": "Config", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "是否必填 (0 -- 否 1-- 是)", + "example": "0", + "member": "uint64", + "name": "Required", + "required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "compute配置依赖的其他field满足的条件时通过校验(如:三个表单项中必须至少有一个填写了)\n\n[fieldName,\n\n{ config: 此项保留,等待后面具体场景细化 }\n\n]", + "example": "{}", + "member": "string", + "name": "Validate", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "是否可见", + "example": "{}", + "member": "string", + "name": "Visible", + "required": true, + "type": "string", + "value_allowed_null": false + } + ], + "usage": "out" + }, + "ActionFieldConfigResult": { + "document": "动作栏位配置结果", + "members": [ + { + "disabled": false, + "document": "动作ID", + "example": "1", + "member": "uint64", + "name": "ActionId", + "required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "动作名称", + "example": "关机", + "member": "string", + "name": "ActionName", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "动作对应的栏位配置详情", + "example": "无", + "member": "ActionFieldConfigDetail", + "name": "ConfigDetail", + "required": true, + "type": "list", + "value_allowed_null": false + } + ], + "usage": "out" + }, "ActionFilter": { "document": "动作库筛选栏位", "members": [ @@ -118,6 +268,212 @@ ], "usage": "in" }, + "ActionLibraryListResult": { + "document": "动作库数据列表", + "members": [ + { + "disabled": false, + "document": "动作名称", + "example": "Esc关机", + "member": "string", + "name": "ActionName", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "动作描述", + "example": "Windows内Cpu满载", + "member": "string", + "name": "Desc", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "动作类型。范围:[\"平台\",\"自定义\"]", + "example": "平台", + "member": "string", + "name": "ActionType", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "创建时间", + "example": "2021-08-01 12:20:20", + "member": "string", + "name": "CreateTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "创建人", + "example": "李四", + "member": "string", + "name": "Creator", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "更新时间", + "example": "2021-08-01 13:20:20", + "member": "string", + "name": "UpdateTime", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "动作风险描述", + "example": "执行后不可逆", + "member": "string", + "name": "RiskDesc", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "动作ID", + "example": "1", + "member": "uint64", + "name": "ActionId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "动作属性( 1:故障 2:恢复)", + "example": "1", + "member": "uint64", + "name": "AttributeId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "关联的动作ID", + "example": "1", + "member": "uint64", + "name": "RelationActionId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "操作命令", + "example": "ls -l", + "member": "string", + "name": "ActionCommand", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "动作类型( 0 -- tat 1 -- 云API)", + "example": "1", + "member": "uint64", + "name": "ActionCommandType", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "自定义动作的参数,json string", + "example": "{\"Command\": \"ff\", \"CommandParameters\": \"{}\", \"CommandType\": \"she", + "member": "string", + "name": "ActionContent", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "二级分类\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "服务器资源", + "member": "string", + "name": "ResourceType", + "output_required": true, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "动作描述\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "

调用云api 探针管理文档,在实例安装探针后重新创建新的演练执行。\"}", + "member": "ResourceOffline", + "name": "ResourceOffline", "output_required": false, - "required": false, - "type": "int", + "type": "list", "value_allowed_null": true + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" } ], - "usage": "both" + "type": "object" }, - "CreateTaskFromTemplateRequest": { - "document": "CreateTaskFromTemplate请求参数结构体", + "DescribeActionLibraryListRequest": { + "document": "DescribeActionLibraryList请求参数结构体", "members": [ { "disabled": false, - "document": "从经验库中查询到的经验模板ID", - "example": "11", + "document": "0-100", + "example": "10", "member": "uint64", - "name": "TemplateId", + "name": "Limit", "required": true, "type": "int" }, { "disabled": false, - "document": "演练的配置参数", - "example": "无", - "member": "TaskConfig", - "name": "TaskConfig", + "document": "默认值0", + "example": "0", + "member": "uint64", + "name": "Offset", "required": true, - "type": "object" + "type": "int" + }, + { + "disabled": false, + "document": "对象类型ID", + "example": "1", + "member": "uint64", + "name": "ObjectType", + "required": true, + "type": "int" + }, + { + "disabled": false, + "document": "Keyword取值{\"动作名称\": \"a_title\", \"描述\": \"a_desc\", \"动作类型\": \"a_type\", \"创建时间\": \"a_create_time\", \"二级分类\": \"a_resource_type\"}", + "example": "无", + "member": "ActionFilter", + "name": "Filters", + "required": false, + "type": "list" + }, + { + "disabled": false, + "document": "动作分类,1表示故障动作,2表示恢复动作", + "example": "[1,2]", + "member": "int64", + "name": "Attribute", + "required": false, + "type": "list" + }, + { + "disabled": false, + "document": "筛选项 -动作ID", + "example": "无", + "member": "uint64", + "name": "ActionIds", + "required": false, + "type": "list" } ], "type": "object" }, - "CreateTaskFromTemplateResponse": { - "document": "CreateTaskFromTemplate返回参数结构体", + "DescribeActionLibraryListResponse": { + "document": "DescribeActionLibraryList返回参数结构体", "members": [ { "disabled": false, - "document": "创建成功的演练ID", - "example": "50", + "document": "查询结果列表", + "example": "无", + "member": "ActionLibraryListResult", + "name": "Results", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "符合记录条数", + "example": "1000", "member": "uint64", - "name": "TaskId", + "name": "Total", + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -202,24 +834,34 @@ ], "type": "object" }, - "DeleteTaskRequest": { - "document": "DeleteTask请求参数结构体", + "DescribeObjectTypeListRequest": { + "document": "DescribeObjectTypeList请求参数结构体", "members": [ { "disabled": false, - "document": "任务ID", - "example": "5689", + "document": "所支持的对象\n0:全平台产品\n1:平台接入的对象\n2:应用所支持的部分对象", + "example": "1", "member": "int64", - "name": "TaskId", - "required": true, + "name": "SupportType", + "required": false, "type": "int" } ], "type": "object" }, - "DeleteTaskResponse": { - "document": "DeleteTask返回参数结构体", + "DescribeObjectTypeListResponse": { + "document": "DescribeObjectTypeList返回参数结构体", "members": [ + { + "disabled": false, + "document": "对象类型列表", + "example": "[{\"Key\":\"NatGatewayId\",\"Header\":\"实例ID\",\"Transfer\":null,\"JsonParse\":null},{\"Key\":\"NatGatewayName\",\"Header\":\"实例名称\",\"Transfer\":null,\"JsonParse\":null},{\"Key\":\"InternetMaxBandwidthOut\",\"Header\":\"最大出带宽(Mbps)\",\"Transfer\":null,\"JsonParse\":null},{\"Key\":\"MaxConcurrentConnection\",\"Header\":\"最大并发连接数\",\"Transfer\":null,\"JsonParse\":null},{\"Key\":\"VpcId\",\"Header\":\"VPC-ID\",\"Transfer\":null,\"JsonParse\":null}]", + "member": "ObjectType", + "name": "ObjectTypeList", + "output_required": true, + "type": "list", + "value_allowed_null": false + }, { "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", "member": "string", @@ -909,6 +1551,190 @@ ], "type": "object" }, + "ObjectType": { + "document": "对象类型", + "members": [ + { + "disabled": false, + "document": "对象类型ID", + "example": "1", + "member": "int64", + "name": "ObjectTypeId", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "对象类型名称", + "example": "CVM", + "member": "string", + "name": "ObjectTypeTitle", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "对象类型第一级", + "example": "主机", + "member": "string", + "name": "ObjectTypeLevelOne", + "output_required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "对象类型参数", + "example": "无", + "member": "ObjectTypeConfig", + "name": "ObjectTypeParams", + "output_required": true, + "type": "object", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "tke接口json解析规则,null不需要解析\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "{\"NameSpace\": \"$.metadata.name\", \"WorkloadName\": \"$.metadata.name\"}", + "member": "ObjectTypeJsonParse", + "name": "ObjectTypeJsonParse", + "output_required": true, + "type": "object", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "是否包含新动作\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "true", + "member": "bool", + "name": "ObjectHasNewAction", + "output_required": false, + "type": "bool", + "value_allowed_null": true + } + ], + "usage": "out" + }, + "ObjectTypeConfig": { + "document": "对象类型配置", + "members": [ + { + "disabled": false, + "document": "主键", + "example": "instanceId", + "member": "string", + "name": "Key", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "对象类型配置字段列表", + "example": "无", + "member": "ObjectTypeConfigFields", + "name": "Fields", + "required": true, + "type": "list", + "value_allowed_null": false + } + ], + "usage": "out" + }, + "ObjectTypeConfigFields": { + "document": "对象类型字段类型", + "members": [ + { + "disabled": false, + "document": "instanceId", + "example": "instanceId", + "member": "string", + "name": "Key", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "实例id", + "example": "实例id", + "member": "string", + "name": "Header", + "required": true, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "字段值是否需要转译,当不需要转译时,此字段返回null\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "string", + "name": "Transfer", + "required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "tke的pod字段信息解析\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "string", + "name": "JsonParse", + "required": false, + "type": "string", + "value_allowed_null": true + } + ], + "usage": "both" + }, + "ObjectTypeJsonParse": { + "document": "标准pod对象类型下拉数据的解析", + "members": [ + { + "disabled": false, + "document": "命名空间\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "\"$.metadata.name\"", + "member": "string", + "name": "NameSpace", + "output_required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "工作负载名称\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "\"$.metadata.name\"", + "member": "string", + "name": "WorkloadName", + "output_required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "节点IP\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "\"$.metadata.name\"", + "member": "string", + "name": "LanIP", + "output_required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "节点ID\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "\"$.metadata.name\"", + "member": "string", + "name": "InstanceId", + "output_required": false, + "type": "string", + "value_allowed_null": true + } + ], + "usage": "out" + }, "PolicyTriggerLog": { "document": "护栏策略触发日志", "members": [ @@ -965,6 +1791,45 @@ ], "usage": "out" }, + "ResourceOffline": { + "document": "资源下线", + "members": [ + { + "disabled": false, + "document": "资源ID\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "1", + "member": "int64", + "name": "ResourceId", + "output_required": false, + "required": false, + "type": "int", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "资源下线时间\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "2024-01-01", + "member": "string", + "name": "ResourceDeleteTime", + "output_required": false, + "required": false, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "资源下线提示\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "该动作所使用所使用探针工具功能不完善,已将该动作下线。", + "member": "string", + "name": "ResourceDeleteMessage", + "output_required": false, + "required": false, + "type": "string", + "value_allowed_null": true + } + ], + "usage": "both" + }, "TagWithCreate": { "document": "用于传入创建、编辑标签", "members": [ diff --git a/tccli/services/cfg/v20210820/examples.json b/tccli/services/cfg/v20210820/examples.json index 8983232c06..6f2a09fed1 100644 --- a/tccli/services/cfg/v20210820/examples.json +++ b/tccli/services/cfg/v20210820/examples.json @@ -1,5 +1,13 @@ { "actions": { + "CreateTaskFromAction": [ + { + "document": "", + "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateTaskFromAction\n<公共请求参数>\n\n\n\n\n{\n\t\"TaskActionId\": 127,\n\t\"TaskInstances\": [\n\t\t\"ins-87bfr32q\"\n\t]\n\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"f0aee8ac-2ed3-4a7f-a25b-f0d7d228dd30\",\n \"TaskId\": 50\n }\n}", + "title": "从动作创建演练" + } + ], "CreateTaskFromTemplate": [ { "document": "通过预创建好的经验模板生成常规化的演练持续使用", @@ -16,6 +24,30 @@ "title": "删除任务" } ], + "DescribeActionFieldConfigList": [ + { + "document": "", + "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeActionFieldConfigList\n<公共请求参数>\n\n{\n \"ObjectTypeId\": \"1\",\n \"ActionIds\": [\n \"1\"\n ]\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"f3433a9a-e8fd-40b9-88e7-dd8b3f1a181f\",\n \"Common\": [\n {\n \"ActionId\": 1,\n \"ActionName\": \"关机\",\n \"ConfigDetail\": [\n {\n \"Type\": \"input\",\n \"Lable\": \"动作别名\",\n \"Field\": \"AliasTitle\",\n \"DefaultValue\": \"\",\n \"Config\": \"{}\",\n \"Required\": 0,\n \"Validate\": \"{}\",\n \"Visible\": \"{}\"\n },\n {\n \"Type\": \"number\",\n \"Lable\": \"前置等待时间(s)\",\n \"Field\": \"PreTimeWait\",\n \"DefaultValue\": \"0\",\n \"Config\": \"{\\\"max\\\": 86400, \\\"min\\\": 0, \\\"tooltip\\\": \\\"仅限用于自动推进模式\\\"}\",\n \"Required\": 1,\n \"Validate\": \"{}\",\n \"Visible\": \"{}\"\n },\n {\n \"Type\": \"number\",\n \"Lable\": \"后置等待时间(s)\",\n \"Field\": \"AfterTimeWait\",\n \"DefaultValue\": \"0\",\n \"Config\": \"{\\\"max\\\": 86400, \\\"min\\\": 0, \\\"tooltip\\\": \\\"仅限用于自动推进模式\\\"}\",\n \"Required\": 1,\n \"Validate\": \"{}\",\n \"Visible\": \"{}\"\n },\n {\n \"Type\": \"number\",\n \"Lable\": \"动作超时时间(s)\",\n \"Field\": \"ActionTimeout\",\n \"DefaultValue\": \"1800\",\n \"Config\": \"{\\\"max\\\": 86400, \\\"min\\\": 0, \\\"tooltip\\\": \\\"动作的超时时间\\\"}\",\n \"Required\": 1,\n \"Validate\": \"{}\",\n \"Visible\": \"{}\"\n }\n ]\n }\n ],\n \"Results\": []\n }\n}", + "title": "示例" + } + ], + "DescribeActionLibraryList": [ + { + "document": "动作库列表数据查询", + "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeActionLibraryList\n<公共请求参数>\n\n{\n \"Limit\": 10,\n \"Offset\": 0,\n \"Filters\": [\n {\n \"Keyword\": \"a_type\",\n \"Values\": [\n \"1\"\n ]\n }\n ],\n \"ObjectType\": 1,\n \"Attribute\": [\n 1\n ]\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"cZ6m0xYnnDreBNJm\",\n \"Results\": [\n {\n \"ActionName\": \"关机(测试)\",\n \"Desc\": \"对CVM进行关机操作\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2023-07-04 11:20:43\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2023-07-04 11:20:43\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 1,\n \"AttributeId\": 1,\n \"RelationActionId\": 2,\n \"ActionCommand\": \"调用腾讯云对应产品的API接口\",\n \"ActionContent\": \"调用云api StopInstances\",\n \"ActionCommandType\": 1,\n \"ActionDetail\": \"

调用云api StopInstances关机

\",\n \"ResourceType\": \"服务器资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"https://cloud.tencent.com/document/product/1500/74357\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": [\n 614,\n 615\n ]\n },\n {\n \"ActionName\": \"开机\",\n \"Desc\": \"对CVM进行开机操作\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 2,\n \"AttributeId\": 2,\n \"RelationActionId\": 1,\n \"ActionCommand\": \"调用腾讯云对应产品的API接口\",\n \"ActionContent\": \"调用云api StartInstances\",\n \"ActionCommandType\": 1,\n \"ActionDetail\": \"

调用云api StartInstances开机

\",\n \"ResourceType\": \"服务器资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"重启\",\n \"Desc\": \"重启\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2023-05-24 15:33:39\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2023-05-24 15:33:39\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 3,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"调用腾讯云对应产品的API接口\",\n \"ActionContent\": \"调用云api RebootInstances\",\n \"ActionCommandType\": 1,\n \"ActionDetail\": \"

调用云api RebootInstances重启

\",\n \"ResourceType\": \"服务器资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"https://tcloud4api.woa.com/document/product/1607/88863?!preview&!document=1\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"CPU利用率高\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 4,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\\nelse\\n stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"completed\\\"\\n exit 0\\nfi\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\\nelse\\n stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"completed\\\"\\n exit 0\\nfi\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"

使用tat通道下发stress-ng命令进行压测

\\n

命令内容:stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}

\\n

tat官方文档

\\n

stress-ng官方文档

\\n\",\n \"ResourceType\": \"CPU资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"内存利用率高\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 7,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --vm-bytes $(awk '/MemAvailable/{printf \\\"%d\\\\n\\\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}\\nelse\\n avaliable_mem=$(awk '/^MemAvailable:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n free_mem=$(awk '/^MemFree:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n buffer=$(awk '/^Buffers:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n cache=$(awk '/^Cached:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n if [ -n \\\"$avaliable_mem\\\" ]\\n then\\n stress-ng --vm-bytes $[$avaliable_mem*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\\n else\\n stress-ng --vm-bytes $[($free_mem+$buffer+$cache)*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\\n fi\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --vm-bytes $(awk '/MemAvailable/{printf \\\"%d\\\\n\\\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}\\nelse\\n avaliable_mem=$(awk '/^MemAvailable:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n free_mem=$(awk '/^MemFree:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n buffer=$(awk '/^Buffers:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n cache=$(awk '/^Cached:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n if [ -n \\\"$avaliable_mem\\\" ]\\n then\\n stress-ng --vm-bytes $[$avaliable_mem*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\\n else\\n stress-ng --vm-bytes $[($free_mem+$buffer+$cache)*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\\n fi\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"

使用tat通道下发stress-ng命令进行压测

\\n

命令内容:stress-ng --vm-bytes $(awk '/MemAvailable/{printf \\\"%d\\\\n\\\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}

\\n

tat官方文档

\\n

stress-ng官方文档

\",\n \"ResourceType\": \"内存资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"磁盘分区使用率高\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 8,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n cd {{dir}} && docker run --rm alexeiled/stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\\nelse\\n cd {{dir}} && stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n cd {{dir}} && docker run --rm alexeiled/stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\\nelse\\n cd {{dir}} && stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"

使用tat通道下发stress-ng命令进行压测

\\n

命令内容:stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}

\\n

tat官方文档

\\n

stress-ng官方文档

\\n\",\n \"ResourceType\": \"磁盘资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"内核故障\",\n \"Desc\": \"会触发实例重启\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 9,\n \"AttributeId\": 1,\n \"RelationActionId\": 24,\n \"ActionCommand\": \"echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && echo 'inject kernel error success!' && echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && sleep 5 && echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && echo c > /proc/sysrq-trigger &\",\n \"ActionContent\": \"echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && echo 'inject kernel error success!' && echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && sleep 5 && echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && echo c > /proc/sysrq-trigger &\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"

使用tat通道下发内核故障命令

\\n

命令内容:echo c > /proc/sysrq-trigger

\\n

tat官方文档

\",\n \"ResourceType\": \"CPU资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"磁盘IO负载\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 10,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\\nelse\\n stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\\nelse\\n stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"

使用tat通道下发stress-ng命令进行压测

\\n

命令内容:stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}

\\n

tat官方文档

\",\n \"ResourceType\": \"IO资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"内存OOM\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2023-07-04 11:20:43\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2023-07-04 11:20:43\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 11,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\\nelse\\n stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\\nfi\\necho \\\"Completed\\\"\\n\\n\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\\nelse\\n stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\\nfi\\necho \\\"Completed\\\"\\n\\n\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"

使用tat通道下发stress-ng命令进行压测

\\n

命令内容:stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}

\\n

tat官方文档

\",\n \"ResourceType\": \"内存资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"https://cloud.tencent.com/document/product/1500/81504\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"空操作\",\n \"Desc\": \"空操作,用于测试流程,不做实际注入操作\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"低风险\",\n \"ActionId\": 12,\n \"AttributeId\": 1,\n \"RelationActionId\": 13,\n \"ActionCommand\": \"调用腾讯云对应产品的API接口\",\n \"ActionContent\": \"空操作\",\n \"ActionCommandType\": 1,\n \"ActionDetail\": null,\n \"ResourceType\": \"其他\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n }\n ],\n \"Total\": 45\n }\n}", + "title": "动作库列表查询" + } + ], + "DescribeObjectTypeList": [ + { + "document": "", + "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeObjectTypeList\n<公共请求参数>\n\n{}", + "output": "{\n \"Response\": {\n \"ObjectTypeList\": [\n {\n \"ObjectTypeId\": 0,\n \"ObjectTypeTitle\": \"abc\",\n \"ObjectTypeLevelOne\": \"abc\",\n \"ObjectTypeParams\": {\n \"Key\": \"abc\",\n \"Fields\": [\n {\n \"Key\": \"abc\",\n \"Header\": \"abc\",\n \"Transfer\": \"abc\",\n \"JsonParse\": \"abc\"\n }\n ]\n },\n \"ObjectTypeJsonParse\": {\n \"NameSpace\": \"abc\",\n \"WorkloadName\": \"abc\"\n }\n }\n ],\n \"RequestId\": \"abc\"\n }\n}", + "title": "请求对象类型列表" + } + ], "DescribeTask": [ { "document": "", diff --git a/tccli/services/cfw/v20190904/api.json b/tccli/services/cfw/v20190904/api.json index ea1538af62..b4a6c5f1b4 100644 --- a/tccli/services/cfw/v20190904/api.json +++ b/tccli/services/cfw/v20190904/api.json @@ -4345,6 +4345,16 @@ "output_required": false, "type": "string", "value_allowed_null": true + }, + { + "disabled": false, + "document": "规则最近命中时间\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "string", + "name": "LastHitTime", + "output_required": false, + "type": "string", + "value_allowed_null": true } ], "usage": "out" @@ -4866,7 +4876,7 @@ }, { "disabled": false, - "document": "已使用的地址模版数", + "document": "已使用的地址模板数", "example": "0", "member": "int64", "name": "UsedTemplateCount", @@ -4876,7 +4886,7 @@ }, { "disabled": false, - "document": "地址模版配额数量", + "document": "地址模板配额数量", "example": "10", "member": "int64", "name": "TemplateQuotaCount", diff --git a/tccli/services/cls/v20201016/api.json b/tccli/services/cls/v20201016/api.json index 2dee86802e..d580950c8f 100644 --- a/tccli/services/cls/v20201016/api.json +++ b/tccli/services/cls/v20201016/api.json @@ -5398,6 +5398,16 @@ "output_required": true, "type": "string", "value_allowed_null": false + }, + { + "disabled": false, + "document": "数据加工类型。0:标准加工任务;1:前置加工任务。\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "0", + "member": "uint64", + "name": "DataTransformType", + "output_required": false, + "type": "int", + "value_allowed_null": true } ], "usage": "out" @@ -6600,7 +6610,7 @@ "members": [ { "disabled": false, - "document": "
  • taskName\n\n按照【加工任务名称】进行过滤。\n类型:String\n\n必选:否\n\n
  • taskId\n\n按照【加工任务id】进行过滤。\n类型:String\n\n必选:否\n\n
  • topicId\n\n按照【源topicId】进行过滤。\n类型:String\n\n必选:否\n\n每次请求的Filters的上限为10,Filter.Values的上限为100。", + "document": "- taskName\n按照【加工任务名称】进行过滤。\n类型:String\n必选:否\n\n- taskId\n按照【加工任务id】进行过滤。\n类型:String\n必选:否\n\n- topicId\n按照【源topicId】进行过滤。\n类型:String\n必选:否\n- status\n按照【 任务运行状态】进行过滤。 1:准备中,2:运行中,3:停止中,4:已停止\n类型:String\n必选:否\n- hasServiceLog\n按照【是否开启服务日志】进行过滤。 1:未开启,2:已开启\n类型:String\n必选:否\n- dstTopicType\n按照【目标topic类型】进行过滤。 1:固定,2:动态\n类型:String\n必选:否\n\n每次请求的Filters的上限为10,Filter.Values的上限为100。", "example": "无", "member": "Filter", "name": "Filters", diff --git a/tccli/services/cme/v20191029/api.json b/tccli/services/cme/v20191029/api.json index c6fa2eefa4..9263568e7f 100644 --- a/tccli/services/cme/v20191029/api.json +++ b/tccli/services/cme/v20191029/api.json @@ -8202,30 +8202,30 @@ { "disabled": false, "document": "导出的多媒体创作引擎媒体 Id,仅当导出目标为多媒体创作引擎媒体时有效。", - "example": "无", + "example": "5f73f8ad54953bce323f", "member": "string", "name": "MaterialId", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, { "disabled": false, "document": "云点播媒资 FileId。", - "example": "无", + "example": "2c65f425b86ad532", "member": "string", "name": "VodFileId", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, { "disabled": false, "document": "导出的媒资 URL。", - "example": "无", + "example": "http://cme.vod2.myqcloud.com/123/f0.mp4", "member": "string", "name": "URL", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -8235,17 +8235,17 @@ "example": "无", "member": "MediaMetaData", "name": "MetaData", - "required": true, + "output_required": true, "type": "object", "value_allowed_null": true }, { "disabled": false, "document": "导出视频的封面图片 URL。", - "example": "无", + "example": "http://cme.vod2.myqcloud.com/123/f0.jpg", "member": "string", "name": "CoverURL", - "required": false, + "output_required": true, "type": "string", "value_allowed_null": false } diff --git a/tccli/services/cme/v20191029/examples.json b/tccli/services/cme/v20191029/examples.json index bd4571061b..4d4be8d37b 100644 --- a/tccli/services/cme/v20191029/examples.json +++ b/tccli/services/cme/v20191029/examples.json @@ -284,7 +284,7 @@ { "document": " 获取任务详情。", "input": "POST / HTTP/1.1\nHost: cme.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTaskDetail\n<公共请求参数>\n\n{\n \"Platform\": \"test\",\n \"TaskId\": \"181xxxxxxxx9-procedurev2-b718fcee09a72470bf665cf55351d810t0\"\n}", - "output": "{\n \"Response\": {\n \"CreateTime\": \"2020-04-28T18:16:58Z\",\n \"ErrCode\": 0,\n \"ErrMsg\": \"Success.\",\n \"Progress\": 100,\n \"RequestId\": \"85b8cdac-8e18-430a-aeae-08076ac26a11\",\n \"Status\": \"SUCCESS\",\n \"TaskType\": \"VIDEO_EDIT_PROJECT_EXPORT\",\n \"VideoEditProjectOutput\": {\n \"MaterialId\": \"6866c9a7-a2ca-4d\",\n \"MetaData\": {\n \"AudioStreamInfoSet\": [\n {\n \"Bitrate\": 46552,\n \"Codec\": \"aac\",\n \"SamplingRate\": 16000\n }\n ],\n \"Bitrate\": 6917072,\n \"Container\": \"mov,mp4,m4a,3gp,3g2,mj2\",\n \"Duration\": 346.55999755859375,\n \"Height\": 1080,\n \"Rotate\": 0,\n \"Size\": 299688882,\n \"VideoStreamInfoSet\": [\n {\n \"Bitrate\": 6870520,\n \"Codec\": \"h264\",\n \"Fps\": 25,\n \"Height\": 1080,\n \"Width\": 1920\n }\n ],\n \"Width\": 1920\n },\n \"URL\": \"http://cmedemo.vod2.myqcloud.com/xxxxx/cemdemo.mp4\",\n \"VodFileId\": \"5285890802029089\"\n }\n }\n}", + "output": "{\n \"Response\": {\n \"CreateTime\": \"2020-04-28T18:16:58Z\",\n \"ErrCode\": 0,\n \"ErrMsg\": \"Success.\",\n \"Progress\": 100,\n \"RequestId\": \"85b8cdac-8e18-430a-aeae-08076ac26a11\",\n \"Status\": \"SUCCESS\",\n \"TaskType\": \"VIDEO_EDIT_PROJECT_EXPORT\",\n \"VideoEditProjectOutput\": {\n \"MaterialId\": \"6866c9a7-a2ca-4d\",\n \"MetaData\": {\n \"AudioStreamInfoSet\": [\n {\n \"Bitrate\": 46552,\n \"Codec\": \"aac\",\n \"SamplingRate\": 16000\n }\n ],\n \"Bitrate\": 6917072,\n \"Container\": \"mov,mp4,m4a,3gp,3g2,mj2\",\n \"Duration\": 346.55999755859375,\n \"Height\": 1080,\n \"Rotate\": 0,\n \"Size\": 299688882,\n \"VideoStreamInfoSet\": [\n {\n \"Bitrate\": 6870520,\n \"Codec\": \"h264\",\n \"Fps\": 25,\n \"Height\": 1080,\n \"Width\": 1920\n }\n ],\n \"Width\": 1920\n },\n \"URL\": \"http://cmedemo.vod2.myqcloud.com/xxxxx/cemdemo.mp4\",\n \"CoverURL\": \"http://cmedemo.vod2.myqcloud.com/xxxxx/cemdemo.jpg\",\n \"VodFileId\": \"5285890802029089\"\n }\n }\n}", "title": "获取任务详情" } ], diff --git a/tccli/services/csip/csip_client.py b/tccli/services/csip/csip_client.py index c056258ed3..e28745ea7e 100644 --- a/tccli/services/csip/csip_client.py +++ b/tccli/services/csip/csip_client.py @@ -1161,6 +1161,58 @@ def doDescribeRiskCenterWebsiteRiskList(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doDescribeCFWAssetStatistics(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.CsipClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribeCFWAssetStatisticsRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribeCFWAssetStatistics(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 doStopRiskCenterTask(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -2234,6 +2286,7 @@ def doDescribeCVMAssetInfo(args, parsed_globals): "DescribeAssetViewVulRiskList": doDescribeAssetViewVulRiskList, "DescribeVULRiskDetail": doDescribeVULRiskDetail, "DescribeRiskCenterWebsiteRiskList": doDescribeRiskCenterWebsiteRiskList, + "DescribeCFWAssetStatistics": doDescribeCFWAssetStatistics, "StopRiskCenterTask": doStopRiskCenterTask, "CreateRiskCenterScanTask": doCreateRiskCenterScanTask, "DescribeGatewayAssets": doDescribeGatewayAssets, diff --git a/tccli/services/csip/v20221121/api.json b/tccli/services/csip/v20221121/api.json index af2cfeedea..b2e6dc7b92 100644 --- a/tccli/services/csip/v20221121/api.json +++ b/tccli/services/csip/v20221121/api.json @@ -49,6 +49,13 @@ "output": "DescribeAssetViewVulRiskListResponse", "status": "online" }, + "DescribeCFWAssetStatistics": { + "document": "云防资产中心统计数据", + "input": "DescribeCFWAssetStatisticsRequest", + "name": "云防资产中心统计数据", + "output": "DescribeCFWAssetStatisticsResponse", + "status": "online" + }, "DescribeCVMAssetInfo": { "document": "cvm详情", "input": "DescribeCVMAssetInfoRequest", @@ -5477,6 +5484,133 @@ ], "type": "object" }, + "DescribeCFWAssetStatisticsRequest": { + "document": "DescribeCFWAssetStatistics请求参数结构体", + "members": [], + "type": "object" + }, + "DescribeCFWAssetStatisticsResponse": { + "document": "DescribeCFWAssetStatistics返回参数结构体", + "members": [ + { + "disabled": false, + "document": "网络资产总数", + "example": "无", + "member": "int64", + "name": "NetworkTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "资产clb数量", + "example": "无", + "member": "int64", + "name": "ClbTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "nat数量", + "example": "无", + "member": "int64", + "name": "NatTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "公网ip数量", + "example": "无", + "member": "int64", + "name": "PublicAssetTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "主机数量", + "example": "无", + "member": "int64", + "name": "CVMAssetTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "配置风险", + "example": "无", + "member": "int64", + "name": "CFGTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "端口风险", + "example": "无", + "member": "int64", + "name": "PortTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "内容风险", + "example": "无", + "member": "int64", + "name": "WebsiteTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "风险服务暴露", + "example": "无", + "member": "int64", + "name": "ServerTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "弱口令风险", + "example": "无", + "member": "int64", + "name": "WeakPasswordTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "漏洞风险", + "example": "无", + "member": "int64", + "name": "VULTotal", + "output_required": true, + "type": "int", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeCVMAssetInfoRequest": { "document": "DescribeCVMAssetInfo请求参数结构体", "members": [ diff --git a/tccli/services/csip/v20221121/examples.json b/tccli/services/csip/v20221121/examples.json index 5c692be24f..b7a99b2d2d 100644 --- a/tccli/services/csip/v20221121/examples.json +++ b/tccli/services/csip/v20221121/examples.json @@ -56,6 +56,14 @@ "title": "success1" } ], + "DescribeCFWAssetStatistics": [ + { + "document": "资产中心统计", + "input": "POST / HTTP/1.1\nHost: csip.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCFWAssetStatistics\n<公共请求参数>\n\n{}", + "output": "{\n \"Response\": {\n \"NetworkTotal\": 0,\n \"ClbTotal\": 0,\n \"NatTotal\": 0,\n \"PublicAssetTotal\": 0,\n \"CVMAssetTotal\": 0,\n \"CFGTotal\": 0,\n \"PortTotal\": 0,\n \"WebsiteTotal\": 0,\n \"ServerTotal\": 0,\n \"WeakPasswordTotal\": 0,\n \"VULTotal\": 0,\n \"RequestId\": \"abc\"\n }\n}", + "title": "资产中心统计" + } + ], "DescribeCVMAssetInfo": [ { "document": "接口测试", diff --git a/tccli/services/cwp/v20180228/api.json b/tccli/services/cwp/v20180228/api.json index 96da58017f..d11e97d61d 100644 --- a/tccli/services/cwp/v20180228/api.json +++ b/tccli/services/cwp/v20180228/api.json @@ -11295,7 +11295,7 @@ "example": "1", "member": "uint64", "name": "Id", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11305,7 +11305,7 @@ "example": "dadada", "member": "string", "name": "Uuid", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11315,7 +11315,7 @@ "example": "dadasda", "member": "string", "name": "Quuid", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11325,7 +11325,7 @@ "example": "127.0.0.1", "member": "string", "name": "Hostip", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11335,7 +11335,7 @@ "example": "root", "member": "string", "name": "User", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11345,7 +11345,7 @@ "example": "1", "member": "uint64", "name": "Platform", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11355,7 +11355,7 @@ "example": "rm", "member": "string", "name": "BashCmd", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11365,7 +11365,7 @@ "example": "1", "member": "uint64", "name": "RuleId", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11375,7 +11375,7 @@ "example": "1", "member": "string", "name": "RuleName", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11385,7 +11385,7 @@ "example": "1", "member": "uint64", "name": "RuleLevel", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11395,7 +11395,7 @@ "example": "1", "member": "uint64", "name": "Status", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11405,7 +11405,7 @@ "example": "2021-03-30 19:17:28", "member": "string", "name": "CreateTime", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11415,7 +11415,7 @@ "example": "主机", "member": "string", "name": "MachineName", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11425,7 +11425,7 @@ "example": "1", "member": "uint64", "name": "DetectBy", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": true }, @@ -11435,7 +11435,7 @@ "example": "1", "member": "string", "name": "Pid", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11445,7 +11445,7 @@ "example": "1.exe", "member": "string", "name": "Exe", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11455,7 +11455,7 @@ "example": "2021-03-30 19:17:28", "member": "string", "name": "ModifyTime", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11465,7 +11465,7 @@ "example": "0", "member": "uint64", "name": "RuleCategory", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": true }, @@ -11475,7 +11475,17 @@ "example": "rm -rf /tmp/t*", "member": "string", "name": "RegexBashCmd", - "required": true, + "output_required": true, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "主机HostName\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "ins-1324", + "member": "string", + "name": "HostName", + "output_required": false, "type": "string", "value_allowed_null": true } @@ -11707,7 +11717,7 @@ "example": "1", "member": "uint64", "name": "Id", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11717,7 +11727,7 @@ "example": "dadada", "member": "string", "name": "Uuid", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11727,7 +11737,7 @@ "example": "dadasda", "member": "string", "name": "Quuid", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11737,7 +11747,7 @@ "example": "127.0.0.1", "member": "string", "name": "HostIp", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11747,7 +11757,7 @@ "example": "1", "member": "uint64", "name": "Platform", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11757,7 +11767,7 @@ "example": "rm", "member": "string", "name": "BashCmd", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11767,7 +11777,7 @@ "example": "1", "member": "uint64", "name": "RuleId", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11777,7 +11787,7 @@ "example": "1", "member": "string", "name": "RuleName", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11787,7 +11797,7 @@ "example": "1", "member": "uint64", "name": "RuleLevel", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11797,7 +11807,7 @@ "example": "1", "member": "uint64", "name": "Status", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": false }, @@ -11807,7 +11817,7 @@ "example": "2021-03-30 19:17:28", "member": "string", "name": "CreateTime", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11817,7 +11827,7 @@ "example": "主机", "member": "string", "name": "MachineName", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -11827,7 +11837,7 @@ "example": "1.exe", "member": "string", "name": "Exe", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11837,7 +11847,7 @@ "example": "2021-03-30 19:17:28", "member": "string", "name": "ModifyTime", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11847,7 +11857,7 @@ "example": "0", "member": "uint64", "name": "RuleCategory", - "required": true, + "output_required": true, "type": "int", "value_allowed_null": true }, @@ -11857,7 +11867,7 @@ "example": "rm -rf /tmp/t*", "member": "string", "name": "RegexBashCmd", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11867,7 +11877,7 @@ "example": "\"[{\"pid\":1234,\"exe\":\"/usr/bin/bash\",\"account\":\"root:root\",\"cmdl\"", "member": "string", "name": "PsTree", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11877,7 +11887,7 @@ "example": "建议方案", "member": "string", "name": "SuggestScheme", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11887,7 +11897,7 @@ "example": "描述", "member": "string", "name": "HarmDescribe", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11897,7 +11907,7 @@ "example": "[\"标签1\",\"标签2\"]", "member": "string", "name": "Tags", - "required": true, + "output_required": true, "type": "list", "value_allowed_null": true }, @@ -11907,7 +11917,7 @@ "example": "[\"http://www.tencent.com\"]", "member": "string", "name": "References", - "required": true, + "output_required": true, "type": "list", "value_allowed_null": true }, @@ -11917,7 +11927,7 @@ "example": "124.2.4.55", "member": "string", "name": "MachineWanIp", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11927,7 +11937,7 @@ "example": "ONLINE", "member": "string", "name": "MachineStatus", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11937,7 +11947,7 @@ "example": "test", "member": "string", "name": "User", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": true }, @@ -11947,7 +11957,17 @@ "example": "1234", "member": "string", "name": "Pid", - "required": true, + "output_required": true, + "type": "string", + "value_allowed_null": true + }, + { + "disabled": false, + "document": "数据来源\n注意:此字段可能返回 null,表示取不到有效值。", + "example": "无", + "member": "string", + "name": "DetectBy", + "output_required": false, "type": "string", "value_allowed_null": true } @@ -38386,7 +38406,7 @@ "example": "xx", "member": "string", "name": "DownloadUrl", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, @@ -40737,7 +40757,7 @@ "example": "xxx", "member": "string", "name": "DownloadUrl", - "required": true, + "output_required": true, "type": "string", "value_allowed_null": false }, diff --git a/tccli/services/cwp/v20180228/examples.json b/tccli/services/cwp/v20180228/examples.json index c7e3d001f2..d59133241d 100644 --- a/tccli/services/cwp/v20180228/examples.json +++ b/tccli/services/cwp/v20180228/examples.json @@ -3040,7 +3040,7 @@ { "document": "", "input": "POST / HTTP/1.1\nHost: cwp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ExportAssetRecentMachineInfo\n<公共请求参数>\n\n{\n \"BeginDate\": \"2020-09-22\",\n \"EndDate\": \"2020-09-22\"\n}", - "output": "{\n \"Response\": {\n \"DownloadUrl\": \"xx\",\n \"RequestId\": \"xx\"\n }\n}", + "output": "{\n \"Response\": {\n \"DownloadUrl\": \"http://xx/xxx\",\n \"RequestId\": \"abcs12434\"\n }\n}", "title": "导出主机概况趋势" } ], diff --git a/tccli/services/dnspod/v20210323/api.json b/tccli/services/dnspod/v20210323/api.json index 5f2c030d3a..0fc68460a4 100644 --- a/tccli/services/dnspod/v20210323/api.json +++ b/tccli/services/dnspod/v20210323/api.json @@ -120,7 +120,7 @@ "status": "online" }, "DeleteRecordBatch": { - "document": "批量删除解析记录", + "document": "批量删除解析记录\n备注:因存储限制, 建议一次批量删除最多2000条", "input": "DeleteRecordBatchRequest", "name": "批量删除解析记录", "output": "DeleteRecordBatchResponse", diff --git a/tccli/services/ess/v20201111/api.json b/tccli/services/ess/v20201111/api.json index 8d155490f9..e343f93e1c 100644 --- a/tccli/services/ess/v20201111/api.json +++ b/tccli/services/ess/v20201111/api.json @@ -248,7 +248,7 @@ "CreatePartnerAutoSignAuthUrl": { "document": "创建他方自动签授权链接(他方授权/我方授权),通过该链接可进入小程序进行合作方企业的自动签授权,若授权企业未开通企业自动签,通过该链接会先引导开通本企业自动签。\n该接口效果同控制台: 企业设置-> 扩展服务 -> 企业自动签署 -> 合作企业方授权\n\n\n\n注: \n1. 所在企业的超管、法人才有权限调用此接口(Operator.UserId 需要传递超管或者法人的UserId)\n2. 已经在授权中或者授权成功的企业,无法重复授权\n3. 授权企业和被授权企业必须都是已认证企业", "input": "CreatePartnerAutoSignAuthUrlRequest", - "name": "创建他方企业自动签授权链接(他方授权 | 我方授权)", + "name": "创建他方企业自动签授权链接(他方授权,我方授权)", "output": "CreatePartnerAutoSignAuthUrlResponse", "status": "online" }, diff --git a/tccli/services/ess/v20201111/examples.json b/tccli/services/ess/v20201111/examples.json index 2bd3a9755e..3158c07a6a 100644 --- a/tccli/services/ess/v20201111/examples.json +++ b/tccli/services/ess/v20201111/examples.json @@ -611,17 +611,17 @@ "output": "{\n \"Response\": {\n \"FlowApproverUrlInfos\": [\n {\n \"ApproverMobile\": \"13200000000\",\n \"ApproverName\": \"典子谦\",\n \"ApproverType\": 1,\n \"LongUrl\": \"https://quick.test.qian.tencent.cn/home?ApproverIdCardNumber=Mi**Kio2&ApproverMobile=MTk***NjA%3D&ApproverName=%25**A&ApproverType=1&Code=yDwJCUUck****V2R5K&CodeType=QUICK&FlowId=yDwF**1f3cqjkGm&ShowHeader=1&shortKey=yDwq5**M5GlG1c&token=bR8**HA\",\n \"SignUrl\": \"https://essurl.cn/bR8**HA\"\n }\n ],\n \"RequestId\": \"s1693832180480950012\"\n }\n}", "title": "创建个人用户H5签署链接,使用视频认证方式" }, - { - "document": "1. 给个人用户创建签署链接\n2. 用户姓名不是合同的参与人", - "input": "POST / HTTP/1.1\nHost: ess.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateFlowSignUrl\n<公共请求参数>\n\n{\n \"Operator\": {\n \"UserId\": \"yDRCLUUgygq2xun5UuO4zjEwg0vjoimj\"\n },\n \"FlowApproverInfos\": [\n {\n \"ApproverType\": 1,\n \"ApproverMobile\": \"13200000000\",\n \"ApproverName\": \"张三\"\n }\n ],\n \"FlowId\": \"yDwFmUUckpstqfvzUE1h3jo1f3cqjkGm\"\n}", - "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"ResourceNotFound\",\n \"Message\": \"无法找到参与人\"\n },\n \"RequestId\": \"s1693832578941223891\"\n }\n}", - "title": "错误示例-创建个人用户签署链接,传错签署人姓名" - }, { "document": "1. 给个人用户创建签署链接\n2. 签署完成后跳转到指定页面地址(设置跳转地址JumpUrl)", "input": "POST / HTTP/1.1\nHost: ess.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateFlowSignUrl\n<公共请求参数>\n\n{\n \"Operator\": {\n \"UserId\": \"yDRCLUUgygq2xun5UuO4zjEwg0vjoimj\"\n },\n \"FlowApproverInfos\": [\n {\n \"ApproverType\": 1,\n \"ApproverMobile\": \"13200000000\",\n \"ApproverName\": \"典子谦\"\n }\n ],\n \"JumpUrl\": \"https://www.example.com\",\n \"FlowId\": \"yDwFmUUckpstqfvzUE1h3jo1f3cqjkGm\"\n}", "output": "{\n \"Response\": {\n \"FlowApproverUrlInfos\": [\n {\n \"ApproverMobile\": \"13200000000\",\n \"ApproverName\": \"典子谦\",\n \"ApproverType\": 1,\n \"LongUrl\": \"https://quick.test.qian.tencent.cn/home?ApproverIdCardNumber=MioqKi**Kio2&ApproverMobile=MTk***NjA%3D&ApproverName=%25**A&ApproverType=1&Code=yDwJCUUck****V2R5K&CodeType=QUICK&FlowId=yDwF**1f3cqjkGm&ShowHeader=1&shortKey=yDwq5**M5GlG1c&token=bR8**HA\",\n \"SignUrl\": \"https://essurl.cn/bR8**HA\"\n }\n ],\n \"RequestId\": \"s1693832180480950012\"\n }\n}", "title": "创建个人用户H5签署链接(签署完成后跳转到指定地址)" + }, + { + "document": "1. 给个人用户创建签署链接\n2. 用户姓名不是合同的参与人", + "input": "POST / HTTP/1.1\nHost: ess.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateFlowSignUrl\n<公共请求参数>\n\n{\n \"Operator\": {\n \"UserId\": \"yDRCLUUgygq2xun5UuO4zjEwg0vjoimj\"\n },\n \"FlowApproverInfos\": [\n {\n \"ApproverType\": 1,\n \"ApproverMobile\": \"13200000000\",\n \"ApproverName\": \"张三\"\n }\n ],\n \"FlowId\": \"yDwFmUUckpstqfvzUE1h3jo1f3cqjkGm\"\n}", + "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"ResourceNotFound\",\n \"Message\": \"无法找到参与人\"\n },\n \"RequestId\": \"s1693832578941223891\"\n }\n}", + "title": "错误示例-创建个人用户签署链接,传错签署人姓名" } ], "CreateIntegrationDepartment": [ diff --git a/tccli/services/essbasic/v20210526/api.json b/tccli/services/essbasic/v20210526/api.json index 653d9981c6..8f31007b50 100644 --- a/tccli/services/essbasic/v20210526/api.json +++ b/tccli/services/essbasic/v20210526/api.json @@ -381,7 +381,7 @@ "CreatePartnerAutoSignAuthUrl": { "document": "创建他方自动签授权链接,通过该链接可进入小程序进行合作方企业的自动签授权,若当前企业未开通企业自动签,通过该链接会先引导开通本企业自动签。\n该接口效果同控制台: 企业设置-> 扩展服务 -> 企业自动签署 -> 合作企业方授权\n\n\n\n注: \n1. 所在企业的超管、法人才有权限调用此接口(Agent.ProxyOperator.OpenId 需要传递超管或者法人的OpenId)\n2. 已经在授权中或者授权成功的企业,无法重复授权", "input": "CreatePartnerAutoSignAuthUrlRequest", - "name": "创建他方企业自动签授权链接", + "name": "创建他方企业自动签授权链接(他方授权 ,我方授权)", "output": "CreatePartnerAutoSignAuthUrlResponse", "status": "online" }, @@ -6725,6 +6725,15 @@ "name": "SealTypes", "required": false, "type": "list" + }, + { + "disabled": false, + "document": "他方授权给我方:- false:我方授权他方,AuthorizedOrganizationName代表【被授权方】企业名称- true:他方授权我方,AuthorizedOrganizationName代表【授权方】企业名称", + "example": "无", + "member": "bool", + "name": "AuthToMe", + "required": false, + "type": "bool" } ], "type": "object" diff --git a/tccli/services/essbasic/v20210526/examples.json b/tccli/services/essbasic/v20210526/examples.json index 359bbc7094..eea3ce83ce 100644 --- a/tccli/services/essbasic/v20210526/examples.json +++ b/tccli/services/essbasic/v20210526/examples.json @@ -827,7 +827,13 @@ "document": "", "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePartnerAutoSignAuthUrl\n<公共请求参数>\n\n{\n \"Agent\": {\n \"AppId\": \"yDSxxxxxxxxxOnHtH51\",\n \"ProxyOrganizationOpenId\": \"org_open_id\",\n \"ProxyOperator\": {\n \"OpenId\": \"user_open_id\"\n }\n },\n \"AuthorizedOrganizationId\": \"org_open_id_another\",\n \"AuthorizedOrganizationName\": \"典子谦子客企业\",\n \"SealTypes\": [\n \"OFFICIAL\"\n ]\n}", "output": "{\n \"Response\": {\n \"ExpireTime\": 1702982931,\n \"MiniAppPath\": \"/pages/guide/index?shortKey=yDSxxxxxxxxxOnHtH51\",\n \"RequestId\": \"s1702378131281988373\",\n \"Url\": \"https://test.essurl.cn/WxxxxxwH\"\n }\n}", - "title": "创建他方自动签授权链接" + "title": "创建他方自动签授权链接-我方授权" + }, + { + "document": "", + "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreatePartnerAutoSignAuthUrl\n<公共请求参数>\n\n{\n \"Agent\": {\n \"AppId\": \"yDSxxxxxxxxxOnHtH51\",\n \"ProxyOrganizationOpenId\": \"org_open_id\",\n \"ProxyOperator\": {\n \"OpenId\": \"user_open_id\"\n }\n },\n \"AuthorizedOrganizationId\": \"org_open_id_another\",\n \"AuthorizedOrganizationName\": \"典子谦子客企业\",\n \"AuthToMe\": true,\n \"SealTypes\": [\n \"OFFICIAL\"\n ]\n}", + "output": "{\n \"Response\": {\n \"ExpireTime\": 1702982931,\n \"MiniAppPath\": \"/pages/guide/index?shortKey=yDSxxxxxxxxxOnHtH51\",\n \"RequestId\": \"s1702378131281988373\",\n \"Url\": \"https://test.essurl.cn/WxxxxxwH\"\n }\n}", + "title": "创建他方自动签授权链接-他方授权" } ], "CreateSealByImage": [ diff --git a/tccli/services/iotexplorer/v20190423/api.json b/tccli/services/iotexplorer/v20190423/api.json index 9bb46bc656..96a6db0545 100644 --- a/tccli/services/iotexplorer/v20190423/api.json +++ b/tccli/services/iotexplorer/v20190423/api.json @@ -764,7 +764,7 @@ "status": "online" }, "ModifyCloudStorageAIService": { - "document": "修改指定设备的云存 AI 服务开通状态与参数配置", + "document": "修改指定设备的云存 AI 服务参数配置", "input": "ModifyCloudStorageAIServiceRequest", "name": "修改设备云存AI分析服务", "output": "ModifyCloudStorageAIServiceResponse", @@ -3828,7 +3828,7 @@ "members": [ { "disabled": false, - "document": "产品ID", + "document": "产品 ID", "example": "WYILLHRQ4", "member": "string", "name": "ProductId", @@ -3885,7 +3885,7 @@ "members": [ { "disabled": false, - "document": "产品ID", + "document": "产品 ID", "example": "TQBDY6RPI9", "member": "string", "name": "ProductId", @@ -3903,8 +3903,8 @@ }, { "disabled": false, - "document": "云存 AI 服务类型。可选值:\n\n- `PackageDetect`:包裹检测\n- `Highlight`:视频浓缩", - "example": "PackageDetect", + "document": "云存 AI 服务类型。可选值:\n- `RealtimeObjectDetect`:目标检测\n- `Highlight`:视频浓缩", + "example": "Highlight", "member": "string", "name": "ServiceType", "required": true, @@ -3918,7 +3918,7 @@ "members": [ { "disabled": false, - "document": "启用状态", + "document": "视频分析启用状态", "example": "true", "member": "bool", "name": "Enabled", @@ -3928,20 +3928,20 @@ }, { "disabled": false, - "document": "视频分析区域", - "example": "{}", + "document": "视频分析配置参数", + "example": "{\"param1\":\"value1\"}", "member": "string", - "name": "ROI", + "name": "Config", "output_required": true, "type": "string", "value_allowed_null": false }, { "disabled": false, - "document": "云存 AI 服务的配置参数", - "example": "{\"param1\":\"value1\"}", + "document": "视频分析识别区域", + "example": "{}", "member": "string", - "name": "Config", + "name": "ROI", "output_required": true, "type": "string", "value_allowed_null": false @@ -4015,8 +4015,8 @@ }, { "disabled": false, - "document": "云存 AI 服务类型。可选值:\n- `PackageDetect`:包裹检测\n- `Highlight`:视频浓缩", - "example": "PackageDetect", + "document": "云存 AI 服务类型。可选值:\n- `RealtimeObjectDetect`:目标检测\n- `Highlight`:视频浓缩", + "example": "Highlight", "member": "string", "name": "ServiceType", "required": true, @@ -4051,7 +4051,7 @@ }, { "disabled": false, - "document": "用户ID", + "document": "用户 ID", "example": "user", "member": "string", "name": "UserId", @@ -4060,7 +4060,7 @@ }, { "disabled": false, - "document": "通道ID 非NVR设备则不填 NVR设备则必填 默认为无", + "document": "通道 ID", "example": "1", "member": "uint64", "name": "ChannelId", @@ -6724,7 +6724,7 @@ "members": [ { "disabled": false, - "document": "产品ID", + "document": "产品 ID", "example": "TQBDY6RPI9", "member": "string", "name": "ProductId", @@ -10316,7 +10316,7 @@ "members": [ { "disabled": false, - "document": "产品ID", + "document": "产品 ID", "example": "WYILLHRQ4", "member": "string", "name": "ProductId", @@ -10370,7 +10370,7 @@ "members": [ { "disabled": false, - "document": "产品ID", + "document": "产品 ID", "example": "TQBDY6RPI9", "member": "string", "name": "ProductId", @@ -10388,8 +10388,8 @@ }, { "disabled": false, - "document": "云存 AI 服务类型。可选值:\n- `PackageDetect`:包裹检测\n- `Highlight`:视频浓缩", - "example": "PackageDetect", + "document": "云存 AI 服务类型。可选值:\n- `RealtimeObjectDetect`:目标检测\n- `Highlight`:视频浓缩", + "example": "Highlight", "member": "string", "name": "ServiceType", "required": true, @@ -10397,7 +10397,7 @@ }, { "disabled": false, - "document": "启用状态", + "document": "视频分析启用状态", "example": "true", "member": "bool", "name": "Enabled", @@ -10406,7 +10406,7 @@ }, { "disabled": false, - "document": "视频分析区域", + "document": "视频分析识别区域", "example": "{}", "member": "string", "name": "ROI", @@ -10415,7 +10415,7 @@ }, { "disabled": false, - "document": "云存 AI 服务的配置参数", + "document": "视频分析配置参数", "example": "{\"param1\":\"value1\"}", "member": "string", "name": "Config", @@ -10812,7 +10812,7 @@ "members": [ { "disabled": false, - "document": "产品ID", + "document": "产品 ID", "example": "TQBDY6RPI9", "member": "string", "name": "ProductId", diff --git a/tccli/services/iotexplorer/v20190423/examples.json b/tccli/services/iotexplorer/v20190423/examples.json index 8c5b6e0c0d..7c488f4425 100644 --- a/tccli/services/iotexplorer/v20190423/examples.json +++ b/tccli/services/iotexplorer/v20190423/examples.json @@ -349,7 +349,7 @@ "DescribeCloudStorageAIService": [ { "document": "", - "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCloudStorageAIService\n<公共请求参数>\n\n{\n \"ProductId\": \"KH6Q8C4N0D\",\n \"DeviceName\": \"aaa_31400554_1\",\n \"ServiceType\": \"PackageDetect\"\n}", + "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCloudStorageAIService\n<公共请求参数>\n\n{\n \"ProductId\": \"KH6Q8C4N0D\",\n \"DeviceName\": \"aaa_31400554_1\",\n \"ServiceType\": \"Highlight\"\n}", "output": "{\n \"Response\": {\n \"Enabled\": true,\n \"ROI\": \"{}\",\n \"Config\": \"{\\\"param1\\\":\\\"value1\\\"}\",\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}", "title": "查询设备云存AI服务" } @@ -373,7 +373,7 @@ "DescribeCloudStorageAIServiceTasks": [ { "document": "", - "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCloudStorageAIServiceTasks\n<公共请求参数>\n\n{\n \"ProductId\": \"KH6Q8C4N0D\",\n \"DeviceName\": \"aaa_31400554_1\",\n \"ServiceType\": \"PackageDetect\",\n \"Offset\": 0,\n \"Limit\": 20\n}", + "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCloudStorageAIServiceTasks\n<公共请求参数>\n\n{\n \"ProductId\": \"KH6Q8C4N0D\",\n \"DeviceName\": \"aaa_31400554_1\",\n \"ServiceType\": \"Highlight\",\n \"Offset\": 0,\n \"Limit\": 20\n}", "output": "{\n \"Response\": {\n \"Tasks\": [\n {\n \"TaskId\": \"fb066d7a-baac-4706-acda-058f56f82759\",\n \"ProductId\": \"TQBDY6RPI9\",\n \"DeviceName\": \"cs_112114601_2\",\n \"ChannelId\": 0,\n \"ServiceType\": \"PackageDetect\",\n \"StartTime\": 1710487888,\n \"EndTime\": 1710487898,\n \"Status\": 3,\n \"Result\": \"{\\\"param1\\\":\\\"value1\\\"}\",\n \"Files\": [\n \"output.mp4\"\n ],\n \"CreateTime\": 1710490000,\n \"UpdateTime\": 1710490000\n }\n ],\n \"Total\": 1,\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}", "title": "查询设备云存 AI 分析任务列表" } @@ -923,9 +923,15 @@ "ModifyCloudStorageAIService": [ { "document": "", - "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyCloudStorageAIService\n<公共请求参数>\n\n{\n \"ProductId\": \"KH6Q8C4N0D\",\n \"DeviceName\": \"aaa_31400554_1\",\n \"ServiceType\": \"PackageDetect\",\n \"Enabled\": true\n}", + "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyCloudStorageAIService\n<公共请求参数>\n\n{\n \"ProductId\": \"KH6Q8C4N0D\",\n \"DeviceName\": \"aaa_31400554_1\",\n \"ServiceType\": \"Highlight\",\n \"Enabled\": true\n}", "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}", - "title": "修改设备云存AI服务开通状态" + "title": "修改云存AI服务启用状态" + }, + { + "document": "", + "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyCloudStorageAIService\n<公共请求参数>\n\n{\n \"ProductId\": \"KH6Q8C4N0D\",\n \"DeviceName\": \"aaa_31400554_1\",\n \"ServiceType\": \"Highlight\",\n \"Config\": \"{\\\"param1\\\":\\\"value1\\\"}\"\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}", + "title": "修改云存AI服务配置参数" } ], "ModifyCloudStorageAIServiceCallback": [ diff --git a/tccli/services/lcic/lcic_client.py b/tccli/services/lcic/lcic_client.py index db0c1c3b39..c7bcd68cbf 100644 --- a/tccli/services/lcic/lcic_client.py +++ b/tccli/services/lcic/lcic_client.py @@ -1577,6 +1577,58 @@ def doSendRoomNormalMessage(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doCreateGroupWithSubGroup(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.LcicClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.CreateGroupWithSubGroupRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.CreateGroupWithSubGroup(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 doDescribeGroupList(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -2877,7 +2929,7 @@ def doUnbindDocumentFromRoom(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) -def doCreateGroupWithSubGroup(args, parsed_globals): +def doUnblockKickedUser(args, parsed_globals): g_param = parse_global_arg(parsed_globals) if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: @@ -2906,11 +2958,11 @@ def doCreateGroupWithSubGroup(args, parsed_globals): client = mod.LcicClient(cred, g_param[OptionsDefine.Region], profile) client._sdkVersion += ("_CLI_" + __version__) models = MODELS_MAP[g_param[OptionsDefine.Version]] - model = models.CreateGroupWithSubGroupRequest() + model = models.UnblockKickedUserRequest() model.from_json_string(json.dumps(args)) start_time = time.time() while True: - rsp = client.CreateGroupWithSubGroup(model) + rsp = client.UnblockKickedUser(model) result = rsp.to_json_string() try: json_obj = json.loads(result) @@ -3178,6 +3230,7 @@ def doDescribeDeveloper(args, parsed_globals): "DescribeRoom": doDescribeRoom, "DescribeDocuments": doDescribeDocuments, "SendRoomNormalMessage": doSendRoomNormalMessage, + "CreateGroupWithSubGroup": doCreateGroupWithSubGroup, "DescribeGroupList": doDescribeGroupList, "DeleteSupervisor": doDeleteSupervisor, "DeleteUser": doDeleteUser, @@ -3203,7 +3256,7 @@ def doDescribeDeveloper(args, parsed_globals): "SendRoomNotificationMessage": doSendRoomNotificationMessage, "DeleteRoom": doDeleteRoom, "UnbindDocumentFromRoom": doUnbindDocumentFromRoom, - "CreateGroupWithSubGroup": doCreateGroupWithSubGroup, + "UnblockKickedUser": doUnblockKickedUser, "CreateRoom": doCreateRoom, "BatchCreateGroupWithMembers": doBatchCreateGroupWithMembers, "DescribeScoreList": doDescribeScoreList, diff --git a/tccli/services/lcic/v20220817/api.json b/tccli/services/lcic/v20220817/api.json index 74405e4b61..6fba465c84 100644 --- a/tccli/services/lcic/v20220817/api.json +++ b/tccli/services/lcic/v20220817/api.json @@ -419,6 +419,13 @@ "name": "文档从房间解绑", "output": "UnbindDocumentFromRoomResponse", "status": "online" + }, + "UnblockKickedUser": { + "document": "解禁从房间里面踢出的用户", + "input": "UnblockKickedUserRequest", + "name": "解禁房间被踢用户", + "output": "UnblockKickedUserResponse", + "status": "online" } }, "metadata": { @@ -6857,6 +6864,51 @@ ], "type": "object" }, + "UnblockKickedUserRequest": { + "document": "UnblockKickedUser请求参数结构体", + "members": [ + { + "disabled": false, + "document": "低代码平台的SdkAppId。", + "example": "123456", + "member": "uint64", + "name": "SdkAppId", + "required": true, + "type": "int" + }, + { + "disabled": false, + "document": "房间Id。", + "example": "301234567", + "member": "uint64", + "name": "RoomId", + "required": true, + "type": "int" + }, + { + "disabled": false, + "document": "需要解禁踢出的成员Id。", + "example": "dfgsadffg", + "member": "string", + "name": "UserId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "UnblockKickedUserResponse": { + "document": "UnblockKickedUser返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "UserInfo": { "document": "用户信息结构体", "members": [ diff --git a/tccli/services/lcic/v20220817/examples.json b/tccli/services/lcic/v20220817/examples.json index d6c1c60d08..3d989176b0 100644 --- a/tccli/services/lcic/v20220817/examples.json +++ b/tccli/services/lcic/v20220817/examples.json @@ -509,6 +509,14 @@ "output": "{\n \"Response\": {\n \"RequestId\": \"e574aae1-lp02-4225-a2f8-9032h7199f5f0\"\n }\n}", "title": "文档从房间解绑" } + ], + "UnblockKickedUser": [ + { + "document": "示例", + "input": "POST / HTTP/1.1\nHost: lcic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UnblockKickedUser\n<公共请求参数>\n\n{\n \"RoomId\": 313337981,\n \"SdkAppId\": 3520371,\n \"UserId\": \"2PMcgEVHi9CMWq6tmfNnPGUkEGn\"\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"3f156f86-9939-4ea0-aee7-81d32fa46c3f\"\n }\n}", + "title": "解禁房间踢出的用户" + } ] }, "version": "1.0" diff --git a/tccli/services/live/v20180801/api.json b/tccli/services/live/v20180801/api.json index 666ea83db5..a15c3ec78d 100644 --- a/tccli/services/live/v20180801/api.json +++ b/tccli/services/live/v20180801/api.json @@ -4558,7 +4558,7 @@ }, { "disabled": false, - "document": "在线人数。", + "document": "在线人数。当前后端接口数据的统计方式与客户端侧不同,该数据仅供参考,具体数据请以业务客户端侧统计数据为准。", "example": "1", "member": "uint64", "name": "Online", diff --git a/tccli/services/lke/v20231130/api.json b/tccli/services/lke/v20231130/api.json index b627f56463..88eb48421b 100644 --- a/tccli/services/lke/v20231130/api.json +++ b/tccli/services/lke/v20231130/api.json @@ -1867,7 +1867,7 @@ }, { "disabled": false, - "document": "文件的 Base64 值。 支持的文件格式:PNG、JPG、JPEG、PDF。 支持的文件大小:所下载文件经Base64编码后不超过 8M。文件下载时间不超过 3 秒。 支持的图片像素:单边介于20-10000px之间。 文件的 FileUrl、FileBase64 必须提供一个,如果都提供,只使用 FileUrl。", + "document": "文件的 Base64 值。支持的文件大小:所下载文件经Base64编码后不超过 8M。文件下载时间不超过 3 秒。支持的图片像素:单边介于20-10000px之间。文件的 FileUrl、FileBase64 必须提供一个,如果都提供,只使用 FileUrl。", "example": "无", "member": "string", "name": "FileBase64", @@ -1876,7 +1876,7 @@ }, { "disabled": false, - "document": "文件的 Url 地址。 支持的文件格式:PNG、JPG、JPEG、PDF。 支持的文件大小:所下载文件经 Base64 编码后不超过 100M。文件下载时间不超过 15 秒。 支持的图片像素:单边介于20-10000px之间。 文件存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议文件存储于腾讯云。 非腾讯云存储的 Url 速度和稳定性可能受一定影响。", + "document": "文件的 Url 地址。支持的文件大小:所下载文件经 Base64 编码后不超过 100M。文件下载时间不超过 15 秒。支持的图片像素:单边介于20-10000px之间。 文件存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议文件存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。", "example": "无", "member": "string", "name": "FileUrl", @@ -5177,7 +5177,7 @@ }, { "disabled": false, - "document": "应用AppKey", + "document": "应用AppKey(应用发布后在应用页面[发布管理]-[调用信息]-[API管理]处获取)", "example": "无", "member": "string", "name": "BotAppKey", @@ -5186,7 +5186,7 @@ }, { "disabled": false, - "document": "坐席ID", + "document": "访客ID(外部输入,建议唯一,标识当前接入会话的用户)", "example": "无", "member": "string", "name": "VisitorBizId", @@ -5195,7 +5195,7 @@ }, { "disabled": false, - "document": "坐席标签", + "document": "知识标签(用于知识库中知识的检索过滤)", "example": "无", "member": "GetWsTokenReq_Label", "name": "VisitorLabels", @@ -5210,7 +5210,7 @@ "members": [ { "disabled": false, - "document": "token值", + "document": "token值(有效期60s)", "example": "无", "member": "string", "name": "Token", @@ -5220,7 +5220,7 @@ }, { "disabled": false, - "document": "余额; 余额大于 0 时表示有效.\n注意:此字段可能返回 null,表示取不到有效值。", + "document": "余额; 余额大于 0 时表示有效\n注意:此字段可能返回 null,表示取不到有效值。", "example": "无", "member": "float", "name": "Balance", diff --git a/tccli/services/ocr/v20181119/api.json b/tccli/services/ocr/v20181119/api.json index f9f35d742c..a5d1d7951c 100644 --- a/tccli/services/ocr/v20181119/api.json +++ b/tccli/services/ocr/v20181119/api.json @@ -21084,6 +21084,16 @@ "type": "object", "value_allowed_null": false }, + { + "disabled": false, + "document": "发票标题", + "example": "无", + "member": "string", + "name": "InvoiceTitle", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, { "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", "member": "string", diff --git a/tccli/services/trtc/trtc_client.py b/tccli/services/trtc/trtc_client.py index 943bbdb0d9..03a8ba8330 100644 --- a/tccli/services/trtc/trtc_client.py +++ b/tccli/services/trtc/trtc_client.py @@ -1421,6 +1421,58 @@ def doStopWebRecord(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doControlAIConversation(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.TrtcClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.ControlAIConversationRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.ControlAIConversation(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 doCreateCloudRecording(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -2811,6 +2863,7 @@ def doDescribeTRTCRealTimeScaleMetricData(args, parsed_globals): "StartAITranscription": doStartAITranscription, "DescribeTRTCMarketScaleData": doDescribeTRTCMarketScaleData, "StopWebRecord": doStopWebRecord, + "ControlAIConversation": doControlAIConversation, "CreateCloudRecording": doCreateCloudRecording, "DescribeScaleInfo": doDescribeScaleInfo, "DescribeRelayUsage": doDescribeRelayUsage, diff --git a/tccli/services/trtc/v20190722/api.json b/tccli/services/trtc/v20190722/api.json index 54b19eed86..17f463a0e3 100644 --- a/tccli/services/trtc/v20190722/api.json +++ b/tccli/services/trtc/v20190722/api.json @@ -1,5 +1,12 @@ { "actions": { + "ControlAIConversation": { + "document": "提供服务端控制机器人的功能", + "input": "ControlAIConversationRequest", + "name": "控制AI对话", + "output": "ControlAIConversationResponse", + "status": "online" + }, "CreateCloudRecording": { "document": "接口说明:\n启动云端录制功能,完成房间内的音视频录制,并上传到指定的云存储。您可以通过此 API 接口把TRTC 房间中的每一路音视频流做单独的录制又或者多路视频画面合流混成一路。\n\n您可以通过此接口实现如下目标:\n* 指定订阅流参数(RecordParams)来指定需要录制的主播的黑名单或者白名单。\n* 指定录制存储参数(StorageParams)来指定上传到您希望的云存储,目前支持腾讯云(云点播VOD、对象存储COS)和第三方AWS\n* 指定合流模式下的音视频转码详细参数(MixTranscodeParams),包括视频分辨率、视频码率、视频帧率、以及声音质量等\n* 指定合流模式各路画面的位置和布局或者也可以指定自动模板的方式来配置。\n\n关键名词:\n* 单流录制:分别录制房间的订阅UserId的音频和视频,录制服务会实时将录制文件上传至您指定的云存储。\n* 合流录制:将房间内订阅UserId的音视频混录成一个视频文件,并将录制文件上传至您指定的云存储。(录制结束后可前往云点播控制台https://console.cloud.tencent.com/vod/media 或 对象存储COS控制台https://console.cloud.tencent.com/cos/bucket查看文件)。", "input": "CreateCloudRecordingRequest", @@ -744,6 +751,51 @@ ], "usage": "in" }, + "ControlAIConversationRequest": { + "document": "ControlAIConversation请求参数结构体", + "members": [ + { + "disabled": false, + "document": "任务唯一标识", + "example": "无", + "member": "string", + "name": "TaskId", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "控制命令,目前支持命令如下:\n\n- ServerPushText,服务端发送文本给AI机器人,AI机器人会播报该文本", + "example": "无", + "member": "string", + "name": "Command", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "服务端发送播报文本命令,当Command为ServerPushText时必填", + "example": "无", + "member": "ServerPushText", + "name": "ServerPushText", + "required": false, + "type": "object" + } + ], + "type": "object" + }, + "ControlAIConversationResponse": { + "document": "ControlAIConversation返回参数结构体", + "members": [ + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "CreateCloudRecordingRequest": { "document": "CreateCloudRecording请求参数结构体", "members": [ @@ -5440,6 +5492,30 @@ ], "usage": "out" }, + "ServerPushText": { + "document": "服务端控制AI对话机器人播报指定文本", + "members": [ + { + "disabled": false, + "document": "服务端推送播报文本", + "example": "无", + "member": "string", + "name": "Text", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "是否允许该文本打断机器人说话", + "example": "无", + "member": "bool", + "name": "Interrupt", + "required": false, + "type": "bool" + } + ], + "usage": "in" + }, "SingleSubscribeParams": { "document": "单流旁路转推的用户上行信息。", "members": [ diff --git a/tccli/services/trtc/v20190722/examples.json b/tccli/services/trtc/v20190722/examples.json index 96f1aa3baf..caf2697bbe 100644 --- a/tccli/services/trtc/v20190722/examples.json +++ b/tccli/services/trtc/v20190722/examples.json @@ -1,5 +1,13 @@ { "actions": { + "ControlAIConversation": [ + { + "document": "当您想让机器人主动播报文本的时候,可以使用该接口", + "input": "POST / HTTP/1.1\nHost: trtc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ControlAIConversation\n<公共请求参数>\n\n{\n \"TaskId\": \"your-taskid\",\n \"Command\": \"ServerPushText\",\n \"ServerPushText\": {\n \"Text\": \"你好很高兴为您服务\",\n \"Interrupt\": true\n }\n}", + "output": "{\n \"Response\": {\n \"RequestId\": \"xxx-xxx\"\n }\n}", + "title": "发送播报文本" + } + ], "CreateCloudRecording": [ { "document": "启动SdkAppId 为 1234 指定房间(房间号为3560)的云端录制。\n\n房间空闲等待时间设置为1分钟。\n录制模式为合流模式。\n录制的流类型为音视频。\n默认订阅所有用户的流。\n录制视频的宽度360,录制视频的高度640,帧率15,比特率500,000bps,默认背景色。\n录制视频布局模式为九宫格布局。\n存储至腾讯云点播VOD", diff --git a/tccli/services/vclm/v20240523/api.json b/tccli/services/vclm/v20240523/api.json index 571146ecee..8a5cefcfba 100644 --- a/tccli/services/vclm/v20240523/api.json +++ b/tccli/services/vclm/v20240523/api.json @@ -14,6 +14,13 @@ "output": "DescribeImageAnimateJobResponse", "status": "online" }, + "DescribePortraitSingJob": { + "document": "用于查询图片唱演任务。\n支持提交音频和图片生成唱演视频,满足社交娱乐、互动营销等场景的需求。", + "input": "DescribePortraitSingJobRequest", + "name": "查询图片唱演任务", + "output": "DescribePortraitSingJobResponse", + "status": "online" + }, "DescribeVideoStylizationJob": { "document": "用于查询视频风格化任务。视频风格化支持将输入视频生成特定风格的视频。生成后的视频画面风格多样、流畅自然,能够满足社交娱乐、互动营销、视频素材制作等场景的需求。", "input": "DescribeVideoStylizationJobRequest", @@ -35,6 +42,13 @@ "output": "SubmitImageAnimateJobResponse", "status": "online" }, + "SubmitPortraitSingJob": { + "document": "用于提交图片唱演任务。\n支持提交音频和图片生成唱演视频,满足社交娱乐、互动营销等场景的需求。", + "input": "SubmitPortraitSingJobRequest", + "name": "提交图片唱演任务", + "output": "SubmitPortraitSingJobResponse", + "status": "online" + }, "SubmitVideoStylizationJob": { "document": "用于提交视频风格化任务。支持将输入视频生成特定风格的视频。生成后的视频画面风格多样、流畅自然,能够满足社交娱乐、互动营销、视频素材制作等场景的需求。", "input": "SubmitVideoStylizationJobRequest", @@ -246,6 +260,73 @@ ], "type": "object" }, + "DescribePortraitSingJobRequest": { + "document": "DescribePortraitSingJob请求参数结构体", + "members": [ + { + "disabled": false, + "document": "任务ID", + "example": "1199999431088685056", + "member": "string", + "name": "JobId", + "required": true, + "type": "string" + } + ], + "type": "object" + }, + "DescribePortraitSingJobResponse": { + "document": "DescribePortraitSingJob返回参数结构体", + "members": [ + { + "disabled": false, + "document": "任务ID", + "example": "1199999431088685056", + "member": "string", + "name": "JobId", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "任务状态码\n—RUN:处理中\n—FAIL:处理失败\n—STOP:处理终止\n—DONE:处理完成", + "example": "[\"RUN\",\"FAIL\",\"STOP\",\"DONE\"]", + "member": "string", + "name": "StatusCode", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "任务状态信息", + "example": "[\"处理中\",\"处理失败\",\"处理中止\",\"处理完成\"]", + "member": "string", + "name": "StatusMsg", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, + { + "disabled": false, + "document": "生成视频的URL地址\n有效期24小时", + "example": "https://***/video.mp4", + "member": "string", + "name": "ResultVideoUrl", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "DescribeVideoStylizationJobRequest": { "document": "DescribeVideoStylizationJob请求参数结构体", "members": [ @@ -534,6 +615,61 @@ ], "type": "object" }, + "SubmitPortraitSingJobRequest": { + "document": "SubmitPortraitSingJob请求参数结构体", + "members": [ + { + "disabled": false, + "document": "传入音频URL地址。音频要求:\n—音频时长:不超过60秒\n—音频格式:mp3、wav、m4a", + "example": "https://***/audio.mp3", + "member": "string", + "name": "AudioUrl", + "required": true, + "type": "string" + }, + { + "disabled": false, + "document": "传入图片URL地址,图片要求:\n—图片格式:jpg、jpeg、png\n—图片分辨率:长边不超过2560\n—图片大小:不超过6M\n—图片宽高比:图片【宽:高】在1:2到2:1范围内", + "example": "https://***/image.jpg", + "member": "string", + "name": "ImageUrl", + "required": false, + "type": "string" + }, + { + "disabled": false, + "document": "传入图片Base64编码。\n—图片Base64编码与URL地址必传其一", + "example": "MIIHNjCCBh6gAwIBAgIQCVe4E0h49mzI0NcSqMy1+jANBgkqhkiG9w0BAQsFADB1 MQswCQYDVQQGEwJVUzEVMBMG", + "member": "string", + "name": "ImageBase64", + "required": false, + "type": "string" + } + ], + "type": "object" + }, + "SubmitPortraitSingJobResponse": { + "document": "SubmitPortraitSingJob返回参数结构体", + "members": [ + { + "disabled": false, + "document": "任务ID", + "example": "1199999431088685056", + "member": "string", + "name": "JobId", + "output_required": false, + "type": "string", + "value_allowed_null": false + }, + { + "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。", + "member": "string", + "name": "RequestId", + "type": "string" + } + ], + "type": "object" + }, "SubmitVideoStylizationJobRequest": { "document": "SubmitVideoStylizationJob请求参数结构体", "members": [ diff --git a/tccli/services/vclm/v20240523/examples.json b/tccli/services/vclm/v20240523/examples.json index f858478b03..ea495a4aba 100644 --- a/tccli/services/vclm/v20240523/examples.json +++ b/tccli/services/vclm/v20240523/examples.json @@ -16,6 +16,20 @@ "title": "调用成功示例" } ], + "DescribePortraitSingJob": [ + { + "document": "处理中", + "input": "POST / HTTP/1.1\nHost: vclm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePortraitSingJob\n<公共请求参数>\n\n{\n \"JobId\": \"1199964964965990400\"\n}", + "output": "{\n \"Response\": {\n \"JobId\": \"1199964964965990400\",\n \"RequestId\": \"0819265a-1bd7-4e0a-94a6-18463ae9b20e\",\n \"ResultVideoUrl\": \"\",\n \"StatusCode\": \"RUN\",\n \"StatusMsg\": \"处理中\"\n }\n}", + "title": "调用示例-处理中" + }, + { + "document": "任务完成", + "input": "POST / HTTP/1.1\nHost: vclm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribePortraitSingJob\n<公共请求参数>\n\n{\n \"JobId\": \"1199964964965990400\"\n}", + "output": "{\n \"Response\": {\n \"JobId\": \"1199964964965990400\",\n \"RequestId\": \"2564192f-1af0-4d1d-ac92-fac0f5844f73\",\n \"ResultVideoUrl\": \"https://***.mp4\",\n \"StatusCode\": \"DONE\",\n \"StatusMsg\": \"处理完成\"\n }\n}", + "title": "调用成功-任务完成" + } + ], "DescribeVideoStylizationJob": [ { "document": "成功调用", @@ -46,6 +60,38 @@ "title": "调用成功示例" } ], + "SubmitPortraitSingJob": [ + { + "document": "调用成功", + "input": "POST / HTTP/1.1\nHost: vclm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitPortraitSingJob\n<公共请求参数>\n\n{\n \"AudioUrl\": \"https://***/test.mp3\",\n \"ImageUrl\": \"https://***/test.png\"\n}", + "output": "{\n \"Response\": {\n \"JobId\": \"1199964964965990400\",\n \"RequestId\": \"79655032-c347-4f05-af23-ae80f7ff47eb\"\n }\n}", + "title": "调用成功-图片url地址" + }, + { + "document": "音频时长超限", + "input": "POST / HTTP/1.1\nHost: vclm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitPortraitSingJob\n<公共请求参数>\n\n{\n \"AudioUrl\": \"https://***/durationInvalid.m4a\",\n \"ImageUrl\": \"https://***/aj.jpg\"\n}", + "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"InvalidParameterValue.InvalidAudioDuration\",\n \"Message\": \"音频时长超出限定范围。上传音频的时长要求:在1秒到60秒范围内\"\n },\n \"RequestId\": \"9d314f18-3670-4793-bf4b-619b43494ac7\"\n }\n}", + "title": "调用失败-音频时长超限" + }, + { + "document": "图片分辨率超限", + "input": "POST / HTTP/1.1\nHost: vclm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitPortraitSingJob\n<公共请求参数>\n\n{\n \"AudioUrl\": \"https://***/test.mp3\",\n \"ImageUrl\": \"https://***/resolutionInvalid.jpg\"\n}", + "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"InvalidParameterValue.InvalidImageResolution\",\n \"Message\": \"图片分辨率超出限定范围。上传图片的长边分辨率要求:在0到2560范围内\"\n },\n \"RequestId\": \"29498231-20eb-43d1-bb3b-cc9e07978699\"\n }\n}", + "title": "调用失败-图片分辨率超限" + }, + { + "document": "图片宽高比超限", + "input": "POST / HTTP/1.1\nHost: vclm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitPortraitSingJob\n<公共请求参数>\n\n{\n \"AudioUrl\": \"https://***/test.mp3\",\n \"ImageUrl\": \"https://***/ratioInvalid.jpg\"\n}", + "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"InvalidParameterValue.InvalidImageAspectRatio\",\n \"Message\": \"图片宽高比超出限定范围。上传图片的宽高比要求:在0.5到2.0范围内\"\n },\n \"RequestId\": \"3c9cb9bd-5b2a-4b18-a890-73f7712ca2ce\"\n }\n}", + "title": "调用失败-图片宽高比超限" + }, + { + "document": "图片大小超限", + "input": "POST / HTTP/1.1\nHost: vclm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitPortraitSingJob\n<公共请求参数>\n\n{\n \"AudioUrl\": \"https://***/test.mp3\",\n \"ImageUrl\": \"https://***/storageInvalid.jpg\"\n}", + "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"InvalidParameterValue.InvalidImageSize\",\n \"Message\": \"图片大小超出限定范围。上传图片的大小要求:在0MB到10MB范围内\"\n },\n \"RequestId\": \"cd17e6bb-afdb-4bed-8a15-55c461333104\"\n }\n}", + "title": "调用失败-图片大小超限" + } + ], "SubmitVideoStylizationJob": [ { "document": "成功调用", diff --git a/tccli/services/vclm/vclm_client.py b/tccli/services/vclm/vclm_client.py index ad26c0f5c9..a178694a6e 100644 --- a/tccli/services/vclm/vclm_client.py +++ b/tccli/services/vclm/vclm_client.py @@ -173,6 +173,58 @@ def doSubmitVideoStylizationJob(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doSubmitPortraitSingJob(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.VclmClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.SubmitPortraitSingJobRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.SubmitPortraitSingJob(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 doConfirmVideoTranslateJob(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -225,6 +277,58 @@ def doConfirmVideoTranslateJob(args, parsed_globals): FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter]) +def doDescribePortraitSingJob(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.VclmClient(cred, g_param[OptionsDefine.Region], profile) + client._sdkVersion += ("_CLI_" + __version__) + models = MODELS_MAP[g_param[OptionsDefine.Version]] + model = models.DescribePortraitSingJobRequest() + model.from_json_string(json.dumps(args)) + start_time = time.time() + while True: + rsp = client.DescribePortraitSingJob(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 doDescribeImageAnimateJob(args, parsed_globals): g_param = parse_global_arg(parsed_globals) @@ -395,7 +499,9 @@ def doDescribeVideoStylizationJob(args, parsed_globals): "SubmitVideoTranslateJob": doSubmitVideoTranslateJob, "DescribeVideoTranslateJob": doDescribeVideoTranslateJob, "SubmitVideoStylizationJob": doSubmitVideoStylizationJob, + "SubmitPortraitSingJob": doSubmitPortraitSingJob, "ConfirmVideoTranslateJob": doConfirmVideoTranslateJob, + "DescribePortraitSingJob": doDescribePortraitSingJob, "DescribeImageAnimateJob": doDescribeImageAnimateJob, "SubmitImageAnimateJob": doSubmitImageAnimateJob, "DescribeVideoStylizationJob": doDescribeVideoStylizationJob, diff --git a/tccli/services/vpc/v20170312/api.json b/tccli/services/vpc/v20170312/api.json index e19c0c15cd..741d68237d 100644 --- a/tccli/services/vpc/v20170312/api.json +++ b/tccli/services/vpc/v20170312/api.json @@ -6634,7 +6634,7 @@ }, { "disabled": false, - "document": "带宽包计费类型, 默认为: ENHANCED95_POSTPAID_BY_MONTH, 可选值:\n
  • TOP5_POSTPAID_BY_MONTH: 按月后付费TOP5计费
  • \n
  • PERCENT95_POSTPAID_BY_MONTH: 按月后付费月95计费
  • \n
  • FIXED_PREPAID_BY_MONTH: 包月预付费计费
  • \n
  • ENHANCED95_POSTPAID_BY_MONTH: 按月后付费增强型95计费
  • \n
  • PEAK_BANDWIDTH_POSTPAID_BY_DAY: 后付费日结按带宽计费
  • \n", + "document": "带宽包计费类型, 默认为: ENHANCED95_POSTPAID_BY_MONTH, 可选值:\n
  • TOP5_POSTPAID_BY_MONTH: 按月后付费TOP5计费
  • \n
  • PERCENT95_POSTPAID_BY_MONTH: 按月后付费月95计费
  • \n
  • FIXED_PREPAID_BY_MONTH: 包月预付费计费
  • \n
  • ENHANCED95_POSTPAID_BY_MONTH: 按月后付费增强型95计费
  • \n
  • PEAK_BANDWIDTH_POSTPAID_BY_DAY: 后付费日结按带宽计费
  • \n
  • PRIMARY_TRAFFIC_POSTPAID_BY_HOUR: 后付费按主流量计费
  • \n", "example": "TOP5_POSTPAID_BY_MONTH", "member": "string", "name": "ChargeType",