MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi
mongodbatlas.getTeam
Explore with Pulumi AI
# Data Source: mongodbatlas.Team
mongodbatlas.Team
describes a Team. The resource requires your Organization ID, Project ID and Team ID.
NOTE: Groups and projects are synonymous terms. You may find
group_id
in the official documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testTeam = new mongodbatlas.Team("test", {
orgId: "<ORGANIZATION-ID>",
name: "myNewTeam",
usernames: [
"user1",
"user2",
"user3",
],
});
const test = mongodbatlas.getTeamOutput({
orgId: testTeam.orgId,
teamId: testTeam.teamId,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_team = mongodbatlas.Team("test",
org_id="<ORGANIZATION-ID>",
name="myNewTeam",
usernames=[
"user1",
"user2",
"user3",
])
test = mongodbatlas.get_team_output(org_id=test_team.org_id,
team_id=test_team.team_id)
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testTeam, err := mongodbatlas.NewTeam(ctx, "test", &mongodbatlas.TeamArgs{
OrgId: pulumi.String("<ORGANIZATION-ID>"),
Name: pulumi.String("myNewTeam"),
Usernames: pulumi.StringArray{
pulumi.String("user1"),
pulumi.String("user2"),
pulumi.String("user3"),
},
})
if err != nil {
return err
}
_ = mongodbatlas.LookupTeamOutput(ctx, mongodbatlas.GetTeamOutputArgs{
OrgId: testTeam.OrgId,
TeamId: testTeam.TeamId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testTeam = new Mongodbatlas.Team("test", new()
{
OrgId = "<ORGANIZATION-ID>",
Name = "myNewTeam",
Usernames = new[]
{
"user1",
"user2",
"user3",
},
});
var test = Mongodbatlas.GetTeam.Invoke(new()
{
OrgId = testTeam.OrgId,
TeamId = testTeam.TeamId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.Team;
import com.pulumi.mongodbatlas.TeamArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.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 testTeam = new Team("testTeam", TeamArgs.builder()
.orgId("<ORGANIZATION-ID>")
.name("myNewTeam")
.usernames(
"user1",
"user2",
"user3")
.build());
final var test = MongodbatlasFunctions.getTeam(GetTeamArgs.builder()
.orgId(testTeam.orgId())
.teamId(testTeam.teamId())
.build());
}
}
resources:
testTeam:
type: mongodbatlas:Team
name: test
properties:
orgId: <ORGANIZATION-ID>
name: myNewTeam
usernames:
- user1
- user2
- user3
variables:
test:
fn::invoke:
Function: mongodbatlas:getTeam
Arguments:
orgId: ${testTeam.orgId}
teamId: ${testTeam.teamId}
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = new mongodbatlas.Team("test", {
orgId: "<ORGANIZATION-ID>",
name: "myNewTeam",
usernames: [
"user1",
"user2",
"user3",
],
});
const test2 = mongodbatlas.getTeamOutput({
orgId: test.orgId,
name: test.name,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.Team("test",
org_id="<ORGANIZATION-ID>",
name="myNewTeam",
usernames=[
"user1",
"user2",
"user3",
])
test2 = mongodbatlas.get_team_output(org_id=test.org_id,
name=test.name)
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := mongodbatlas.NewTeam(ctx, "test", &mongodbatlas.TeamArgs{
OrgId: pulumi.String("<ORGANIZATION-ID>"),
Name: pulumi.String("myNewTeam"),
Usernames: pulumi.StringArray{
pulumi.String("user1"),
pulumi.String("user2"),
pulumi.String("user3"),
},
})
if err != nil {
return err
}
_ = mongodbatlas.LookupTeamOutput(ctx, mongodbatlas.GetTeamOutputArgs{
OrgId: test.OrgId,
Name: test.Name,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = new Mongodbatlas.Team("test", new()
{
OrgId = "<ORGANIZATION-ID>",
Name = "myNewTeam",
Usernames = new[]
{
"user1",
"user2",
"user3",
},
});
var test2 = Mongodbatlas.GetTeam.Invoke(new()
{
OrgId = test.OrgId,
Name = test.Name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.Team;
import com.pulumi.mongodbatlas.TeamArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.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()
.orgId("<ORGANIZATION-ID>")
.name("myNewTeam")
.usernames(
"user1",
"user2",
"user3")
.build());
final var test2 = MongodbatlasFunctions.getTeam(GetTeamArgs.builder()
.orgId(test.orgId())
.name(test.name())
.build());
}
}
resources:
test:
type: mongodbatlas:Team
properties:
orgId: <ORGANIZATION-ID>
name: myNewTeam
usernames:
- user1
- user2
- user3
variables:
test2:
fn::invoke:
Function: mongodbatlas:getTeam
Arguments:
orgId: ${test.orgId}
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,
team_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTeamResult
def get_team_output(name: Optional[pulumi.Input[str]] = None,
org_id: Optional[pulumi.Input[str]] = None,
team_id: 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: mongodbatlas:index/getTeam:getTeam
arguments:
# arguments dictionary
The following arguments are supported:
getTeam Result
The following output properties are available:
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.