1. Packages
  2. PagerDuty
  3. API Docs
  4. getTeamMembers
PagerDuty v4.14.6 published on Tuesday, Sep 24, 2024 by Pulumi

pagerduty.getTeamMembers

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.14.6 published on Tuesday, Sep 24, 2024 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,
    }));
    
    import pulumi
    import pulumi_pagerduty as pagerduty
    
    devops = pagerduty.get_team(name="devops")
    devops_members = pagerduty.get_team_members(team_id=devops.id)
    
    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
    	})
    }
    
    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),
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      devops:
        fn::invoke:
          Function: pagerduty:getTeam
          Arguments:
            name: devops
      devopsMembers:
        fn::invoke:
          Function: pagerduty:getTeamMembers
          Arguments:
            teamId: ${devops.id}
    

    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>
    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]
    func GetTeamMembers(ctx *Context, args *GetTeamMembersArgs, opts ...InvokeOption) (*GetTeamMembersResult, error)
    func GetTeamMembersOutput(ctx *Context, args *GetTeamMembersOutputArgs, opts ...InvokeOption) GetTeamMembersResultOutput

    > 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)
    }
    public static CompletableFuture<GetTeamMembersResult> getTeamMembers(GetTeamMembersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: pagerduty:index/getTeamMembers:getTeamMembers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TeamId string
    The ID of the team to find in the PagerDuty API.
    TeamId string
    The ID of the team to find in the PagerDuty API.
    teamId String
    The ID of the team to find in the PagerDuty API.
    teamId string
    The ID of the team to find in the PagerDuty API.
    team_id str
    The ID of the team to find in the PagerDuty API.
    teamId 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 string
    The ID of the found user.
    Role string
    The team role of the found user.
    Summary 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 string
    The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
    Id string
    The ID of the found user.
    Role string
    The team role of the found user.
    Summary 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 string
    The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
    id String
    The ID of the found user.
    role String
    The team role of the found user.
    summary 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 String
    The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
    id string
    The ID of the found user.
    role string
    The team role of the found user.
    summary 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 string
    The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
    id str
    The ID of the found user.
    role str
    The team role of the found user.
    summary 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 str
    The type of object. The value returned will be user_reference. Can be used for passing to another object as dependency.
    id String
    The ID of the found user.
    role String
    The team role of the found user.
    summary 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 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 logo
    PagerDuty v4.14.6 published on Tuesday, Sep 24, 2024 by Pulumi