Documentation
¶
Overview ¶
Package schedulingrule provides the CLI resource handler for Dynatrace scheduling rules.
Index ¶
- type Handler
- func (h *Handler) Create(data []byte) (*SchedulingRule, error)
- func (h *Handler) Delete(id string) error
- func (h *Handler) Get(id string) (*SchedulingRule, error)
- func (h *Handler) List(chunkSize, limit int64) (*SchedulingRuleList, error)
- func (h *Handler) Update(id string, data []byte) (*SchedulingRule, error)
- type ModificationInfo
- type SchedulingRule
- type SchedulingRuleList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles scheduling rule resources. It delegates to the SDK handler and adds CLI-specific convenience methods.
func NewHandler ¶
NewHandler creates a new scheduling rule handler.
func (*Handler) Create ¶
func (h *Handler) Create(data []byte) (*SchedulingRule, error)
Create creates a new scheduling rule.
func (*Handler) Get ¶
func (h *Handler) Get(id string) (*SchedulingRule, error)
Get retrieves a specific scheduling rule.
type ModificationInfo ¶
type ModificationInfo struct {
CreatedBy string `json:"createdBy,omitempty" yaml:"createdBy,omitempty"`
CreatedTime string `json:"createdTime,omitempty" yaml:"createdTime,omitempty"`
LastModifiedBy string `json:"lastModifiedBy,omitempty" yaml:"lastModifiedBy,omitempty"`
LastModifiedTime string `json:"lastModifiedTime,omitempty" yaml:"lastModifiedTime,omitempty"`
}
ModificationInfo records who created and last changed a scheduling rule.
type SchedulingRule ¶
type SchedulingRule struct {
ID string `json:"id,omitempty" yaml:"id,omitempty" table:"ID"`
Title string `json:"title" yaml:"title" table:"TITLE"`
RuleType string `json:"ruleType" yaml:"ruleType" table:"TYPE"`
Description string `json:"description,omitempty" yaml:"description,omitempty" table:"DESCRIPTION,wide"`
BusinessCalendar string `json:"businessCalendar,omitempty" yaml:"businessCalendar,omitempty" table:"CALENDAR,wide"`
Version int `json:"version,omitempty" yaml:"version,omitempty" table:"-"`
RRule map[string]interface{} `json:"rrule,omitempty" yaml:"rrule,omitempty" table:"-"`
GroupingRule map[string]interface{} `json:"groupingRule,omitempty" yaml:"groupingRule,omitempty" table:"-"`
FixedOffsetRule map[string]interface{} `json:"fixedOffsetRule,omitempty" yaml:"fixedOffsetRule,omitempty" table:"-"`
RelativeOffsetRule map[string]interface{} `json:"relativeOffsetRule,omitempty" yaml:"relativeOffsetRule,omitempty" table:"-"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty" table:"-"`
ModificationInfo *ModificationInfo `json:"modificationInfo,omitempty" yaml:"modificationInfo,omitempty" table:"-"`
}
SchedulingRule represents a scheduling rule (CLI version with table tags).
func (*SchedulingRule) OwnerID ¶
func (s *SchedulingRule) OwnerID() string
OwnerID returns the user the rule belongs to, for safety-level ownership checks. The API exposes no owner field, so creation is the ownership signal: modificationInfo.createdBy. An empty result yields OwnershipUnknown, which the safety checker already treats as the restrictive case.
type SchedulingRuleList ¶
type SchedulingRuleList struct {
Count int `json:"count"`
Results []SchedulingRule `json:"results"`
}
SchedulingRuleList represents a list of scheduling rules.