GetTeam

Use this data source to get information about a specific team that you can use for other PagerDuty resources.

Example Usage

using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

class MyStack : Stack
{
    public MyStack()
    {
        var me = Output.Create(Pagerduty.GetUser.InvokeAsync(new Pagerduty.GetUserArgs
        {
            Email = "me@example.com",
        }));
        var devops = Output.Create(Pagerduty.GetTeam.InvokeAsync(new Pagerduty.GetTeamArgs
        {
            Name = "devops",
        }));
        var foo = new Pagerduty.EscalationPolicy("foo", new Pagerduty.EscalationPolicyArgs
        {
            NumLoops = 2,
            Rules = 
            {
                new Pagerduty.Inputs.EscalationPolicyRuleArgs
                {
                    EscalationDelayInMinutes = 10,
                    Target = 
                    {
                        
                        {
                            { "id", me.Apply(me => me.Id) },
                            { "type", "user" },
                        },
                    },
                },
            },
            Teams = 
            {
                devops.Apply(devops => devops.Id),
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_pagerduty as pagerduty

me = pagerduty.get_user(email="me@example.com")
devops = pagerduty.get_team(name="devops")
foo = pagerduty.EscalationPolicy("foo",
    num_loops=2,
    rules=[{
        "escalationDelayInMinutes": 10,
        "target": [{
            "id": me.id,
            "type": "user",
        }],
    }],
    teams=[devops.id])
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const me = pulumi.output(pagerduty.getUser({
    email: "me@example.com",
}, { async: true }));
const devops = pulumi.output(pagerduty.getTeam({
    name: "devops",
}, { async: true }));
const foo = new pagerduty.EscalationPolicy("foo", {
    numLoops: 2,
    rules: [{
        escalationDelayInMinutes: 10,
        targets: [{
            id: me.id,
            type: "user",
        }],
    }],
    teams: [devops.id],
});

Using GetTeam

function getTeam(args: GetTeamArgs, opts?: InvokeOptions): Promise<GetTeamResult>
function  get_team(name=None, opts=None)
func LookupTeam(ctx *Context, args *LookupTeamArgs, opts ...InvokeOption) (*LookupTeamResult, error)

Note: This function is named LookupTeam in the Go SDK.

public static class GetTeam {
    public static Task<GetTeamResult> InvokeAsync(GetTeamArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the team to find in the PagerDuty API.

Name string

The name of the team to find in the PagerDuty API.

name string

The name of the team to find in the PagerDuty API.

name str

The name of the team to find in the PagerDuty API.

GetTeam Result

The following output properties are available:

Description string

A description of the found team.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the found team.

Description string

A description of the found team.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the found team.

description string

A description of the found team.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the found team.

description str

A description of the found team.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the found team.

Package Details

Repository
https://github.com/pulumi/pulumi-pagerduty
License
Apache-2.0
Notes
This Pulumi package is based on the pagerduty Terraform Provider.