schedulingrule

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package schedulingrule provides the CLI resource handler for Dynatrace scheduling rules.

Index

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

func NewHandler(c *client.Client) *Handler

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) Delete

func (h *Handler) Delete(id string) error

Delete deletes a scheduling rule.

func (*Handler) Get

func (h *Handler) Get(id string) (*SchedulingRule, error)

Get retrieves a specific scheduling rule.

func (*Handler) List

func (h *Handler) List(chunkSize, limit int64) (*SchedulingRuleList, error)

List retrieves scheduling rules. chunkSize controls page size; 0 returns only the first page. limit caps the total number of results; 0 means unlimited.

func (*Handler) Update

func (h *Handler) Update(id string, data []byte) (*SchedulingRule, error)

Update updates an existing 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.

Jump to

Keyboard shortcuts

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