model

package
v0.0.106 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAlarmRuleResourcesRequest added in v0.0.99

type AddAlarmRuleResourcesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	// Alarm实例ID
	AlarmId string `json:"alarm_id"`

	Body *ResourcesReqV2 `json:"body,omitempty"`
}

Request Object

func (AddAlarmRuleResourcesRequest) String added in v0.0.99

type AddAlarmRuleResourcesResponse added in v0.0.99

type AddAlarmRuleResourcesResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (AddAlarmRuleResourcesResponse) String added in v0.0.99

type AdditionalInfo

type AdditionalInfo struct {

	// 该条告警记录对应的资源ID;如:22d98f6c-16d2-4c2d-b424-50e79d82838f。
	ResourceId *string `json:"resource_id,omitempty"`

	// 该条告警记录对应的资源名称;如:ECS-Test01。
	ResourceName *string `json:"resource_name,omitempty"`

	// 该条告警记录对应的事件监控ID,资源所产生的事件;如:ev16031292300990kKN8p17J。
	EventId *string `json:"event_id,omitempty"`
}

告警记录额外字段,仅针对事件监控告警场景所产生的告警记录信息。

func (AdditionalInfo) String

func (o AdditionalInfo) String() string

type AgentDimension added in v0.0.99

type AgentDimension struct {

	// 维度名称,枚举类型,类型有:   mount_point:挂载点,   disk:磁盘,   proc:进程,   gpu:显卡,   raid: RAID控制器
	Name *AgentDimensionName `json:"name,omitempty"`

	// 维度值,32位字符串,如:2e84018fc8b4484b94e89aae212fe615
	Value *string `json:"value,omitempty"`

	// 实际维度信息,字符串,如:vda。
	OriginValue *string `json:"origin_value,omitempty"`
}

func (AgentDimension) String added in v0.0.99

func (o AgentDimension) String() string

type AgentDimensionName added in v0.0.99

type AgentDimensionName struct {
	// contains filtered or unexported fields
}

func (AgentDimensionName) MarshalJSON added in v0.0.99

func (c AgentDimensionName) MarshalJSON() ([]byte, error)

func (*AgentDimensionName) UnmarshalJSON added in v0.0.99

func (c *AgentDimensionName) UnmarshalJSON(b []byte) error

func (AgentDimensionName) Value added in v0.0.99

func (c AgentDimensionName) Value() string

type AgentDimensionNameEnum added in v0.0.99

type AgentDimensionNameEnum struct {
	MOUNT_POINT AgentDimensionName
	DISK        AgentDimensionName
	PROC        AgentDimensionName
	GPU         AgentDimensionName
	RAID        AgentDimensionName
}

func GetAgentDimensionNameEnum added in v0.0.99

func GetAgentDimensionNameEnum() AgentDimensionNameEnum

type AlarmCondition

type AlarmCondition struct {

	// 指标周期,单位是秒; 0是默认值,例如事件类告警该字段就用0即可; 1代表指标的原始周期,比如RDS监控指标原始周期是60s,表示该RDS指标按60s周期为一个数据点参与告警计算;如想了解各个云服务的指标原始周期可以参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html), 300代表指标按5分钟聚合周期为一个数据点参与告警计算。
	Period AlarmConditionPeriod `json:"period"`

	// 聚合方式, 支持的值为(average|min|max|sum)
	Filter string `json:"filter"`

	// 阈值符号
	ComparisonOperator string `json:"comparison_operator"`

	// 告警阈值,取值范围[0, Number.MAX_VALUE],Number.MAX_VALUE值为1.7976931348623157e+108。具体阈值取值请参见附录中各服务监控指标中取值范围,如支持监控的服务列表中ECS的CPU使用率cpu_util取值范围可配置80。
	Value float64 `json:"value"`

	// 数据的单位,最大长度为32位。
	Unit *string `json:"unit,omitempty"`

	// 次数
	Count int32 `json:"count"`

	// 告警抑制时间,单位为秒,对应页面上创建告警规则时告警策略最后一个字段,该字段主要为解决告警频繁的问题,0代表不抑制,满足条件即告警;300代表满足告警触发条件后每5分钟告警一次;
	SuppressDuration *AlarmConditionSuppressDuration `json:"suppress_duration,omitempty"`
}

