MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi
mongodbatlas.getProjectInvitation
Explore with Pulumi AI
# Data Source: mongodbatlas.ProjectInvitation
mongodbatlas.ProjectInvitation
describes an invitation to a user to join an Atlas project.
NOTE: Groups and projects are synonymous terms. You may find GROUP-ID in the official documentation.
Example Usage
S
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testProjectInvitation = new mongodbatlas.ProjectInvitation("test", {
username: "test-acc-username",
projectId: "<PROJECT-ID>",
roles: ["GROUP_DATA_ACCESS_READ_WRITE"],
});
const test = mongodbatlas.getProjectInvitationOutput({
projectId: testProjectInvitation.projectId,
username: testProjectInvitation.username,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_project_invitation = mongodbatlas.ProjectInvitation("test",
username="test-acc-username",
project_id="<PROJECT-ID>",
roles=["GROUP_DATA_ACCESS_READ_WRITE"])
test = mongodbatlas.get_project_invitation_output(project_id=test_project_invitation.project_id,
username=test_project_invitation.username)
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 {
testProjectInvitation, err := mongodbatlas.NewProjectInvitation(ctx, "test", &mongodbatlas.ProjectInvitationArgs{
Username: pulumi.String("test-acc-username"),
ProjectId: pulumi.String("<PROJECT-ID>"),
Roles: pulumi.StringArray{
pulumi.String("GROUP_DATA_ACCESS_READ_WRITE"),
},
})
if err != nil {
return err
}
_ = mongodbatlas.LookupProjectInvitationOutput(ctx, mongodbatlas.GetProjectInvitationOutputArgs{
ProjectId: testProjectInvitation.ProjectId,
Username: testProjectInvitation.Username,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var testProjectInvitation = new Mongodbatlas.ProjectInvitation("test", new()
{
Username = "test-acc-username",
ProjectId = "<PROJECT-ID>",
Roles = new[]
{
"GROUP_DATA_ACCESS_READ_WRITE",
},
});
var test = Mongodbatlas.GetProjectInvitation.Invoke(new()
{
ProjectId = testProjectInvitation.ProjectId,
Username = testProjectInvitation.Username,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.ProjectInvitation;
import com.pulumi.mongodbatlas.ProjectInvitationArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetProjectInvitationArgs;
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 testProjectInvitation = new ProjectInvitation("testProjectInvitation", ProjectInvitationArgs.builder()
.username("test-acc-username")
.projectId("<PROJECT-ID>")
.roles("GROUP_DATA_ACCESS_READ_WRITE")
.build());
final var test = MongodbatlasFunctions.getProjectInvitation(GetProjectInvitationArgs.builder()
.projectId(testProjectInvitation.projectId())
.username(testProjectInvitation.username())
.build());
}
}
resources:
testProjectInvitation:
type: mongodbatlas:ProjectInvitation
name: test
properties:
username: test-acc-username
projectId: <PROJECT-ID>
roles:
- GROUP_DATA_ACCESS_READ_WRITE
variables:
test:
fn::invoke:
Function: mongodbatlas:getProjectInvitation
Arguments:
projectId: ${testProjectInvitation.projectId}
username: ${testProjectInvitation.username}
Using getProjectInvitation
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 getProjectInvitation(args: GetProjectInvitationArgs, opts?: InvokeOptions): Promise<GetProjectInvitationResult>
function getProjectInvitationOutput(args: GetProjectInvitationOutputArgs, opts?: InvokeOptions): Output<GetProjectInvitationResult>
def get_project_invitation(invitation_id: Optional[str] = None,
project_id: Optional[str] = None,
username: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectInvitationResult
def get_project_invitation_output(invitation_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
username: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProjectInvitationResult]
func LookupProjectInvitation(ctx *Context, args *LookupProjectInvitationArgs, opts ...InvokeOption) (*LookupProjectInvitationResult, error)
func LookupProjectInvitationOutput(ctx *Context, args *LookupProjectInvitationOutputArgs, opts ...InvokeOption) LookupProjectInvitationResultOutput
> Note: This function is named LookupProjectInvitation
in the Go SDK.
public static class GetProjectInvitation
{
public static Task<GetProjectInvitationResult> InvokeAsync(GetProjectInvitationArgs args, InvokeOptions? opts = null)
public static Output<GetProjectInvitationResult> Invoke(GetProjectInvitationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectInvitationResult> getProjectInvitation(GetProjectInvitationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: mongodbatlas:index/getProjectInvitation:getProjectInvitation
arguments:
# arguments dictionary
The following arguments are supported:
- Invitation
Id string - Unique 24-hexadecimal digit string that identifies the invitation in Atlas.
- Project
Id string - Unique 24-hexadecimal digit string that identifies the project to which you invited the user.
- Username string
- Email address of the invited user. This is the address to which Atlas sends the invite. If the user accepts the invitation, they log in to Atlas with this username.
- Invitation
Id string - Unique 24-hexadecimal digit string that identifies the invitation in Atlas.
- Project
Id string - Unique 24-hexadecimal digit string that identifies the project to which you invited the user.
- Username string
- Email address of the invited user. This is the address to which Atlas sends the invite. If the user accepts the invitation, they log in to Atlas with this username.
- invitation
Id String - Unique 24-hexadecimal digit string that identifies the invitation in Atlas.
- project
Id String - Unique 24-hexadecimal digit string that identifies the project to which you invited the user.
- username String
- Email address of the invited user. This is the address to which Atlas sends the invite. If the user accepts the invitation, they log in to Atlas with this username.
- invitation
Id string - Unique 24-hexadecimal digit string that identifies the invitation in Atlas.
- project
Id string - Unique 24-hexadecimal digit string that identifies the project to which you invited the user.
- username string
- Email address of the invited user. This is the address to which Atlas sends the invite. If the user accepts the invitation, they log in to Atlas with this username.
- invitation_
id str - Unique 24-hexadecimal digit string that identifies the invitation in Atlas.
- project_
id str - Unique 24-hexadecimal digit string that identifies the project to which you invited the user.
- username str
- Email address of the invited user. This is the address to which Atlas sends the invite. If the user accepts the invitation, they log in to Atlas with this username.
- invitation
Id String - Unique 24-hexadecimal digit string that identifies the invitation in Atlas.
- project
Id String - Unique 24-hexadecimal digit string that identifies the project to which you invited the user.
- username String
- Email address of the invited user. This is the address to which Atlas sends the invite. If the user accepts the invitation, they log in to Atlas with this username.
getProjectInvitation Result
The following output properties are available:
- Created
At string - Timestamp in ISO 8601 date and time format in UTC when Atlas sent the invitation.
- Expires
At string - Timestamp in ISO 8601 date and time format in UTC when the invitation expires. Users have 30 days to accept an invitation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Invitation
Id string - Inviter
Username string - Atlas user who invited
username
to the project. - Project
Id string - Roles List<string>
- Atlas roles to assign to the invited user. If the user accepts the invitation, Atlas assigns these roles to them. Refer to the MongoDB Documentation for information on valid roles.
- Username string
- Created
At string - Timestamp in ISO 8601 date and time format in UTC when Atlas sent the invitation.
- Expires
At string - Timestamp in ISO 8601 date and time format in UTC when the invitation expires. Users have 30 days to accept an invitation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Invitation
Id string - Inviter
Username string - Atlas user who invited
username
to the project. - Project
Id string - Roles []string
- Atlas roles to assign to the invited user. If the user accepts the invitation, Atlas assigns these roles to them. Refer to the MongoDB Documentation for information on valid roles.
- Username string
- created
At String - Timestamp in ISO 8601 date and time format in UTC when Atlas sent the invitation.
- expires
At String - Timestamp in ISO 8601 date and time format in UTC when the invitation expires. Users have 30 days to accept an invitation.
- id String
- The provider-assigned unique ID for this managed resource.
- invitation
Id String - inviter
Username String - Atlas user who invited
username
to the project. - project
Id String - roles List<String>
- Atlas roles to assign to the invited user. If the user accepts the invitation, Atlas assigns these roles to them. Refer to the MongoDB Documentation for information on valid roles.
- username String
- created
At string - Timestamp in ISO 8601 date and time format in UTC when Atlas sent the invitation.
- expires
At string - Timestamp in ISO 8601 date and time format in UTC when the invitation expires. Users have 30 days to accept an invitation.
- id string
- The provider-assigned unique ID for this managed resource.
- invitation
Id string - inviter
Username string - Atlas user who invited
username
to the project. - project
Id string - roles string[]
- Atlas roles to assign to the invited user. If the user accepts the invitation, Atlas assigns these roles to them. Refer to the MongoDB Documentation for information on valid roles.
- username string
- created_
at str - Timestamp in ISO 8601 date and time format in UTC when Atlas sent the invitation.
- expires_
at str - Timestamp in ISO 8601 date and time format in UTC when the invitation expires. Users have 30 days to accept an invitation.
- id str
- The provider-assigned unique ID for this managed resource.
- invitation_
id str - inviter_
username str - Atlas user who invited
username
to the project. - project_
id str - roles Sequence[str]
- Atlas roles to assign to the invited user. If the user accepts the invitation, Atlas assigns these roles to them. Refer to the MongoDB Documentation for information on valid roles.
- username str
- created
At String - Timestamp in ISO 8601 date and time format in UTC when Atlas sent the invitation.
- expires
At String - Timestamp in ISO 8601 date and time format in UTC when the invitation expires. Users have 30 days to accept an invitation.
- id String
- The provider-assigned unique ID for this managed resource.
- invitation
Id String - inviter
Username String - Atlas user who invited
username
to the project. - project
Id String - roles List<String>
- Atlas roles to assign to the invited user. If the user accepts the invitation, Atlas assigns these roles to them. Refer to the MongoDB Documentation for information on valid roles.
- username String
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.