eventstometrics

package
v2.37.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Code generated by tutone: DO NOT EDIT

Index

Constants

This section is empty.

Variables

View Source
var EventsToMetricsErrorReasonTypes = struct {
	// Other errors.
	GENERAL EventsToMetricsErrorReason
	// Indicates some part of your submission was invalid.
	INVALID_INPUT EventsToMetricsErrorReason
	// The user attempting to submit this rule is not authorized to do so.
	USER_NOT_AUTHORIZED EventsToMetricsErrorReason
}{

	GENERAL: "GENERAL",

	INVALID_INPUT: "INVALID_INPUT",

	USER_NOT_AUTHORIZED: "USER_NOT_AUTHORIZED",
}

Functions

This section is empty.

Types

type EventsToMetrics

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

EventsToMetrics is used to communicate with New Relic EventsToMetrics.

func New

func New(config config.Config) EventsToMetrics

New is used to create a new EventsToMetrics client instance.

func (*EventsToMetrics) CreateRules

func (e *EventsToMetrics) CreateRules(createInput []EventsToMetricsCreateRuleInput) ([]EventsToMetricsRule, error)

CreateRules creates one or more New Relic events to metrics rules.

func (*EventsToMetrics) CreateRulesWithContext

func (e *EventsToMetrics) CreateRulesWithContext(ctx context.Context, createInput []EventsToMetricsCreateRuleInput) ([]EventsToMetricsRule, error)

CreateRulesWithContext creates one or more New Relic events to metrics rules.

func (*EventsToMetrics) DeleteRules

func (e *EventsToMetrics) DeleteRules(deleteInput []EventsToMetricsDeleteRuleInput) ([]EventsToMetricsRule, error)

DeleteRules deletes one or more New Relic events to metrics rules.

func (*EventsToMetrics) DeleteRulesWithContext

func (e *EventsToMetrics) DeleteRulesWithContext(ctx context.Context, deleteInput []EventsToMetricsDeleteRuleInput) ([]EventsToMetricsRule, error)

DeleteRulesWithContext deletes one or more New Relic events to metrics rules.

func (*EventsToMetrics) GetRule

func (e *EventsToMetrics) GetRule(accountID int, ruleID string) (*EventsToMetricsRule, error)

GetRule retrieves one or more New Relic events to metrics rules by their IDs.

func (*EventsToMetrics) GetRuleWithContext

func (e *EventsToMetrics) GetRuleWithContext(ctx context.Context, accountID int, ruleID string) (*EventsToMetricsRule, error)

GetRuleWithContext retrieves one or more New Relic events to metrics rules by their IDs.

func (*EventsToMetrics) GetRules

func (e *EventsToMetrics) GetRules(accountID int, ruleIDs []string) ([]EventsToMetricsRule, error)

GetRules retrieves one or more New Relic events to metrics rules by their IDs.

func (*EventsToMetrics) GetRulesWithContext

func (e *EventsToMetrics) GetRulesWithContext(ctx context.Context, accountID int, ruleIDs []string) ([]EventsToMetricsRule, error)

GetRulesWithContext retrieves one or more New Relic events to metrics rules by their IDs.

func (*EventsToMetrics) ListRules

func (e *EventsToMetrics) ListRules(accountID int) ([]EventsToMetricsRule, error)

ListRules retrieves a set of New Relic events to metrics rules by their account ID.

func (*EventsToMetrics) ListRulesWithContext

func (e *EventsToMetrics) ListRulesWithContext(ctx context.Context, accountID int) ([]EventsToMetricsRule, error)

ListRulesWithContext retrieves a set of New Relic events to metrics rules by their account ID.

func (*EventsToMetrics) UpdateRules

func (e *EventsToMetrics) UpdateRules(updateInput []EventsToMetricsUpdateRuleInput) ([]EventsToMetricsRule, error)

UpdateRules updates one or more New Relic events to metrics rules.

func (*EventsToMetrics) UpdateRulesWithContext

