1. Packages
  2. Incident Provider
  3. API Docs
  4. AlertAttribute
incident 5.4.1 published on Wednesday, Apr 9, 2025 by incident-io

incident.AlertAttribute

Explore with Pulumi AI

View and manage alert attributes.

Alert attributes are used to parse structured data from alerts coming in via alert sources.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as incident from "@pulumi/incident";

// Create an alert attribute that points at a single Github user in the catalog
const githubUser = new incident.AlertAttribute("githubUser", {
    array: false,
    type: "CatalogEntry[\"Github User\"]",
});
Copy
import pulumi
import pulumi_incident as incident

# Create an alert attribute that points at a single Github user in the catalog
github_user = incident.AlertAttribute("githubUser",
    array=False,
    type="CatalogEntry[\"Github User\"]")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incident/v5/incident"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create an alert attribute that points at a single Github user in the catalog
		_, err := incident.NewAlertAttribute(ctx, "githubUser", &incident.AlertAttributeArgs{
			Array: pulumi.Bool(false),
			Type:  pulumi.String("CatalogEntry[\"Github User\"]"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incident = Pulumi.Incident;

return await Deployment.RunAsync(() => 
{
    // Create an alert attribute that points at a single Github user in the catalog
    var githubUser = new Incident.AlertAttribute("githubUser", new()
    {
        Array = false,
        Type = "CatalogEntry[\"Github User\"]",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incident.AlertAttribute;
import com.pulumi.incident.AlertAttributeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        // Create an alert attribute that points at a single Github user in the catalog
        var githubUser = new AlertAttribute("githubUser", AlertAttributeArgs.builder()
            .array(false)
            .type("CatalogEntry[\"Github User\"]")
            .build());

    }
}
Copy
resources:
  # Create an alert attribute that points at a single Github user in the catalog
  githubUser:
    type: incident:AlertAttribute
    properties:
      array: false
      type: CatalogEntry["Github User"]
Copy

Create AlertAttribute Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AlertAttribute(name: string, args: AlertAttributeArgs, opts?: CustomResourceOptions);
@overload
def AlertAttribute(resource_name: str,
                   args: AlertAttributeArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def AlertAttribute(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   array: Optional[bool] = None,
                   type: Optional[str] = None,
                   name: Optional[str] = None)
func NewAlertAttribute(ctx *Context, name string, args AlertAttributeArgs, opts ...ResourceOption) (*AlertAttribute, error)
public AlertAttribute(string name, AlertAttributeArgs args, CustomResourceOptions? opts = null)
public AlertAttribute(String name, AlertAttributeArgs args)
public AlertAttribute(String name, AlertAttributeArgs args, CustomResourceOptions options)
type: incident:AlertAttribute
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AlertAttributeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AlertAttributeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AlertAttributeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AlertAttributeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AlertAttributeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var alertAttributeResource = new Incident.AlertAttribute("alertAttributeResource", new()
{
    Array = false,
    Type = "string",
    Name = "string",
});
Copy
example, err := incident.NewAlertAttribute(ctx, "alertAttributeResource", &incident.AlertAttributeArgs{
Array: pulumi.Bool(false),
Type: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var alertAttributeResource = new AlertAttribute("alertAttributeResource", AlertAttributeArgs.builder()
    .array(false)
    .type("string")
    .name("string")
    .build());
Copy
alert_attribute_resource = incident.AlertAttribute("alertAttributeResource",
    array=False,
    type="string",
    name="string")
Copy
const alertAttributeResource = new incident.AlertAttribute("alertAttributeResource", {
    array: false,
    type: "string",
    name: "string",
});
Copy
type: incident:AlertAttribute
properties:
    array: false
    name: string
    type: string
Copy

AlertAttribute Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AlertAttribute resource accepts the following input properties:

Array This property is required. bool
Whether this attribute is an array
Type This property is required. string
Engine resource name for this attribute
Name string
Unique name of this attribute
Array This property is required. bool
Whether this attribute is an array
Type This property is required. string
Engine resource name for this attribute
Name string
Unique name of this attribute
array This property is required. Boolean
Whether this attribute is an array
type This property is required. String
Engine resource name for this attribute
name String
Unique name of this attribute
array This property is required. boolean
Whether this attribute is an array
type This property is required. string
Engine resource name for this attribute
name string
Unique name of this attribute
array This property is required. bool
Whether this attribute is an array
type This property is required. str
Engine resource name for this attribute
name str
Unique name of this attribute
array This property is required. Boolean
Whether this attribute is an array
type This property is required. String
Engine resource name for this attribute
name String
Unique name of this attribute

Outputs

All input properties are implicitly available as output properties. Additionally, the AlertAttribute 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 string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing AlertAttribute Resource

Get an existing AlertAttribute 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?: AlertAttributeState, opts?: CustomResourceOptions): AlertAttribute
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        array: Optional[bool] = None,
        name: Optional[str] = None,
        type: Optional[str] = None) -> AlertAttribute
func GetAlertAttribute(ctx *Context, name string, id IDInput, state *AlertAttributeState, opts ...ResourceOption) (*AlertAttribute, error)
public static AlertAttribute Get(string name, Input<string> id, AlertAttributeState? state, CustomResourceOptions? opts = null)
public static AlertAttribute get(String name, Output<String> id, AlertAttributeState state, CustomResourceOptions options)
resources:  _:    type: incident:AlertAttribute    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Array bool
Whether this attribute is an array
Name string
Unique name of this attribute
Type string
Engine resource name for this attribute
Array bool
Whether this attribute is an array
Name string
Unique name of this attribute
Type string
Engine resource name for this attribute
array Boolean
Whether this attribute is an array
name String
Unique name of this attribute
type String
Engine resource name for this attribute
array boolean
Whether this attribute is an array
name string
Unique name of this attribute
type string
Engine resource name for this attribute
array bool
Whether this attribute is an array
name str
Unique name of this attribute
type str
Engine resource name for this attribute
array Boolean
Whether this attribute is an array
name String
Unique name of this attribute
type String
Engine resource name for this attribute

Import

#!/bin/bash

Import an alert attribute using its ID

Replace the ID with a real ID from your incident.io organization

$ pulumi import incident:index/alertAttribute:AlertAttribute example 01ABC123DEF456GHI789JKL
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
incident incident-io/terraform-provider-incident
License
Notes
This Pulumi package is based on the incident Terraform Provider.