model

package
v0.0.28-beta.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 AlarmActions

type AlarmActions struct {
	// 告警通知类型,取值如下: notification:通知; autoscaling:弹性伸缩。
	Type string `json:"type"`
	// 告警状态发生变化时,被通知对象的列表。通知对象ID最多可以配置5个。topicUrn可从SMN获取,具体操作请参考查询Topic列表。当type为notification时,notificationList列表不能为空;当type为autoscaling时,列表必须为[]。 说明:若alarm_action_enabled为true,对应的alarm_actions、insufficientdata_actions(该参数已废弃,建议无需配置)、ok_actions至少有一个不能为空。若alarm_actions、insufficientdata_actions(该参数已废弃,建议无需配置)、ok_actions同时存在时,notificationList值保持一致。
	NotificationList []string `json:"notificationList"`
}

func (AlarmActions) String

func (o AlarmActions) String() string

type AlarmHistoryInfo

type AlarmHistoryInfo struct {
	// 告警规则的ID,如:al1603131199286dzxpqK3Ez。
	AlarmId *string `json:"alarm_id,omitempty"`
	// 告警规则的名称,如:alarm-test01。
	AlarmName *string `json:"alarm_name,omitempty"`
	// 告警规则的描述。
	AlarmDescription *string     `json:"alarm_description,omitempty"`
	Metric           *MetricInfo `json:"metric,omitempty"`
	Condition        *Condition  `json:"condition,omitempty"`
	// 告警历史的告警级别,值为1,2,3,4;1为紧急,2为重要,3为次要,4为提示。
	AlarmLevel *int32 `json:"alarm_level,omitempty"`
	// 告警类型; 仅针对事件告警的参数,枚举类型:值为EVENT.SYS或者EVENT.CUSTOM
	AlarmType *string `json:"alarm_type,omitempty"`
	// 告警规则是否被启用,值为true或者false。
	AlarmEnabled *bool `json:"alarm_enabled,omitempty"`
	// 告警规则的告警触发动作是否被启用,值为true或者false。
	AlarmActionEnabled *bool `json:"alarm_action_enabled,omitempty"`
	// 告警触发的动作。  结构如下:  {  \"type\": \"notification\", \"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  }  type取值: notification:通知。 autoscaling:弹性伸缩。 notificationList:告警状态发生变化时,被通知对象的列表。
	AlarmActions *[]AlarmActions `json:"alarm_actions,omitempty"`
	// 告警恢复触发的动作。  结构如下:  {  \"type\": \"notification\", \"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  } type取值:  notification:通知。  notificationList:告警状态发生变化时,被通知对象的列表。
	OkActions *[]AlarmActions `json:"ok_actions,omitempty"`
	// 数据不足触发的动作。  结构如下:  {  \"type\": \"notification\", \"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  }  type取值: 数据不足触发告警通知类型,取值为notification。 notificationList:数据不足触发告警通知时,被通知对象的ID列表。
	InsufficientdataActions *[]AlarmActions `json:"insufficientdata_actions,omitempty"`
	// 告警状态变更的时间,UNIX时间戳,单位毫秒,如:1603131199000。
	UpdateTime *int64 `json:"update_time,omitempty"`
	// 企业项目ID。 值为all_granted_eps时,表示所有企业项目;值为0时,表示默认的企业项目default。
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`
	// 计算出该条告警历史的时间,UNIX时间戳,单位毫秒,如:1603131199469。
	TriggerTime *int64 `json:"trigger_time,omitempty"`
	// 告警历史的状态,取值为ok,alarm,insufficient_data; ok为正常,alarm为告警,insufficient_data为数据不足。
	AlarmStatus *string `json:"alarm_status,omitempty"`
	// 计算出该条告警历史的资源监控数据的一组数据上报时间和监控数值。
	Datapoints     *[]DataPointForAlarmHistory `json:"datapoints,omitempty"`
	AdditionalInfo *AdditionalInfo             `json:"additional_info,omitempty"`
}

告警历史详细信息

func (AlarmHistoryInfo) String

func (o AlarmHistoryInfo) String() string

type AlarmTemplate

type AlarmTemplate struct {
	// 自定义告警模板名称,如:alarmTemplate-Test01。
	TemplateName *string `json:"template_name,omitempty"`
	// 自定义告警模板描述。
	TemplateDescription *string `json:"template_description,omitempty"`
	// 自定义告警模板选择的资源类型,即服务命名空间,如:选择弹性云服务器,则命名空间为SYS.ECS,各资源的监控指标名称可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace *string `json:"namespace,omitempty"`
	// 自定义告警模板选择的资源维度,如:弹性云服务器,则维度为instance_id,各服务资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	DimensionName *string `json:"dimension_name,omitempty"`
	// 自定义告警模板添加的一组或者多个告警策略。
	TemplateItems *[]TemplateItem `json:"template_items,omitempty"`
	// 自定义告警模板的ID,如:at1603330892378wkDm77y6B。
	TemplateId *string `json:"template_id,omitempty"`
}

创建的自定义告警模板详细信息

func (AlarmTemplate) String

func (o AlarmTemplate) String() string

type AlarmTemplateCondition

type AlarmTemplateCondition struct {
	// 告警阈值的比较条件,可以是>、=、<、>=、<=。
	ComparisonOperator string `json:"comparison_operator"`
	// 触发告警的连续发生次数,取值范围[1, 5]。
	Count int32 `json:"count"`
	// 数据聚合的方式,支持max、min、average、sum、variance,分别表示最大值、最小值、平均值、求和值、方差值。
	Filter string `json:"filter"`
	// 告警条件判断周期,单位为秒,支持的值为1,300,1200,3600,14400,86400。说明:当period设置为1时,表示以原始的指标数据判断告警。当alarm_type为(EVENT.SYS| EVENT.CUSTOM)时允许为0。
	Period int32 `json:"period"`
	// 数据的单位,最大长度为32位。
	Unit *string `json:"unit,omitempty"`
	// 告警阈值,取值范围[0, Number.MAX_VALUE],Number.MAX_VALUE值为1.7976931348623157e+108。具体阈值取值请参见附录中各服务监控指标中取值范围,如支持监控的服务列表中ECS的CPU使用率cpu_util取值范围可配置80。
	Value float64 `json:"value"`
	// 发送告警的周期,值可为0, 300, 600, 900, 1800, 3600, 10800, 21600, 43200, 86400;0表示只告警一次,300表示每5分钟告警一次,600表示每10分钟告警一次,900表示每15分钟告警一次,1800表示每30分钟告警一次,3600表示每1小时告警一次,10800表示每3小时告警一次,21600表示每6小时告警一次,43200表示每12小时告警一次,86400表示每1天告警一次。
	SuppressDuration *int32 `json:"suppress_duration,omitempty"`
}

创建自定义告警模板的告警策略。

func (AlarmTemplateCondition) String

func (o AlarmTemplateCondition) String() string

type BatchListMetricDataRequest

type BatchListMetricDataRequest struct {
	ContentType string                          `json:"Content-Type"`
	Body        *BatchListMetricDataRequestBody `json:"body,omitempty"`
}

Request Object

func (BatchListMetricDataRequest) String

type BatchListMetricDataRequestBody

type BatchListMetricDataRequestBody struct {
	// 指标数据。数组长度最大10
	Metrics []MetricInfo `json:"metrics"`
	// 指标监控数据的聚合粒度,取值范围:1,300,1200,3600,14400,86400;1为监控资源的实时数据;300为聚合5分钟粒度数据,表示5分钟一个数据点;1200为聚合20分钟粒度数据,表示20分钟一个数据点;3600为聚合1小时粒度数据,表示1小时一个数据点;14400为聚合4小时粒度数据,表示4小时一个数据点;86400为聚合1天粒度数据,表示1天一个数据点;聚合解释可查看:“[聚合含义](https://support.huaweicloud.com/ces_faq/ces_faq_0009.html)”。
	Period string `json:"period"`
	// 数据聚合方式。  支持的值为max, min, average, sum, variance;max为最大值,min为最小值,average为平均值,sum为和,variance为方差值。
	Filter string `json:"filter"`
	// 查询数据起始时间,UNIX时间戳,单位毫秒。建议from的值相对于当前时间向前偏移至少1个周期。由于聚合运算的过程是将一个聚合周期范围内的数据点聚合到周期起始边界上,如果将from和to的范围设置在聚合周期内,会因为聚合未完成而造成查询数据为空,所以建议from参数相对于当前时间向前偏移至少1个周期。以5分钟聚合周期为例:假设当前时间点为10:35,10:30~10:35之间的原始数据会被聚合到10:30这个点上,所以查询5分钟数据点时from参数应为10:30或之前。  说明: 云监控会根据所选择的聚合粒度向前取整from参数;如:1607146998177
	From int64 `json:"from"`
	// 查询数据截止时间UNIX时间戳,单位毫秒。from必须小于to;如:1607150598177。
	To int64 `json:"to"`
}

func (BatchListMetricDataRequestBody) String

type BatchListMetricDataResponse

type BatchListMetricDataResponse struct {
	// 监控指标。
	Metrics        *[]BatchMetricData `json:"metrics,omitempty"`
	HttpStatusCode int                `json:"-"`
}

Response Object

func (BatchListMetricDataResponse) String

type BatchMetricData

type BatchMetricData struct {
	// 指标单位
	Unit *string `json:"unit,omitempty"`
	// 指标数据列表。由于查询数据时,云监控会根据所选择的聚合粒度向前取整from参数,所以datapoints中包含的数据点有可能会多于预期。
	Datapoints []DatapointForBatchMetric `json:"datapoints"`
	// 指标命名空间,格式为service.item;service和item必须是字符串,必须以字母开头,只能包含0-9/a-z/A-Z/_,总长度最短为3,最大为32;各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace *string `json:"namespace,omitempty"`
	// 指标名称,例如弹性云服务器监控指标中的cpu_util;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	MetricName string `json:"metric_name"`
	// 指标维度列表
	Dimensions *[]MetricsDimension `json:"dimensions,omitempty"`
}

func (BatchMetricData) String

func (o BatchMetricData) String() string

type Condition

type Condition struct {
	// 告警阈值的比较条件,可以是>、=、<、>=、<=。
	ComparisonOperator string `json:"comparison_operator"`
	// 触发告警的连续发生次数,取值范围[1, 5]。
	Count int32 `json:"count"`
	// 数据聚合的方式,支持max、min、average、sum、variance,分别表示最大值、最小值、平均值、求和值、方差值。
	Filter string `json:"filter"`
	// 告警条件判断周期,单位为秒,支持的值为1,300,1200,3600,14400,86400。说明:当period设置为1时,表示以原始的指标数据判断告警。当alarm_type为(EVENT.SYS| EVENT.CUSTOM)时允许为0。
	Period int32 `json:"period"`
	// 数据的单位,最大长度为32位。
	Unit *string `json:"unit,omitempty"`
	// 告警阈值,取值范围[0, Number.MAX_VALUE],Number.MAX_VALUE值为1.7976931348623157e+108。具体阈值取值请参见附录中各服务监控指标中取值范围,如支持监控的服务列表中ECS的CPU使用率cpu_util取值范围可配置80。
	Value float64 `json:"value"`
	// 发送告警的周期,值可为0, 300, 600, 900, 1800, 3600, 10800, 21600, 43200, 86400;0表示只告警一次,300表示每5分钟告警一次,600表示每10分钟告警一次,900表示每15分钟告警一次,1800表示每30分钟告警一次,3600表示每1小时告警一次,10800表示每3小时告警一次,21600表示每6小时告警一次,43200表示每12小时告警一次,86400表示每1天告警一次。
	SuppressDuration *int32 `json:"suppress_duration,omitempty"`
}

告警规则设置的告警策略

func (Condition) String

func (o Condition) String() string

type CreateAlarmRequest

type CreateAlarmRequest struct {
	Body *CreateAlarmRequestBody `json:"body,omitempty"`
}

Request Object

func (CreateAlarmRequest) String

func (o CreateAlarmRequest) String() string

type CreateAlarmRequestBody

type CreateAlarmRequestBody struct {
	// 告警名称,只能包含0-9/a-z/A-Z/_/-或汉字。
	AlarmName string `json:"alarm_name"`
	// 告警描述,长度0-256。
	AlarmDescription *string             `json:"alarm_description,omitempty"`
	Metric           *MetricInfoForAlarm `json:"metric"`
	Condition        *Condition          `json:"condition"`
	// 是否启用该条告警,默认为true。
	AlarmEnabled *bool `json:"alarm_enabled,omitempty"`
	// 是否启用该条告警触发的动作,默认为true。注:若alarm_action_enabled为true,对应的alarm_actions、ok_actions至少有一个不能为空。若alarm_actions、ok_actions同时存在时,notificationList值保持一致。
	AlarmActionEnabled *bool `json:"alarm_action_enabled,omitempty"`
	// 告警级别,默认为2,级别为1、2、3、4。分别对应紧急、重要、次要、提示。
	AlarmLevel *int32 `json:"alarm_level,omitempty"`
	// 告警类型,支持的枚举类型:EVENT.SYS:针对系统事件的告警规则;EVENT.CUSTOM:针对自定义事件的告警规则;RESOURCE_GROUP:针对资源分组的告警规则。
	AlarmType *CreateAlarmRequestBodyAlarmType `json:"alarm_type,omitempty"`
	// 告警触发的动作。 结构样例如下: { \"type\": \"notification\",\"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"] } type取值: notification:通知。 autoscaling:弹性伸缩。
	AlarmActions *[]AlarmActions `json:"alarm_actions,omitempty"`
	// 数据不足触发的动作(该参数已废弃,建议无需配置)。
	InsufficientdataActions *[]AlarmActions `json:"insufficientdata_actions,omitempty"`
	// 告警恢复触发的动作
	OkActions *[]AlarmActions `json:"ok_actions,omitempty"`
	// 企业项目ID。默认值为0,表示默认的企业项目default。说明:此参数在“华东-上海一”区域上线。
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`
}