func (e *EventsToMetrics) UpdateRulesWithContext(ctx context.Context, updateInput []EventsToMetricsUpdateRuleInput) ([]EventsToMetricsRule, error)

UpdateRulesWithContext updates one or more New Relic events to metrics rules.

type EventsToMetricsAccountStitchedFields

type EventsToMetricsAccountStitchedFields struct {
	// List all rules for your account.
	AllRules EventsToMetricsListRuleResult `json:"allRules,omitempty"`
	// List rules for your account by id.
	RulesById EventsToMetricsListRuleResult `json:"rulesById,omitempty"`
}

EventsToMetricsAccountStitchedFields - Account stitched fields to enable autostitching in NerdGraph

type EventsToMetricsCreateRuleFailure

type EventsToMetricsCreateRuleFailure struct {
	// Information about why the create failed.
	Errors []EventsToMetricsError `json:"errors,omitempty"`
	// Input information about a submitted rule that was unable to be created.
	Submitted EventsToMetricsCreateRuleSubmission `json:"submitted,omitempty"`
}

EventsToMetricsCreateRuleFailure - Error details about the events to metrics rule that failed to be created and why.

func (EventsToMetricsCreateRuleFailure) String

type EventsToMetricsCreateRuleInput

type EventsToMetricsCreateRuleInput struct {
	// The account where the events exist and the metrics will be put.
	AccountID int `json:"accountId"`
	// Provides additional information about the rule.
	Description string `json:"description,omitempty"`
	// Explains how to create one or more metrics from events.
	NRQL string `json:"nrql"`
	// The name of the rule. This must be unique within a given account.
	Name string `json:"name"`
}

EventsToMetricsCreateRuleInput - Details needed to create an events to metrics conversion rule.

type EventsToMetricsCreateRuleResult

type EventsToMetricsCreateRuleResult struct {
	// Rules that were not created and why.
	Failures []EventsToMetricsCreateRuleFailure `json:"failures,omitempty"`
	// Rules that were successfully created.
	Successes []EventsToMetricsRule `json:"successes,omitempty"`
}

EventsToMetricsCreateRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully created

func (EventsToMetricsCreateRuleResult) Errors

type EventsToMetricsCreateRuleSubmission

type EventsToMetricsCreateRuleSubmission struct {
	// The account where the events exist and the metrics will be put.
	AccountID int `json:"accountId"`
	// Provides additional information about the rule.
	Description string `json:"description,omitempty"`
	// Explains how to create one or more metrics from events.
	NRQL string `json:"nrql"`
	// The name of the rule. This must be unique within a given account.
	Name string `json:"name"`
}

EventsToMetricsCreateRuleSubmission - The details that were submitted when creating an events to metrics conversion rule.

type EventsToMetricsDeleteRuleFailure

type EventsToMetricsDeleteRuleFailure struct {
	// Information about why the delete failed.
	Errors []EventsToMetricsError `json:"errors,omitempty"`
	// Input information about a submitted rule that was unable to be deleted.
	Submitted EventsToMetricsDeleteRuleSubmission `json:"submitted,omitempty"`
}

EventsToMetricsDeleteRuleFailure - Error details about the events to metrics rule that failed to be deleted and why.

func (EventsToMetricsDeleteRuleFailure) String

type EventsToMetricsDeleteRuleInput

type EventsToMetricsDeleteRuleInput struct {
	// A submitted account id.
	AccountID int `json:"accountId"`
	// A submitted rule id.
	RuleId string `json:"ruleId"`
}

EventsToMetricsDeleteRuleInput - Identifying information about the events to metrics rule you want to delete.

type EventsToMetricsDeleteRuleResult

type EventsToMetricsDeleteRuleResult struct {
	// Information about the rules that could not be deleted.
	Failures []EventsToMetricsDeleteRuleFailure `json:"failures,omitempty"`
	// Rules that were successfully deleted.
	Successes []EventsToMetricsRule `json:"successes,omitempty"`
}

EventsToMetricsDeleteRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully deleted.

func (EventsToMetricsDeleteRuleResult) Errors

type EventsToMetricsDeleteRuleSubmission

type EventsToMetricsDeleteRuleSubmission struct {
	// A submitted account id.
	AccountID int `json:"accountId"`
	// A submitted rule id.
	RuleId string `json:"ruleId"`
}

EventsToMetricsDeleteRuleSubmission - The details that were submitted when deleteing an events to metrics conversion rule.

type EventsToMetricsError

type EventsToMetricsError struct {
	// A detailed error message.
	Description string `json:"description,omitempty"`
	// The category of error that occurred.
	Reason EventsToMetricsErrorReason `json:"reason,omitempty"`
}

EventsToMetricsError - Error details when processing events to metrics rule requests.

func (EventsToMetricsError) String

func (e EventsToMetricsError) String() string

type EventsToMetricsErrorReason

type EventsToMetricsErrorReason string

EventsToMetricsErrorReason - General error categories.

type EventsToMetricsListRuleResult

type EventsToMetricsListRuleResult struct {
	// Event-to-metric rules to be returned.
	Rules []EventsToMetricsRule `json:"rules,omitempty"`
}

EventsToMetricsListRuleResult - A list of rule details to be returned.

type EventsToMetricsRule

type EventsToMetricsRule struct {
	// Account with the event and where the metrics will be placed.
	AccountID int `json:"accountId"`
	// The time at which the rule was created
	CreatedAt nrtime.DateTime `json:"createdAt"`
	// Additional information about the rule.
	Description string `json:"description,omitempty"`
	// True means this rule is enabled. False means the rule is currently not creating metrics.
	Enabled bool `json:"enabled"`
	// The id, uniquely identifying the rule.
	ID string `json:"id"`
	// Explains how to create metrics from events.
	NRQL string `json:"nrql"`
	// The name of the rule. This must be unique within an account.
	Name string `json:"name"`
	// The time at which the rule was updated
	UpdatedAt nrtime.DateTime `json:"updatedAt"`
}

EventsToMetricsRule - Information about an event-to-metric rule which creates metrics from events.

type EventsToMetricsUpdateRuleFailure

type EventsToMetricsUpdateRuleFailure struct {
	// Information about why the update failed.
	Errors []EventsToMetricsError `json:"errors,omitempty"`
	// Input information about a failed update.
	Submitted EventsToMetricsUpdateRuleSubmission `json:"submitted,omitempty"`
}

EventsToMetricsUpdateRuleFailure - Error details about the events to metrics rule that failed to be updated and why.

func (EventsToMetricsUpdateRuleFailure) String

type EventsToMetricsUpdateRuleInput

type EventsToMetricsUpdateRuleInput struct {
	// A submitted account id.
	AccountID int `json:"accountId"`
	// Changes the state of the rule as being enabled or disabled.
	Enabled bool `json:"enabled"`
	// A submitted rule id.
	RuleId string `json:"ruleId"`
}

EventsToMetricsUpdateRuleInput - Identifying information about the events to metrics rule you want to update.

type EventsToMetricsUpdateRuleResult

type EventsToMetricsUpdateRuleResult struct {
	// Rules that failed to get updated.
	Failures []EventsToMetricsUpdateRuleFailure `json:"failures,omitempty"`
	// Rules that were successfully enabled or disabled.
	Successes []EventsToMetricsRule `json:"successes,omitempty"`
}

EventsToMetricsUpdateRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully update.

func (EventsToMetricsUpdateRuleResult) Errors

type EventsToMetricsUpdateRuleSubmission

type EventsToMetricsUpdateRuleSubmission struct {
	// A submitted account id.
	AccountID int `json:"accountId"`
	// Changes the state of the rule as being enabled or disabled.
	Enabled bool `json:"enabled"`
	// A submitted rule id.
	RuleId string `json:"ruleId"`
}

EventsToMetricsUpdateRuleSubmission - The details that were submitted when updating an events to metrics conversion rule.

Jump to

Keyboard shortcuts

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