client

package
v1.98.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRateLimitPerSecond = 2
	DefaultTimeoutSeconds     = 60
	DefaultUserAgent          = "terraform-provider-lightstep"
)
View Source
const InferredServiceRuleType = "inferred_service_rule"

Variables

This section is empty.

Functions

func CustomDataConvert

func CustomDataConvert(customData []interface{}) map[string]map[string]string

Types

type APIClientError

type APIClientError struct {
	Response *http.Response
	Message  string
}

APIClientError contains the HTTP Response(for inspection of the error code) as well as the error message

func (APIClientError) Error

func (a APIClientError) Error() string

func (APIClientError) GetHTTPResponse

func (a APIClientError) GetHTTPResponse() *http.Response

func (APIClientError) GetStatusCode added in v1.70.14

func (a APIClientError) GetStatusCode() int

type APIResponseCarrier

type APIResponseCarrier interface {
	GetHTTPResponse() *http.Response
	GetStatusCode() int
}

type AlertingRule

type AlertingRule struct {
	MessageDestinationID string `json:"message-destination-client-id"`
	UpdateInterval       int    `json:"update-interval-ms"`
}

type AttributeFilter added in v1.81.0

type AttributeFilter struct {
	Key    string   `json:"key"`
	Values []string `json:"values"`
}

type Auth added in v1.79.0

type Auth struct {
	Username string `json:"username"`
	// Password is only set for requests. Will be empty for API responses
	Password string `json:"password"`
}

type BasicTargeting added in v1.95.1

type BasicTargeting struct {
	ScopeFilters []ScopeFilter `json:"scope_filters"`
}

type Cadence added in v1.95.1

