1. Packages
  2. Grafana Cloud
  3. API Docs
  4. getTeam
Grafana v0.2.0 published on Sunday, Oct 29, 2023 by lbrlabs

grafana.getTeam

Explore with Pulumi AI

grafana logo
Grafana v0.2.0 published on Sunday, Oct 29, 2023 by lbrlabs

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Lbrlabs.PulumiPackage.Grafana;
    using Grafana = Pulumi.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Grafana.Team("test", new()
        {
            Email = "test-team-email@test.com",
            Preferences = new Grafana.Inputs.TeamPreferencesArgs
            {
                Theme = "dark",
                Timezone = "utc",
            },
        });
    
        var fromName = Grafana.GetTeam.Invoke(new()
        {
            Name = test.Name,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-grafana/sdk/go/grafana"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := grafana.NewTeam(ctx, "test", &grafana.TeamArgs{
    			Email: pulumi.String("test-team-email@test.com"),
    			Preferences: &grafana.TeamPreferencesArgs{
    				Theme:    pulumi.String("dark"),
    				Timezone: pulumi.String("utc"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = grafana.LookupTeamOutput(ctx, grafana.GetTeamOutputArgs{
    			Name: test.Name,
    		}, nil)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.Team;
    import com.pulumi.grafana.TeamArgs;
    import com.pulumi.grafana.inputs.TeamPreferencesArgs;
    import com.pulumi.grafana.GrafanaFunctions;
    import com.pulumi.grafana.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) {
            var test = new Team("test", TeamArgs.builder()        
                .email("test-team-email@test.com")
                .preferences(TeamPreferencesArgs.builder()
                    .theme("dark")
                    .timezone("utc")
                    .build())
                .build());
    
            final var fromName = GrafanaFunctions.getTeam(GetTeamArgs.builder()
                .name(test.name())
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_grafana as grafana
    import pulumi_grafana as grafana
    
    test = grafana.Team("test",
        email="test-team-email@test.com",
        preferences=grafana.TeamPreferencesArgs(
            theme="dark",
            timezone="utc",
        ))
    from_name = grafana.get_team_output(name=test.name)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@lbrlabs/pulumi-grafana";
    import * as grafana from "@pulumi/grafana";
    
    const test = new grafana.Team("test", {
        email: "test-team-email@test.com",
        preferences: {
            theme: "dark",
            timezone: "utc",
        },
    });
    const fromName = grafana.getTeamOutput({
        name: test.name,
    });
    
    resources:
      test:
        type: grafana:Team
        properties:
          email: test-team-email@test.com
          preferences:
            theme: dark
            timezone: utc
    variables:
      fromName:
        fn::invoke:
          Function: grafana:getTeam
          Arguments:
            name: ${test.name}
    

    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(name: Optional[str] = None,
                 org_id: Optional[str] = None,
                 read_team_sync: Optional[bool] = None,
                 opts: Optional[InvokeOptions] = None) -> GetTeamResult
    def get_team_output(name: Optional[pulumi.Input[str]] = None,
                 org_id: Optional[pulumi.Input[str]] = None,
                 read_team_sync: Optional[pulumi.Input[bool]] = 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: grafana:index/getTeam:getTeam
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    OrgId string
    ReadTeamSync bool
    Name string
    OrgId string
    ReadTeamSync bool
    name String
    orgId String
    readTeamSync Boolean
    name string
    orgId string
    readTeamSync boolean
    name String
    orgId String
    readTeamSync Boolean

    getTeam Result

    The following output properties are available:

    Email string
    Id string
    The provider-assigned unique ID for this managed resource.
    Members []string
    Name string
    Preferences []GetTeamPreference
    TeamId int
    TeamSyncs []GetTeamTeamSync
    OrgId string
    ReadTeamSync bool
    email String
    id String
    The provider-assigned unique ID for this managed resource.
    members List<String>
    name String
    preferences List<GetTeamPreference>
    teamId Integer
    teamSyncs List<GetTeamTeamSync>
    orgId String
    readTeamSync Boolean
    email string
    id string
    The provider-assigned unique ID for this managed resource.
    members string[]
    name string
    preferences GetTeamPreference[]
    teamId number
    teamSyncs GetTeamTeamSync[]
    orgId string
    readTeamSync boolean
    email str
    id str
    The provider-assigned unique ID for this managed resource.
    members Sequence[str]
    name str
    preferences Sequence[GetTeamPreference]
    team_id int
    team_syncs Sequence[GetTeamTeamSync]
    org_id str
    read_team_sync bool
    email String
    id String
    The provider-assigned unique ID for this managed resource.
    members List<String>
    name String
    preferences List<Property Map>
    teamId Number
    teamSyncs List<Property Map>
    orgId String
    readTeamSync Boolean

    Supporting Types

    GetTeamPreference

    HomeDashboardUid string
    Theme string
    Timezone string
    HomeDashboardUid string
    Theme string
    Timezone string
    homeDashboardUid String
    theme String
    timezone String
    homeDashboardUid string
    theme string
    timezone string
    homeDashboardUid String
    theme String
    timezone String

    GetTeamTeamSync

    Groups List<string>
    Groups []string
    groups List<String>
    groups string[]
    groups Sequence[str]
    groups List<String>

    Package Details

    Repository
    grafana lbrlabs/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.2.0 published on Sunday, Oct 29, 2023 by lbrlabs