Rootly v1.5.0 published on Thursday, Apr 25, 2024 by Rootly
rootly.Severity
Explore with Pulumi AI
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rootly = Pulumi.Rootly;
return await Deployment.RunAsync(() =>
{
var sev0 = new Rootly.Severity("sev0", new()
{
Color = "#FF0000",
NotifyEmails = new[]
{
"foo@acme.com",
"bar@acme.com",
},
SlackAliases = new[]
{
new Rootly.Inputs.SeveritySlackAliasArgs
{
Id = "S0614TZR7",
Name = "Alias 1",
},
},
SlackChannels = new[]
{
new Rootly.Inputs.SeveritySlackChannelArgs
{
Id = "C06A4RZR9",
Name = "Channel 1",
},
new Rootly.Inputs.SeveritySlackChannelArgs
{
Id = "C02T4RYR2",
Name = "Channel 2",
},
},
});
var sev1 = new Rootly.Severity("sev1", new()
{
Color = "#FFA500",
NotifyEmails = new[]
{
"foo@acme.com",
"bar@acme.com",
},
SlackAliases = new[]
{
new Rootly.Inputs.SeveritySlackAliasArgs
{
Id = "S0614TZR7",
Name = "Alias 1",
},
},
SlackChannels = new[]
{
new Rootly.Inputs.SeveritySlackChannelArgs
{
Id = "C06A4RZR9",
Name = "Channel 1",
},
new Rootly.Inputs.SeveritySlackChannelArgs
{
Id = "C02T4RYR2",
Name = "Channel 2",
},
},
});
var sev2 = new Rootly.Severity("sev2", new()
{
Color = "#FFA500",
NotifyEmails = new[]
{
"foo@acme.com",
"bar@acme.com",
},
SlackAliases = new[]
{
new Rootly.Inputs.SeveritySlackAliasArgs
{
Id = "S0614TZR7",
Name = "Alias 1",
},
},
SlackChannels = new[]
{
new Rootly.Inputs.SeveritySlackChannelArgs
{
Id = "C06A4RZR9",
Name = "Channel 1",
},
new Rootly.Inputs.SeveritySlackChannelArgs
{
Id = "C02T4RYR2",
Name = "Channel 2",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-rootly/sdk/go/rootly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rootly.NewSeverity(ctx, "sev0", &rootly.SeverityArgs{
Color: pulumi.String("#FF0000"),
NotifyEmails: pulumi.StringArray{
pulumi.String("foo@acme.com"),
pulumi.String("bar@acme.com"),
},
SlackAliases: rootly.SeveritySlackAliasArray{
&rootly.SeveritySlackAliasArgs{
Id: pulumi.String("S0614TZR7"),
Name: pulumi.String("Alias 1"),
},
},
SlackChannels: rootly.SeveritySlackChannelArray{
&rootly.SeveritySlackChannelArgs{
Id: pulumi.String("C06A4RZR9"),
Name: pulumi.String("Channel 1"),
},
&rootly.SeveritySlackChannelArgs{
Id: pulumi.String("C02T4RYR2"),
Name: pulumi.String("Channel 2"),
},
},
})
if err != nil {
return err
}
_, err = rootly.NewSeverity(ctx, "sev1", &rootly.SeverityArgs{
Color: pulumi.String("#FFA500"),
NotifyEmails: pulumi.StringArray{
pulumi.String("foo@acme.com"),
pulumi.String("bar@acme.com"),
},
SlackAliases: rootly.SeveritySlackAliasArray{
&rootly.SeveritySlackAliasArgs{
Id: pulumi.String("S0614TZR7"),
Name: pulumi.String("Alias 1"),
},
},
SlackChannels: rootly.SeveritySlackChannelArray{
&rootly.SeveritySlackChannelArgs{
Id: pulumi.String("C06A4RZR9"),
Name: pulumi.String("Channel 1"),
},
&rootly.SeveritySlackChannelArgs{
Id: pulumi.String("C02T4RYR2"),
Name: pulumi.String("Channel 2"),
},
},
})
if err != nil {
return err
}
_, err = rootly.NewSeverity(ctx, "sev2", &rootly.SeverityArgs{
Color: pulumi.String("#FFA500"),
NotifyEmails: pulumi.StringArray{
pulumi.String("foo@acme.com"),
pulumi.String("bar@acme.com"),
},
SlackAliases: rootly.SeveritySlackAliasArray{
&rootly.SeveritySlackAliasArgs{
Id: pulumi.String("S0614TZR7"),
Name: pulumi.String("Alias 1"),
},
},
SlackChannels: rootly.SeveritySlackChannelArray{
&rootly.SeveritySlackChannelArgs{
Id: pulumi.String("C06A4RZR9"),
Name: pulumi.String("Channel 1"),
},
&rootly.SeveritySlackChannelArgs{
Id: pulumi.String("C02T4RYR2"),
Name: pulumi.String("Channel 2"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rootly.Severity;
import com.pulumi.rootly.SeverityArgs;
import com.pulumi.rootly.inputs.SeveritySlackAliasArgs;
import com.pulumi.rootly.inputs.SeveritySlackChannelArgs;
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) {
var sev0 = new Severity("sev0", SeverityArgs.builder()
.color("#FF0000")
.notifyEmails(
"foo@acme.com",
"bar@acme.com")
.slackAliases(SeveritySlackAliasArgs.builder()
.id("S0614TZR7")
.name("Alias 1")
.build())
.slackChannels(
SeveritySlackChannelArgs.builder()
.id("C06A4RZR9")
.name("Channel 1")
.build(),
SeveritySlackChannelArgs.builder()
.id("C02T4RYR2")
.name("Channel 2")
.build())
.build());
var sev1 = new Severity("sev1", SeverityArgs.builder()
.color("#FFA500")
.notifyEmails(
"foo@acme.com",
"bar@acme.com")
.slackAliases(SeveritySlackAliasArgs.builder()
.id("S0614TZR7")
.name("Alias 1")
.build())
.slackChannels(
SeveritySlackChannelArgs.builder()
.id("C06A4RZR9")
.name("Channel 1")
.build(),
SeveritySlackChannelArgs.builder()
.id("C02T4RYR2")
.name("Channel 2")
.build())
.build());
var sev2 = new Severity("sev2", SeverityArgs.builder()
.color("#FFA500")
.notifyEmails(
"foo@acme.com",
"bar@acme.com")
.slackAliases(SeveritySlackAliasArgs.builder()
.id("S0614TZR7")
.name("Alias 1")
.build())
.slackChannels(
SeveritySlackChannelArgs.builder()
.id("C06A4RZR9")
.name("Channel 1")
.build(),
SeveritySlackChannelArgs.builder()
.id("C02T4RYR2")
.name("Channel 2")
.build())
.build());
}
}
import pulumi
import pulumi_rootly as rootly
sev0 = rootly.Severity("sev0",
color="#FF0000",
notify_emails=[
"foo@acme.com",
"bar@acme.com",
],
slack_aliases=[rootly.SeveritySlackAliasArgs(
id="S0614TZR7",
name="Alias 1",
)],
slack_channels=[
rootly.SeveritySlackChannelArgs(
id="C06A4RZR9",
name="Channel 1",
),
rootly.SeveritySlackChannelArgs(
id="C02T4RYR2",
name="Channel 2",
),
])
sev1 = rootly.Severity("sev1",
color="#FFA500",
notify_emails=[
"foo@acme.com",
"bar@acme.com",
],
slack_aliases=[rootly.SeveritySlackAliasArgs(
id="S0614TZR7",
name="Alias 1",
)],
slack_channels=[
rootly.SeveritySlackChannelArgs(
id="C06A4RZR9",
name="Channel 1",
),
rootly.SeveritySlackChannelArgs(
id="C02T4RYR2",
name="Channel 2",
),
])
sev2 = rootly.Severity("sev2",
color="#FFA500",
notify_emails=[
"foo@acme.com",
"bar@acme.com",
],
slack_aliases=[rootly.SeveritySlackAliasArgs(
id="S0614TZR7",
name="Alias 1",
)],
slack_channels=[
rootly.SeveritySlackChannelArgs(
id="C06A4RZR9",
name="Channel 1",
),
rootly.SeveritySlackChannelArgs(
id="C02T4RYR2",
name="Channel 2",
),
])
import * as pulumi from "@pulumi/pulumi";
import * as rootly from "@pulumi/rootly";
const sev0 = new rootly.Severity("sev0", {
color: "#FF0000",
notifyEmails: [
"foo@acme.com",
"bar@acme.com",
],
slackAliases: [{
id: "S0614TZR7",
name: "Alias 1",
}],
slackChannels: [
{
id: "C06A4RZR9",
name: "Channel 1",
},
{
id: "C02T4RYR2",
name: "Channel 2",
},
],
});
const sev1 = new rootly.Severity("sev1", {
color: "#FFA500",
notifyEmails: [
"foo@acme.com",
"bar@acme.com",
],
slackAliases: [{
id: "S0614TZR7",
name: "Alias 1",
}],
slackChannels: [
{
id: "C06A4RZR9",
name: "Channel 1",
},
{
id: "C02T4RYR2",
name: "Channel 2",
},
],
});
const sev2 = new rootly.Severity("sev2", {
color: "#FFA500",
notifyEmails: [
"foo@acme.com",
"bar@acme.com",
],
slackAliases: [{
id: "S0614TZR7",
name: "Alias 1",
}],
slackChannels: [
{
id: "C06A4RZR9",
name: "Channel 1",
},
{
id: "C02T4RYR2",
name: "Channel 2",
},
],
});
resources:
sev0:
type: rootly:Severity
properties:
color: '#FF0000'
notifyEmails:
- foo@acme.com
- bar@acme.com
slackAliases:
- id: S0614TZR7
name: Alias 1
slackChannels:
- id: C06A4RZR9
name: Channel 1
- id: C02T4RYR2
name: Channel 2
sev1:
type: rootly:Severity
properties:
color: '#FFA500'
notifyEmails:
- foo@acme.com
- bar@acme.com
slackAliases:
- id: S0614TZR7
name: Alias 1
slackChannels:
- id: C06A4RZR9
name: Channel 1
- id: C02T4RYR2
name: Channel 2
sev2:
type: rootly:Severity
properties:
color: '#FFA500'
notifyEmails:
- foo@acme.com
- bar@acme.com
slackAliases:
- id: S0614TZR7
name: Alias 1
slackChannels:
- id: C06A4RZR9
name: Channel 1
- id: C02T4RYR2
name: Channel 2
Create Severity Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Severity(name: string, args?: SeverityArgs, opts?: CustomResourceOptions);
@overload
def Severity(resource_name: str,
args: Optional[SeverityArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Severity(resource_name: str,
opts: Optional[ResourceOptions] = None,
color: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
notify_emails: Optional[Sequence[str]] = None,
position: Optional[int] = None,
severity: Optional[str] = None,
slack_aliases: Optional[Sequence[SeveritySlackAliasArgs]] = None,
slack_channels: Optional[Sequence[SeveritySlackChannelArgs]] = None,
slug: Optional[str] = None)
func NewSeverity(ctx *Context, name string, args *SeverityArgs, opts ...ResourceOption) (*Severity, error)
public Severity(string name, SeverityArgs? args = null, CustomResourceOptions? opts = null)
public Severity(String name, SeverityArgs args)
public Severity(String name, SeverityArgs args, CustomResourceOptions options)
type: rootly:Severity
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SeverityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SeverityArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SeverityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SeverityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SeverityArgs
- 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 severityResource = new Rootly.Severity("severityResource", new()
{
Color = "string",
Description = "string",
Name = "string",
NotifyEmails = new[]
{
"string",
},
Position = 0,
Rootly_severity = "string",
SlackAliases = new[]
{
new Rootly.Inputs.SeveritySlackAliasArgs
{
Id = "string",
Name = "string",
},
},
SlackChannels = new[]
{
new Rootly.Inputs.SeveritySlackChannelArgs
{
Id = "string",
Name = "string",
},
},
Slug = "string",
});
example, err := rootly.NewSeverity(ctx, "severityResource", &rootly.SeverityArgs{
Color: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
NotifyEmails: pulumi.StringArray{
pulumi.String("string"),
},
Position: pulumi.Int(0),
Severity: pulumi.String("string"),
SlackAliases: rootly.SeveritySlackAliasArray{
&rootly.SeveritySlackAliasArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
SlackChannels: rootly.SeveritySlackChannelArray{
&rootly.SeveritySlackChannelArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
Slug: pulumi.String("string"),
})
var severityResource = new Severity("severityResource", SeverityArgs.builder()
.color("string")
.description("string")
.name("string")
.notifyEmails("string")
.position(0)
.severity("string")
.slackAliases(SeveritySlackAliasArgs.builder()
.id("string")
.name("string")
.build())
.slackChannels(SeveritySlackChannelArgs.builder()
.id("string")
.name("string")
.build())
.slug("string")
.build());
severity_resource = rootly.Severity("severityResource",
color="string",
description="string",
name="string",
notify_emails=["string"],
position=0,
severity="string",
slack_aliases=[rootly.SeveritySlackAliasArgs(
id="string",
name="string",
)],
slack_channels=[rootly.SeveritySlackChannelArgs(
id="string",
name="string",
)],
slug="string")
const severityResource = new rootly.Severity("severityResource", {
color: "string",
description: "string",
name: "string",
notifyEmails: ["string"],
position: 0,
severity: "string",
slackAliases: [{
id: "string",
name: "string",
}],
slackChannels: [{
id: "string",
name: "string",
}],
slug: "string",
});
type: rootly:Severity
properties:
color: string
description: string
name: string
notifyEmails:
- string
position: 0
severity: string
slackAliases:
- id: string
name: string
slackChannels:
- id: string
name: string
slug: string
Severity Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Severity resource accepts the following input properties:
- Color string
- The hex color of the severity
- Description string
- The description of the severity
- Name string
- The name of the severity
- Notify
Emails List<string> - Emails to attach to the severity
- Position int
- Position of the severity
- Slack
Aliases List<SeveritySlack Alias> - Slack Aliases associated with this severity
- Slack
Channels List<SeveritySlack Channel> - Slack Channels associated with this severity
- Slug string
- The slug of the severity
- rootly_
severity string - The severity of the severity. Value must be one of
critical
,high
,medium
,low
.
- Color string
- The hex color of the severity
- Description string
- The description of the severity
- Name string
- The name of the severity
- Notify
Emails []string - Emails to attach to the severity
- Position int
- Position of the severity
- Severity string
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - Slack
Aliases []SeveritySlack Alias Args - Slack Aliases associated with this severity
- Slack
Channels []SeveritySlack Channel Args - Slack Channels associated with this severity
- Slug string
- The slug of the severity
- color String
- The hex color of the severity
- description String
- The description of the severity
- name String
- The name of the severity
- notify
Emails List<String> - Emails to attach to the severity
- position Integer
- Position of the severity
- severity String
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - slack
Aliases List<SeveritySlack Alias> - Slack Aliases associated with this severity
- slack
Channels List<SeveritySlack Channel> - Slack Channels associated with this severity
- slug String
- The slug of the severity
- color string
- The hex color of the severity
- description string
- The description of the severity
- name string
- The name of the severity
- notify
Emails string[] - Emails to attach to the severity
- position number
- Position of the severity
- severity string
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - slack
Aliases SeveritySlack Alias[] - Slack Aliases associated with this severity
- slack
Channels SeveritySlack Channel[] - Slack Channels associated with this severity
- slug string
- The slug of the severity
- color str
- The hex color of the severity
- description str
- The description of the severity
- name str
- The name of the severity
- notify_
emails Sequence[str] - Emails to attach to the severity
- position int
- Position of the severity
- severity str
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - slack_
aliases Sequence[SeveritySlack Alias Args] - Slack Aliases associated with this severity
- slack_
channels Sequence[SeveritySlack Channel Args] - Slack Channels associated with this severity
- slug str
- The slug of the severity
- color String
- The hex color of the severity
- description String
- The description of the severity
- name String
- The name of the severity
- notify
Emails List<String> - Emails to attach to the severity
- position Number
- Position of the severity
- severity String
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - slack
Aliases List<Property Map> - Slack Aliases associated with this severity
- slack
Channels List<Property Map> - Slack Channels associated with this severity
- slug String
- The slug of the severity
Outputs
All input properties are implicitly available as output properties. Additionally, the Severity 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 Severity Resource
Get an existing Severity 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?: SeverityState, opts?: CustomResourceOptions): Severity
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
color: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
notify_emails: Optional[Sequence[str]] = None,
position: Optional[int] = None,
severity: Optional[str] = None,
slack_aliases: Optional[Sequence[SeveritySlackAliasArgs]] = None,
slack_channels: Optional[Sequence[SeveritySlackChannelArgs]] = None,
slug: Optional[str] = None) -> Severity
func GetSeverity(ctx *Context, name string, id IDInput, state *SeverityState, opts ...ResourceOption) (*Severity, error)
public static Severity Get(string name, Input<string> id, SeverityState? state, CustomResourceOptions? opts = null)
public static Severity get(String name, Output<String> id, SeverityState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Color string
- The hex color of the severity
- Description string
- The description of the severity
- Name string
- The name of the severity
- Notify
Emails List<string> - Emails to attach to the severity
- Position int
- Position of the severity
- Slack
Aliases List<SeveritySlack Alias> - Slack Aliases associated with this severity
- Slack
Channels List<SeveritySlack Channel> - Slack Channels associated with this severity
- Slug string
- The slug of the severity
- rootly_
severity string - The severity of the severity. Value must be one of
critical
,high
,medium
,low
.
- Color string
- The hex color of the severity
- Description string
- The description of the severity
- Name string
- The name of the severity
- Notify
Emails []string - Emails to attach to the severity
- Position int
- Position of the severity
- Severity string
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - Slack
Aliases []SeveritySlack Alias Args - Slack Aliases associated with this severity
- Slack
Channels []SeveritySlack Channel Args - Slack Channels associated with this severity
- Slug string
- The slug of the severity
- color String
- The hex color of the severity
- description String
- The description of the severity
- name String
- The name of the severity
- notify
Emails List<String> - Emails to attach to the severity
- position Integer
- Position of the severity
- severity String
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - slack
Aliases List<SeveritySlack Alias> - Slack Aliases associated with this severity
- slack
Channels List<SeveritySlack Channel> - Slack Channels associated with this severity
- slug String
- The slug of the severity
- color string
- The hex color of the severity
- description string
- The description of the severity
- name string
- The name of the severity
- notify
Emails string[] - Emails to attach to the severity
- position number
- Position of the severity
- severity string
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - slack
Aliases SeveritySlack Alias[] - Slack Aliases associated with this severity
- slack
Channels SeveritySlack Channel[] - Slack Channels associated with this severity
- slug string
- The slug of the severity
- color str
- The hex color of the severity
- description str
- The description of the severity
- name str
- The name of the severity
- notify_
emails Sequence[str] - Emails to attach to the severity
- position int
- Position of the severity
- severity str
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - slack_
aliases Sequence[SeveritySlack Alias Args] - Slack Aliases associated with this severity
- slack_
channels Sequence[SeveritySlack Channel Args] - Slack Channels associated with this severity
- slug str
- The slug of the severity
- color String
- The hex color of the severity
- description String
- The description of the severity
- name String
- The name of the severity
- notify
Emails List<String> - Emails to attach to the severity
- position Number
- Position of the severity
- severity String
- The severity of the severity. Value must be one of
critical
,high
,medium
,low
. - slack
Aliases List<Property Map> - Slack Aliases associated with this severity
- slack
Channels List<Property Map> - Slack Channels associated with this severity
- slug String
- The slug of the severity
Supporting Types
SeveritySlackAlias, SeveritySlackAliasArgs
SeveritySlackChannel, SeveritySlackChannelArgs
Package Details
- Repository
- rootly rootlyhq/pulumi-rootly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rootly
Terraform Provider.