Opsgenie

Pulumi Official
Package maintained by Pulumi
v1.1.6 published on Tuesday, May 24, 2022 by Pulumi

Team

Manages a Team within Opsgenie.

Example Usage

using Pulumi;
using Opsgenie = Pulumi.Opsgenie;

class MyStack : Stack
{
    public MyStack()
    {
        var first = new Opsgenie.User("first", new Opsgenie.UserArgs
        {
            FullName = "name ",
            Role = "User",
            Username = "user@domain.com",
        });
        var second = new Opsgenie.User("second", new Opsgenie.UserArgs
        {
            FullName = "name ",
            Role = "User",
            Username = "test@domain.com",
        });
        var test = new Opsgenie.Team("test", new Opsgenie.TeamArgs
        {
            Description = "This team deals with all the things",
            Members = 
            {
                new Opsgenie.Inputs.TeamMemberArgs
                {
                    Id = first.Id,
                    Role = "admin",
                },
                new Opsgenie.Inputs.TeamMemberArgs
                {
                    Id = second.Id,
                    Role = "user",
                },
            },
        });
        var self_service = new Opsgenie.Team("self-service", new Opsgenie.TeamArgs
        {
            DeleteDefaultResources = true,
            Description = "Membership in this team is managed via OpsGenie web UI only",
            IgnoreMembers = true,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-opsgenie/sdk/go/opsgenie"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		first, err := opsgenie.NewUser(ctx, "first", &opsgenie.UserArgs{
			FullName: pulumi.String("name "),
			Role:     pulumi.String("User"),
			Username: pulumi.String("user@domain.com"),
		})
		if err != nil {
			return err
		}
		second, err := opsgenie.NewUser(ctx, "second", &opsgenie.UserArgs{
			FullName: pulumi.String("name "),
			Role:     pulumi.String("User"),
			Username: pulumi.String("test@domain.com"),
		})
		if err != nil {
			return err
		}
		_, err = opsgenie.NewTeam(ctx, "test", &opsgenie.TeamArgs{
			Description: pulumi.String("This team deals with all the things"),
			Members: TeamMemberArray{
				&TeamMemberArgs{
					Id:   first.ID(),
					Role: pulumi.String("admin"),
				},
				&TeamMemberArgs{
					Id:   second.ID(),
					Role: pulumi.String("user"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = opsgenie.NewTeam(ctx, "self-service", &opsgenie.TeamArgs{
			DeleteDefaultResources: pulumi.Bool(true),
			Description:            pulumi.String("Membership in this team is managed via OpsGenie web UI only"),
			IgnoreMembers:          pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_opsgenie as opsgenie

first = opsgenie.User("first",
    full_name="name ",
    role="User",
    username="user@domain.com")
second = opsgenie.User("second",
    full_name="name ",
    role="User",
    username="test@domain.com")
test = opsgenie.Team("test",
    description="This team deals with all the things",
    members=[
        opsgenie.TeamMemberArgs(
            id=first.id,
            role="admin",
        ),
        opsgenie.TeamMemberArgs(
            id=second.id,
            role="user",
        ),
    ])
self_service = opsgenie.Team("self-service",
    delete_default_resources=True,
    description="Membership in this team is managed via OpsGenie web UI only",
    ignore_members=True)
import * as pulumi from "@pulumi/pulumi";
import * as opsgenie from "@pulumi/opsgenie";

const first = new opsgenie.User("first", {
    fullName: "name ",
    role: "User",
    username: "user@domain.com",
});
const second = new opsgenie.User("second", {
    fullName: "name ",
    role: "User",
    username: "test@domain.com",
});
const test = new opsgenie.Team("test", {
    description: "This team deals with all the things",
    members: [
        {
            id: first.id,
            role: "admin",
        },
        {
            id: second.id,
            role: "user",
        },
    ],
});
const self_service = new opsgenie.Team("self-service", {
    deleteDefaultResources: true,
    description: "Membership in this team is managed via OpsGenie web UI only",
    ignoreMembers: true,
});

Coming soon!

Create a Team Resource

new Team(name: string, args?: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         delete_default_resources: Optional[bool] = None,
         description: Optional[str] = None,
         ignore_members: Optional[bool] = None,
         members: Optional[Sequence[TeamMemberArgs]] = None,
         name: Optional[str] = None)
@overload
def Team(resource_name: str,
         args: Optional[TeamArgs] = None,
         opts: Optional[ResourceOptions] = None)
func NewTeam(ctx *Context, name string, args *TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs? args = null, CustomResourceOptions? opts = null)
public Team(String name, TeamArgs args)
public Team(String name, TeamArgs args, CustomResourceOptions options)
type: opsgenie:Team
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args TeamArgs
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 TeamArgs
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 TeamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

DeleteDefaultResources bool

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

Description string

A description for this team.

IgnoreMembers bool

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

Members List<TeamMemberArgs>

A Member block as documented below.

Name string

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

DeleteDefaultResources bool

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

Description string

A description for this team.

IgnoreMembers bool

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

Members []TeamMemberArgs

A Member block as documented below.

Name string

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

deleteDefaultResources Boolean

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

description String

A description for this team.

ignoreMembers Boolean

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

members List<TeamMemberArgs>

A Member block as documented below.

name String

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

deleteDefaultResources boolean

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

description string

A description for this team.

ignoreMembers boolean

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

members TeamMemberArgs[]

A Member block as documented below.

name string

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

delete_default_resources bool

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

description str

A description for this team.

ignore_members bool

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

members Sequence[TeamMemberArgs]

A Member block as documented below.

name str

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

deleteDefaultResources Boolean

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

description String

A description for this team.

ignoreMembers Boolean

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

members List<Property Map>

A Member block as documented below.

name String

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

Outputs

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

Get an existing Team 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?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        delete_default_resources: Optional[bool] = None,
        description: Optional[str] = None,
        ignore_members: Optional[bool] = None,
        members: Optional[Sequence[TeamMemberArgs]] = None,
        name: Optional[str] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
public static Team get(String name, Output<String> id, TeamState 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:
DeleteDefaultResources bool

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

Description string

A description for this team.

IgnoreMembers bool

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

Members List<TeamMemberArgs>

A Member block as documented below.

Name string

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

DeleteDefaultResources bool

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

Description string

A description for this team.

IgnoreMembers bool

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

Members []TeamMemberArgs

A Member block as documented below.

Name string

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

deleteDefaultResources Boolean

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

description String

A description for this team.

ignoreMembers Boolean

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

members List<TeamMemberArgs>

A Member block as documented below.

name String

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

deleteDefaultResources boolean

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

description string

A description for this team.

ignoreMembers boolean

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

members TeamMemberArgs[]

A Member block as documented below.

name string

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

delete_default_resources bool

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

description str

A description for this team.

ignore_members bool

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

members Sequence[TeamMemberArgs]

A Member block as documented below.

name str

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

deleteDefaultResources Boolean

Set to true to remove default escalation and schedule for newly created team. Be careful its also changes that team routing rule to None. That means you have to define routing rule as well

description String

A description for this team.

ignoreMembers Boolean

Set to true to ignore any configured member blocks and any team member added/updated/removed via OpsGenie web UI. Use this option e.g. to maintain membership via web UI only and use it only for new teams. Changing the value for existing teams might lead to strange behaviour. Default: false.

members List<Property Map>

A Member block as documented below.

name String

The name associated with this team. Opsgenie defines that this must not be longer than 100 characters.

Supporting Types

TeamMember

Id string

The UUID for the member to add to this Team.

Role string

The role for the user within the Team - can be either admin or user. Default: user.

Id string

The UUID for the member to add to this Team.

Role string

The role for the user within the Team - can be either admin or user. Default: user.

id String

The UUID for the member to add to this Team.

role String

The role for the user within the Team - can be either admin or user. Default: user.

id string

The UUID for the member to add to this Team.

role string

The role for the user within the Team - can be either admin or user. Default: user.

id str

The UUID for the member to add to this Team.

role str

The role for the user within the Team - can be either admin or user. Default: user.

id String

The UUID for the member to add to this Team.

role String

The role for the user within the Team - can be either admin or user. Default: user.

Import

Teams can be imported using the team_id, e.g.

 $ pulumi import opsgenie:index/team:Team team1 team_id`

Package Details

Repository
https://github.com/pulumi/pulumi-opsgenie
License
Apache-2.0
Notes

This Pulumi package is based on the opsgenie Terraform Provider.