EventsToMetricsRule
Use this resource to create, update, and delete New Relic Events to Metrics rules.
Example Usage
using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.EventsToMetricsRule("foo", new NewRelic.EventsToMetricsRuleArgs
{
AccountId = 12345,
Description = "Example description",
Nrql = "SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name",
});
}
}
Coming soon!
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.EventsToMetricsRule("foo",
account_id=12345,
description="Example description",
nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.EventsToMetricsRule("foo", {
accountId: 12345,
description: "Example description",
nrql: "SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name",
});Create a EventsToMetricsRule Resource
new EventsToMetricsRule(name: string, args: EventsToMetricsRuleArgs, opts?: CustomResourceOptions);def EventsToMetricsRule(resource_name, opts=None, account_id=None, description=None, enabled=None, name=None, nrql=None, __props__=None);func NewEventsToMetricsRule(ctx *Context, name string, args EventsToMetricsRuleArgs, opts ...ResourceOption) (*EventsToMetricsRule, error)public EventsToMetricsRule(string name, EventsToMetricsRuleArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args EventsToMetricsRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args EventsToMetricsRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EventsToMetricsRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
EventsToMetricsRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The EventsToMetricsRule resource accepts the following input properties:
- Account
Id int Account with the event and where the metrics will be put.
- Nrql string
Explains how to create metrics from events.
- Description string
Provides additional information about the rule.
- Enabled bool
True means this rule is enabled. False means the rule is currently not creating metrics.
- Name string
The name of the rule. This must be unique within an account.
- Account
Id int Account with the event and where the metrics will be put.
- Nrql string
Explains how to create metrics from events.
- Description string
Provides additional information about the rule.
- Enabled bool
True means this rule is enabled. False means the rule is currently not creating metrics.
- Name string
The name of the rule. This must be unique within an account.
- account
Id number Account with the event and where the metrics will be put.
- nrql string
Explains how to create metrics from events.
- description string
Provides additional information about the rule.
- enabled boolean
True means this rule is enabled. False means the rule is currently not creating metrics.
- name string
The name of the rule. This must be unique within an account.
- account_
id float Account with the event and where the metrics will be put.
- nrql str
Explains how to create metrics from events.
- description str
Provides additional information about the rule.
- enabled bool
True means this rule is enabled. False means the rule is currently not creating metrics.
- name str
The name of the rule. This must be unique within an account.
Outputs
All input properties are implicitly available as output properties. Additionally, the EventsToMetricsRule resource produces the following output properties:
Look up an Existing EventsToMetricsRule Resource
Get an existing EventsToMetricsRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: EventsToMetricsRuleState, opts?: CustomResourceOptions): EventsToMetricsRulestatic get(resource_name, id, opts=None, account_id=None, description=None, enabled=None, name=None, nrql=None, rule_id=None, __props__=None);func GetEventsToMetricsRule(ctx *Context, name string, id IDInput, state *EventsToMetricsRuleState, opts ...ResourceOption) (*EventsToMetricsRule, error)public static EventsToMetricsRule Get(string name, Input<string> id, EventsToMetricsRuleState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Account
Id int Account with the event and where the metrics will be put.
- Description string
Provides additional information about the rule.
- Enabled bool
True means this rule is enabled. False means the rule is currently not creating metrics.
- Name string
The name of the rule. This must be unique within an account.
- Nrql string
Explains how to create metrics from events.
- Rule
Id string The id, uniquely identifying the rule.
- Account
Id int Account with the event and where the metrics will be put.
- Description string
Provides additional information about the rule.
- Enabled bool
True means this rule is enabled. False means the rule is currently not creating metrics.
- Name string
The name of the rule. This must be unique within an account.
- Nrql string
Explains how to create metrics from events.
- Rule
Id string The id, uniquely identifying the rule.
- account
Id number Account with the event and where the metrics will be put.
- description string
Provides additional information about the rule.
- enabled boolean
True means this rule is enabled. False means the rule is currently not creating metrics.
- name string
The name of the rule. This must be unique within an account.
- nrql string
Explains how to create metrics from events.
- rule
Id string The id, uniquely identifying the rule.
- account_
id float Account with the event and where the metrics will be put.
- description str
Provides additional information about the rule.
- enabled bool
True means this rule is enabled. False means the rule is currently not creating metrics.
- name str
The name of the rule. This must be unique within an account.
- nrql str
Explains how to create metrics from events.
- rule_
id str The id, uniquely identifying the rule.
Package Details
- Repository
- https://github.com/pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.