Documentation ¶
Index ¶
- type ActionOpts
- type ActionResult
- type AlarmRule
- type BatchResourcesResult
- type CreateOpts
- type CreateResponse
- type CreateResult
- type DeleteOpts
- type DeleteResult
- type DimensionOpts
- type GetResourcesResult
- type GetResult
- type NotificationOpts
- type PoliciesResult
- type PolicyOpts
- type ResourcesInfo
- type UpdatePoliciesOpts
- type UpdateResourcesOpts
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionOpts ¶
type ActionResult ¶
type ActionResult struct {
golangsdk.ErrResult
}
func Action ¶
func Action(c *golangsdk.ServiceClient, id string, opts ActionOpts) (r ActionResult)
type AlarmRule ¶
type AlarmRule struct { AlarmID string `json:"alarm_id"` Name string `json:"name"` Description string `json:"description"` Namespace string `json:"namespace"` Resources []ResourcesInfo `json:"resources"` Policies []PolicyOpts `json:"policies"` Type string `json:"type"` AlarmNotifications []NotificationOpts `json:"alarm_notifications"` OkNotifications []NotificationOpts `json:"ok_notifications"` NotificationBeginTime string `json:"notification_begin_time"` NotificationEndTime string `json:"notification_end_time"` EnterpriseProjectID string `json:"enterprise_project_id"` Enabled bool `json:"enabled"` NotificationEnabled bool `json:"notification_enabled"` AlarmTemplateID string `json:"alarm_template_id"` }
type BatchResourcesResult ¶
type BatchResourcesResult struct {
golangsdk.ErrResult
}
func BatchResources ¶
func BatchResources(c *golangsdk.ServiceClient, id, operation string, opts UpdateResourcesOpts) (r BatchResourcesResult)
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name" required:"true"` Description string `json:"description,omitempty"` Namespace string `json:"namespace" required:"true"` ResourceGroupID string `json:"resource_group_id,omitempty"` Resources [][]DimensionOpts `json:"resources" required:"true"` Policies []PolicyOpts `json:"policies" required:"true"` Type string `json:"type" required:"true"` AlarmNotifications []NotificationOpts `json:"alarm_notifications,omitempty"` OkNotifications []NotificationOpts `json:"ok_notifications,omitempty"` NotificationBeginTime string `json:"notification_begin_time,omitempty"` NotificationEndTime string `json:"notification_end_time,omitempty"` EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` Enabled bool `json:"enabled"` NotificationEnabled bool `json:"notification_enabled"` AlarmTemplateID string `json:"alarm_template_id,omitempty"` }
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 CreateOpts) (r CreateResult)
func (CreateResult) Extract ¶
func (c CreateResult) Extract() (*CreateResponse, error)
type DeleteOpts ¶
type DeleteOpts struct {
AlarmIDs []string `json:"alarm_ids"`
}
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
func Delete ¶
func Delete(c *golangsdk.ServiceClient, opts DeleteOpts) (r DeleteResult)
type DimensionOpts ¶
type GetResourcesResult ¶
type GetResourcesResult struct {
golangsdk.Result
}
func GetResources ¶
func GetResources(c *golangsdk.ServiceClient, id string) (r GetResourcesResult)
func (GetResourcesResult) Extract ¶
func (g GetResourcesResult) Extract() (*[][]DimensionOpts, error)
type NotificationOpts ¶
type PoliciesResult ¶
type PoliciesResult struct {
golangsdk.ErrResult
}
func PoliciesModify ¶
func PoliciesModify(c *golangsdk.ServiceClient, id string, opts UpdatePoliciesOpts) (r PoliciesResult)
type PolicyOpts ¶
type PolicyOpts struct { MetricName string `json:"metric_name" required:"true"` // The value can be 0 Period int `json:"period"` Filter string `json:"filter" required:"true"` ComparisonOperator string `json:"comparison_operator" required:"true"` // The Value ranges from 0 to MAX_VALUE Value float64 `json:"value"` Unit string `json:"unit,omitempty"` Count int `json:"count" required:"true"` // The value can be 0 SuppressDuration int `json:"suppress_duration"` Level int `json:"level,omitempty"` }
type ResourcesInfo ¶
type ResourcesInfo struct { ResourceGroupID string `json:"resource_group_id"` ResourceGroupName string `json:"resource_group_name"` Dimensions []DimensionOpts `json:"dimensions"` }
type UpdatePoliciesOpts ¶
type UpdatePoliciesOpts struct {
Policies []PolicyOpts `json:"policies" required:"true"`
}
type UpdateResourcesOpts ¶
type UpdateResourcesOpts struct {
Resources [][]DimensionOpts `json:"resources" required:"true"`
}
type UpdateResult ¶
type UpdateResult struct {
golangsdk.ErrResult
}
Click to show internal directories.
Click to hide internal directories.