告警触发条件

func (AlarmCondition) String

func (o AlarmCondition) String() string

type AlarmConditionPeriod added in v0.0.99

type AlarmConditionPeriod struct {
	// contains filtered or unexported fields
}

func (AlarmConditionPeriod) MarshalJSON added in v0.0.99

func (c AlarmConditionPeriod) MarshalJSON() ([]byte, error)

func (*AlarmConditionPeriod) UnmarshalJSON added in v0.0.99

func (c *AlarmConditionPeriod) UnmarshalJSON(b []byte) error

func (AlarmConditionPeriod) Value added in v0.0.99

func (c AlarmConditionPeriod) Value() int32

type AlarmConditionPeriodEnum added in v0.0.99

func GetAlarmConditionPeriodEnum added in v0.0.99

func GetAlarmConditionPeriodEnum() AlarmConditionPeriodEnum

type AlarmConditionSuppressDuration added in v0.0.99

type AlarmConditionSuppressDuration struct {
	// contains filtered or unexported fields
}

func (AlarmConditionSuppressDuration) MarshalJSON added in v0.0.99

func (c AlarmConditionSuppressDuration) MarshalJSON() ([]byte, error)

func (*AlarmConditionSuppressDuration) UnmarshalJSON added in v0.0.99

func (c *AlarmConditionSuppressDuration) UnmarshalJSON(b []byte) error

func (AlarmConditionSuppressDuration) Value added in v0.0.99

type AlarmDescription added in v0.0.99

type AlarmDescription struct {
}

告警描述,长度0-256

func (AlarmDescription) String added in v0.0.99

func (o AlarmDescription) String() string

type AlarmEnabled added in v0.0.99

type AlarmEnabled struct {
}

告警开关

func (AlarmEnabled) String added in v0.0.99

func (o AlarmEnabled) String() string

type AlarmHistoryItemV2

type AlarmHistoryItemV2 struct {

	// 告警记录ID
	RecordId *string `json:"record_id,omitempty"`

	// 告警规则的ID,如:al1603131199286dzxpqK3Ez。
	AlarmId *string `json:"alarm_id,omitempty"`

	// 告警规则的名称,如:alarm-test01。
	Name *string `json:"name,omitempty"`

	// 告警记录的状态,取值为ok,alarm,invalid; ok为正常,alarm为告警,invalid为已失效。
	Status *AlarmHistoryItemV2Status `json:"status,omitempty"`

	// 告警记录的告警级别,值为1,2,3,4;1为紧急,2为重要,3为次要,4为提示。
	Level *AlarmHistoryItemV2Level `json:"level,omitempty"`

	// 告警类型; 仅针对事件告警的参数,枚举类型:值为EVENT.SYS或者EVENT.CUSTOM
	Type *AlarmHistoryItemV2Type `json:"type,omitempty"`

	// 是否发送通知,值为true或者false。
	ActionEnabled *bool `json:"action_enabled,omitempty"`

	// 产生时间,UTC时间
	BeginTime *sdktime.SdkTime `json:"begin_time,omitempty"`

	// 结束时间,UTC时间
	EndTime *sdktime.SdkTime `json:"end_time,omitempty"`

	Metric *Metric `json:"metric,omitempty"`

	Condition *AlarmCondition `json:"condition,omitempty"`

	AdditionalInfo *AdditionalInfo `json:"additional_info,omitempty"`

	// 告警触发的动作。  结构如下:  {  \"type\": \"notification\", \"notification_list\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  }  type取值: notification:通知。 autoscaling:弹性伸缩。 notification_list:告警状态发生变化时,被通知对象的列表。
	AlarmActions *[]Notification `json:"alarm_actions,omitempty"`

	// 告警恢复触发的动作。  结构如下:  {  \"type\": \"notification\", \"notification_list\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  } type取值:  notification:通知。  notification_list:告警状态发生变化时,被通知对象的列表。
	OkActions *[]Notification `json:"ok_actions,omitempty"`

	// 计算出该条告警记录的资源监控数据上报时间和监控数值。
	Datapoints *[]DataPointInfo `json:"datapoints,omitempty"`
}

