1. Packages
  2. Grafana Cloud
  3. API Docs
  4. oss
  5. Team
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse

grafana.oss.Team

Explore with Pulumi AI

grafana logo
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const viewer = new grafana.oss.User("viewer", {
        name: "Viewer",
        email: "viewer@example.com",
        login: "viewer",
        password: "my-password",
    });
    const test_team = new grafana.oss.Team("test-team", {
        name: "Test Team",
        email: "teamemail@example.com",
        members: [viewer.email],
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    viewer = grafana.oss.User("viewer",
        name="Viewer",
        email="viewer@example.com",
        login="viewer",
        password="my-password")
    test_team = grafana.oss.Team("test-team",
        name="Test Team",
        email="teamemail@example.com",
        members=[viewer.email])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/oss"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		viewer, err := oss.NewUser(ctx, "viewer", &oss.UserArgs{
    			Name:     pulumi.String("Viewer"),
    			Email:    pulumi.String("viewer@example.com"),
    			Login:    pulumi.String("viewer"),
    			Password: pulumi.String("my-password"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = oss.NewTeam(ctx, "test-team", &oss.TeamArgs{
    			Name:  pulumi.String("Test Team"),
    			Email: pulumi.String("teamemail@example.com"),
    			Members: pulumi.StringArray{
    				viewer.Email,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var viewer = new Grafana.Oss.User("viewer", new()
        {
            Name = "Viewer",
            Email = "viewer@example.com",
            Login = "viewer",
            Password = "my-password",
        });
    
        var test_team = new Grafana.Oss.Team("test-team", new()
        {
            Name = "Test Team",
            Email = "teamemail@example.com",
            Members = new[]
            {
                viewer.Email,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.oss.User;
    import com.pulumi.grafana.oss.UserArgs;
    import com.pulumi.grafana.oss.Team;
    import com.pulumi.grafana.oss.TeamArgs;
    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 viewer = new User("viewer", UserArgs.builder()
                .name("Viewer")
                .email("viewer@example.com")
                .login("viewer")
                .password("my-password")
                .build());
    
            var test_team = new Team("test-team", TeamArgs.builder()
                .name("Test Team")
                .email("teamemail@example.com")
                .members(viewer.email())
                .build());
    
        }
    }
    
    resources:
      viewer:
        type: grafana:oss:User
        properties:
          name: Viewer
          email: viewer@example.com
          login: viewer
          password: my-password
      test-team:
        type: grafana:oss:Team
        properties:
          name: Test Team
          email: teamemail@example.com
          members:
            - ${viewer.email}
    

    Create Team Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Team(name: string, args?: TeamArgs, opts?: CustomResourceOptions);
    @overload
    def Team(resource_name: str,
             args: Optional[TeamArgs] = None,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Team(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             email: Optional[str] = None,
             ignore_externally_synced_members: Optional[bool] = None,
             members: Optional[Sequence[str]] = None,
             name: Optional[str] = None,
             org_id: Optional[str] = None,
             preferences: Optional[TeamPreferencesArgs] = None,
             team_sync: Optional[TeamTeamSyncArgs] = None)
    func NewTeam(ctx *Context, name string, args *TeamArgs, opts ...ResourceOption) (*Team, error)
    public Team(string name, TeamArgs? args = null, CustomResourceOptions? opts = null)
    public Team(String name, TeamArgs args)
    public Team(String name, TeamArgs args, CustomResourceOptions options)
    
    type: grafana:oss:Team
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TeamArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TeamArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TeamArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TeamArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TeamArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var teamResource = new Grafana.Oss.Team("teamResource", new()
    {
        Email = "string",
        IgnoreExternallySyncedMembers = false,
        Members = new[]
        {
            "string",
        },
        Name = "string",
        OrgId = "string",
        Preferences = new Grafana.Oss.Inputs.TeamPreferencesArgs
        {
            HomeDashboardUid = "string",
            Theme = "string",
            Timezone = "string",
            WeekStart = "string",
        },
        TeamSync = new Grafana.Oss.Inputs.TeamTeamSyncArgs
        {
            Groups = new[]
            {
                "string",
            },
        },
    });
    
    example, err := oss.NewTeam(ctx, "teamResource", &oss.TeamArgs{
    	Email:                         pulumi.String("string"),
    	IgnoreExternallySyncedMembers: pulumi.Bool(false),
    	Members: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:  pulumi.String("string"),
    	OrgId: pulumi.String("string"),
    	Preferences: &oss.TeamPreferencesArgs{
    		HomeDashboardUid: pulumi.String("string"),
    		Theme:            pulumi.String("string"),
    		Timezone:         pulumi.String("string"),
    		WeekStart:        pulumi.String("string"),
    	},
    	TeamSync: &oss.TeamTeamSyncArgs{
    		Groups: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    })
    
    var teamResource = new Team("teamResource", TeamArgs.builder()
        .email("string")
        .ignoreExternallySyncedMembers(false)
        .members("string")
        .name("string")
        .orgId("string")
        .preferences(TeamPreferencesArgs.builder()
            .homeDashboardUid("string")
            .theme("string")
            .timezone("string")
            .weekStart("string")
            .build())
        .teamSync(TeamTeamSyncArgs.builder()
            .groups("string")
            .build())
        .build());
    
    team_resource = grafana.oss.Team("teamResource",
        email="string",
        ignore_externally_synced_members=False,
        members=["string"],
        name="string",
        org_id="string",
        preferences={
            "home_dashboard_uid": "string",
            "theme": "string",
            "timezone": "string",
            "week_start": "string",
        },
        team_sync={
            "groups": ["string"],
        })
    
    const teamResource = new grafana.oss.Team("teamResource", {
        email: "string",
        ignoreExternallySyncedMembers: false,
        members: ["string"],
        name: "string",
        orgId: "string",
        preferences: {
            homeDashboardUid: "string",
            theme: "string",
            timezone: "string",
            weekStart: "string",
        },
        teamSync: {
            groups: ["string"],
        },
    });
    
    type: grafana:oss:Team
    properties:
        email: string
        ignoreExternallySyncedMembers: false
        members:
            - string
        name: string
        orgId: string
        preferences:
            homeDashboardUid: string
            theme: string
            timezone: string
            weekStart: string
        teamSync:
            groups:
                - string
    

    Team Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Team resource accepts the following input properties:

    Email string
    An email address for the team.
    IgnoreExternallySyncedMembers bool
    Members List<string>
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    Name string
    The display name for the Grafana team created.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Preferences Pulumiverse.Grafana.Oss.Inputs.TeamPreferences
    TeamSync Pulumiverse.Grafana.Oss.Inputs.TeamTeamSync
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    Email string
    An email address for the team.
    IgnoreExternallySyncedMembers bool
    Members []string
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    Name string
    The display name for the Grafana team created.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Preferences TeamPreferencesArgs
    TeamSync TeamTeamSyncArgs
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    email String
    An email address for the team.
    ignoreExternallySyncedMembers Boolean
    members List<String>
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    name String
    The display name for the Grafana team created.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    preferences TeamPreferences
    teamSync TeamTeamSync
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    email string
    An email address for the team.
    ignoreExternallySyncedMembers boolean
    members string[]
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    name string
    The display name for the Grafana team created.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    preferences TeamPreferences
    teamSync TeamTeamSync
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    email str
    An email address for the team.
    ignore_externally_synced_members bool
    members Sequence[str]
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    name str
    The display name for the Grafana team created.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    preferences TeamPreferencesArgs
    team_sync TeamTeamSyncArgs
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    email String
    An email address for the team.
    ignoreExternallySyncedMembers Boolean
    members List<String>
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    name String
    The display name for the Grafana team created.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    preferences Property Map
    teamSync Property Map
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Team resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    TeamId int
    The team id assigned to this team by Grafana.
    Id string
    The provider-assigned unique ID for this managed resource.
    TeamId int
    The team id assigned to this team by Grafana.
    id String
    The provider-assigned unique ID for this managed resource.
    teamId Integer
    The team id assigned to this team by Grafana.
    id string
    The provider-assigned unique ID for this managed resource.
    teamId number
    The team id assigned to this team by Grafana.
    id str
    The provider-assigned unique ID for this managed resource.
    team_id int
    The team id assigned to this team by Grafana.
    id String
    The provider-assigned unique ID for this managed resource.
    teamId Number
    The team id assigned to this team by Grafana.

    Look up Existing Team Resource

    Get an existing Team resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: TeamState, opts?: CustomResourceOptions): Team
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            email: Optional[str] = None,
            ignore_externally_synced_members: Optional[bool] = None,
            members: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            preferences: Optional[TeamPreferencesArgs] = None,
            team_id: Optional[int] = None,
            team_sync: Optional[TeamTeamSyncArgs] = None) -> Team
    func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
    public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
    public static Team get(String name, Output<String> id, TeamState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Email string
    An email address for the team.
    IgnoreExternallySyncedMembers bool
    Members List<string>
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    Name string
    The display name for the Grafana team created.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Preferences Pulumiverse.Grafana.Oss.Inputs.TeamPreferences
    TeamId int
    The team id assigned to this team by Grafana.
    TeamSync Pulumiverse.Grafana.Oss.Inputs.TeamTeamSync
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    Email string
    An email address for the team.
    IgnoreExternallySyncedMembers bool
    Members []string
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    Name string
    The display name for the Grafana team created.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Preferences TeamPreferencesArgs
    TeamId int
    The team id assigned to this team by Grafana.
    TeamSync TeamTeamSyncArgs
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    email String
    An email address for the team.
    ignoreExternallySyncedMembers Boolean
    members List<String>
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    name String
    The display name for the Grafana team created.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    preferences TeamPreferences
    teamId Integer
    The team id assigned to this team by Grafana.
    teamSync TeamTeamSync
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    email string
    An email address for the team.
    ignoreExternallySyncedMembers boolean
    members string[]
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    name string
    The display name for the Grafana team created.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    preferences TeamPreferences
    teamId number
    The team id assigned to this team by Grafana.
    teamSync TeamTeamSync
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    email str
    An email address for the team.
    ignore_externally_synced_members bool
    members Sequence[str]
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    name str
    The display name for the Grafana team created.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    preferences TeamPreferencesArgs
    team_id int
    The team id assigned to this team by Grafana.
    team_sync TeamTeamSyncArgs
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
    email String
    An email address for the team.
    ignoreExternallySyncedMembers Boolean
    members List<String>
    A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
    name String
    The display name for the Grafana team created.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    preferences Property Map
    teamId Number
    The team id assigned to this team by Grafana.
    teamSync Property Map
    Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API

    Supporting Types

    TeamPreferences, TeamPreferencesArgs

    HomeDashboardUid string
    The UID of the dashboard to display when a team member logs in.
    Theme string
    The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
    Timezone string
    The default timezone for this team. Available values are utc, browser, or an empty string for the default.
    WeekStart string
    The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
    HomeDashboardUid string
    The UID of the dashboard to display when a team member logs in.
    Theme string
    The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
    Timezone string
    The default timezone for this team. Available values are utc, browser, or an empty string for the default.
    WeekStart string
    The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
    homeDashboardUid String
    The UID of the dashboard to display when a team member logs in.
    theme String
    The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
    timezone String
    The default timezone for this team. Available values are utc, browser, or an empty string for the default.
    weekStart String
    The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
    homeDashboardUid string
    The UID of the dashboard to display when a team member logs in.
    theme string
    The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
    timezone string
    The default timezone for this team. Available values are utc, browser, or an empty string for the default.
    weekStart string
    The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
    home_dashboard_uid str
    The UID of the dashboard to display when a team member logs in.
    theme str
    The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
    timezone str
    The default timezone for this team. Available values are utc, browser, or an empty string for the default.
    week_start str
    The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
    homeDashboardUid String
    The UID of the dashboard to display when a team member logs in.
    theme String
    The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
    timezone String
    The default timezone for this team. Available values are utc, browser, or an empty string for the default.
    weekStart String
    The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.

    TeamTeamSync, TeamTeamSyncArgs

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

    Import

    $ pulumi import grafana:oss/team:Team name "{{ id }}"
    
    $ pulumi import grafana:oss/team:Team name "{{ orgID }}:{{ id }}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse