1. Packages
  2. Spectrocloud Provider
  3. API Docs
  4. getTeam
spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud

spectrocloud.getTeam

Explore with Pulumi AI

spectrocloud logo
spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as spectrocloud from "@pulumi/spectrocloud";
    
    const example = spectrocloud.getTeam({
        id: "team-12345",
    });
    export const teamInfo = {
        id: example.then(example => example.id),
        name: example.then(example => example.name),
        role_ids: example.then(example => example.roleIds),
    };
    
    import pulumi
    import pulumi_spectrocloud as spectrocloud
    
    example = spectrocloud.get_team(id="team-12345")
    pulumi.export("teamInfo", {
        "id": example.id,
        "name": example.name,
        "role_ids": example.role_ids,
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := spectrocloud.LookupTeam(ctx, &spectrocloud.LookupTeamArgs{
    			Id: pulumi.StringRef("team-12345"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("teamInfo", pulumi.Map{
    			"id":       example.Id,
    			"name":     example.Name,
    			"role_ids": example.RoleIds,
    		})
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Spectrocloud = Pulumi.Spectrocloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Spectrocloud.GetTeam.Invoke(new()
        {
            Id = "team-12345",
        });
    
        return new Dictionary<string, object?>
        {
            ["teamInfo"] = 
            {
                { "id", example.Apply(getTeamResult => getTeamResult.Id) },
                { "name", example.Apply(getTeamResult => getTeamResult.Name) },
                { "role_ids", example.Apply(getTeamResult => getTeamResult.RoleIds) },
            },
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.spectrocloud.SpectrocloudFunctions;
    import com.pulumi.spectrocloud.inputs.GetTeamArgs;
    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 example = SpectrocloudFunctions.getTeam(GetTeamArgs.builder()
                .id("team-12345")
                .build());
    
            ctx.export("teamInfo", %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference));
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: spectrocloud:getTeam
          arguments:
            id: team-12345
    outputs:
      teamInfo:
        id: ${example.id}
        name: ${example.name}
        role_ids: ${example.roleIds}
    

    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(id: Optional[str] = None,
                 name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetTeamResult
    def get_team_output(id: Optional[pulumi.Input[str]] = None,
                 name: 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)
    public static Output<GetTeamResult> getTeam(GetTeamArgs args, InvokeOptions options)
    
    fn::invoke:
      function: spectrocloud:index/getTeam:getTeam
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The unique ID of the team. If provided, name cannot be used.
    Name string
    The name of the team. If provided, id cannot be used.
    Id string
    The unique ID of the team. If provided, name cannot be used.
    Name string
    The name of the team. If provided, id cannot be used.
    id String
    The unique ID of the team. If provided, name cannot be used.
    name String
    The name of the team. If provided, id cannot be used.
    id string
    The unique ID of the team. If provided, name cannot be used.
    name string
    The name of the team. If provided, id cannot be used.
    id str
    The unique ID of the team. If provided, name cannot be used.
    name str
    The name of the team. If provided, id cannot be used.
    id String
    The unique ID of the team. If provided, name cannot be used.
    name String
    The name of the team. If provided, id cannot be used.

    getTeam Result

    The following output properties are available:

    Id string
    The unique ID of the team. If provided, name cannot be used.
    RoleIds List<string>
    The roles id's assigned to the team.
    Name string
    The name of the team. If provided, id cannot be used.
    Id string
    The unique ID of the team. If provided, name cannot be used.
    RoleIds []string
    The roles id's assigned to the team.
    Name string
    The name of the team. If provided, id cannot be used.
    id String
    The unique ID of the team. If provided, name cannot be used.
    roleIds List<String>
    The roles id's assigned to the team.
    name String
    The name of the team. If provided, id cannot be used.
    id string
    The unique ID of the team. If provided, name cannot be used.
    roleIds string[]
    The roles id's assigned to the team.
    name string
    The name of the team. If provided, id cannot be used.
    id str
    The unique ID of the team. If provided, name cannot be used.
    role_ids Sequence[str]
    The roles id's assigned to the team.
    name str
    The name of the team. If provided, id cannot be used.
    id String
    The unique ID of the team. If provided, name cannot be used.
    roleIds List<String>
    The roles id's assigned to the team.
    name String
    The name of the team. If provided, id cannot be used.

    Package Details

    Repository
    spectrocloud spectrocloud/terraform-provider-spectrocloud
    License
    Notes
    This Pulumi package is based on the spectrocloud Terraform Provider.
    spectrocloud logo
    spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud