Documentation ¶
Index ¶
- Variables
- type DateTime
- type EventsToMetrics
- func (e *EventsToMetrics) CreateRules(createInput []EventsToMetricsCreateRuleInput) ([]EventsToMetricsRule, error)
- func (e *EventsToMetrics) DeleteRules(deleteInput []EventsToMetricsDeleteRuleInput) ([]EventsToMetricsRule, error)
- func (e *EventsToMetrics) GetRule(accountID int, ruleID string) (*EventsToMetricsRule, error)
- func (e *EventsToMetrics) GetRules(accountID int, ruleIDs []string) ([]EventsToMetricsRule, error)
- func (e *EventsToMetrics) ListRules(accountID int) ([]EventsToMetricsRule, error)
- func (e *EventsToMetrics) UpdateRules(updateInput []EventsToMetricsUpdateRuleInput) ([]EventsToMetricsRule, error)
- type EventsToMetricsAccountStitchedFields
- type EventsToMetricsCreateRuleFailure
- type EventsToMetricsCreateRuleInput
- type EventsToMetricsCreateRuleResult
- type EventsToMetricsCreateRuleSubmission
- type EventsToMetricsDeleteRuleFailure
- type EventsToMetricsDeleteRuleInput
- type EventsToMetricsDeleteRuleResult
- type EventsToMetricsDeleteRuleSubmission
- type EventsToMetricsError
- type EventsToMetricsErrorReason
- type EventsToMetricsListRuleResult
- type EventsToMetricsRule
- type EventsToMetricsUpdateRuleFailure
- type EventsToMetricsUpdateRuleInput
- type EventsToMetricsUpdateRuleResult
- type EventsToMetricsUpdateRuleSubmission
Constants ¶
This section is empty.
Variables ¶
var EventsToMetricsErrorReasonTypes = struct { /* GENERAL - Other errors. */ GENERAL EventsToMetricsErrorReason /* INVALID_INPUT - Indicates some part of your submission was invalid. */ INVALID_INPUT EventsToMetricsErrorReason /* USER_NOT_AUTHORIZED - 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 DateTime ¶
type DateTime string
DateTime - The `DateTime` scalar represents a date and time. The `DateTime` appears as an ISO8601 formatted string.
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) DeleteRules ¶
func (e *EventsToMetrics) DeleteRules(deleteInput []EventsToMetricsDeleteRuleInput) ([]EventsToMetricsRule, error)
DeleteRules 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) 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) 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) UpdateRules ¶
func (e *EventsToMetrics) UpdateRules(updateInput []EventsToMetricsUpdateRuleInput) ([]EventsToMetricsRule, error)
UpdateRules updates one or more New Relic events to metrics rules.
type EventsToMetricsAccountStitchedFields ¶
type EventsToMetricsAccountStitchedFields struct { /* AllRules - List all rules for your account. */ AllRules EventsToMetricsListRuleResult `json:"allRules"` /* RulesById - List rules for your account by id. */ RulesById EventsToMetricsListRuleResult `json:"rulesById"` }
EventsToMetricsAccountStitchedFields - Account stitched fields to enable autostitching in NerdGraph
type EventsToMetricsCreateRuleFailure ¶
type EventsToMetricsCreateRuleFailure struct { /* Errors - Information about why the create failed. */ Errors []EventsToMetricsError `json:"errors"` /* Submitted - Input information about a submitted rule that was unable to be created. */ Submitted EventsToMetricsCreateRuleSubmission `json:"submitted"` }
EventsToMetricsCreateRuleFailure - Error details about the events to metrics rule that failed to be created and why.
func (EventsToMetricsCreateRuleFailure) String ¶
func (f EventsToMetricsCreateRuleFailure) String() string
type EventsToMetricsCreateRuleInput ¶
type EventsToMetricsCreateRuleInput struct { /* AccountID - The account where the events exist and the metrics will be put. */ AccountID int `json:"accountId"` /* Description - Provides additional information about the rule. */ Description string `json:"description"` /* Name - The name of the rule. This must be unique within a given account. */ Name string `json:"name"` /* Nrql - Explains how to create one or more metrics from events. */ Nrql string `json:"nrql"` }
EventsToMetricsCreateRuleInput - Details needed to create an events to metrics conversion rule.
type EventsToMetricsCreateRuleResult ¶
type EventsToMetricsCreateRuleResult struct { /* Failures - Rules that were not created and why. */ Failures []EventsToMetricsCreateRuleFailure `json:"failures"` /* Successes - Rules that were successfully created. */ Successes []EventsToMetricsRule `json:"successes"` }
EventsToMetricsCreateRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully created
func (EventsToMetricsCreateRuleResult) Errors ¶
func (r EventsToMetricsCreateRuleResult) Errors() string
type EventsToMetricsCreateRuleSubmission ¶
type EventsToMetricsCreateRuleSubmission struct { /* AccountID - The account where the events exist and the metrics will be put. */ AccountID int `json:"accountId"` /* Description - Provides additional information about the rule. */ Description string `json:"description"` /* Name - The name of the rule. This must be unique within a given account. */ Name string `json:"name"` /* Nrql - Explains how to create one or more metrics from events. */ Nrql string `json:"nrql"` }
EventsToMetricsCreateRuleSubmission - The details that were submitted when creating an events to metrics conversion rule.
type EventsToMetricsDeleteRuleFailure ¶
type EventsToMetricsDeleteRuleFailure struct { /* Errors - Information about why the delete failed. */ Errors []EventsToMetricsError `json:"errors"` /* Submitted - Input information about a submitted rule that was unable to be deleted. */ Submitted EventsToMetricsDeleteRuleSubmission `json:"submitted"` }
EventsToMetricsDeleteRuleFailure - Error details about the events to metrics rule that failed to be deleted and why.
func (EventsToMetricsDeleteRuleFailure) String ¶
func (f EventsToMetricsDeleteRuleFailure) String() string
type EventsToMetricsDeleteRuleInput ¶
type EventsToMetricsDeleteRuleInput struct { /* AccountID - A submitted account id. */ AccountID int `json:"accountId"` /* RuleId - 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 { /* Failures - Information about the rules that could not be deleted. */ Failures []EventsToMetricsDeleteRuleFailure `json:"failures"` /* Successes - Rules that were successfully deleted. */ Successes []EventsToMetricsRule `json:"successes"` }
EventsToMetricsDeleteRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully deleted.
func (EventsToMetricsDeleteRuleResult) Errors ¶
func (r EventsToMetricsDeleteRuleResult) Errors() string
type EventsToMetricsDeleteRuleSubmission ¶
type EventsToMetricsDeleteRuleSubmission struct { /* AccountID - A submitted account id. */ AccountID int `json:"accountId"` /* RuleId - 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 { /* Description - A detailed error message. */ Description string `json:"description"` /* Reason - The category of error that occurred. */ Reason EventsToMetricsErrorReason `json:"reason"` }
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 { /* Rules - Event-to-metric rules to be returned. */ Rules []EventsToMetricsRule `json:"rules"` }
EventsToMetricsListRuleResult - A list of rule details to be returned.
type EventsToMetricsRule ¶
type EventsToMetricsRule struct { /* AccountID - Account with the event and where the metrics will be placed. */ AccountID int `json:"accountId"` /* CreatedAt - The time at which the rule was created */ CreatedAt DateTime `json:"createdAt"` /* Description - Additional information about the rule. */ Description string `json:"description"` /* Enabled - True means this rule is enabled. False means the rule is currently not creating metrics. */ Enabled bool `json:"enabled"` /* ID - The id, uniquely identifying the rule. */ ID string `json:"id"` /* Name - The name of the rule. This must be unique within an account. */ Name string `json:"name"` /* Nrql - Explains how to create metrics from events. */ Nrql string `json:"nrql"` /* UpdatedAt - The time at which the rule was updated */ UpdatedAt DateTime `json:"updatedAt"` }
EventsToMetricsRule - Information about an event-to-metric rule which creates metrics from events.
type EventsToMetricsUpdateRuleFailure ¶
type EventsToMetricsUpdateRuleFailure struct { /* Errors - Information about why the update failed. */ Errors []EventsToMetricsError `json:"errors"` /* Submitted - Input information about a failed update. */ Submitted EventsToMetricsUpdateRuleSubmission `json:"submitted"` }
EventsToMetricsUpdateRuleFailure - Error details about the events to metrics rule that failed to be updated and why.
func (EventsToMetricsUpdateRuleFailure) String ¶
func (f EventsToMetricsUpdateRuleFailure) String() string
type EventsToMetricsUpdateRuleInput ¶
type EventsToMetricsUpdateRuleInput struct { /* AccountID - A submitted account id. */ AccountID int `json:"accountId"` /* Enabled - Changes the state of the rule as being enabled or disabled. */ Enabled bool `json:"enabled"` /* RuleId - 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 { /* Failures - Rules that failed to get updated. */ Failures []EventsToMetricsUpdateRuleFailure `json:"failures"` /* Successes - Rules that were successfully enabled or disabled. */ Successes []EventsToMetricsRule `json:"successes"` }
EventsToMetricsUpdateRuleResult - The result of which submitted events to metrics rules were successfully and unsuccessfully update.
func (EventsToMetricsUpdateRuleResult) Errors ¶
func (r EventsToMetricsUpdateRuleResult) Errors() string
type EventsToMetricsUpdateRuleSubmission ¶
type EventsToMetricsUpdateRuleSubmission struct { /* AccountID - A submitted account id. */ AccountID int `json:"accountId"` /* Enabled - Changes the state of the rule as being enabled or disabled. */ Enabled bool `json:"enabled"` /* RuleId - A submitted rule id. */ RuleId string `json:"ruleId"` }
EventsToMetricsUpdateRuleSubmission - The details that were submitted when updating an events to metrics conversion rule.