告警记录详细信息

func (AlarmHistoryItemV2) String

func (o AlarmHistoryItemV2) String() string

type AlarmHistoryItemV2Level added in v0.0.99

type AlarmHistoryItemV2Level struct {
	// contains filtered or unexported fields
}

func (AlarmHistoryItemV2Level) MarshalJSON added in v0.0.99

func (c AlarmHistoryItemV2Level) MarshalJSON() ([]byte, error)

func (*AlarmHistoryItemV2Level) UnmarshalJSON added in v0.0.99

func (c *AlarmHistoryItemV2Level) UnmarshalJSON(b []byte) error

func (AlarmHistoryItemV2Level) Value added in v0.0.99

func (c AlarmHistoryItemV2Level) Value() int32

type AlarmHistoryItemV2LevelEnum added in v0.0.99

type AlarmHistoryItemV2LevelEnum struct {
	E_1 AlarmHistoryItemV2Level
	E_2 AlarmHistoryItemV2Level
	E_3 AlarmHistoryItemV2Level
	E_4 AlarmHistoryItemV2Level
}

func GetAlarmHistoryItemV2LevelEnum added in v0.0.99

func GetAlarmHistoryItemV2LevelEnum() AlarmHistoryItemV2LevelEnum

type AlarmHistoryItemV2Status added in v0.0.99

type AlarmHistoryItemV2Status struct {
	// contains filtered or unexported fields
}

func (AlarmHistoryItemV2Status) MarshalJSON added in v0.0.99

func (c AlarmHistoryItemV2Status) MarshalJSON() ([]byte, error)

func (*AlarmHistoryItemV2Status) UnmarshalJSON added in v0.0.99

func (c *AlarmHistoryItemV2Status) UnmarshalJSON(b []byte) error

func (AlarmHistoryItemV2Status) Value added in v0.0.99

func (c AlarmHistoryItemV2Status) Value() string

type AlarmHistoryItemV2StatusEnum added in v0.0.99

type AlarmHistoryItemV2StatusEnum struct {
	OK      AlarmHistoryItemV2Status
	ALARM   AlarmHistoryItemV2Status
	INVALID AlarmHistoryItemV2Status
}

func GetAlarmHistoryItemV2StatusEnum added in v0.0.99

func GetAlarmHistoryItemV2StatusEnum() AlarmHistoryItemV2StatusEnum

type AlarmHistoryItemV2Type added in v0.0.99

type AlarmHistoryItemV2Type struct {
	// contains filtered or unexported fields
}

func (AlarmHistoryItemV2Type) MarshalJSON added in v0.0.99

func (c AlarmHistoryItemV2Type) MarshalJSON() ([]byte, error)

func (*AlarmHistoryItemV2Type) UnmarshalJSON added in v0.0.99

func (c *AlarmHistoryItemV2Type) UnmarshalJSON(b []byte) error

func (AlarmHistoryItemV2Type) Value added in v0.0.99

func (c AlarmHistoryItemV2Type) Value() string

type AlarmHistoryItemV2TypeEnum added in v0.0.99

type AlarmHistoryItemV2TypeEnum struct {
	EVENT_SYS    AlarmHistoryItemV2Type
	EVENT_CUSTOM AlarmHistoryItemV2Type
}

func GetAlarmHistoryItemV2TypeEnum added in v0.0.99

func GetAlarmHistoryItemV2TypeEnum() AlarmHistoryItemV2TypeEnum

type AlarmId added in v0.0.79

type AlarmId struct {
}

告警规则id,以al开头,包含22个数字或字母

func (AlarmId) String added in v0.0.79

func (o AlarmId) String() string

type AlarmName added in v0.0.99

type AlarmName struct {
}

告警名称, 只能包含0-9/a-z/A-Z/_/-或汉字,长度1-128

func (AlarmName) String added in v0.0.99

func (o AlarmName) String() string

type AlarmTemplateId added in v0.0.99

type AlarmTemplateId struct {
}

告警规则关联告警模板ID,如果传了,告警规则关联的策略会和告警模板策略联动变化

func (AlarmTemplateId) String added in v0.0.99

func (o AlarmTemplateId) String() string

