Documentation ¶
Index ¶
- type ActionInfo
- type ActionOpts
- type AlarmRule
- type ConditionInfo
- type ConditionOpts
- type CreateOpts
- type CreateOptsBuilder
- type CreateResponse
- type CreateResult
- type DeleteResult
- type DimensionInfo
- type DimensionOpts
- type GetResult
- type MetricInfo
- type MetricOpts
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionInfo ¶
type ActionOpts ¶
type AlarmRule ¶
type AlarmRule struct { AlarmName string `json:"alarm_name"` AlarmID string `json:"alarm_id"` AlarmDescription string `json:"alarm_description"` AlarmType string `json:"alarm_type"` AlarmLevel int `json:"alarm_level"` Metric MetricInfo `json:"metric"` Condition ConditionInfo `json:"condition"` AlarmActions []ActionInfo `json:"alarm_actions"` InsufficientdataActions []ActionInfo `json:"insufficientdata_actions"` OkActions []ActionInfo `json:"ok_actions"` AlarmEnabled bool `json:"alarm_enabled"` AlarmActionEnabled bool `json:"alarm_action_enabled"` UpdateTime int64 `json:"update_time"` AlarmState string `json:"alarm_state"` }
type ConditionInfo ¶
type ConditionOpts ¶
type ConditionOpts struct { Period int `json:"period" required:"true"` SuppressDuration int `json:"suppress_duration,omitempty"` Filter string `json:"filter" required:"true"` ComparisonOperator string `json:"comparison_operator" required:"true"` // The Value ranges from 0 to MAX_VALUE Value int `json:"value"` Unit string `json:"unit,omitempty"` Count int `json:"count" required:"true"` }
type CreateOpts ¶
type CreateOpts struct { AlarmName string `json:"alarm_name" required:"true"` AlarmDescription string `json:"alarm_description,omitempty"` AlarmType string `json:"alarm_type,omitempty"` AlarmLevel int `json:"alarm_level,omitempty"` Metric MetricOpts `json:"metric" required:"true"` Condition ConditionOpts `json:"condition" required:"true"` AlarmActions []ActionOpts `json:"alarm_actions,omitempty"` InsufficientdataActions []ActionOpts `json:"insufficientdata_actions,omitempty"` OkActions []ActionOpts `json:"ok_actions,omitempty"` AlarmEnabled bool `json:"alarm_enabled"` AlarmActionEnabled bool `json:"alarm_action_enabled"` }
func (CreateOpts) ToAlarmRuleCreateMap ¶
func (opts CreateOpts) ToAlarmRuleCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResponse ¶
type CreateResponse struct {
AlarmID string `json:"alarm_id"`
}
type CreateResult ¶
type CreateResult struct {
golangsdk.Result
}
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (c CreateResult) Extract() (*CreateResponse, error)
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
func Delete ¶
func Delete(c *golangsdk.ServiceClient, id string) (r DeleteResult)
type DimensionInfo ¶
type DimensionOpts ¶
type MetricInfo ¶
type MetricInfo struct { Namespace string `json:"namespace"` MetricName string `json:"metric_name"` Dimensions []DimensionInfo `json:"dimensions"` }
type MetricOpts ¶
type MetricOpts struct { Namespace string `json:"namespace" required:"true"` MetricName string `json:"metric_name" required:"true"` Dimensions []DimensionOpts `json:"dimensions" required:"true"` }
type UpdateOpts ¶
type UpdateOpts struct {
AlarmEnabled bool `json:"alarm_enabled"`
}
func (UpdateOpts) ToAlarmRuleUpdateMap ¶
func (opts UpdateOpts) ToAlarmRuleUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
type UpdateResult struct {
golangsdk.ErrResult
}
func Update ¶
func Update(c *golangsdk.ServiceClient, id string, opts UpdateOpts) (r UpdateResult)
Click to show internal directories.
Click to hide internal directories.