1. Packages
  2. Rootly
  3. API Docs
  4. Environment
Rootly v1.0.1 published on Friday, Jun 2, 2023 by Rootly

rootly.Environment

Explore with Pulumi AI

rootly logo
Rootly v1.0.1 published on Friday, Jun 2, 2023 by Rootly

    Example Usage

    using Pulumi;
    using Rootly = Pulumi.Rootly;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var development = new Rootly.Environment("development", new Rootly.EnvironmentArgs
            {
                Color = "#FF0000",
                NotifyEmails = 
                {
                    "foo@acme.com",
                    "bar@acme.com",
                },
                SlackAliases = 
                {
                    new Rootly.Inputs.EnvironmentSlackAliasArgs
                    {
                        Id = "S0614TZR7",
                        Name = "Alias 1",
                    },
                },
                SlackChannels = 
                {
                    new Rootly.Inputs.EnvironmentSlackChannelArgs
                    {
                        Id = "C06A4RZR9",
                        Name = "Channel 1",
                    },
                    new Rootly.Inputs.EnvironmentSlackChannelArgs
                    {
                        Id = "C02T4RYR2",
                        Name = "Channel 2",
                    },
                },
            });
            var staging = new Rootly.Environment("staging", new Rootly.EnvironmentArgs
            {
                Color = "#FFA500",
                NotifyEmails = 
                {
                    "foo@acme.com",
                    "bar@acme.com",
                },
                SlackAliases = 
                {
                    new Rootly.Inputs.EnvironmentSlackAliasArgs
                    {
                        Id = "S0614TZR7",
                        Name = "Alias 1",
                    },
                },
                SlackChannels = 
                {
                    new Rootly.Inputs.EnvironmentSlackChannelArgs
                    {
                        Id = "C06A4RZR9",
                        Name = "Channel 1",
                    },
                    new Rootly.Inputs.EnvironmentSlackChannelArgs
                    {
                        Id = "C02T4RYR2",
                        Name = "Channel 2",
                    },
                },
            });
            var production = new Rootly.Environment("production", new Rootly.EnvironmentArgs
            {
                Color = "#FFA500",
                NotifyEmails = 
                {
                    "foo@acme.com",
                    "bar@acme.com",
                },
                SlackAliases = 
                {
                    new Rootly.Inputs.EnvironmentSlackAliasArgs
                    {
                        Id = "S0614TZR7",
                        Name = "Alias 1",
                    },
                },
                SlackChannels = 
                {
                    new Rootly.Inputs.EnvironmentSlackChannelArgs
                    {
                        Id = "C06A4RZR9",
                        Name = "Channel 1",
                    },
                    new Rootly.Inputs.EnvironmentSlackChannelArgs
                    {
                        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.NewEnvironment(ctx, "development", &rootly.EnvironmentArgs{
    			Color: pulumi.String("#FF0000"),
    			NotifyEmails: pulumi.StringArray{
    				pulumi.String("foo@acme.com"),
    				pulumi.String("bar@acme.com"),
    			},
    			SlackAliases: EnvironmentSlackAliasArray{
    				&EnvironmentSlackAliasArgs{
    					Id:   pulumi.String("S0614TZR7"),
    					Name: pulumi.String("Alias 1"),
    				},
    			},
    			SlackChannels: EnvironmentSlackChannelArray{
    				&EnvironmentSlackChannelArgs{
    					Id:   pulumi.String("C06A4RZR9"),
    					Name: pulumi.String("Channel 1"),
    				},
    				&EnvironmentSlackChannelArgs{
    					Id:   pulumi.String("C02T4RYR2"),
    					Name: pulumi.String("Channel 2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rootly.NewEnvironment(ctx, "staging", &rootly.EnvironmentArgs{
    			Color: pulumi.String("#FFA500"),
    			NotifyEmails: pulumi.StringArray{
    				pulumi.String("foo@acme.com"),
    				pulumi.String("bar@acme.com"),
    			},
    			SlackAliases: EnvironmentSlackAliasArray{
    				&EnvironmentSlackAliasArgs{
    					Id:   pulumi.String("S0614TZR7"),
    					Name: pulumi.String("Alias 1"),
    				},
    			},
    			SlackChannels: EnvironmentSlackChannelArray{
    				&EnvironmentSlackChannelArgs{
    					Id:   pulumi.String("C06A4RZR9"),
    					Name: pulumi.String("Channel 1"),
    				},
    				&EnvironmentSlackChannelArgs{
    					Id:   pulumi.String("C02T4RYR2"),
    					Name: pulumi.String("Channel 2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = rootly.NewEnvironment(ctx, "production", &rootly.EnvironmentArgs{
    			Color: pulumi.String("#FFA500"),
    			NotifyEmails: pulumi.StringArray{
    				pulumi.String("foo@acme.com"),
    				pulumi.String("bar@acme.com"),
    			},
    			SlackAliases: EnvironmentSlackAliasArray{
    				&EnvironmentSlackAliasArgs{
    					Id:   pulumi.String("S0614TZR7"),
    					Name: pulumi.String("Alias 1"),
    				},
    			},
    			SlackChannels: EnvironmentSlackChannelArray{
    				&EnvironmentSlackChannelArgs{
    					Id:   pulumi.String("C06A4RZR9"),
    					Name: pulumi.String("Channel 1"),
    				},
    				&EnvironmentSlackChannelArgs{
    					Id:   pulumi.String("C02T4RYR2"),
    					Name: pulumi.String("Channel 2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_rootly as rootly
    
    development = rootly.Environment("development",
        color="#FF0000",
        notify_emails=[
            "foo@acme.com",
            "bar@acme.com",
        ],
        slack_aliases=[rootly.EnvironmentSlackAliasArgs(
            id="S0614TZR7",
            name="Alias 1",
        )],
        slack_channels=[
            rootly.EnvironmentSlackChannelArgs(
                id="C06A4RZR9",
                name="Channel 1",
            ),
            rootly.EnvironmentSlackChannelArgs(
                id="C02T4RYR2",
                name="Channel 2",
            ),
        ])
    staging = rootly.Environment("staging",
        color="#FFA500",
        notify_emails=[
            "foo@acme.com",
            "bar@acme.com",
        ],
        slack_aliases=[rootly.EnvironmentSlackAliasArgs(
            id="S0614TZR7",
            name="Alias 1",
        )],
        slack_channels=[
            rootly.EnvironmentSlackChannelArgs(
                id="C06A4RZR9",
                name="Channel 1",
            ),
            rootly.EnvironmentSlackChannelArgs(
                id="C02T4RYR2",
                name="Channel 2",
            ),
        ])
    production = rootly.Environment("production",
        color="#FFA500",
        notify_emails=[
            "foo@acme.com",
            "bar@acme.com",
        ],
        slack_aliases=[rootly.EnvironmentSlackAliasArgs(
            id="S0614TZR7",
            name="Alias 1",
        )],
        slack_channels=[
            rootly.EnvironmentSlackChannelArgs(
                id="C06A4RZR9",
                name="Channel 1",
            ),
            rootly.EnvironmentSlackChannelArgs(
                id="C02T4RYR2",
                name="Channel 2",
            ),
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as rootly from "@pulumi/rootly";
    
    const development = new rootly.Environment("development", {
        color: "#FF0000",
        notifyEmails: [
            "foo@acme.com",
            "bar@acme.com",
        ],
        slackAliases: [{
            id: "S0614TZR7",
            name: "Alias 1", // Any string really
        }],
        slackChannels: [
            {
                id: "C06A4RZR9",
                name: "Channel 1", // Any string really
            },
            {
                id: "C02T4RYR2",
                name: "Channel 2", // Any string really
            },
        ],
    });
    const staging = new rootly.Environment("staging", {
        color: "#FFA500",
        notifyEmails: [
            "foo@acme.com",
            "bar@acme.com",
        ],
        slackAliases: [{
            id: "S0614TZR7",
            name: "Alias 1", // Any string really
        }],
        slackChannels: [
            {
                id: "C06A4RZR9",
                name: "Channel 1", // Any string really
            },
            {
                id: "C02T4RYR2",
                name: "Channel 2", // Any string really
            },
        ],
    });
    const production = new rootly.Environment("production", {
        color: "#FFA500",
        notifyEmails: [
            "foo@acme.com",
            "bar@acme.com",
        ],
        slackAliases: [{
            id: "S0614TZR7",
            name: "Alias 1", // Any string really
        }],
        slackChannels: [
            {
                id: "C06A4RZR9",
                name: "Channel 1", // Any string really
            },
            {
                id: "C02T4RYR2",
                name: "Channel 2", // Any string really
            },
        ],
    });
    

    Coming soon!

    Create Environment Resource

    new Environment(name: string, args?: EnvironmentArgs, opts?: CustomResourceOptions);
    @overload
    def Environment(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,
                    slack_aliases: Optional[Sequence[EnvironmentSlackAliasArgs]] = None,
                    slack_channels: Optional[Sequence[EnvironmentSlackChannelArgs]] = None,
                    slug: Optional[str] = None)
    @overload
    def Environment(resource_name: str,
                    args: Optional[EnvironmentArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    func NewEnvironment(ctx *Context, name string, args *EnvironmentArgs, opts ...ResourceOption) (*Environment, error)
    public Environment(string name, EnvironmentArgs? args = null, CustomResourceOptions? opts = null)
    public Environment(String name, EnvironmentArgs args)
    public Environment(String name, EnvironmentArgs args, CustomResourceOptions options)
    
    type: rootly:Environment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EnvironmentArgs
    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 EnvironmentArgs
    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 EnvironmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnvironmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnvironmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Environment 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 Environment resource accepts the following input properties:

    Color string
    Description string

    The description of the environment

    Name string

    The name of the environment

    NotifyEmails List<string>

    Emails attached to the environment

    Position int

    Position of the environment

    SlackAliases List<EnvironmentSlackAlias>

    Slack Aliases associated with this environment

    SlackChannels List<EnvironmentSlackChannel>

    Slack Channels associated with this environment

    Slug string

    The slug of the environment

    Color string
    Description string

    The description of the environment

    Name string

    The name of the environment

    NotifyEmails []string

    Emails attached to the environment

    Position int

    Position of the environment

    SlackAliases []EnvironmentSlackAliasArgs

    Slack Aliases associated with this environment

    SlackChannels []EnvironmentSlackChannelArgs

    Slack Channels associated with this environment

    Slug string

    The slug of the environment

    color String
    description String

    The description of the environment

    name String

    The name of the environment

    notifyEmails List<String>

    Emails attached to the environment

    position Integer

    Position of the environment

    slackAliases List<EnvironmentSlackAlias>

    Slack Aliases associated with this environment

    slackChannels List<EnvironmentSlackChannel>

    Slack Channels associated with this environment

    slug String

    The slug of the environment

    color string
    description string

    The description of the environment

    name string

    The name of the environment

    notifyEmails string[]

    Emails attached to the environment

    position number

    Position of the environment

    slackAliases EnvironmentSlackAlias[]

    Slack Aliases associated with this environment

    slackChannels EnvironmentSlackChannel[]

    Slack Channels associated with this environment

    slug string

    The slug of the environment

    color str
    description str

    The description of the environment

    name str

    The name of the environment

    notify_emails Sequence[str]

    Emails attached to the environment

    position int

    Position of the environment

    slack_aliases Sequence[EnvironmentSlackAliasArgs]

    Slack Aliases associated with this environment

    slack_channels Sequence[EnvironmentSlackChannelArgs]

    Slack Channels associated with this environment

    slug str

    The slug of the environment

    color String
    description String

    The description of the environment

    name String

    The name of the environment

    notifyEmails List<String>

    Emails attached to the environment

    position Number

    Position of the environment

    slackAliases List<Property Map>

    Slack Aliases associated with this environment

    slackChannels List<Property Map>

    Slack Channels associated with this environment

    slug String

    The slug of the environment

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Environment 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 Environment Resource

    Get an existing Environment 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?: EnvironmentState, opts?: CustomResourceOptions): Environment
    @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,
            slack_aliases: Optional[Sequence[EnvironmentSlackAliasArgs]] = None,
            slack_channels: Optional[Sequence[EnvironmentSlackChannelArgs]] = None,
            slug: Optional[str] = None) -> Environment
    func GetEnvironment(ctx *Context, name string, id IDInput, state *EnvironmentState, opts ...ResourceOption) (*Environment, error)
    public static Environment Get(string name, Input<string> id, EnvironmentState? state, CustomResourceOptions? opts = null)
    public static Environment get(String name, Output<String> id, EnvironmentState 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.
    The following state arguments are supported:
    Color string
    Description string

    The description of the environment

    Name string

    The name of the environment

    NotifyEmails List<string>

    Emails attached to the environment

    Position int

    Position of the environment

    SlackAliases List<EnvironmentSlackAlias>

    Slack Aliases associated with this environment

    SlackChannels List<EnvironmentSlackChannel>

    Slack Channels associated with this environment

    Slug string

    The slug of the environment

    Color string
    Description string

    The description of the environment

    Name string

    The name of the environment

    NotifyEmails []string

    Emails attached to the environment

    Position int

    Position of the environment

    SlackAliases []EnvironmentSlackAliasArgs

    Slack Aliases associated with this environment

    SlackChannels []EnvironmentSlackChannelArgs

    Slack Channels associated with this environment

    Slug string

    The slug of the environment

    color String
    description String

    The description of the environment

    name String

    The name of the environment

    notifyEmails List<String>

    Emails attached to the environment

    position Integer

    Position of the environment

    slackAliases List<EnvironmentSlackAlias>

    Slack Aliases associated with this environment

    slackChannels List<EnvironmentSlackChannel>

    Slack Channels associated with this environment

    slug String

    The slug of the environment

    color string
    description string

    The description of the environment

    name string

    The name of the environment

    notifyEmails string[]

    Emails attached to the environment

    position number

    Position of the environment

    slackAliases EnvironmentSlackAlias[]

    Slack Aliases associated with this environment

    slackChannels EnvironmentSlackChannel[]

    Slack Channels associated with this environment

    slug string

    The slug of the environment

    color str
    description str

    The description of the environment

    name str

    The name of the environment

    notify_emails Sequence[str]

    Emails attached to the environment

    position int

    Position of the environment

    slack_aliases Sequence[EnvironmentSlackAliasArgs]

    Slack Aliases associated with this environment

    slack_channels Sequence[EnvironmentSlackChannelArgs]

    Slack Channels associated with this environment

    slug str

    The slug of the environment

    color String
    description String

    The description of the environment

    name String

    The name of the environment

    notifyEmails List<String>

    Emails attached to the environment

    position Number

    Position of the environment

    slackAliases List<Property Map>

    Slack Aliases associated with this environment

    slackChannels List<Property Map>

    Slack Channels associated with this environment

    slug String

    The slug of the environment

    Supporting Types

    EnvironmentSlackAlias, EnvironmentSlackAliasArgs

    Id string
    Name string
    Id string
    Name string
    id String
    name String
    id string
    name string
    id str
    name str
    id String
    name String

    EnvironmentSlackChannel, EnvironmentSlackChannelArgs

    Id string
    Name string
    Id string
    Name string
    id String
    name String
    id string
    name string
    id str
    name str
    id String
    name String

    Package Details

    Repository
    rootly rootlyhq/pulumi-rootly
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the rootly Terraform Provider.

    rootly logo
    Rootly v1.0.1 published on Friday, Jun 2, 2023 by Rootly