1. Packages
  2. Opsgenie
  3. API Docs
  4. Team
Opsgenie v1.3.6 published on Tuesday, Feb 27, 2024 by Pulumi

opsgenie.Team

Explore with Pulumi AI

opsgenie logo
Opsgenie v1.3.6 published on Tuesday, Feb 27, 2024 by Pulumi

    Manages a Team within Opsgenie.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opsgenie = Pulumi.Opsgenie;
    
    return await Deployment.RunAsync(() => 
    {
        var first = new Opsgenie.User("first", new()
        {
            FullName = "name ",
            Role = "User",
            Username = "user@domain.com",
        });
    
        var second = new Opsgenie.User("second", new()
        {
            FullName = "name ",
            Role = "User",
            Username = "test@domain.com",
        });
    
        var test = new Opsgenie.Team("test", new()
        {
            Description = "This team deals with all the things",
            Members = new[]
            {
                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()
        {
            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: opsgenie.TeamMemberArray{
    				&opsgenie.TeamMemberArgs{
    					Id:   first.ID(),
    					Role: pulumi.String("admin"),
    				},
    				&opsgenie.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
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opsgenie.User;
    import com.pulumi.opsgenie.UserArgs;
    import com.pulumi.opsgenie.Team;
    import com.pulumi.opsgenie.TeamArgs;
    import com.pulumi.opsgenie.inputs.TeamMemberArgs;
    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 first = new User("first", UserArgs.builder()        
                .fullName("name ")
                .role("User")
                .username("user@domain.com")
                .build());
    
            var second = new User("second", UserArgs.builder()        
                .fullName("name ")
                .role("User")
                .username("test@domain.com")
                .build());
    
            var test = new Team("test", TeamArgs.builder()        
                .description("This team deals with all the things")
                .members(            
                    TeamMemberArgs.builder()
                        .id(first.id())
                        .role("admin")
                        .build(),
                    TeamMemberArgs.builder()
                        .id(second.id())
                        .role("user")
                        .build())
                .build());
    
            var self_service = new Team("self-service", TeamArgs.builder()        
                .deleteDefaultResources(true)
                .description("Membership in this team is managed via OpsGenie web UI only")
                .ignoreMembers(true)
                .build());
    
        }
    }
    
    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,
    });
    
    resources:
      first:
        type: opsgenie:User
        properties:
          fullName: 'name '
          role: User
          username: user@domain.com
      second:
        type: opsgenie:User
        properties:
          fullName: 'name '
          role: User
          username: test@domain.com
      test:
        type: opsgenie:Team
        properties:
          description: This team deals with all the things
          members:
            - id: ${first.id}
              role: admin
            - id: ${second.id}
              role: user
      self-service:
        type: opsgenie:Team
        properties:
          deleteDefaultResources: true
          description: Membership in this team is managed via OpsGenie web UI only
          ignoreMembers: true
    

    Create Team Resource

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

    Constructor syntax

    new Team(name: string, args?: TeamArgs, opts?: CustomResourceOptions);
    @overload
    def Team(resource_name: str,
             args: Optional[TeamArgs] = None,
             opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Example

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

    var teamResource = new Opsgenie.Team("teamResource", new()
    {
        DeleteDefaultResources = false,
        Description = "string",
        IgnoreMembers = false,
        Members = new[]
        {
            new Opsgenie.Inputs.TeamMemberArgs
            {
                Id = "string",
                Role = "string",
                Username = "string",
            },
        },
        Name = "string",
    });
    
    example, err := opsgenie.NewTeam(ctx, "teamResource", &opsgenie.TeamArgs{
    	DeleteDefaultResources: pulumi.Bool(false),
    	Description:            pulumi.String("string"),
    	IgnoreMembers:          pulumi.Bool(false),
    	Members: opsgenie.TeamMemberArray{
    		&opsgenie.TeamMemberArgs{
    			Id:       pulumi.String("string"),
    			Role:     pulumi.String("string"),
    			Username: pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    })
    
    var teamResource = new Team("teamResource", TeamArgs.builder()        
        .deleteDefaultResources(false)
        .description("string")
        .ignoreMembers(false)
        .members(TeamMemberArgs.builder()
            .id("string")
            .role("string")
            .username("string")
            .build())
        .name("string")
        .build());
    
    team_resource = opsgenie.Team("teamResource",
        delete_default_resources=False,
        description="string",
        ignore_members=False,
        members=[opsgenie.TeamMemberArgs(
            id="string",
            role="string",
            username="string",
        )],
        name="string")
    
    const teamResource = new opsgenie.Team("teamResource", {
        deleteDefaultResources: false,
        description: "string",
        ignoreMembers: false,
        members: [{
            id: "string",
            role: "string",
            username: "string",
        }],
        name: "string",
    });
    
    type: opsgenie:Team
    properties:
        deleteDefaultResources: false
        description: string
        ignoreMembers: false
        members:
            - id: string
              role: string
              username: string
        name: string
    

    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<TeamMember>
    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<TeamMember>
    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 TeamMember[]
    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 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<TeamMember>
    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<TeamMember>
    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 TeamMember[]
    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, TeamMemberArgs

    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.
    Username string
    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.
    Username string
    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.
    username String
    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.
    username string
    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.
    username str
    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.
    username String

    Import

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

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

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

    Package Details

    Repository
    Opsgenie pulumi/pulumi-opsgenie
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the opsgenie Terraform Provider.
    opsgenie logo
    Opsgenie v1.3.6 published on Tuesday, Feb 27, 2024 by Pulumi