Event

Use this resource to create one or more Insights events.

Events

The event mapping supports the following arguments:

  • type - (Required) The event’s name. Can be a combination of alphanumeric characters, underscores, and colons.
  • timestamp - (Optional) Must be a Unix epoch timestamp. You can define timestamps either in seconds or in milliseconds.
  • attribute - (Required) An attribute to include in your event payload. Multiple attribute blocks can be defined for an event. See Attributes below for details.

Attributes

The attribute mapping supports the following arguments:

  • key - (Required) The name of the attribute.
  • value - (Required) The value of the attribute.
  • type - (Optional) Specify the type for the attribute value. This is useful when passing integer or float values to Insights. Allowed values are string, int, or float. Defaults to string.

Example Usage

using Pulumi;
using NewRelic = Pulumi.NewRelic;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new NewRelic.Insights.Event("foo", new NewRelic.Insights.EventArgs
        {
            Events = 
            {
                new NewRelic.Insights.Inputs.EventEventArgs
                {
                    Attribute = 
                    {
                        
                        {
                            { "key", "a_string_attribute" },
                            { "value", "a string" },
                        },
                        
                        {
                            { "key", "an_integer_attribute" },
                            { "type", "int" },
                            { "value", 42 },
                        },
                        
                        {
                            { "key", "a_float_attribute" },
                            { "type", "float" },
                            { "value", 101.1 },
                        },
                    },
                    Timestamp = 1232471100,
                    Type = "MyEvent",
                },
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.insights.Event("foo", events=[{
    "attribute": [
        {
            "key": "a_string_attribute",
            "value": "a string",
        },
        {
            "key": "an_integer_attribute",
            "type": "int",
            "value": 42,
        },
        {
            "key": "a_float_attribute",
            "type": "float",
            "value": 101.1,
        },
    ],
    "timestamp": 1232471100,
    "type": "MyEvent",
}])
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = new newrelic.insights.Event("foo", {
    events: [{
        attributes: [
            {
                key: "a_string_attribute",
                value: "a string",
            },
            {
                key: "an_integer_attribute",
                type: "int",
                value: "42",
            },
            {
                key: "a_float_attribute",
                type: "float",
                value: "101.1",
            },
        ],
        timestamp: 1232471100,
        type: "MyEvent",
    }],
});

Create a Event Resource

new Event(name: string, args: EventArgs, opts?: CustomResourceOptions);
def Event(resource_name, opts=None, events=None, __props__=None);
func NewEvent(ctx *Context, name string, args EventArgs, opts ...ResourceOption) (*Event, error)
public Event(string name, EventArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args EventArgs
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 EventArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EventArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Event Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Event resource accepts the following input properties:

Events List<Pulumi.NewRelic.Insights.Inputs.EventEventArgs>

An event to insert into Insights. Multiple event blocks can be defined. See Events below for details.

Events []EventEvent

An event to insert into Insights. Multiple event blocks can be defined. See Events below for details.

events EventEvent[]

An event to insert into Insights. Multiple event blocks can be defined. See Events below for details.

events List[EventEvent]

An event to insert into Insights. Multiple event blocks can be defined. See Events below for details.

Outputs

All input properties are implicitly available as output properties. Additionally, the Event resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Event Resource

Get an existing Event 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?: EventState, opts?: CustomResourceOptions): Event
static get(resource_name, id, opts=None, events=None, __props__=None);
func GetEvent(ctx *Context, name string, id IDInput, state *EventState, opts ...ResourceOption) (*Event, error)
public static Event Get(string name, Input<string> id, EventState? 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:

Events List<Pulumi.NewRelic.Insights.Inputs.EventEventArgs>

An event to insert into Insights. Multiple event blocks can be defined. See Events below for details.

Events []EventEvent

An event to insert into Insights. Multiple event blocks can be defined. See Events below for details.

events EventEvent[]

An event to insert into Insights. Multiple event blocks can be defined. See Events below for details.

events List[EventEvent]

An event to insert into Insights. Multiple event blocks can be defined. See Events below for details.

Supporting Types

EventEvent

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Attributes List<Pulumi.NewRelic.Insights.Inputs.EventEventAttributeArgs>
Type string
Timestamp int
Attributes []EventEventAttribute
Type string
Timestamp int
attributes EventEventAttribute[]
type string
timestamp number
attributes List[EventEventAttribute]
type str
timestamp float

EventEventAttribute

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string
Value string
Type string
Key string
Value string
Type string
key string
value string
type string
key str
value str
type str

Package Details

Repository
https://github.com/pulumi/pulumi-newrelic
License
Apache-2.0
Notes
This Pulumi package is based on the newrelic Terraform Provider.