Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RequestOpts golangsdk.RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
This section is empty.
Types ¶
type AlarmMasking ¶
type AlarmMasking struct { // the ID of a false alarm masking rule Id string `json:"id"` // the policy ID PolicyID string `json:"policy_id"` // a misreported URL excluding a domain name Path string `json:"path"` // the event ID EventID string `json:"event_id"` // the event ID EventType string `json:"event_type"` // the rule ID, which consists of six digits and cannot be empty Rule string `json:"rule"` // the time when a false alarm masking rule is added TimeStamp int `json:"timestamp"` }
type CreateOpts ¶
type CreateOpts struct { Path string `json:"path" required:"true"` EventID string `json:"event_id" required:"true"` }
CreateOpts contains all the values needed to create a new falsealarmmasking rule.
func (CreateOpts) ToAlarmMaskingCreateMap ¶
func (opts CreateOpts) ToAlarmMaskingCreateMap() (map[string]interface{}, error)
ToAlarmMaskingCreateMap builds a create request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation. Call its Extract method to interpret it as a False Alarm Masking rule.
func Create ¶
func Create(c *golangsdk.ServiceClient, policyID string, opts CreateOptsBuilder) (r CreateResult)
Create will create a new falsealarmmasking rule based on the values in CreateOpts.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*AlarmMasking, error)
Extract is a function that accepts a result and extracts a falsealarmmasking rule.
type DeleteResult ¶
DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(c *golangsdk.ServiceClient, policyID, ruleID string) (r DeleteResult)
Delete will permanently delete a particular falsealarmmasking rule based on its unique ID.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func Get ¶
func Get(c *golangsdk.ServiceClient, policyID, ruleID string) (r GetResult)
Get retrieves a particular falsealarmmasking rule based on its unique ID.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*AlarmMasking, error)
Extract is a function that accepts a result and extracts a falsealarmmasking rule.
type ListResponse ¶
type ListResponse struct { // Total number of the Rules Total int `json:"total"` // List of AlarmMasking Items []AlarmMasking `json:"items"` }
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
func List ¶
func List(c *golangsdk.ServiceClient, policyID string) (r ListResult)
List retrieves falsealarmmasking rules.
func (ListResult) Extract ¶
func (r ListResult) Extract() ([]AlarmMasking, error)
type UpdateOpts ¶
type UpdateOpts struct { Path string `json:"path,omitempty"` EventID string `json:"event_id,omitempty"` }
UpdateOpts contains all the values needed to update a falsealarmmasking rule.
func (UpdateOpts) ToAlarmMaskingUpdateMap ¶
func (opts UpdateOpts) ToAlarmMaskingUpdateMap() (map[string]interface{}, error)
ToAlarmMaskingUpdateMap builds a update request body from UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(c *golangsdk.ServiceClient, policyID, ruleID string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and uses the values to update a rule.The response code from api is 200
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*AlarmMasking, error)
Extract is a function that accepts a result and extracts a falsealarmmasking rule.