1. Packages
  2. Pagerduty Provider
  3. API Docs
  4. getTeamMembers
PagerDuty v4.22.1 published on Friday, Mar 21, 2025 by Pulumi

pagerduty.getTeamMembers

Explore with Pulumi AI

PagerDuty v4.22.1 published on Friday, Mar 21, 2025 by Pulumi

Use this data source to get information about a specific [team’s members][1].

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";

const devops = pagerduty.getTeam({
    name: "devops",
});
const devopsMembers = devops.then(devops => pagerduty.getTeamMembers({
    teamId: devops.id,
}));
Copy
import pulumi
import pulumi_pagerduty as pagerduty

devops = pagerduty.get_team(name="devops")
devops_members = pagerduty.get_team_members(team_id=devops.id)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		devops, err := pagerduty.LookupTeam(ctx, &pagerduty.LookupTeamArgs{
			Name: "devops",
		}, nil)
		if err != nil {
			return err
		}
		_, err = pagerduty.GetTeamMembers(ctx, &pagerduty.GetTeamMembersArgs{
			TeamId: devops.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Pagerduty = Pulumi.Pagerduty;

return await Deployment.RunAsync(() => 
{
    var devops = Pagerduty.GetTeam.Invoke(new()
    {
        Name = "devops",
    });

    var devopsMembers = Pagerduty.GetTeamMembers.Invoke(new()
    {
        TeamId = devops.Apply(getTeamResult => getTeamResult.Id),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.pagerduty.PagerdutyFunctions;
import com.pulumi.pagerduty.inputs.GetTeamArgs;
import com.pulumi.pagerduty.inputs.GetTeamMembersArgs;
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) {
        final var devops = PagerdutyFunctions.getTeam(GetTeamArgs.builder()
            .name("devops")
            .build());

        final var devopsMembers = PagerdutyFunctions.getTeamMembers(GetTeamMembersArgs.builder()
            .teamId(devops.applyValue(getTeamResult -> getTeamResult.id()))
            .build());

    }
}
Copy
variables:
  devops:
    fn::invoke:
      function: pagerduty:getTeam
      arguments:
        name: devops
  devopsMembers:
    fn::invoke:
      function: pagerduty:getTeamMembers
      arguments:
        teamId: ${devops.id}
Copy

Using getTeamMembers

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTeamMembers(args: GetTeamMembersArgs, opts?: InvokeOptions): Promise<GetTeamMembersResult>
function getTeamMembersOutput(args: GetTeamMembersOutputArgs, opts?: InvokeOptions): Output<GetTeamMembersResult>
Copy
def get_team_members(team_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetTeamMembersResult
def get_team_members_output(team_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetTeamMembersResult]
Copy
func GetTeamMembers(ctx *Context, args *GetTeamMembersArgs, opts ...InvokeOption) (*GetTeamMembersResult, error)
func GetTeamMembersOutput(ctx *Context, args *GetTeamMembersOutputArgs, opts ...InvokeOption) GetTeamMembersResultOutput
Copy

> Note: This function is named GetTeamMembers in the Go SDK.

public static class GetTeamMembers 
{
    public static Task<GetTeamMembersResult> InvokeAsync(GetTeamMembersArgs args, InvokeOptions? opts = null)
    public static Output<GetTeamMembersResult> Invoke(GetTeamMembersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTeamMembersResult> getTeamMembers(GetTeamMembersArgs args, InvokeOptions options)
public static Output<GetTeamMembersResult> getTeamMembers(GetTeamMembersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: pagerduty:index/getTeamMembers:getTeamMembers
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

TeamId This property is required. string
The ID of the team to find in the PagerDuty API.
TeamId This property is required. string
The ID of the team to find in the PagerDuty API.
teamId This property is required. String
The ID of the team to find in the PagerDuty API.
teamId This property is required. string
The ID of the team to find in the PagerDuty API.
team_id This property is required. str
The ID of the team to find in the PagerDuty API.
teamId This property is required. String
The ID of the team to find in the PagerDuty API.

getTeamMembers Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Members List<GetTeamMembersMember>
The users of the found team.
TeamId string
Id string
The provider-assigned unique ID for this managed resource.
Members []GetTeamMembersMember
The users of the found team.
TeamId string
id String
The provider-assigned unique ID for this managed resource.
members List<GetTeamMembersMember>
The users of the found team.
teamId String
id string
The provider-assigned unique ID for this managed resource.
members GetTeamMembersMember[]
The users of the found team.
teamId string
id str
The provider-assigned unique ID for this managed resource.
members Sequence[GetTeamMembersMember]
The users of the found team.
team_id str
id String
The provider-assigned unique ID for this managed resource.
members List<Property Map>
The users of the found team.
teamId String

Supporting Types

GetTeamMembersMember

Id This property is required. string
The ID of the found user.
Role This property is required. string
The team role of the found user.
Summary This property is required. string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
Type This property is required. string
The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
Id This property is required. string
The ID of the found user.
Role This property is required. string
The team role of the found user.
Summary This property is required. string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
Type This property is required. string
The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
id This property is required. String
The ID of the found user.
role This property is required. String
The team role of the found user.
summary This property is required. String
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
type This property is required. String
The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
id This property is required. string
The ID of the found user.
role This property is required. string
The team role of the found user.
summary This property is required. string
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
type This property is required. string
The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
id This property is required. str
The ID of the found user.
role This property is required. str
The team role of the found user.
summary This property is required. str
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
type This property is required. str
The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
id This property is required. String
The ID of the found user.
role This property is required. String
The team role of the found user.
summary This property is required. String
A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier.
type This property is required. String
The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.

Package Details

Repository
PagerDuty pulumi/pulumi-pagerduty
License
Apache-2.0
Notes
This Pulumi package is based on the pagerduty Terraform Provider.
PagerDuty v4.22.1 published on Friday, Mar 21, 2025 by Pulumi