type AlarmType added in v0.0.99

type AlarmType struct {
}

告警规则类型

func (AlarmType) String added in v0.0.99

func (o AlarmType) String() string

type BatchDeleteAlarmRulesRequest added in v0.0.99

type BatchDeleteAlarmRulesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	Body *BatchDeleteAlarmsRequestBody `json:"body,omitempty"`
}

Request Object

func (BatchDeleteAlarmRulesRequest) String added in v0.0.99

type BatchDeleteAlarmRulesResponse added in v0.0.99

type BatchDeleteAlarmRulesResponse struct {

	// 成功删除的告警规则ID列表
	AlarmIds       *[]string `json:"alarm_ids,omitempty"`
	HttpStatusCode int       `json:"-"`
}

Response Object

func (BatchDeleteAlarmRulesResponse) String added in v0.0.99

type BatchDeleteAlarmsRequestBody added in v0.0.99

type BatchDeleteAlarmsRequestBody struct {

	// 需要批量删除的告警规则的ID列表
	AlarmIds []string `json:"alarm_ids"`
}

func (BatchDeleteAlarmsRequestBody) String added in v0.0.99

type BatchEnableAlarmRulesRequest added in v0.0.99

type BatchEnableAlarmRulesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	Body *BatchEnableAlarmsRequestBody `json:"body,omitempty"`
}

Request Object

func (BatchEnableAlarmRulesRequest) String added in v0.0.99

type BatchEnableAlarmRulesResponse added in v0.0.99

type BatchEnableAlarmRulesResponse struct {

	// 成功启停的告警规则ID列表
	AlarmIds       *[]string `json:"alarm_ids,omitempty"`
	HttpStatusCode int       `json:"-"`
}

Response Object

func (BatchEnableAlarmRulesResponse) String added in v0.0.99

type BatchEnableAlarmsRequestBody added in v0.0.99

type BatchEnableAlarmsRequestBody struct {

	// 需要批量启停的告警规则的ID列表
	AlarmIds []string `json:"alarm_ids"`

	// 告警开关
	AlarmEnabled bool `json:"alarm_enabled"`
}

func (BatchEnableAlarmsRequestBody) String added in v0.0.99

type ComparisonOperator added in v0.0.99

type ComparisonOperator struct {
}

阈值符号, 支持的值为(>|<|>=|<=|=|><)

func (ComparisonOperator) String added in v0.0.99

func (o ComparisonOperator) String() string

type Count added in v0.0.99

type Count struct {
}

次数

func (Count) String added in v0.0.99

func (o Count) String() string

type CreateAlarmRulesRequest added in v0.0.99

type CreateAlarmRulesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	Body *PostAlarmsReqV2 `json:"body,omitempty"`
}

Request Object

func (CreateAlarmRulesRequest) String added in v0.0.99

func (o CreateAlarmRulesRequest) String() string

type CreateAlarmRulesResponse added in v0.0.99