func (CreateAlarmRequestBody) String

func (o CreateAlarmRequestBody) String() string

type CreateAlarmRequestBodyAlarmType

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

func (CreateAlarmRequestBodyAlarmType) MarshalJSON

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

func (*CreateAlarmRequestBodyAlarmType) UnmarshalJSON

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

type CreateAlarmRequestBodyAlarmTypeEnum

type CreateAlarmRequestBodyAlarmTypeEnum struct {
	EVENT_SYS      CreateAlarmRequestBodyAlarmType
	EVENT_CUSTOM   CreateAlarmRequestBodyAlarmType
	RESOURCE_GROUP CreateAlarmRequestBodyAlarmType
}

func GetCreateAlarmRequestBodyAlarmTypeEnum

func GetCreateAlarmRequestBodyAlarmTypeEnum() CreateAlarmRequestBodyAlarmTypeEnum

type CreateAlarmResponse

type CreateAlarmResponse struct {
	// 告警规则的ID。
	AlarmId        *string `json:"alarm_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateAlarmResponse) String

func (o CreateAlarmResponse) String() string

type CreateAlarmTemplateRequest

type CreateAlarmTemplateRequest struct {
	ContentType string                          `json:"Content-Type"`
	Body        *CreateAlarmTemplateRequestBody `json:"body,omitempty"`
}

Request Object

func (CreateAlarmTemplateRequest) String

type CreateAlarmTemplateRequestBody

type CreateAlarmTemplateRequestBody struct {
	// 自定义告警模板名称,只能包含0-9/a-z/A-Z/_/-或汉字,长度为1-128。。
	TemplateName string `json:"template_name"`
	// 自定义告警模板详细描述,长度为0-256。
	TemplateDescription *string `json:"template_description,omitempty"`
	// 创建自定义告警模板选择的资源类型,即服务命名空间,如:选择弹性云服务器,则命名空间为SYS.ECS;各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace string `json:"namespace"`
	// 资源类型对应的指标监控维度,选择弹性云服务器,则维度为云服务器,dimension_name值为instance_id;各服务资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	DimensionName string `json:"dimension_name"`
	// 创建自定义告警模板添加一个或者多个指标的告警规则;目前最多可增加30组告警规则策略。
	TemplateItems []TemplateItem `json:"template_items"`
}

创建自定义告警模板请求参数。

func (CreateAlarmTemplateRequestBody) String

type CreateAlarmTemplateResponse

type CreateAlarmTemplateResponse struct {
	// 自定义告警模板创建成功返回的ID,如:at1603252280799wLRyGLxnz。
	TemplateId     *string `json:"template_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateAlarmTemplateResponse) String

type CreateEventsRequest

type CreateEventsRequest struct {
	ContentType string `json:"Content-Type"`
	// 上报自定义事件。请求参数。
	Body *[]EventItem `json:"body,omitempty"`
}

Request Object

func (CreateEventsRequest) String

func (o CreateEventsRequest) String() string

type CreateEventsResponse

type CreateEventsResponse struct {
	// 响应参数。
	Body           *[]CreateEventsResponseBody `json:"body,omitempty"`
	HttpStatusCode int                         `json:"-"`
}

Response Object

func (CreateEventsResponse) String

func (o CreateEventsResponse) String() string

type CreateEventsResponseBody

type CreateEventsResponseBody struct {
	// 事件ID。
	EventId string `json:"event_id"`
	// 事件名称。  必须以字母开头,只能包含0-9/a-z/A-Z/_,长度最短为1,最大为64。
	EventName string `json:"event_name"`
}

响应参数。

func (CreateEventsResponseBody) String

func (o CreateEventsResponseBody) String() string

type CreateMetricDataRequest

type CreateMetricDataRequest struct {
	// 添加一条或多条自定义指标监控数据,请求参数。
	Body *[]MetricDataItem `json:"body,omitempty"`
}

Request Object

func (CreateMetricDataRequest) String

func (o CreateMetricDataRequest) String() string

type CreateMetricDataResponse

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

Response Object

func (CreateMetricDataResponse) String

func (o CreateMetricDataResponse) String() string

type CreateResourceGroup

type CreateResourceGroup struct {
	// 资源类型。即命名空间,如弹性云服务器的资源命名空间为:SYS.ECS;各服务命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace string `json:"namespace"`
	// 一个或者多个资源维度。
	Dimensions []MetricsDimension `json:"dimensions"`
}

资源分组中选择的资源信息。

func (CreateResourceGroup) String

func (o CreateResourceGroup) String() string

type CreateResourceGroupRequest

type CreateResourceGroupRequest struct {
	ContentType string                          `json:"Content-Type"`
	Body        *CreateResourceGroupRequestBody `json:"body,omitempty"`
}

Request Object

func (CreateResourceGroupRequest) String

type CreateResourceGroupRequestBody

type CreateResourceGroupRequestBody struct {
	// 资源分组的名称;长度为1-128,只能包含0-9/a-z/A-Z/_/-或汉字;如:ResourceGroup-Test01。
	GroupName string `json:"group_name"`
	// 创建的资源分组选择一个或者多个资源。
	Resources []CreateResourceGroup `json:"resources"`
}

创建资源分组,请求参数。

func (CreateResourceGroupRequestBody) String

type CreateResourceGroupResponse

type CreateResourceGroupResponse struct {
	// 创建的资源分组ID,如:rg1606377637506DmVOENVyL。
	GroupId        *string `json:"group_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateResourceGroupResponse) String

type DataPointForAlarmHistory

type DataPointForAlarmHistory struct {
	// 计算出该条告警历史的资源监控数据上报时间,UNIX时间戳,单位毫秒,如:1603131028000。
	Time *int64 `json:"time,omitempty"`
	// 计算出该条告警历史的资源监控数据在该时间点的监控数值,如:7.019。
	Value *float64 `json:"value,omitempty"`
}

计算出该条告警历史的资源监控数据上报时间和监控数值。

func (DataPointForAlarmHistory) String

func (o DataPointForAlarmHistory) String() string

type Datapoint

type Datapoint struct {
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Max *float64 `json:"max,omitempty"`
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Min *float64 `json:"min,omitempty"`
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Average *float64 `json:"average,omitempty"`
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Sum *float64 `json:"sum,omitempty"`
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Variance *float64 `json:"variance,omitempty"`
	// 指标采集时间。
	Timestamp int64 `json:"timestamp"`
	// 指标单位
	Unit *string `json:"unit,omitempty"`
}

func (Datapoint) String

func (o Datapoint) String() string

type DatapointForBatchMetric

type DatapointForBatchMetric struct {
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Max *float64 `json:"max,omitempty"`
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Min *float64 `json:"min,omitempty"`
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Average *float64 `json:"average,omitempty"`
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Sum *float64 `json:"sum,omitempty"`
	// 指标值,该字段名称与请求参数中filter使用的查询值相同;字段名称可为:max/min/average/sum/variance。
	Variance *string `json:"variance,omitempty"`
	// 指标采集时间,UNIX时间戳,单位毫秒。
	Timestamp int64 `json:"timestamp"`
}

func (DatapointForBatchMetric) String

func (o DatapointForBatchMetric) String() string

type DeleteAlarmRequest

type DeleteAlarmRequest struct {
	AlarmId string `json:"alarm_id"`
}

Request Object

func (DeleteAlarmRequest) String

func (o DeleteAlarmRequest) String() string

type DeleteAlarmResponse

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

Response Object

func (DeleteAlarmResponse) String

func (o DeleteAlarmResponse) String() string

type DeleteAlarmTemplateRequest

type DeleteAlarmTemplateRequest struct {
	ContentType string `json:"Content-Type"`
	TemplateId  string `json:"template_id"`
}

Request Object

func (DeleteAlarmTemplateRequest) String

type DeleteAlarmTemplateResponse

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

Response Object

func (DeleteAlarmTemplateResponse) String

type DeleteResourceGroupRequest

type DeleteResourceGroupRequest struct {
	ContentType string `json:"Content-Type"`
	GroupId     string `json:"group_id"`
}

Request Object

func (DeleteResourceGroupRequest) String

type DeleteResourceGroupResponse

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

Response Object

func (DeleteResourceGroupResponse) String

type EventDataInfo

type EventDataInfo struct {
	// 事件类型,例如instance_host_info。
	Type string `json:"type"`
	// 事件上报时间。
	Timestamp int64 `json:"timestamp"`
	// 主机配置信息。
	Value string `json:"value"`
}

func (EventDataInfo) String

func (o EventDataInfo) String() string

type EventInfo

type EventInfo struct {
	// 事件名称。
	EventName *string `json:"event_name,omitempty"`
	// 事件类型。
	EventType *string `json:"event_type,omitempty"`
	// 选择查询的时间范围内,此事件发生的数量。
	EventCount *string `json:"event_count,omitempty"`
	// 此事件最近一次发生的时间。
	LatestOccurTime *string `json:"latest_occur_time,omitempty"`
	// 事件来源,如果是系统事件则值为各服务的命名空间,各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”;如果是自定义事件,则为用户自定义上报定义。
	LatestEventSource *string `json:"latest_event_source,omitempty"`
}

一条事件监控信息

func (EventInfo) String

func (o EventInfo) String() string

type EventInfoDetail

type EventInfoDetail struct {
	// 事件名称。  必须以字母开头,只能包含0-9/a-z/A-Z/_,长度最短为1,最大为64。
	EventName string `json:"event_name"`
	// 事件来源。 格式为service.item;service和item必须是字符串,必须以字母开头,只能包含0-9/a-z/A-Z/_,总长度最短为3,最大为32。
	EventSource *string `json:"event_source,omitempty"`
	// 事件发生时间。UNIX时间戳,单位毫秒。  说明: 因为客户端到服务器端有延时,因此插入数据的时间戳应该在[当前时间-1小时+20秒,当前时间+10分钟-20秒]区间内,保证到达服务器时不会因为传输时延造成数据不能插入数据库。
	Time   int64            `json:"time"`
	Detail *EventItemDetail `json:"detail"`
	// 事件ID。
	EventId *string `json:"event_id,omitempty"`
}

一条事件监控详细信息

func (EventInfoDetail) String

func (o EventInfoDetail) String() string

type EventItem

type EventItem struct {
	// 事件名称。  必须以字母开头,只能包含0-9/a-z/A-Z/_,长度最短为1,最大为64。
	EventName string `json:"event_name"`
	// 事件来源。 格式为service.item;service和item必须是字符串,必须以字母开头,只能包含0-9/a-z/A-Z/_,总长度最短为3,最大为32。
	EventSource *string `json:"event_source,omitempty"`
	// 事件发生时间。UNIX时间戳,单位毫秒。  说明: 因为客户端到服务器端有延时,因此插入数据的时间戳应该在[当前时间-1小时+20秒,当前时间+10分钟-20秒]区间内,保证到达服务器时不会因为传输时延造成数据不能插入数据库。
	Time   int64            `json:"time"`
	Detail *EventItemDetail `json:"detail"`
}

请求参数。

func (EventItem) String

func (o EventItem) String() string

type EventItemDetail

type EventItemDetail struct {
	// 事件内容,最大长度4096。
	Content *string `json:"content,omitempty"`
	// 所属分组。  资源分组对应的ID,必须传存在的分组ID。
	GroupId *string `json:"group_id,omitempty"`
	// 资源ID,支持字母、数字_ -:,最大长度128。
	ResourceId *string `json:"resource_id,omitempty"`
	// 资源名称,支持字母 中文 数字_ -. ,最大长度128。
	ResourceName *string `json:"resource_name,omitempty"`
	// 事件状态。  枚举类型:normal\\warning\\incident
	EventState *EventItemDetailEventState `json:"event_state,omitempty"`
	// 事件级别。  枚举类型:Critical, Major, Minor, Info
	EventLevel *EventItemDetailEventLevel `json:"event_level,omitempty"`
	// 事件用户。  支持字母 数字_ -/空格 ,最大长度64。
	EventUser *string `json:"event_user,omitempty"`
}

func (EventItemDetail) String

func (o EventItemDetail) String() string

type EventItemDetailEventLevel

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

func (EventItemDetailEventLevel) MarshalJSON

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

func (*EventItemDetailEventLevel) UnmarshalJSON

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

type EventItemDetailEventLevelEnum

type EventItemDetailEventLevelEnum struct {
	CRITICAL EventItemDetailEventLevel
	MAJOR    EventItemDetailEventLevel
	MINOR    EventItemDetailEventLevel
	INFO     EventItemDetailEventLevel
}

func GetEventItemDetailEventLevelEnum

func GetEventItemDetailEventLevelEnum() EventItemDetailEventLevelEnum

type EventItemDetailEventState

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

func (EventItemDetailEventState) MarshalJSON

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

func (*EventItemDetailEventState) UnmarshalJSON

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

type EventItemDetailEventStateEnum

type EventItemDetailEventStateEnum struct {
	NORMAL   EventItemDetailEventState
	WARNING  EventItemDetailEventState
	INCIDENT EventItemDetailEventState
}

func GetEventItemDetailEventStateEnum

func GetEventItemDetailEventStateEnum() EventItemDetailEventStateEnum

type InstanceStatistics

type InstanceStatistics struct {
	// 该资源分组中当前处在告警状态的资源个数。
	Unhealth *int32 `json:"unhealth,omitempty"`
	// 该资源分组中资源的总个数。
	Total *int32 `json:"total,omitempty"`
	// 该资源分组中选择的资源类型个数,如资源分组添加了弹性云服务、弹性公网IP和带宽则值为2。
	TypeStatistics *string `json:"type_statistics,omitempty"`
}

资源分组中的资源信息统计。

func (InstanceStatistics) String

func (o InstanceStatistics) String() string

type ListAlarmHistoriesRequest

type ListAlarmHistoriesRequest struct {
	ContentType string  `json:"Content-Type"`
	GroupId     *string `json:"group_id,omitempty"`
	AlarmId     *string `json:"alarm_id,omitempty"`
	AlarmName   *string `json:"alarm_name,omitempty"`
	AlarmStatus *string `json:"alarm_status,omitempty"`
	AlarmLevel  *string `json:"alarm_level,omitempty"`
	Namespace   *string `json:"namespace,omitempty"`
	From        *string `json:"from,omitempty"`
	To          *string `json:"to,omitempty"`
	Start       *string `json:"start,omitempty"`
	Limit       *string `json:"limit,omitempty"`
}

Request Object

func (ListAlarmHistoriesRequest) String

func (o ListAlarmHistoriesRequest) String() string

type ListAlarmHistoriesResponse

type ListAlarmHistoriesResponse struct {
	// 一条或者多条告警历史详细信息
	AlarmHistories *[]AlarmHistoryInfo      `json:"alarm_histories,omitempty"`
	MetaData       *MetaDataForAlarmHistory `json:"meta_data,omitempty"`
	HttpStatusCode int                      `json:"-"`
}

Response Object

func (ListAlarmHistoriesResponse) String

type ListAlarmTemplatesRequest

type ListAlarmTemplatesRequest struct {
	ContentType     string  `json:"Content-Type"`
	AlarmTemplateId *string `json:"alarmTemplateId,omitempty"`
	Namespace       *string `json:"namespace,omitempty"`
	Dname           *string `json:"dname,omitempty"`
	Start           *string `json:"start,omitempty"`
	Limit           *string `json:"limit,omitempty"`
}

Request Object

func (ListAlarmTemplatesRequest) String

func (o ListAlarmTemplatesRequest) String() string

type ListAlarmTemplatesResponse

type ListAlarmTemplatesResponse struct {
	// 自定义告警模板详细信息。
	AlarmTemplates *[]AlarmTemplate `json:"alarm_templates,omitempty"`
	MetaData       *MetaData        `json:"meta_data,omitempty"`
	HttpStatusCode int              `json:"-"`
}

Response Object

func (ListAlarmTemplatesResponse) String

type ListAlarmsRequest

type ListAlarmsRequest struct {
	ContentType string  `json:"Content-Type"`
	Limit       *int32  `json:"limit,omitempty"`
	Order       *string `json:"order,omitempty"`
	Start       *string `json:"start,omitempty"`
}

Request Object

func (ListAlarmsRequest) String

func (o ListAlarmsRequest) String() string

type ListAlarmsResponse

type ListAlarmsResponse struct {
	// 告警对象列表。
	MetricAlarms   *[]MetricAlarms `json:"metric_alarms,omitempty"`
	MetaData       *MetaData       `json:"meta_data,omitempty"`
	HttpStatusCode int             `json:"-"`
}

Response Object

func (ListAlarmsResponse) String

func (o ListAlarmsResponse) String() string

type ListEventDetailRequest

type ListEventDetailRequest struct {
	ContentType string                          `json:"Content-Type"`
	EventName   string                          `json:"event_name"`
	EventType   ListEventDetailRequestEventType `json:"event_type"`
	EventSource *string                         `json:"event_source,omitempty"`
	EventLevel  *string                         `json:"event_level,omitempty"`
	EventUser   *string                         `json:"event_user,omitempty"`
	EventState  *string                         `json:"event_state,omitempty"`
	From        *int64                          `json:"from,omitempty"`
	To          *int64                          `json:"to,omitempty"`
	Start       *int32                          `json:"start,omitempty"`
	Limit       *int32                          `json:"limit,omitempty"`
}

Request Object

func (ListEventDetailRequest) String

func (o ListEventDetailRequest) String() string

type ListEventDetailRequestEventType

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

func (ListEventDetailRequestEventType) MarshalJSON

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

func (*ListEventDetailRequestEventType) UnmarshalJSON

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

type ListEventDetailRequestEventTypeEnum

type ListEventDetailRequestEventTypeEnum struct {
	EVENT_SYS    ListEventDetailRequestEventType
	EVENT_CUSTOM ListEventDetailRequestEventType
}

func GetListEventDetailRequestEventTypeEnum

func GetListEventDetailRequestEventTypeEnum() ListEventDetailRequestEventTypeEnum

type ListEventDetailResponse

type ListEventDetailResponse struct {
	// 事件名称,值为系统产生的事件名称,或用户自定义上报的事件名称。
	EventName *string `json:"event_name,omitempty"`
	// 事件类型,值为EVENT.SYS或EVENT.CUSTOM,EVENT.SYS表示系统事件,EVENT.CUSTOM表示自定义事件。
	EventType *ListEventDetailResponseEventType `json:"event_type,omitempty"`
	// 上报事件时用户的名称,也可能为projectID。
	EventUsers *string `json:"event_users,omitempty"`
	// 事件来源,如果是系统事件则值为各服务的命名空间,各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”;如果是自定义事件,则为用户自定义上报定义。
	EventSources *string `json:"event_sources,omitempty"`
	// 一条或者多条事件详细信息。
	EventInfo      *[]EventInfoDetail `json:"event_info,omitempty"`
	MetaData       *TotalMetaData     `json:"meta_data,omitempty"`
	HttpStatusCode int                `json:"-"`
}

Response Object

func (ListEventDetailResponse) String

func (o ListEventDetailResponse) String() string

type ListEventDetailResponseEventType

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

func (ListEventDetailResponseEventType) MarshalJSON

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

func (*ListEventDetailResponseEventType) UnmarshalJSON

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

type ListEventDetailResponseEventTypeEnum

type ListEventDetailResponseEventTypeEnum struct {
	EVENT_SYS    ListEventDetailResponseEventType
	EVENT_CUSTOM ListEventDetailResponseEventType
}

func GetListEventDetailResponseEventTypeEnum

func GetListEventDetailResponseEventTypeEnum() ListEventDetailResponseEventTypeEnum

type ListEventsRequest

type ListEventsRequest struct {
	ContentType string                      `json:"Content-Type"`
	EventType   *ListEventsRequestEventType `json:"event_type,omitempty"`
	EventName   *string                     `json:"event_name,omitempty"`
	From        *int64                      `json:"from,omitempty"`
	To          *int64                      `json:"to,omitempty"`
	Start       *int32                      `json:"start,omitempty"`
	Limit       *int32                      `json:"limit,omitempty"`
}

Request Object

func (ListEventsRequest) String

func (o ListEventsRequest) String() string

type ListEventsRequestEventType

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

func (ListEventsRequestEventType) MarshalJSON

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

func (*ListEventsRequestEventType) UnmarshalJSON

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

type ListEventsRequestEventTypeEnum

type ListEventsRequestEventTypeEnum struct {
	EVENT_SYS    ListEventsRequestEventType
	EVENT_CUSTOM ListEventsRequestEventType
}

func GetListEventsRequestEventTypeEnum

func GetListEventsRequestEventTypeEnum() ListEventsRequestEventTypeEnum

type ListEventsResponse

type ListEventsResponse struct {
	// 一条或者多条事件数据。
	Events         *[]EventInfo   `json:"events,omitempty"`
	MetaData       *TotalMetaData `json:"meta_data,omitempty"`
	HttpStatusCode int            `json:"-"`
}

Response Object

func (ListEventsResponse) String

func (o ListEventsResponse) String() string

type ListMetricsRequest

type ListMetricsRequest struct {
	ContentType string                   `json:"Content-Type"`
	Dim0        *string                  `json:"dim.0,omitempty"`
	Dim1        *string                  `json:"dim.1,omitempty"`
	Dim2        *string                  `json:"dim.2,omitempty"`
	Limit       *int32                   `json:"limit,omitempty"`
	MetricName  *string                  `json:"metric_name,omitempty"`
	Namespace   *string                  `json:"namespace,omitempty"`
	Order       *ListMetricsRequestOrder `json:"order,omitempty"`
	Start       *string                  `json:"start,omitempty"`
}

Request Object

func (ListMetricsRequest) String

func (o ListMetricsRequest) String() string

type ListMetricsRequestOrder

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

func (ListMetricsRequestOrder) MarshalJSON

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

func (*ListMetricsRequestOrder) UnmarshalJSON

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

type ListMetricsRequestOrderEnum

type ListMetricsRequestOrderEnum struct {
	ASC  ListMetricsRequestOrder
	DESC ListMetricsRequestOrder
}

func GetListMetricsRequestOrderEnum

func GetListMetricsRequestOrderEnum() ListMetricsRequestOrderEnum

type ListMetricsResponse

type ListMetricsResponse struct {
	// 指标信息列表
	Metrics        *[]MetricInfoList `json:"metrics,omitempty"`
	MetaData       *MetaData         `json:"meta_data,omitempty"`
	HttpStatusCode int               `json:"-"`
}

Response Object

func (ListMetricsResponse) String

func (o ListMetricsResponse) String() string

type ListResourceGroupRequest

type ListResourceGroupRequest struct {
	ContentType string  `json:"Content-Type"`
	GroupName   *string `json:"group_name,omitempty"`
	GroupId     *string `json:"group_id,omitempty"`
	Status      *string `json:"status,omitempty"`
	Start       *int32  `json:"start,omitempty"`
	Limit       *int32  `json:"limit,omitempty"`
}

Request Object

func (ListResourceGroupRequest) String

func (o ListResourceGroupRequest) String() string

type ListResourceGroupResponse

type ListResourceGroupResponse struct {
	// 一个或者多个资源分组信息。
	ResourceGroups *[]ResourceGroupInfo `json:"resource_groups,omitempty"`
	MetaData       *TotalMetaData       `json:"meta_data,omitempty"`
	HttpStatusCode int                  `json:"-"`
}

Response Object

func (ListResourceGroupResponse) String

func (o ListResourceGroupResponse) String() string

type MetaData

type MetaData struct {
	// 当前返回结果条数。
	Count int32 `json:"count"`
	// 总条数。
	Total int32 `json:"total"`
	// 下一个开始的标记,用于分页。
	Marker string `json:"marker"`
}

查询结果元数据信息,包括分页信息等。

func (MetaData) String

func (o MetaData) String() string

type MetaDataForAlarmHistory

type MetaDataForAlarmHistory struct {
	// 查询告警历史返回的总条数。
	Total int32 `json:"total"`
}

查询告警历史返回的总条数。

func (MetaDataForAlarmHistory) String

func (o MetaDataForAlarmHistory) String() string

type MetricAlarms

type MetricAlarms struct {
	// 告警名称。
	AlarmName string `json:"alarm_name"`
	// 告警描述。
	AlarmDescription *string             `json:"alarm_description,omitempty"`
	Metric           *MetricInfoForAlarm `json:"metric"`
	Condition        *Condition          `json:"condition"`
	// 是否启用该条告警。
	AlarmEnabled *bool `json:"alarm_enabled,omitempty"`
	// 告警级别,默认为2,级别为1、2、3、4。分别对应紧急、重要、次要、提示。
	AlarmLevel *int32 `json:"alarm_level,omitempty"`
	// 告警类型。 仅针对事件告警的参数,枚举类型:EVENT.SYS或者EVENT.CUSTOM
	AlarmType *MetricAlarmsAlarmType `json:"alarm_type,omitempty"`
	// 是否启用该条告警触发的动作。
	AlarmActionEnabled *bool `json:"alarm_action_enabled,omitempty"`
	// 告警触发的动作。  结构如下:  {  \"type\": \"notification\", \"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  }  type取值: notification:通知。 autoscaling:弹性伸缩。 notificationList:告警状态发生变化时,被通知对象的列表。
	AlarmActions *[]AlarmActions `json:"alarm_actions,omitempty"`
	// 告警恢复触发的动作。  结构如下:  {  \"type\": \"notification\", \"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  } type取值:  notification:通知。  notificationList:告警状态发生变化时,被通知对象的列表。
	OkActions *[]AlarmActions `json:"ok_actions,omitempty"`
	// 数据不足触发的动作。  结构如下:  {  \"type\": \"notification\", \"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"]  }  type取值: 数据不足触发告警通知类型,取值为notification。 notificationList:数据不足触发告警通知时,被通知对象的ID列表。
	InsufficientdataActions *[]AlarmActions `json:"insufficientdata_actions,omitempty"`
	// 告警规则生效的开始时间,告警规则仅在生效时间内发送通知消息。例如alarm_action_begin_time为8:00,alarm_action_end_time为20:00时,则对应的告警规则仅在08:00-20:00发送通知消息。
	AlarmActionBeginTime *string `json:"alarm_action_begin_time,omitempty"`
	// 告警规则生效的结束时间,告警规则仅在生效时间内发送通知消息。例如alarm_action_begin_time为8:00,alarm_action_end_time为20:00时,则对应的告警规则仅在08:00-20:00发送通知消息。
	AlarmActionEndTime *string `json:"alarm_action_end_time,omitempty"`
	// 告警规则的ID。
	AlarmId string `json:"alarm_id"`
	// 告警状态变更的时间,UNIX时间戳,单位毫秒。
	UpdateTime int64 `json:"update_time"`
	// 告警状态,取值说明:  ok,正常 alarm,告警 insufficient_data,数据不足
	AlarmState string `json:"alarm_state"`
	// 企业项目ID。 取值为all_granted_eps时,表示所有企业项目; 取值为0时,表示默认的企业项目default。
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`
}

func (MetricAlarms) String

func (o MetricAlarms) String() string

type MetricAlarmsAlarmType

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

func (MetricAlarmsAlarmType) MarshalJSON

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

func (*MetricAlarmsAlarmType) UnmarshalJSON

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

type MetricAlarmsAlarmTypeEnum

type MetricAlarmsAlarmTypeEnum struct {
	EVENT_SYS    MetricAlarmsAlarmType
	EVENT_CUSTOM MetricAlarmsAlarmType
}

func GetMetricAlarmsAlarmTypeEnum

func GetMetricAlarmsAlarmTypeEnum() MetricAlarmsAlarmTypeEnum

type MetricDataItem

type MetricDataItem struct {
	Metric *MetricInfo `json:"metric"`
	// 数据的有效期,超出该有效期则自动删除该数据,单位秒,最大值604800。
	Ttl int32 `json:"ttl"`
	// 数据收集时间  UNIX时间戳,单位毫秒。  说明: 因为客户端到服务器端有延时,因此插入数据的时间戳应该在[当前时间-3天+20秒,当前时间+10分钟-20秒]区间内,保证到达服务器时不会因为传输时延造成数据不能插入数据库。
	CollectTime int64 `json:"collect_time"`
	// 指标数据的值。
	Value float64 `json:"value"`
	// 数据的单位。
	Unit *string `json:"unit,omitempty"`
	// 数据的类型,只能是\"int\"或\"float\"
	Type *string `json:"type,omitempty"`
}

添加一条或多条自定义指标监控数据,请求参数。

func (MetricDataItem) String

func (o MetricDataItem) String() string

type MetricInfo

type MetricInfo struct {
	// 服务指标命名空间,格式为service.item;service和item必须是字符串,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符总长度最短为3,最大为32。说明: 当alarm_type为(EVENT.SYS| EVENT.CUSTOM)时允许为空;如:弹性云服务器的命名空间为SYS.ECS,文档数据库的命名空间为SYS.DDS,各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace string `json:"namespace"`
	// 资源的监控指标名称,必须以字母开头,只能包含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"`
	// 指标维度,目前最大可添加4个维度。
	Dimensions []MetricsDimension `json:"dimensions"`
}

指标信息

func (MetricInfo) String

func (o MetricInfo) String() string

type MetricInfoForAlarm

type MetricInfoForAlarm struct {
	// 服务指标命名空间,格式为service.item;service和item必须是字符串,必须以字母开头,只能包含0-9/a-z/A-Z/_,字符总长度最短为3,最大为32。说明: 当alarm_type为(EVENT.SYS| EVENT.CUSTOM)时允许为空;如:弹性云服务器的命名空间为SYS.ECS,文档数据库的命名空间为SYS.DDS,各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace string `json:"namespace"`
	// 资源的监控指标名称,必须以字母开头,只能包含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"`
	// 指标维度,目前最大可添加4个维度。
	Dimensions []MetricsDimension `json:"dimensions"`
	// 创建告警规则时选择的资源分组ID,如:rg1603786526428bWbVmk4rP
	ResourceGroupId *string `json:"resource_group_id,omitempty"`
	// 创建告警规则时选择的资源分组名称,如:Resource-Group-ECS-01
	ResourceGroupName *string `json:"resource_group_name,omitempty"`
}

创建规则中的监控指标信息

func (MetricInfoForAlarm) String

func (o MetricInfoForAlarm) String() string

type MetricInfoList

type MetricInfoList struct {
	// 指标维度
	Dimensions []MetricsDimension `json:"dimensions"`
	// 指标名称,必须以字母开头,只能包含0-9/a-z/A-Z/_,长度最短为1,最大为64;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	MetricName string `json:"metric_name"`
	// 指标命名空间,例如弹性云服务器命名空间SYS.ECS;格式为service.item;service和item必须是字符串,必须以字母开头,只能包含0-9/a-z/A-Z/_,总长度最短为3,最大为32。说明: 当alarm_type为(EVENT.SYS| EVENT.CUSTOM)时允许为空;各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace string `json:"namespace"`
	// 指标单位。
	Unit string `json:"unit"`
}

指标信息

func (MetricInfoList) String

func (o MetricInfoList) String() string

type MetricsDimension

type MetricsDimension struct {
	// 资源维度,如:弹性云服务器,则维度为instance_id;目前最大支持4个维度,各服务资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Name *string `json:"name,omitempty"`
	// 资源维度值,为资源的实例ID,如:4270ff17-aba3-4138-89fa-820594c39755。
	Value *string `json:"value,omitempty"`
}

指标维度

func (MetricsDimension) String

func (o MetricsDimension) String() string

type ModifyAlarmActionReq

type ModifyAlarmActionReq struct {
	// 告警是否启用。true:启动。false:停止
	AlarmEnabled bool `json:"alarm_enabled"`
}

func (ModifyAlarmActionReq) String

func (o ModifyAlarmActionReq) String() string

type Quotas

type Quotas struct {
	// 资源配额列表。
	Resources []Resource `json:"resources"`
}

func (Quotas) String

func (o Quotas) String() string

type Resource

type Resource struct {
	// 配额类型。  枚举值说明:  alarm,告警规则
	Type string `json:"type"`
	// 已使用配额数。
	Used int32 `json:"used"`
	// 单位。
	Unit string `json:"unit"`
	// 配额总数。
	Quota int32 `json:"quota"`
}

func (Resource) String

func (o Resource) String() string

type ResourceGroup

type ResourceGroup struct {
	// 资源类型。即命名空间,如弹性云服务器的资源命名空间为:SYS.ECS;各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace *string `json:"namespace,omitempty"`
	// 一个或者多个资源维度。
	Dimensions *[]MetricsDimension `json:"dimensions,omitempty"`
	// 资源分组中该资源的当前状态,值可为health、unhealth、no_alarm_rule;health表示健康,unhealth表示不健康,no_alarm_rule表示未设置告警规则。
	Status *string `json:"status,omitempty"`
}

资源分组中的资源信息

func (ResourceGroup) String

func (o ResourceGroup) String() string

type ResourceGroupInfo

type ResourceGroupInfo struct {
	// 资源分组的名称,如:ResourceGroup-Test01。
	GroupName *string `json:"group_name,omitempty"`
	// 资源分组的ID,如:rg1603786526428bWbVmk4rP。
	GroupId *string `json:"group_id,omitempty"`
	// 资源分组的创建时间,UNIX时间戳,单位毫秒;如:1603819753000。
	CreateTime         *int64              `json:"create_time,omitempty"`
	InstanceStatistics *InstanceStatistics `json:"instance_statistics,omitempty"`
	// 资源分组的当前状态,值可为health、unhealth、no_alarm_rule;health表示健康,unhealth表示不健康,no_alarm_rule表示未设置告警规则。
	Status *string `json:"status,omitempty"`
	// 创建资源分组时关联的企业项目,默认值为0,表示企业项目为default。
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`
}

资源分组信息

func (ResourceGroupInfo) String

func (o ResourceGroupInfo) String() string

type ShowAlarmRequest

type ShowAlarmRequest struct {
	ContentType string `json:"Content-Type"`
	AlarmId     string `json:"alarm_id"`
}

Request Object

func (ShowAlarmRequest) String

func (o ShowAlarmRequest) String() string

type ShowAlarmResponse

type ShowAlarmResponse struct {
	// 告警对象列表。
	MetricAlarms   *[]MetricAlarms `json:"metric_alarms,omitempty"`
	HttpStatusCode int             `json:"-"`
}

Response Object

func (ShowAlarmResponse) String

func (o ShowAlarmResponse) String() string

type ShowEventDataRequest

type ShowEventDataRequest struct {
	ContentType string  `json:"Content-Type"`
	Namespace   string  `json:"namespace"`
	Dim0        string  `json:"dim.0"`
	Dim1        *string `json:"dim.1,omitempty"`
	Dim2        *string `json:"dim.2,omitempty"`
	Dim3        *string `json:"dim.3,omitempty"`
	Type        string  `json:"type"`
	From        int64   `json:"from"`
	To          int64   `json:"to"`
}

Request Object

func (ShowEventDataRequest) String

func (o ShowEventDataRequest) String() string

type ShowEventDataResponse

type ShowEventDataResponse struct {
	// 配置信息列表。如果不存在对应的配置信息,则datapoints为空数组[]。
	Datapoints     *[]EventDataInfo `json:"datapoints,omitempty"`
	HttpStatusCode int              `json:"-"`
}

Response Object

func (ShowEventDataResponse) String

func (o ShowEventDataResponse) String() string

type ShowMetricDataRequest

type ShowMetricDataRequest struct {
	ContentType string                      `json:"Content-Type"`
	Namespace   string                      `json:"namespace"`
	MetricName  string                      `json:"metric_name"`
	Dim0        string                      `json:"dim.0"`
	Dim1        *string                     `json:"dim.1,omitempty"`
	Dim2        *string                     `json:"dim.2,omitempty"`
	Dim3        *string                     `json:"dim.3,omitempty"`
	Filter      ShowMetricDataRequestFilter `json:"filter"`
	Period      int32                       `json:"period"`
	From        int64                       `json:"from"`
	To          int64                       `json:"to"`
}

Request Object

func (ShowMetricDataRequest) String

func (o ShowMetricDataRequest) String() string

type ShowMetricDataRequestFilter

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

func (ShowMetricDataRequestFilter) MarshalJSON

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

func (*ShowMetricDataRequestFilter) UnmarshalJSON

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

type ShowMetricDataResponse

type ShowMetricDataResponse struct {
	// 指标数据列表。由于查询数据时,云监控会根据所选择的聚合粒度向前取整from参数,所以datapoints中包含的数据点有可能会多于预期。
	Datapoints *[]Datapoint `json:"datapoints,omitempty"`
	// 指标名称,例如弹性云服务器监控指标中的cpu_util。
	MetricName     *string `json:"metric_name,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowMetricDataResponse) String

func (o ShowMetricDataResponse) String() string

type ShowQuotasRequest

type ShowQuotasRequest struct {
	ContentType string `json:"Content-Type"`
}

Request Object

func (ShowQuotasRequest) String

func (o ShowQuotasRequest) String() string

type ShowQuotasResponse

type ShowQuotasResponse struct {
	Quotas         *Quotas `json:"quotas,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowQuotasResponse) String

func (o ShowQuotasResponse) String() string

type ShowResourceGroupRequest

type ShowResourceGroupRequest struct {
	ContentType string  `json:"Content-Type"`
	GroupId     string  `json:"group_id"`
	Status      *string `json:"status,omitempty"`
	Namespace   *string `json:"namespace,omitempty"`
	Dname       *string `json:"dname,omitempty"`
	Start       *string `json:"start,omitempty"`
	Limit       *string `json:"limit,omitempty"`
}

Request Object

func (ShowResourceGroupRequest) String

func (o ShowResourceGroupRequest) String() string

type ShowResourceGroupResponse

type ShowResourceGroupResponse struct {
	// 资源分组的名称,如:Resource-Group-ECS-01。
	GroupName *string `json:"group_name,omitempty"`
	// 资源分组的ID,如:rg1603786526428bWbVmk4rP。
	GroupId *string `json:"group_id,omitempty"`
	// 一组或者多个资源信息。
	Resources *[]ResourceGroup `json:"resources,omitempty"`
	// 资源分组的当前状态,值可为health、unhealth、no_alarm_rule;health表示健康,unhealth表示不健康,no_alarm_rule表示未设置告警规则。
	Status *string `json:"status,omitempty"`
	// 资源分组的创建时间,UNIX时间戳,单位毫秒;如:1603819753000。
	CreateTime *int64    `json:"create_time,omitempty"`
	MetaData   *MetaData `json:"meta_data,omitempty"`
	// 创建资源分组时关联的企业项目,默认值为0,表示企业项目为default。
	EnterpriseProjectId *string `json:"enterprise_project_id,omitempty"`
	HttpStatusCode      int     `json:"-"`
}

Response Object

func (ShowResourceGroupResponse) String

func (o ShowResourceGroupResponse) String() string

type TemplateItem

type TemplateItem struct {
	// 告警模板添加的监控指标,如弹性云服务器可添加的监控指标为cpu_util等;各服务的指标名称可查看:“[服务指标名称](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	MetricName string                  `json:"metric_name"`
	Condition  *AlarmTemplateCondition `json:"condition"`
	// 设置告警级别,值为1,2,3,4;1为紧急,2为重要,3为次要,4为提示。
	AlarmLevel *int32 `json:"alarm_level,omitempty"`
}

创建自定义告警模板添加的告警规则。

func (TemplateItem) String

func (o TemplateItem) String() string

type TotalMetaData

type TotalMetaData struct {
	// 总条数。
	Total *int32 `json:"total,omitempty"`
}

查询结果元数据统计个数。

func (TotalMetaData) String

func (o TotalMetaData) String() string

type UpdateAlarmActionRequest

type UpdateAlarmActionRequest struct {
	ContentType string                `json:"Content-Type"`
	AlarmId     string                `json:"alarm_id"`
	Body        *ModifyAlarmActionReq `json:"body,omitempty"`
}

Request Object

func (UpdateAlarmActionRequest) String

func (o UpdateAlarmActionRequest) String() string

type UpdateAlarmActionResponse

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

Response Object

func (UpdateAlarmActionResponse) String

func (o UpdateAlarmActionResponse) String() string

type UpdateAlarmRequest

type UpdateAlarmRequest struct {
	ContentType string                  `json:"Content-Type"`
	AlarmId     string                  `json:"alarm_id"`
	Body        *UpdateAlarmRequestBody `json:"body,omitempty"`
}

Request Object

func (UpdateAlarmRequest) String

func (o UpdateAlarmRequest) String() string

type UpdateAlarmRequestBody

type UpdateAlarmRequestBody struct {
	// 告警名称,只能包含0-9/a-z/A-Z/_/-或汉字。
	AlarmName *string `json:"alarm_name,omitempty"`
	// 告警描述,长度0-256。
	AlarmDescription *string    `json:"alarm_description,omitempty"`
	Condition        *Condition `json:"condition,omitempty"`
	// 是否启用该条告警触发的动作,默认为true。注:若alarm_action_enabled为true,对应的alarm_actions、ok_actions至少有一个不能为空。若alarm_actions、ok_actions同时存在时,notificationList值保持一致。
	AlarmActionEnabled *bool `json:"alarm_action_enabled,omitempty"`
	// 告警级别,默认为2,级别为1、2、3、4。分别对应紧急、重要、次要、提示。
	AlarmLevel *int32 `json:"alarm_level,omitempty"`
	// 告警类型,支持的枚举类型:EVENT.SYS:针对系统事件的告警规则;EVENT.CUSTOM:针对自定义事件的告警规则;RESOURCE_GROUP:针对资源分组的告警规则。
	AlarmType *UpdateAlarmRequestBodyAlarmType `json:"alarm_type,omitempty"`
	// 告警触发的动作。 结构样例如下: { \"type\": \"notification\",\"notificationList\": [\"urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd\"] } type取值: notification:通知。 autoscaling:弹性伸缩。
	AlarmActions *[]AlarmActions `json:"alarm_actions,omitempty"`
	// 数据不足触发的动作(该参数已废弃,建议无需配置)。
	InsufficientdataActions *[]AlarmActions `json:"insufficientdata_actions,omitempty"`
	// 告警恢复触发的动作
	OkActions *[]AlarmActions `json:"ok_actions,omitempty"`
}

func (UpdateAlarmRequestBody) String

func (o UpdateAlarmRequestBody) String() string

type UpdateAlarmRequestBodyAlarmType

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

func (UpdateAlarmRequestBodyAlarmType) MarshalJSON

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

func (*UpdateAlarmRequestBodyAlarmType) UnmarshalJSON

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

type UpdateAlarmRequestBodyAlarmTypeEnum

type UpdateAlarmRequestBodyAlarmTypeEnum struct {
	EVENT_SYS      UpdateAlarmRequestBodyAlarmType
	EVENT_CUSTOM   UpdateAlarmRequestBodyAlarmType
	RESOURCE_GROUP UpdateAlarmRequestBodyAlarmType
}

func GetUpdateAlarmRequestBodyAlarmTypeEnum

func GetUpdateAlarmRequestBodyAlarmTypeEnum() UpdateAlarmRequestBodyAlarmTypeEnum

type UpdateAlarmResponse

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

Response Object

func (UpdateAlarmResponse) String

func (o UpdateAlarmResponse) String() string

type UpdateAlarmTemplateRequest

type UpdateAlarmTemplateRequest struct {
	ContentType string                          `json:"Content-Type"`
	TemplateId  string                          `json:"template_id"`
	Body        *UpdateAlarmTemplateRequestBody `json:"body,omitempty"`
}

Request Object

func (UpdateAlarmTemplateRequest) String

type UpdateAlarmTemplateRequestBody

type UpdateAlarmTemplateRequestBody struct {
	// 自定义告警模板名称,只能包含0-9/a-z/A-Z/_/-或汉字,长度为1-128。。
	TemplateName string `json:"template_name"`
	// 自定义告警模板详细描述,长度为0-256。
	TemplateDescription *string `json:"template_description,omitempty"`
	// 创建自定义告警模板选择的资源类型,即服务命名空间,如:选择弹性云服务器,则命名空间为SYS.ECS;各服务的命名空间可查看:“[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	Namespace string `json:"namespace"`
	// 资源类型对应的指标监控维度,选择弹性云服务器,则维度为云服务器,dimension_name值为instance_id;各服务资源的指标维度名称可查看:“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
	DimensionName string `json:"dimension_name"`
	// 创建自定义告警模板添加一个或者多个指标的告警规则;目前最多可增加30组告警规则策略。
	TemplateItems []TemplateItem `json:"template_items"`
}

修改自定义告警模板,请求参数

func (UpdateAlarmTemplateRequestBody) String

type UpdateAlarmTemplateResponse

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

Response Object

func (UpdateAlarmTemplateResponse) String

type UpdateResourceGroupRequest

type UpdateResourceGroupRequest struct {
	ContentType string                          `json:"Content-Type"`
	GroupId     string                          `json:"group_id"`
	Body        *UpdateResourceGroupRequestBody `json:"body,omitempty"`
}

Request Object

func (UpdateResourceGroupRequest) String

type UpdateResourceGroupRequestBody

type UpdateResourceGroupRequestBody struct {
	// 资源分组的名称;长度为1-128,只能包含0-9/a-z/A-Z/_/-或汉字;如:ResourceGroup-Test01。
	GroupName string `json:"group_name"`
	// 更新资源分组选择一个或者多个资源。
	Resources []CreateResourceGroup `json:"resources"`
}

更新资源分组,请求参数。

func (UpdateResourceGroupRequestBody) String

type UpdateResourceGroupResponse

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

Response Object

func (UpdateResourceGroupResponse) String

Source Files

Jump to

Keyboard shortcuts

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