tencentcloud-sdk-monitor 3.0.959 → 3.0.961
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20180724/client.rb +24 -0
- data/lib/v20180724/models.rb +108 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5a9cdc4901f212ead574813c11f2f718f3c7d80
|
4
|
+
data.tar.gz: 62384a889eecd59942929ab765f6999fe10a595b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f913c7aaedc1d59d3e8bbfc84d2424f2355b98709a9fc110d6a771ee3143ab12a16cbc7886c50b5b865746e8d5f17297bd26c6b0d25b2d3957530f27075975
|
7
|
+
data.tar.gz: f180f6b31c10126ae85b2426b05b65ba06e99440821677ea98b6eaa4f56e7b1784aaa35760c54d8e7f2dca9f4bb261ad4923a98b4047ee5f05b312c715a5d6e6
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.961
|
data/lib/v20180724/client.rb
CHANGED
@@ -173,6 +173,30 @@ module TencentCloud
|
|
173
173
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
174
174
|
end
|
175
175
|
|
176
|
+
# 创建告警屏蔽规则
|
177
|
+
|
178
|
+
# @param request: Request instance for CreateAlarmShield.
|
179
|
+
# @type request: :class:`Tencentcloud::monitor::V20180724::CreateAlarmShieldRequest`
|
180
|
+
# @rtype: :class:`Tencentcloud::monitor::V20180724::CreateAlarmShieldResponse`
|
181
|
+
def CreateAlarmShield(request)
|
182
|
+
body = send_request('CreateAlarmShield', request.serialize)
|
183
|
+
response = JSON.parse(body)
|
184
|
+
if response['Response'].key?('Error') == false
|
185
|
+
model = CreateAlarmShieldResponse.new
|
186
|
+
model.deserialize(response['Response'])
|
187
|
+
model
|
188
|
+
else
|
189
|
+
code = response['Response']['Error']['Code']
|
190
|
+
message = response['Response']['Error']['Message']
|
191
|
+
reqid = response['Response']['RequestId']
|
192
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
193
|
+
end
|
194
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
195
|
+
raise e
|
196
|
+
rescue StandardError => e
|
197
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
198
|
+
end
|
199
|
+
|
176
200
|
# 创建 Prometheus 告警规则。
|
177
201
|
|
178
202
|
# 请注意,**告警对象和告警消息是 Prometheus Rule Annotations 的特殊字段,需要通过 annotations 来传递,对应的 Key 分别为summary/description**,,请参考 [Prometheus Rule更多配置请参考](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)。
|
data/lib/v20180724/models.rb
CHANGED
@@ -1637,6 +1637,114 @@ module TencentCloud
|
|
1637
1637
|
end
|
1638
1638
|
end
|
1639
1639
|
|
1640
|
+
# CreateAlarmShield请求参数结构体
|
1641
|
+
class CreateAlarmShieldRequest < TencentCloud::Common::AbstractModel
|
1642
|
+
# @param Module: 模块名,这里填“monitor”
|
1643
|
+
# @type Module: String
|
1644
|
+
# @param Name: 屏蔽策略名称
|
1645
|
+
# @type Name: String
|
1646
|
+
# @param MonitorType: 监控类型
|
1647
|
+
# @type MonitorType: String
|
1648
|
+
# @param NameSpace: 命名空间即策略类型
|
1649
|
+
# @type NameSpace: String
|
1650
|
+
# @param ShieldTimeType: 屏蔽时间类型 FOREVER_SHIELD:永久屏蔽 PERIOD_SHIELD:绝对时间范围屏蔽 LOOP_SHIELD:相对时间范围屏蔽
|
1651
|
+
# @type ShieldTimeType: String
|
1652
|
+
# @param ShieldObject: 屏蔽对象
|
1653
|
+
# @type ShieldObject: Array
|
1654
|
+
# @param ShieldMetric: 屏蔽指标 为空则为全部指标
|
1655
|
+
# @type ShieldMetric: Array
|
1656
|
+
# @param StartTime: 开始时间 相对时间范围:36000 绝对时间范围:1648742400 缺省:0
|
1657
|
+
# @type StartTime: Integer
|
1658
|
+
# @param EndTime: 结束时间 相对时间范围:72000 绝对时间范围:1649088000 缺省:0
|
1659
|
+
# @type EndTime: Integer
|
1660
|
+
# @param LoopStartDate: 循环开始日期 2022/04/01 缺省:0
|
1661
|
+
# @type LoopStartDate: Integer
|
1662
|
+
# @param LoopEndDate: 循环结束日期 2022/04/05 缺省:0
|
1663
|
+
# @type LoopEndDate: Integer
|
1664
|
+
# @param ShieldPolicyId: 需要屏蔽的策略ID
|
1665
|
+
# @type ShieldPolicyId: String
|
1666
|
+
# @param ShieldAlarmLevel: 需要屏蔽的告警等级,取值范围Warn,Remind,Serious
|
1667
|
+
# @type ShieldAlarmLevel: Array
|
1668
|
+
# @param VersionTag: 屏蔽类型,为OBJNAME是老版本实例名屏蔽,为POLICY是新版本维度匹配
|
1669
|
+
# @type VersionTag: String
|
1670
|
+
# @param Description: 屏蔽规则的描述
|
1671
|
+
# @type Description: String
|
1672
|
+
# @param TimeZone: 时区,东八区+8,西八区减8,以此类推
|
1673
|
+
# @type TimeZone: Float
|
1674
|
+
# @param ShieldEvent: 屏蔽事件 为空则为全部指标
|
1675
|
+
# @type ShieldEvent: Array
|
1676
|
+
# @param ShieldMetricFlag: 是否对指标屏蔽 1=是 0=否
|
1677
|
+
# @type ShieldMetricFlag: Integer
|
1678
|
+
# @param ShieldEventFlag: 是否对事件屏蔽 1=是 0=否
|
1679
|
+
# @type ShieldEventFlag: Integer
|
1680
|
+
|
1681
|
+
attr_accessor :Module, :Name, :MonitorType, :NameSpace, :ShieldTimeType, :ShieldObject, :ShieldMetric, :StartTime, :EndTime, :LoopStartDate, :LoopEndDate, :ShieldPolicyId, :ShieldAlarmLevel, :VersionTag, :Description, :TimeZone, :ShieldEvent, :ShieldMetricFlag, :ShieldEventFlag
|
1682
|
+
|
1683
|
+
def initialize(_module=nil, name=nil, monitortype=nil, namespace=nil, shieldtimetype=nil, shieldobject=nil, shieldmetric=nil, starttime=nil, endtime=nil, loopstartdate=nil, loopenddate=nil, shieldpolicyid=nil, shieldalarmlevel=nil, versiontag=nil, description=nil, timezone=nil, shieldevent=nil, shieldmetricflag=nil, shieldeventflag=nil)
|
1684
|
+
@Module = _module
|
1685
|
+
@Name = name
|
1686
|
+
@MonitorType = monitortype
|
1687
|
+
@NameSpace = namespace
|
1688
|
+
@ShieldTimeType = shieldtimetype
|
1689
|
+
@ShieldObject = shieldobject
|
1690
|
+
@ShieldMetric = shieldmetric
|
1691
|
+
@StartTime = starttime
|
1692
|
+
@EndTime = endtime
|
1693
|
+
@LoopStartDate = loopstartdate
|
1694
|
+
@LoopEndDate = loopenddate
|
1695
|
+
@ShieldPolicyId = shieldpolicyid
|
1696
|
+
@ShieldAlarmLevel = shieldalarmlevel
|
1697
|
+
@VersionTag = versiontag
|
1698
|
+
@Description = description
|
1699
|
+
@TimeZone = timezone
|
1700
|
+
@ShieldEvent = shieldevent
|
1701
|
+
@ShieldMetricFlag = shieldmetricflag
|
1702
|
+
@ShieldEventFlag = shieldeventflag
|
1703
|
+
end
|
1704
|
+
|
1705
|
+
def deserialize(params)
|
1706
|
+
@Module = params['Module']
|
1707
|
+
@Name = params['Name']
|
1708
|
+
@MonitorType = params['MonitorType']
|
1709
|
+
@NameSpace = params['NameSpace']
|
1710
|
+
@ShieldTimeType = params['ShieldTimeType']
|
1711
|
+
@ShieldObject = params['ShieldObject']
|
1712
|
+
@ShieldMetric = params['ShieldMetric']
|
1713
|
+
@StartTime = params['StartTime']
|
1714
|
+
@EndTime = params['EndTime']
|
1715
|
+
@LoopStartDate = params['LoopStartDate']
|
1716
|
+
@LoopEndDate = params['LoopEndDate']
|
1717
|
+
@ShieldPolicyId = params['ShieldPolicyId']
|
1718
|
+
@ShieldAlarmLevel = params['ShieldAlarmLevel']
|
1719
|
+
@VersionTag = params['VersionTag']
|
1720
|
+
@Description = params['Description']
|
1721
|
+
@TimeZone = params['TimeZone']
|
1722
|
+
@ShieldEvent = params['ShieldEvent']
|
1723
|
+
@ShieldMetricFlag = params['ShieldMetricFlag']
|
1724
|
+
@ShieldEventFlag = params['ShieldEventFlag']
|
1725
|
+
end
|
1726
|
+
end
|
1727
|
+
|
1728
|
+
# CreateAlarmShield返回参数结构体
|
1729
|
+
class CreateAlarmShieldResponse < TencentCloud::Common::AbstractModel
|
1730
|
+
# @param ShieldId: 屏蔽规则的Id
|
1731
|
+
# @type ShieldId: String
|
1732
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
1733
|
+
# @type RequestId: String
|
1734
|
+
|
1735
|
+
attr_accessor :ShieldId, :RequestId
|
1736
|
+
|
1737
|
+
def initialize(shieldid=nil, requestid=nil)
|
1738
|
+
@ShieldId = shieldid
|
1739
|
+
@RequestId = requestid
|
1740
|
+
end
|
1741
|
+
|
1742
|
+
def deserialize(params)
|
1743
|
+
@ShieldId = params['ShieldId']
|
1744
|
+
@RequestId = params['RequestId']
|
1745
|
+
end
|
1746
|
+
end
|
1747
|
+
|
1640
1748
|
# CreateAlertRule请求参数结构体
|
1641
1749
|
class CreateAlertRuleRequest < TencentCloud::Common::AbstractModel
|
1642
1750
|
# @param InstanceId: Prometheus 实例 ID,例如:prom-abcd1234
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.961
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|