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
LookupUserin the Go SDK.
public static class GetUser {
public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetUser Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pagerdutyTerraform Provider.