type CreateAlarmRulesResponse struct {

	// 告警规则id,以al开头,包含22个数字或字母
	AlarmId        *string `json:"alarm_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateAlarmRulesResponse) String added in v0.0.99

func (o CreateAlarmRulesResponse) String() string

type DataPointInfo added in v0.0.99

type DataPointInfo struct {

	// 计算出该条告警记录的资源监控数据上报的UTC时间
	Time *string `json:"time,omitempty"`

	// 计算出该条告警记录的资源监控数据在该时间点的监控数值,如:7.019。
	Value *float64 `json:"value,omitempty"`
}

func (DataPointInfo) String added in v0.0.99

func (o DataPointInfo) String() string

type DeleteAlarmRuleResourcesRequest added in v0.0.99

type DeleteAlarmRuleResourcesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	// Alarm实例ID
	AlarmId string `json:"alarm_id"`

	Body *ResourcesReqV2 `json:"body,omitempty"`
}

Request Object

func (DeleteAlarmRuleResourcesRequest) String added in v0.0.99

type DeleteAlarmRuleResourcesResponse added in v0.0.99

type DeleteAlarmRuleResourcesResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (DeleteAlarmRuleResourcesResponse) String added in v0.0.99

type Dimension

type Dimension struct {

	// 资源维度,如:弹性云服务器,则维度为instance_id;目前最大支持4个维度,各服务资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Name string `json:"name"`

	// 资源维度值,为资源的实例ID,如:4270ff17-aba3-4138-89fa-820594c39755。
	Value *string `json:"value,omitempty"`
}

指标维度

func (Dimension) String

func (o Dimension) String() string

type EnterpriseProjectId added in v0.0.99

type EnterpriseProjectId struct {
}

企业项目ID

func (EnterpriseProjectId) String added in v0.0.99

func (o EnterpriseProjectId) String() string

type Filter added in v0.0.99

type Filter struct {
}

聚合方式, 支持的值为(average|min|max|sum)

func (Filter) String added in v0.0.99

func (o Filter) String() string

type Level added in v0.0.99

type Level struct {
}

告警级别, 1为紧急,2为重要,3为次要,4为提示

func (Level) String added in v0.0.99

func (o Level) String() string

type ListAgentDimensionInfoRequest added in v0.0.99

type ListAgentDimensionInfoRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	// 资源ID,如:4270ff17-aba3-4138-89fa-820594c39755。
	InstanceId string `json:"instance_id"`

	// 维度名称,枚举类型,类型有:   mount_point:挂载点,   disk:磁盘,   proc:进程,   gpu:显卡,   raid: RAID控制器,
	DimName ListAgentDimensionInfoRequestDimName `json:"dim_name"`

	// 维度值,32位字符串,如:2e84018fc8b4484b94e89aae212fe615。
	DimValue *string `json:"dim_value,omitempty"`

	// 分页偏移量
	Offset *int32 `json:"offset,omitempty"`

	// 分页大小
	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ListAgentDimensionInfoRequest) String added in v0.0.99

type ListAgentDimensionInfoRequestDimName added in v0.0.99

type ListAgentDimensionInfoRequestDimName struct {
	// contains filtered or unexported fields
}

func (ListAgentDimensionInfoRequestDimName) MarshalJSON added in v0.0.99

func (c ListAgentDimensionInfoRequestDimName) MarshalJSON() ([]byte, error)

func (*ListAgentDimensionInfoRequestDimName) UnmarshalJSON added in v0.0.99

func (c *ListAgentDimensionInfoRequestDimName) UnmarshalJSON(b []byte) error

func (ListAgentDimensionInfoRequestDimName) Value added in v0.0.99

type ListAgentDimensionInfoResponse added in v0.0.99

type ListAgentDimensionInfoResponse struct {

	// 维度信息
	Dimensions *[]AgentDimension `json:"dimensions,omitempty"`

	// 维度信息总数
	Count          *int32 `json:"count,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ListAgentDimensionInfoResponse) String added in v0.0.99

type ListAlarmHistoriesRequest

type ListAlarmHistoriesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	// 告警ID,以al开头,后跟22位由字母或数字组成的字符串
	AlarmId *string `json:"alarm_id,omitempty"`

	// 告警规则名称
	Name *string `json:"name,omitempty"`

	// 告警规则状态, ok为正常,alarm为告警,invalid为已失效
	Status *string `json:"status,omitempty"`

	// 告警级别, 1为紧急,2为重要,3为次要,4为提示
	Level *int32 `json:"level,omitempty"`

	// 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
	Namespace *string `json:"namespace,omitempty"`

	// 告警资源ID,多维度情况按字母升序排列并使用逗号分隔
	ResourceId *string `json:"resource_id,omitempty"`

	// 查询告警记录的起始时间,例如:2022-02-10T10:05:46+08:00
	From *string `json:"from,omitempty"`

	// 查询告警记录的截止时间,例如:2022-02-10T10:05:47+08:00
	To *string `json:"to,omitempty"`

	// 分页偏移量
	Offset *int32 `json:"offset,omitempty"`

	// 分页大小
	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ListAlarmHistoriesRequest) String

func (o ListAlarmHistoriesRequest) String() string

type ListAlarmHistoriesResponse

