PagerDuty v4.29.5 published on Wednesday, Nov 5, 2025 by Pulumi
pagerduty.getTeams
PagerDuty v4.29.5 published on Wednesday, Nov 5, 2025 by Pulumi
Use this data source to list teams in your PagerDuty account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as pagerduty from "@pulumi/pagerduty";
const allTeams = pagerduty.getTeams({});
// Fetch only teams whose name matches "devops"
const devops = pagerduty.getTeams({
query: "devops",
});
import pulumi
import pulumi_pagerduty as pagerduty
all_teams = pagerduty.get_teams()
# Fetch only teams whose name matches "devops"
devops = pagerduty.get_teams(query="devops")
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 {
_, err := pagerduty.GetTeams(ctx, &pagerduty.GetTeamsArgs{}, nil)
if err != nil {
return err
}
// Fetch only teams whose name matches "devops"
_, err = pagerduty.GetTeams(ctx, &pagerduty.GetTeamsArgs{
Query: pulumi.StringRef("devops"),
}, 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 allTeams = Pagerduty.GetTeams.Invoke();
// Fetch only teams whose name matches "devops"
var devops = Pagerduty.GetTeams.Invoke(new()
{
Query = "devops",
});
});
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.GetTeamsArgs;
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 allTeams = PagerdutyFunctions.getTeams(GetTeamsArgs.builder()
.build());
// Fetch only teams whose name matches "devops"
final var devops = PagerdutyFunctions.getTeams(GetTeamsArgs.builder()
.query("devops")
.build());
}
}
variables:
allTeams:
fn::invoke:
function: pagerduty:getTeams
arguments: {}
# Fetch only teams whose name matches "devops"
devops:
fn::invoke:
function: pagerduty:getTeams
arguments:
query: devops
Using getTeams
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 getTeams(args: GetTeamsArgs, opts?: InvokeOptions): Promise<GetTeamsResult>
function getTeamsOutput(args: GetTeamsOutputArgs, opts?: InvokeOptions): Output<GetTeamsResult>def get_teams(query: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTeamsResult
def get_teams_output(query: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTeamsResult]func GetTeams(ctx *Context, args *GetTeamsArgs, opts ...InvokeOption) (*GetTeamsResult, error)
func GetTeamsOutput(ctx *Context, args *GetTeamsOutputArgs, opts ...InvokeOption) GetTeamsResultOutput> Note: This function is named GetTeams in the Go SDK.
public static class GetTeams
{
public static Task<GetTeamsResult> InvokeAsync(GetTeamsArgs args, InvokeOptions? opts = null)
public static Output<GetTeamsResult> Invoke(GetTeamsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTeamsResult> getTeams(GetTeamsArgs args, InvokeOptions options)
public static Output<GetTeamsResult> getTeams(GetTeamsArgs args, InvokeOptions options)
fn::invoke:
function: pagerduty:index/getTeams:getTeams
arguments:
# arguments dictionaryThe following arguments are supported:
- Query string
- Filters the result, showing only the records whose name matches the query.
- Query string
- Filters the result, showing only the records whose name matches the query.
- query String
- Filters the result, showing only the records whose name matches the query.
- query string
- Filters the result, showing only the records whose name matches the query.
- query str
- Filters the result, showing only the records whose name matches the query.
- query String
- Filters the result, showing only the records whose name matches the query.
getTeams Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Teams
List<Get
Teams Team> - The teams found.
- Query string
- Id string
- The provider-assigned unique ID for this managed resource.
- Teams
[]Get
Teams Team - The teams found.
- Query string
- id String
- The provider-assigned unique ID for this managed resource.
- teams
List<Get
Teams Team> - The teams found.
- query String
- id string
- The provider-assigned unique ID for this managed resource.
- teams
Get
Teams Team[] - The teams found.
- query string
- id str
- The provider-assigned unique ID for this managed resource.
- teams
Sequence[Get
Teams Team] - The teams found.
- query str
- id String
- The provider-assigned unique ID for this managed resource.
- teams List<Property Map>
- The teams found.
- query String
Supporting Types
GetTeamsTeam
- Description string
- The description of the team.
- Id string
- The ID of the team.
- Name string
- The name of the team.
- 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.
- Description string
- The description of the team.
- Id string
- The ID of the team.
- Name string
- The name of the team.
- 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.
- description String
- The description of the team.
- id String
- The ID of the team.
- name String
- The name of the team.
- 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.
- description string
- The description of the team.
- id string
- The ID of the team.
- name string
- The name of the team.
- 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.
- description str
- The description of the team.
- id str
- The ID of the team.
- name str
- The name of the team.
- 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.
- description String
- The description of the team.
- id String
- The ID of the team.
- name String
- The name of the team.
- 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.
Package Details
- Repository
- PagerDuty pulumi/pulumi-pagerduty
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
pagerdutyTerraform Provider.
PagerDuty v4.29.5 published on Wednesday, Nov 5, 2025 by Pulumi
