GetUser

Use this data source to get information about a specific user 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 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" },
                        },
                    },
                },
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_pagerduty as pagerduty

me = pagerduty.get_user(email="me@example.com")
foo = pagerduty.EscalationPolicy("foo",
    num_loops=2,
    rules=[{
        "escalationDelayInMinutes": 10,
        "target": [{
            "id": me.id,
            "type": "user",
        }],
    }])
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 foo = new pagerduty.EscalationPolicy("foo", {
    numLoops: 2,
    rules: [{
        escalationDelayInMinutes: 10,
        targets: [{
            id: me.id,
            type: "user",
        }],
    }],
});

Using GetUser

function getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function  get_user(email=None, opts=None)
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)

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

public static class GetUser {
    public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Email string

The email to use to find a user in the PagerDuty API.

Email string

The email to use to find a user in the PagerDuty API.

email string

The email to use to find a user in the PagerDuty API.

email str

The email to use to find a user in the PagerDuty API.

GetUser Result

The following output properties are available:

Email string
Id string

The provider-assigned unique ID for this managed resource.

Name string

The short name of the found user.

Email string
Id string

The provider-assigned unique ID for this managed resource.

Name string

The short name of the found user.

email string
id string

The provider-assigned unique ID for this managed resource.

name string

The short name of the found user.

email str
id str

The provider-assigned unique ID for this managed resource.

name str

The short name of the found user.

Package Details

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