type ListAlarmHistoriesResponse struct {

	// alarmHistories列表
	AlarmHistories *[]AlarmHistoryItemV2 `json:"alarm_histories,omitempty"`

	// 告警记录列表总数
	Count          *int32 `json:"count,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ListAlarmHistoriesResponse) String

type ListAlarmResponseAlarms added in v0.0.99

type ListAlarmResponseAlarms struct {

	// 告警规则id,以al开头,包含22个数字或字母
	AlarmId *string `json:"alarm_id,omitempty"`

	// 告警名称, 只能包含0-9/a-z/A-Z/_/-或汉字,长度1-128
	Name *string `json:"name,omitempty"`

	// 告警描述,长度0-256
	Description *string `json:"description,omitempty"`

	// 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
	Namespace *string `json:"namespace,omitempty"`

	// 告警策略
	Policies *[]Policy `json:"policies,omitempty"`

	// 资源列表,关联资源需要使用查询告警规则资源接口获取
	Resources *[]ResourcesInListResp `json:"resources,omitempty"`

	// 告警规则类型
	Type *string `json:"type,omitempty"`

	// 告警开关
	Enabled *bool `json:"enabled,omitempty"`

	// 是否开启告警通知
	NotificationEnabled *bool `json:"notification_enabled,omitempty"`

	// 告警触发的动作
	AlarmNotifications *[]Notification `json:"alarm_notifications,omitempty"`

	// 告警恢复触发的动作
	OkNotifications *[]Notification `json:"ok_notifications,omitempty"`

	// 告警通知开启时间
	NotificationBeginTime *string `json:"notification_begin_time,omitempty"`

	// 告警通知关闭时间
	NotificationEndTime *string `json:"notification_end_time,omitempty"`

	// 企业项目ID
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`

	// 告警规则关联告警模板ID,如果传了,告警规则关联的策略会和告警模板策略联动变化
	AlarmTemplateId *string `json:"alarm_template_id,omitempty"`
}

func (ListAlarmResponseAlarms) String added in v0.0.99

func (o ListAlarmResponseAlarms) String() string

type ListAlarmRulePoliciesRequest added in v0.0.99

type ListAlarmRulePoliciesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	// 告警规则ID
	AlarmId string `json:"alarm_id"`

	// 分页偏移量
	Offset *int32 `json:"offset,omitempty"`

	// 分页大小
	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ListAlarmRulePoliciesRequest) String added in v0.0.99

type ListAlarmRulePoliciesResponse added in v0.0.99

