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\n\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\n", + "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\n\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", + "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", + "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", + "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\\n\\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\\n\",\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\\n\\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\",\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\",\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\",\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": "