type Cadence struct {
	DaysOfWeek string `json:"days_of_week"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string, orgName string, baseUrl string) *Client

NewClient gets a client for the public API

func NewClientWithUserAgent added in v1.51.2

func NewClientWithUserAgent(apiKey string, orgName string, baseUrl string, userAgent string) *Client

func (*Client) CallAPI

func (c *Client) CallAPI(ctx context.Context, httpMethod string, suffix string, data interface{}, result interface{}) error

CallAPI calls the given API and unmarshals the result to into result.

func (*Client) CreateAlertingRule

func (c *Client) CreateAlertingRule(
	ctx context.Context,
	projectName string,
	updateIntervalMs int,
	destinationID string,
	conditionID string) (StreamAlertingRuleResponse, error)

func (*Client) CreateDashboard

func (c *Client) CreateDashboard(
	ctx context.Context,
	projectName string,
	dashboardName string,
	streams []Stream,
) (Dashboard, error)

func (*Client) CreateDestination

func (c *Client) CreateDestination(
	ctx context.Context,
	project string,
	destination Destination) (Destination, error)

func (*Client) CreateEventQuery added in v1.91.1

func (c *Client) CreateEventQuery(ctx context.Context, projectName string, attributes EventQueryAttributes) (*EventQueryAttributes, error)

func (*Client) CreateInferredServiceRule added in v1.81.0

func (c *Client) CreateInferredServiceRule(
	ctx context.Context,
	projectName string,
	requestAttributes InferredServiceRuleRequestAttributes,
) (InferredServiceRuleResponse, error)

func (*Client) CreateSnoozeRule added in v1.95.1

func (c *Client) CreateSnoozeRule(
	ctx context.Context,
	projectName string,
	snoozeRule SnoozeRule) (SnoozeRuleWithID, error)

func (*Client) CreateStream

func (c *Client) CreateStream(
	ctx context.Context,
	projectName string,
	name string,
	query string,
	customData []interface{},
) (Stream, error)

func (*Client) CreateStreamCondition

func (c *Client) CreateStreamCondition(
	ctx context.Context,
	projectName string,
	conditionName string,
	expression string,
	evaluationWindowMS int,
	streamID string) (StreamCondition, error)

func (*Client) CreateUnifiedCondition added in v1.71.0

func (c *Client) CreateUnifiedCondition(
	ctx context.Context,
	projectName string,
	condition UnifiedCondition) (UnifiedCondition, error)

func (*Client) CreateUnifiedDashboard added in v1.70.4

func (c *Client) CreateUnifiedDashboard(
	ctx context.Context,
	projectName string,
	dashboard UnifiedDashboard) (UnifiedDashboard, error)

func (*Client) DeleteAlertingRule

func (c *Client) DeleteAlertingRule(ctx context.Context, projectName string, alertingRuleID string) error

func (*Client) DeleteDashboard

func (c *Client) DeleteDashboard(ctx context.Context, projectName string, dashboardID string) error

func (*Client) DeleteDestination

func (c *Client) DeleteDestination(ctx context.Context, project string, destinationID string) error

func (*Client) DeleteEventQuery added in v1.91.1

func (c *Client) DeleteEventQuery(ctx context.Context, projectName string, eventQueryID string) error

func (*Client) DeleteInferredServiceRule added in v1.81.0

func (c *Client) DeleteInferredServiceRule(
	ctx context.Context,
	projectName string,
	inferredServiceRuleID string,
) error

func (*Client) DeleteSnoozeRule added in v1.95.1

func (c *Client) DeleteSnoozeRule(ctx context.Context, projectName string, conditionID string) error

func (*Client) DeleteStream

func (c *Client) DeleteStream(ctx context.Context, projectName string, StreamID string) error

func (*Client) DeleteStreamCondition

func (c *Client) DeleteStreamCondition(ctx context.Context, projectName string, conditionID string) error

func (*Client) DeleteUnifiedCondition added in v1.71.0

func (c *Client) DeleteUnifiedCondition(ctx context.Context, projectName string, conditionID string) error

func (*Client) DeleteUnifiedDashboard added in v1.70.4

func (c *Client) DeleteUnifiedDashboard(ctx context.Context, projectName string, dashboardID string) error

func (*Client) GetAlertingRule

func (c *Client) GetAlertingRule(ctx context.Context, projectName string, alertingRuleID string) (*StreamAlertingRuleResponse, error)

func (*Client) GetDashboard

func (c *Client) GetDashboard(ctx context.Context, projectName string, dashboardID string) (*Dashboard, error)

func (*Client) GetDestination

func (c *Client) GetDestination(ctx context.Context, projectName string, destinationID string) (*Destination, error)

func (*Client) GetEventQuery added in v1.91.1

func (c *Client) GetEventQuery(ctx context.Context, projectName string, eventQueryID string) (*EventQueryAttributes, error)

func (*Client) GetInferredServiceRule added in v1.81.0

func (c *Client) GetInferredServiceRule(
	ctx context.Context,
	project string,
	inferredServiceRuleId string,
) (InferredServiceRuleResponse, error)

func (*Client) GetSnoozeRule added in v1.95.1

func (c *Client) GetSnoozeRule(ctx context.Context, projectName string, conditionID string) (*SnoozeRuleWithID, error)

func (*Client) GetStream

func (c *Client) GetStream(ctx context.Context, projectName string, StreamID string) (*Stream, error)

func (*Client) GetStreamCondition

func (c *Client) GetStreamCondition(ctx context.Context, projectName string, conditionID string) (*StreamCondition, error)
func (c *Client) GetStreamIDByLink(ctx context.Context, url string) (string, error)

func (*Client) GetUnifiedCondition added in v1.71.0

func (c *Client) GetUnifiedCondition(ctx context.Context, projectName string, conditionID string) (*UnifiedCondition, error)

func (*Client) GetUnifiedDashboard added in v1.70.4

func (c *Client) GetUnifiedDashboard(ctx context.Context, projectName string, id string) (*UnifiedDashboard, error)

func (*Client) ListRoleBinding added in v1.80.0

func (c *Client) ListRoleBinding(
	ctx context.Context,
	projectName string,
	roleName string,
) (RoleBinding, error)

func (*Client) ListSAMLGroupMappings added in v1.88.0

func (c *Client) ListSAMLGroupMappings(ctx context.Context) (SAMLGroupMappings, error)

func (*Client) ListStreams

func (c *Client) ListStreams(ctx context.Context, projectName string) ([]Stream, error)

func (*Client) OrgName added in v1.80.0

func (c *Client) OrgName() string

OrgName returns the name of the organization that this client will make request on behalf to.

func (*Client) UpdateDashboard

func (c *Client) UpdateDashboard(
	ctx context.Context,
	projectName string,
	dashboardName string,
	streams []Stream,
	dashboardID string,
) (Dashboard, error)

func (*Client) UpdateEventQuery added in v1.91.1

func (c *Client) UpdateEventQuery(ctx context.Context, projectName string, eventQueryID string, attributes EventQueryAttributes) (*EventQueryAttributes, error)

func (*Client) UpdateInferredServiceRule added in v1.81.0

func (c *Client) UpdateInferredServiceRule(
	ctx context.Context,
	projectName string,
	inferredServiceRuleID string,
	requestAttributes InferredServiceRuleRequestAttributes,
) (InferredServiceRuleResponse, error)

func (*Client) UpdateRoleBinding added in v1.80.0

func (c *Client) UpdateRoleBinding(
	ctx context.Context,
	projectName string,
	roleName string,
	users ...string,
) (RoleBinding, error)

func (*Client) UpdateSAMLGroupMappings added in v1.88.0

func (c *Client) UpdateSAMLGroupMappings(ctx context.Context, mappings SAMLGroupMappings) error

func (*Client) UpdateSnoozeRule added in v1.95.1

func (c *Client) UpdateSnoozeRule(
	ctx context.Context,
	projectName string,
	id string,
	snoozeRule SnoozeRule,
) (SnoozeRuleWithID, error)

func (*Client) UpdateStream

func (c *Client) UpdateStream(ctx context.Context, projectName string,
	streamID string,
	stream Stream,
) (Stream, error)

func (*Client) UpdateStreamCondition

func (c *Client) UpdateStreamCondition(
	ctx context.Context,
	projectName string,
	conditionID string,
	attributes StreamConditionAttributes,
) (*StreamCondition, error)

func (*Client) UpdateUnifiedCondition added in v1.71.0

func (c *Client) UpdateUnifiedCondition(
	ctx context.Context,
	projectName string,
	conditionID string,
	attributes UnifiedConditionAttributes,
) (UnifiedCondition, error)

func (*Client) UpdateUnifiedDashboard added in v1.70.4

func (c *Client) UpdateUnifiedDashboard(
	ctx context.Context,
	projectName string,
	dashboardID string,
	attributes UnifiedDashboardAttributes,
) (*UnifiedDashboard, error)

func (*Client) ValidateSnoozeRule added in v1.95.1

func (c *Client) ValidateSnoozeRule(ctx context.Context, projectName string, snoozeRule SnoozeRule) (bool, string, error)

type CompositeAlert added in v1.75.0

type CompositeAlert struct {
	Alerts []CompositeSubAlert `json:"alerts"`
}

type CompositeQuery added in v1.61.0

type CompositeQuery struct {
	FinalWindowOperation *FinalWindowOperation `json:"final-window-operation"`
}

type CompositeSubAlert added in v1.75.0

type CompositeSubAlert struct {
	Name       string                      `json:"name"`
	Title      string                      `json:"title"`
	Expression SubAlertExpression          `json:"expression"`
	Queries    []MetricQueryWithAttributes `json:"queries"`
}

type ConditionStream

type ConditionStream struct {
	ID    string `json:"id"`
	Type  string `json:"type"`
	Links Links  `json:"links"`
}

type CreateRequest

type CreateRequest struct {
	Type string `json:"type"`
}

type CreateResponse

type CreateResponse struct {
	Type string `json:"type"`
	ID   string `json:"id"`
}

type Dashboard

type Dashboard struct {
	Type       string              `json:"type,omitempty"`
	ID         string              `json:"id,omitempty"`
	Attributes DashboardAttributes `json:"attributes,omitempty"`
}

type DashboardAttributes

type DashboardAttributes struct {
	Name    string   `json:"name"`
	Streams []Stream `json:"streams"`
}

type DependencyMapOptions added in v1.70.13

type DependencyMapOptions struct {
	Scope   string `json:"scope,omitempty"`
	MapType string `json:"map-type,omitempty"`
}

type Destination

type Destination struct {
	Type       string      `json:"type"`
	Attributes interface{} `json:"attributes"`
	ID         string      `json:"id"`
}

type Envelope

type Envelope struct {
	Data json.RawMessage `json:"data"`
}

Envelope represents a generic response from the API

type EventQueryAttributes added in v1.91.1

type EventQueryAttributes struct {
	ID            string   `json:"id"`
	Name          string   `json:"name"`
	QueryString   string   `json:"query_string"`
	Source        string   `json:"source"`
	Type          string   `json:"type"`
	Description   string   `json:"description"`
	TooltipFields []string `json:"tooltip_fields"`
}

type Expression

type Expression struct {
	SubAlertExpression
	IsMulti bool `json:"is-multi-alert,omitempty"`
}

type FinalWindowOperation added in v1.61.0

type FinalWindowOperation struct {
	Operator      string `json:"operator"`
	InputWindowMs int    `json:"input-window-ms"`
}

type GroupBy

type GroupBy struct {
	LabelKeys   []string `json:"label-keys"`
	Aggregation string   `json:"aggregation-method"`
}

type Headers

type Headers map[string]string

type InferredServiceRuleRequest added in v1.81.0

type InferredServiceRuleRequest struct {
	CreateRequest
	Attributes InferredServiceRuleRequestAttributes `json:"attributes,omitempty"`
}

type InferredServiceRuleRequestAttributes added in v1.81.0

type InferredServiceRuleRequestAttributes struct {
	Name             string            `json:"name"`
	Description      *string           `json:"description"`
	AttributeFilters []AttributeFilter `json:"attribute-filters"`
	GroupByKeys      []string          `json:"group-by-keys"`
}

type InferredServiceRuleResponse added in v1.81.0

type InferredServiceRuleResponse struct {
	CreateResponse
	Attributes InferredServiceRuleResponseAttributes `json:"attributes,omitempty"`
}

type InferredServiceRuleResponseAttributes added in v1.81.0

type InferredServiceRuleResponseAttributes struct {
	Name             string            `json:"name"`
	Description      string            `json:"description,omitempty"`
	AttributeFilters []AttributeFilter `json:"attribute-filters"`
	GroupByKeys      []string          `json:"group-by-keys,omitempty"`
}

type Label added in v1.72.0

type Label struct {
	Key   string `json:"label_key"`
	Value string `json:"label_value"`
}

type LabelFilter

type LabelFilter struct {
	Key     string `json:"key"`
	Value   string `json:"value"`
	Operand string `json:"operand"`
}
type Links struct {
	Related string `json:"related"`
	Self    string `json:"self"`
}

type MetricGroupBy

type MetricGroupBy struct {
	LabelKeys         []string `json:"label-keys"`
	AggregationMethod string   `json:"aggregation-method"`
}

type MetricQuery

type MetricQuery struct {
	Metric                          string                `json:"metric"`
	Filters                         []LabelFilter         `json:"filters,omitempty"`
	TimeseriesOperator              string                `json:"timeseries-operator"`
	TimeseriesOperatorInputWindowMs *int                  `json:"timeseries-operator-input-window-ms,omitempty"`
	GroupBy                         GroupBy               `json:"group-by,omitempty"`
	FinalWindowOperation            *FinalWindowOperation `json:"final-window-operation,omitempty"`
}

type MetricQueryWithAttributes

type MetricQueryWithAttributes struct {
	Name                 string                 `json:"query-name"`
	Type                 string                 `json:"query-type"`
	Hidden               bool                   `json:"hidden"`
	Display              string                 `json:"display-type"`
	DisplayTypeOptions   map[string]interface{} `json:"display-type-options,omitempty"`
	Query                MetricQuery            `json:"metric-query"`
	SpansQuery           SpansQuery             `json:"spans-query,omitempty"`
	CompositeQuery       CompositeQuery         `json:"composite-query,omitempty"`
	QueryString          string                 `json:"query-string"`
	DependencyMapOptions *DependencyMapOptions  `json:"dependency-map-options,omitempty"`
	HiddenQueries        map[string]bool        `json:"hidden-queries,omitempty"`
}

type OneTimeSchedule added in v1.95.1

type OneTimeSchedule struct {
	Timezone      string `json:"timezone"`
	StartDateTime string `json:"start_date_time"`
	EndDateTime   string `json:"end_date_time,omitempty"`
}

type PagerdutyAttributes

type PagerdutyAttributes struct {
	Name            string `json:"name"`
	IntegrationKey  string `json:"integration_key"`
	DestinationType string `json:"destination_type"`
}

type Panel added in v1.85.0

type Panel struct {
	ID       string          `json:"id"`
	Title    string          `json:"title"`
	Type     string          `json:"type"`
	Position UnifiedPosition `json:"position"`
	Body     map[string]any  `json:"body"`
}

type Predicate added in v1.95.1

type Predicate struct {
	Operator string          `json:"operator"`
	Labels   []ResourceLabel `json:"labels"`
}

type RecurringSchedule added in v1.95.1

type RecurringSchedule struct {
	Timezone  string         `json:"timezone"`
	StartDate string         `json:"start_date"`
	EndDate   string         `json:"end_date,omitempty"`
	Schedules []Reoccurrence `json:"schedules"`
}

type RelatedResourceObject

type RelatedResourceObject struct {
	Type string `json:"type"`
	ID   string `json:"id"`
}
type RelatedResourceWithLinks struct {
	Links Links                 `json:"links"`
	Data  RelatedResourceObject `json:"data"`
}

type Reoccurrence added in v1.95.1

type Reoccurrence struct {
	Name           string  `json:"name"`
	StartTime      string  `json:"start_time"`
	DurationMillis int64   `json:"duration_millis"`
	Cadence        Cadence `json:"cadence"`
}

type ResourceLabel added in v1.95.1

type ResourceLabel struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type RoleBinding added in v1.80.0

type RoleBinding struct {
	RoleName    string   `json:"role-name"`
	ProjectName string   `json:"project-name"`
	Users       []string `json:"users"`
}

func (RoleBinding) ID added in v1.80.0

func (rb RoleBinding) ID() string

type SAMLGroupMapping added in v1.88.0

type SAMLGroupMapping struct {
	SAMLAttributeKey   string            `json:"saml-attribute-key"`
	SAMLAttributeValue string            `json:"saml-attribute-value"`
	OrganizationRole   string            `json:"organization-role"`
	ProjectRoles       map[string]string `json:"project-roles"`
}

type SAMLGroupMappings added in v1.88.0

type SAMLGroupMappings struct {
	Mappings []SAMLGroupMapping `json:"mappings,omitempty"`
}

type Schedule added in v1.95.1

type Schedule struct {
	OneTime   *OneTimeSchedule   `json:"one_time,omitempty"`
	Recurring *RecurringSchedule `json:"recurring,omitempty"`
}

type Scope added in v1.95.1

type Scope struct {
	Basic *BasicTargeting `json:"basic,omitempty"`
}

type ScopeFilter added in v1.95.1

type ScopeFilter struct {
	AlertIDs       []string   `json:"alert_ids"`
	LabelPredicate *Predicate `json:"label_predicate"`
}

type ServiceNowAttributes added in v1.79.0

type ServiceNowAttributes struct {
	Name            string `json:"name"`
	DestinationType string `json:"destination_type"`
	URL             string `json:"url"`
	Auth            Auth   `json:"auth"`
}

type SlackAttributes

type SlackAttributes struct {
	Channel         string `json:"channel"`
	DestinationType string `json:"destination_type"`
}

type SnoozeRule added in v1.95.1

type SnoozeRule struct {
	Title    string   `json:"title"`
	Scope    Scope    `json:"scope"`
	Schedule Schedule `json:"schedule"`
}

type SnoozeRuleWithID added in v1.95.1

type SnoozeRuleWithID struct {
	SnoozeRule
	ID string `json:"id"`
}

type SpansQuery added in v1.60.0

type SpansQuery struct {
	Query                 string                `json:"query"`
	Operator              string                `json:"operator"`
	OperatorInputWindowMs *int                  `json:"operator-input-window-ms,omitempty"`
	LatencyPercentiles    []float64             `json:"latency-percentiles,omitempty"`
	GroupByKeys           []string              `json:"group-by,omitempty"`
	FinalWindowOperation  *FinalWindowOperation `json:"final-window-operation,omitempty"`
}

type Stream

type Stream struct {
	Type       string           `json:"type,omitempty"`
	ID         string           `json:"id,omitempty"`
	Attributes StreamAttributes `json:"attributes,omitempty"`
}

type StreamAlertingRuleAttributes

type StreamAlertingRuleAttributes struct {
	UpdateInterval int `json:"update-interval-ms"`
}

type StreamAlertingRuleRequest

type StreamAlertingRuleRequest struct {
	CreateRequest
	Attributes    StreamAlertingRuleAttributes           `json:"attributes,omitempty"`
	Relationships StreamAlertingRuleRequestRelationships `json:"relationships,omitempty"`
}

type StreamAlertingRuleRequestRelationships

type StreamAlertingRuleRequestRelationships struct {
	Condition   RelatedResourceObject `json:"condition"`
	Destination RelatedResourceObject `json:"destination"`
}

type StreamAlertingRuleResponse

type StreamAlertingRuleResponse struct {
	CreateResponse
	Attributes    StreamAlertingRuleAttributes            `json:"attributes,omitempty"`
	Relationships StreamAlertingRuleResponseRelationships `json:"relationships,omitempty"`
	Links         Links                                   `json:"links"`
}

type StreamAlertingRuleResponseRelationships

type StreamAlertingRuleResponseRelationships struct {
	Condition   RelatedResourceWithLinks `json:"condition"`
	Destination RelatedResourceWithLinks `json:"destination"`
	Project     RelatedResourceWithLinks `json:"project"`
	Stream      RelatedResourceWithLinks `json:"stream"`
}

type StreamAttributes

type StreamAttributes struct {
	Name  string `json:"name"`
	Query string `json:"query"`

	// "custom_data" on set, but "custom-data" on get
	CustomData map[string]map[string]string `json:"custom_data,omitempty"`

	// Hack until https://lightstep.atlassian.net/browse/LS-26494 is fixed.
	CustomDataGet map[string]map[string]string `json:"custom-data,omitempty"`
}

type StreamCondition

type StreamCondition struct {
	Type          string                       `json:"type,omitempty"`
	ID            string                       `json:"id,omitempty"`
	Attributes    StreamConditionAttributes    `json:"attributes"`
	Relationships StreamConditionRelationships `json:"relationships,omitempty"`
}

type StreamConditionAttributes

type StreamConditionAttributes struct {
	Name               string                 `json:"name,omitempty"`
	EvaluationWindowMS int                    `json:"eval-window-ms,omitempty"`
	Expression         string                 `json:"expression,omitempty"`
	CustomData         map[string]interface{} `json:"custom_data,omitempty"`
}

type StreamConditionRelationships

type StreamConditionRelationships struct {
	Stream ConditionStream `json:"stream"`
}

type SubAlertExpression added in v1.74.1

type SubAlertExpression struct {
	Thresholds       Thresholds `json:"thresholds"`
	Operand          string     `json:"operand"`
	IsNoData         bool       `json:"enable-no-data-alert,omitempty"`
	NoDataDurationMs *int       `json:"no-data-duration-ms,omitempty"`
}

type TemplateVariable added in v1.73.2

type TemplateVariable struct {
	Name                   string   `json:"name"`
	DefaultValues          []string `json:"default_values"`
	SuggestionAttributeKey string   `json:"suggestion_attribute_key"`
}

type Threshold added in v1.96.0

type Threshold struct {
	// enum: E,GE,GT,LE,LT
	Operator string  `json:"operator"`
	Value    float64 `json:"value"`
	// An alpha hex color
	Color string `json:"color"`
	Label string `json:"label"`
}

type Thresholds

type Thresholds struct {
	Warning            *float64 `json:"warning,omitempty"`
	WarningDurationMs  *int     `json:"warning-duration-ms,omitempty"`
	Critical           *float64 `json:"critical,omitempty"`
	CriticalDurationMs *int     `json:"critical-duration-ms,omitempty"`
}

type UnifiedChart added in v1.70.4

type UnifiedChart struct {
	Rank          int                         `json:"rank"`
	Position      UnifiedPosition             `json:"position"`
	ID            string                      `json:"id"`
	Title         string                      `json:"title"`
	Description   string                      `json:"description"`
	ChartType     string                      `json:"chart-type"`
	YAxis         *YAxis                      `json:"y-axis"`
	MetricQueries []MetricQueryWithAttributes `json:"metric-queries"`
	Text          string                      `json:"text"`
	Thresholds    []Threshold                 `json:"thresholds"`
	Subtitle      *string                     `json:"subtitle,omitempty"`
	WorkflowLinks []WorkflowLink              `json:"workflow_links"`
}

type UnifiedCondition added in v1.71.0

type UnifiedCondition struct {
	ID         string                     `json:"id"`
	Type       string                     `json:"type"`
	Attributes UnifiedConditionAttributes `json:"attributes"`
}

type UnifiedConditionAttributes added in v1.71.0

type UnifiedConditionAttributes struct {
	Name           string                      `json:"name"`
	Description    string                      `json:"description"`
	Labels         []Label                     `json:"labels"`
	Type           string                      `json:"condition_type"`
	CustomData     string                      `json:"custom-data"`
	Expression     *Expression                 `json:"expression,omitempty"`
	Queries        []MetricQueryWithAttributes `json:"metric-queries"`
	AlertingRules  []AlertingRule              `json:"alerting-rules,omitempty"`
	CompositeAlert *CompositeAlert             `json:"composite-alert,omitempty"`
}

type UnifiedDashboard added in v1.70.4

type UnifiedDashboard struct {
	Type       string                     `json:"type"`
	ID         string                     `json:"id"`
	Attributes UnifiedDashboardAttributes `json:"attributes,omitempty"`
}

type UnifiedDashboardAttributes added in v1.70.4

type UnifiedDashboardAttributes struct {
	Name              string             `json:"name"`
	Description       string             `json:"description"`
	Charts            []UnifiedChart     `json:"charts"`
	Groups            []UnifiedGroup     `json:"groups"`
	Labels            []Label            `json:"labels"`
	TemplateVariables []TemplateVariable `json:"template_variables"`
	EventQueryIDs     []string           `json:"event_query_ids"`
	WorkflowLinks     []WorkflowLink     `json:"workflow_links"`
}

type UnifiedGroup added in v1.73.0

type UnifiedGroup struct {
	ID             string         `json:"id"`
	Rank           int            `json:"rank"`
	Title          string         `json:"title"`
	VisibilityType string         `json:"visibility_type"`
	Charts         []UnifiedChart `json:"charts"`
	Labels         []Label        `json:"labels"`
	Panels         []Panel        `json:"panels"`
}

type UnifiedPosition added in v1.73.1

type UnifiedPosition struct {
	XPos   int `json:"x-pos"`
	YPos   int `json:"y-pos"`
	Width  int `json:"width"`
	Height int `json:"height"`
}

type WebhookAttributes

type WebhookAttributes struct {
	Name            string                 `json:"name"`
	DestinationType string                 `json:"destination_type"`
	URL             string                 `json:"url"`
	Template        string                 `json:"template"`
	CustomHeaders   map[string]interface{} `json:"custom_headers,omitempty"`
}

type WireEventQueryAttributes added in v1.91.1

type WireEventQueryAttributes struct {
	Attributes EventQueryAttributes `json:"attributes"`
}
type WorkflowLink struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

type YAxis

type YAxis struct {
	Min float64 `json:"min"`
	Max float64 `json:"max"`
}

Jump to

Keyboard shortcuts

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