type ListAlarmRulePoliciesResponse struct {

	// 策略信息
	Policies *[]Policy `json:"policies,omitempty"`

	// 指定告警规则对应的策略总数
	Count          *int32 `json:"count,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ListAlarmRulePoliciesResponse) String added in v0.0.99

type ListAlarmRuleResourcesRequest added in v0.0.99

type ListAlarmRuleResourcesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	// Alarm实例ID
	AlarmId string `json:"alarm_id"`

	// 分页偏移量
	Offset *int32 `json:"offset,omitempty"`

	// 分页大小
	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ListAlarmRuleResourcesRequest) String added in v0.0.99

type ListAlarmRuleResourcesResponse added in v0.0.99

type ListAlarmRuleResourcesResponse struct {

	// 资源信息
	Resources *[][]Dimension `json:"resources,omitempty"`

	// 资源总数
	Count          *int32 `json:"count,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ListAlarmRuleResourcesResponse) String added in v0.0.99

type ListAlarmRulesRequest added in v0.0.99

type ListAlarmRulesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	// 告警规则ID
	AlarmId *string `json:"alarm_id,omitempty"`

	// 告警名称, 只能包含0-9/a-z/A-Z/_/-或汉字,长度1-128
	Name *string `json:"name,omitempty"`

	// 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
	Namespace *string `json:"namespace,omitempty"`

	// 告警资源ID,多维度情况按字母升序排列并使用逗号分隔
	ResourceId *string `json:"resource_id,omitempty"`

	// 企业项目ID
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`

	// 分页偏移量
	Offset *int32 `json:"offset,omitempty"`

	// 分页大小
	Limit *int32 `json:"limit,omitempty"`
}

Request Object

func (ListAlarmRulesRequest) String added in v0.0.99

func (o ListAlarmRulesRequest) String() string

type ListAlarmRulesResponse added in v0.0.99

type ListAlarmRulesResponse struct {

	// 告警规则列表
	Alarms *[]ListAlarmResponseAlarms `json:"alarms,omitempty"`

	// 告警规则总数
	Count          *int32 `json:"count,omitempty"`
	HttpStatusCode int    `json:"-"`
}

Response Object

func (ListAlarmRulesResponse) String added in v0.0.99

func (o ListAlarmRulesResponse) String() string

type Metric

type Metric struct {

	// 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
	Namespace *string `json:"namespace,omitempty"`

	// 资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	MetricName *string `json:"metric_name,omitempty"`

	// 指标维度,目前最大可添加4个维度。
	Dimensions *[]Dimension `json:"dimensions,omitempty"`
}

指标信息

func (Metric) String

func (o Metric) String() string

type MetricDimension added in v0.0.79

type MetricDimension struct {

	// 指标维度名称
	Name string `json:"name"`

	// 指标维度值
	Value *string `json:"value,omitempty"`
}

指标维度

func (MetricDimension) String added in v0.0.79

func (o MetricDimension) String() string

type MetricName added in v0.0.99

type MetricName struct {
}

资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。

func (MetricName) String added in v0.0.99

func (o MetricName) String() string

type Namespace added in v0.0.79

type Namespace struct {
}

查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)

func (Namespace) String added in v0.0.79

func (o Namespace) String() string

type Notification added in v0.0.99

type Notification struct {

	// 通知类型, notification代表通过SMN通知
	Type string `json:"type"`

	// 告警状态发生变化时,被通知对象的列表。topicUrn可从SMN获取,具体操作请参考查询Topic列表。当type为notification时,notification_list列表不能为空。 说明:若alarm_action_enabled为true,对应的alarm_actions、ok_actions至少有一个不能为空。若alarm_actions、ok_actions同时存在时,notification_list值保持一致。
	NotificationList []string `json:"notification_list"`
}

func (Notification) String added in v0.0.99

func (o Notification) String() string

type NotificationBeginTime added in v0.0.99

type NotificationBeginTime struct {
}

告警通知开启时间

func (NotificationBeginTime) String added in v0.0.99

func (o NotificationBeginTime) String() string

type NotificationEnabled added in v0.0.99

type NotificationEnabled struct {
}

是否开启告警通知

func (NotificationEnabled) String added in v0.0.99

func (o NotificationEnabled) String() string

type NotificationEndTime added in v0.0.99

type NotificationEndTime struct {
}

告警通知关闭时间

func (NotificationEndTime) String added in v0.0.99

func (o NotificationEndTime) String() string

type PoliciesReqV2 added in v0.0.99

type PoliciesReqV2 struct {

	// 策略信息
	Policies []Policy `json:"policies"`
}

func (PoliciesReqV2) String added in v0.0.99

func (o PoliciesReqV2) String() string

type Policy added in v0.0.79

type Policy struct {

	// 资源的监控指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符长度最短为1,最大为64;如:弹性云服务器中的监控指标cpu_util,表示弹性服务器的CPU使用率;文档数据库中的指标mongo001_command_ps,表示command执行频率;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	MetricName string `json:"metric_name"`

	// 指标周期,单位是秒; 0是默认值,例如事件类告警该字段就用0即可; 1代表指标的原始周期,比如RDS监控指标原始周期是60s,表示该RDS指标按60s周期为一个数据点参与告警计算;如想了解各个云服务的指标原始周期可以参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html), 300代表指标按5分钟聚合周期为一个数据点参与告警计算。
	Period int32 `json:"period"`

	// 聚合方式, 支持的值为(average|min|max|sum)
	Filter string `json:"filter"`

	// 阈值符号, 支持的值为(>|<|>=|<=|=|><)
	ComparisonOperator string `json:"comparison_operator"`

	// 阈值
	Value float64 `json:"value"`

	// 单位
	Unit *string `json:"unit,omitempty"`

	// 次数
	Count int32 `json:"count"`

	// 告警抑制时间,单位为秒,对应页面上创建告警规则时告警策略最后一个字段,该字段主要为解决告警频繁的问题,0代表不抑制,满足条件即告警;300代表满足告警触发条件后每5分钟告警一次;
	SuppressDuration *int32 `json:"suppress_duration,omitempty"`

	// 告警级别, 1为紧急,2为重要,3为次要,4为提示
	Level *int32 `json:"level,omitempty"`
}

func (Policy) String added in v0.0.79

func (o Policy) String() string

type PostAlarmsReqV2 added in v0.0.79

type PostAlarmsReqV2 struct {

	// 告警名称, 只能包含0-9/a-z/A-Z/_/-或汉字,长度1-128
	Name string `json:"name"`

	// 告警描述,长度0-256
	Description *string `json:"description,omitempty"`

	// 查询服务的命名空间,各服务命名空间请参考[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
	Namespace string `json:"namespace"`

	// 资源分组ID,监控范围为资源分组时必传
	ResourceGroupId *string `json:"resource_group_id,omitempty"`

	// 资源列表,监控范围为指定资源时必传
	Resources [][]Dimension `json:"resources"`

	// 告警策略
	Policies []Policy `json:"policies"`

	// 告警规则类型
	Type string `json:"type"`

	// 告警触发的动作
	AlarmNotifications *[]Notification `json:"alarm_notifications,omitempty"`

	// 告警恢复触发的动作
	OkNotifications *[]Notification `json:"ok_notifications,omitempty"`

	// 告警通知开启时间
	NotificationBeginTime *string `json:"notification_begin_time,omitempty"`

	// 告警通知关闭时间
	NotificationEndTime *string `json:"notification_end_time,omitempty"`

	// 企业项目ID
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`

	// 告警开关
	Enabled bool `json:"enabled"`

	// 是否开启告警通知
	NotificationEnabled bool `json:"notification_enabled"`

	// 告警规则关联告警模板ID,如果传了,告警规则关联的策略会和告警模板策略联动变化
	AlarmTemplateId *string `json:"alarm_template_id,omitempty"`
}

