1. Packages
  2. PagerDuty
  3. API Docs
  4. getTeam
PagerDuty v4.10.1 published on Wednesday, Mar 27, 2024 by Pulumi

pagerduty.getTeam

Explore with Pulumi AI

pagerduty logo
PagerDuty v4.10.1 published on Wednesday, Mar 27, 2024 by Pulumi

    Use this data source to get information about a specific team that you can use for other PagerDuty resources.

    Example Usage

    Coming soon!```
    </pulumi-choosable>
    </div>
    <div>
    <pulumi-choosable type="language" values="python">
    

    Coming soon!```

    Coming soon!```
    </pulumi-choosable>
    </div>
    <div>
    <pulumi-choosable type="language" values="csharp">
    

    Coming soon!```

    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.GetUserArgs;
    import com.pulumi.pagerduty.inputs.GetTeamArgs;
    import com.pulumi.pagerduty.EscalationPolicy;
    import com.pulumi.pagerduty.EscalationPolicyArgs;
    import com.pulumi.pagerduty.inputs.EscalationPolicyRuleArgs;
    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 me = PagerdutyFunctions.getUser(GetUserArgs.builder()
                .email("me@example.com")
                .build());
    
            final var devops = PagerdutyFunctions.getTeam(GetTeamArgs.builder()
                .name("devops")
                .build());
    
            var foo = new EscalationPolicy("foo", EscalationPolicyArgs.builder()        
                .numLoops(2)
                .teams(devops.applyValue(getTeamResult -> getTeamResult.id()))
                .rules(EscalationPolicyRuleArgs.builder()
                    .escalationDelayInMinutes(10)
                    .targets(EscalationPolicyRuleTargetArgs.builder()
                        .type("user")
                        .id(me.applyValue(getUserResult -> getUserResult.id()))
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: pagerduty:EscalationPolicy
        properties:
          numLoops: 2
          teams:
            - ${devops.id}
          rules:
            - escalationDelayInMinutes: 10
              targets:
                - type: user
                  id: ${me.id}
    variables:
      me:
        fn::invoke:
          Function: pagerduty:getUser
          Arguments:
            email: me@example.com
      devops:
        fn::invoke:
          Function: pagerduty:getTeam
          Arguments:
            name: devops
    

    Using getTeam

    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 getTeam(args: GetTeamArgs, opts?: InvokeOptions): Promise<GetTeamResult>
    function getTeamOutput(args: GetTeamOutputArgs, opts?: InvokeOptions): Output<GetTeamResult>
    def get_team(default_role: Optional[str] = None,
                 name: Optional[str] = None,
                 parent: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetTeamResult
    def get_team_output(default_role: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 parent: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetTeamResult]
    func LookupTeam(ctx *Context, args *LookupTeamArgs, opts ...InvokeOption) (*LookupTeamResult, error)
    func LookupTeamOutput(ctx *Context, args *LookupTeamOutputArgs, opts ...InvokeOption) LookupTeamResultOutput

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

    public static class GetTeam 
    {
        public static Task<GetTeamResult> InvokeAsync(GetTeamArgs args, InvokeOptions? opts = null)
        public static Output<GetTeamResult> Invoke(GetTeamInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTeamResult> getTeam(GetTeamArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: pagerduty:index/getTeam:getTeam
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the team to find in the PagerDuty API.
    DefaultRole string
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    Parent string
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    Name string
    The name of the team to find in the PagerDuty API.
    DefaultRole string
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    Parent string
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    name String
    The name of the team to find in the PagerDuty API.
    defaultRole String
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    parent String
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    name string
    The name of the team to find in the PagerDuty API.
    defaultRole string
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    parent string
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    name str
    The name of the team to find in the PagerDuty API.
    default_role str
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    parent str
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    name String
    The name of the team to find in the PagerDuty API.
    defaultRole String
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    parent String
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.

    getTeam Result

    The following output properties are available:

    Description string
    A description of the found team.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the found team.
    DefaultRole string
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    Parent string
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    Description string
    A description of the found team.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the found team.
    DefaultRole string
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    Parent string
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    description String
    A description of the found team.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the found team.
    defaultRole String
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    parent String
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    description string
    A description of the found team.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the found team.
    defaultRole string
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    parent string
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    description str
    A description of the found team.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the found team.
    default_role str
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    parent str
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.
    description String
    A description of the found team.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the found team.
    defaultRole String
    (Optional) The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager").
    parent String
    ID of the parent team. This is available to accounts with the Team Hierarchy feature enabled. Please contact your account manager for more information.

    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.10.1 published on Wednesday, Mar 27, 2024 by Pulumi