func (PostAlarmsReqV2) String added in v0.0.79

func (o PostAlarmsReqV2) String() string

type ResourceGroupId added in v0.0.99

type ResourceGroupId struct {
}

资源分组ID,监控范围为资源分组时必传

func (ResourceGroupId) String added in v0.0.99

func (o ResourceGroupId) String() string

type ResourcesInListResp added in v0.0.79

type ResourcesInListResp struct {

	// 资源分组ID,监控范围为资源分组时存在该值
	ResourceGroupId *string `json:"resource_group_id,omitempty"`

	// 资源分组名称,监控范围为资源分组时存在该值
	ResourceGroupName *string `json:"resource_group_name,omitempty"`

	// 维度信息
	Dimensions *[]MetricDimension `json:"dimensions,omitempty"`
}

func (ResourcesInListResp) String added in v0.0.79

func (o ResourcesInListResp) String() string

type ResourcesReqV2 added in v0.0.79

type ResourcesReqV2 struct {

	// 资源信息
	Resources [][]Dimension `json:"resources"`
}

func (ResourcesReqV2) String added in v0.0.79

func (o ResourcesReqV2) String() string

type SmnUrn

type SmnUrn struct {
}

func (SmnUrn) String

func (o SmnUrn) String() string

type Unit added in v0.0.99

type Unit struct {
}

单位

func (Unit) String added in v0.0.99

func (o Unit) String() string

type UpdateAlarmRulePoliciesRequest added in v0.0.99

type UpdateAlarmRulePoliciesRequest struct {

	// 发送的实体的MIME类型。默认使用application/json; charset=UTF-8。
	ContentType string `json:"Content-Type"`

	// Alarm实例ID
	AlarmId string `json:"alarm_id"`

	Body *PoliciesReqV2 `json:"body,omitempty"`
}

Request Object

func (UpdateAlarmRulePoliciesRequest) String added in v0.0.99

type UpdateAlarmRulePoliciesResponse added in v0.0.99

type UpdateAlarmRulePoliciesResponse struct {

	// 策略信息
	Policies       *[]Policy `json:"policies,omitempty"`
	HttpStatusCode int       `json:"-"`
}

Response Object

func (UpdateAlarmRulePoliciesResponse) String added in v0.0.99

type Value added in v0.0.99

type Value struct {
}

阈值

func (Value) String added in v0.0.99

func (o Value) String() string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL