MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi
mongodbatlas.getAtlasUser
Explore with Pulumi AI
mongodbatlas.getAtlasUser
Provides a MongoDB Atlas User.
NOTE: If you are the owner of a MongoDB Atlas organization or project, you can also retrieve the user profile for any user with membership in that organization or project.
Example Usage
Using user_id attribute to query
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = mongodbatlas.getAtlasUser({
userId: "<USER_ID>",
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.get_atlas_user(user_id="<USER_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 {
_, err := mongodbatlas.GetAtlasUser(ctx, &mongodbatlas.GetAtlasUserArgs{
UserId: pulumi.StringRef("<USER_ID>"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = Mongodbatlas.GetAtlasUser.Invoke(new()
{
UserId = "<USER_ID>",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetAtlasUserArgs;
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 test = MongodbatlasFunctions.getAtlasUser(GetAtlasUserArgs.builder()
.userId("<USER_ID>")
.build());
}
}
variables:
test:
fn::invoke:
Function: mongodbatlas:getAtlasUser
Arguments:
userId: <USER_ID>
Using username attribute to query
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = mongodbatlas.getAtlasUser({
username: "<USERNAME>",
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.get_atlas_user(username="<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 {
_, err := mongodbatlas.GetAtlasUser(ctx, &mongodbatlas.GetAtlasUserArgs{
Username: pulumi.StringRef("<USERNAME>"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = Mongodbatlas.GetAtlasUser.Invoke(new()
{
Username = "<USERNAME>",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetAtlasUserArgs;
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 test = MongodbatlasFunctions.getAtlasUser(GetAtlasUserArgs.builder()
.username("<USERNAME>")
.build());
}
}
variables:
test:
fn::invoke:
Function: mongodbatlas:getAtlasUser
Arguments:
username: <USERNAME>
Using getAtlasUser
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 getAtlasUser(args: GetAtlasUserArgs, opts?: InvokeOptions): Promise<GetAtlasUserResult>
function getAtlasUserOutput(args: GetAtlasUserOutputArgs, opts?: InvokeOptions): Output<GetAtlasUserResult>
def get_atlas_user(user_id: Optional[str] = None,
username: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAtlasUserResult
def get_atlas_user_output(user_id: Optional[pulumi.Input[str]] = None,
username: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAtlasUserResult]
func GetAtlasUser(ctx *Context, args *GetAtlasUserArgs, opts ...InvokeOption) (*GetAtlasUserResult, error)
func GetAtlasUserOutput(ctx *Context, args *GetAtlasUserOutputArgs, opts ...InvokeOption) GetAtlasUserResultOutput
> Note: This function is named GetAtlasUser
in the Go SDK.
public static class GetAtlasUser
{
public static Task<GetAtlasUserResult> InvokeAsync(GetAtlasUserArgs args, InvokeOptions? opts = null)
public static Output<GetAtlasUserResult> Invoke(GetAtlasUserInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAtlasUserResult> getAtlasUser(GetAtlasUserArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: mongodbatlas:index/getAtlasUser:getAtlasUser
arguments:
# arguments dictionary
The following arguments are supported:
getAtlasUser Result
The following output properties are available:
- Country string
- Two alphabet characters that identifies MongoDB Atlas user's geographic location. This parameter uses the ISO 3166-1a2 code format.
- Created
At string - Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC.
- Email
Address string - Email address that belongs to the MongoDB Atlas user.
- First
Name string - First or given name that belongs to the MongoDB Atlas user.
- Id string
- Last
Auth string - Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
- Last
Name string - Last name, family name, or surname that belongs to the MongoDB Atlas user.
- Links
List<Get
Atlas User Link> - Mobile
Number string - Mobile phone number that belongs to the MongoDB Atlas user.
- Roles
List<Get
Atlas User Role> - Team
Ids List<string> - List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Atlas user belongs.
links.#.href
- Uniform Resource Locator (URL) that points another API resource to which this response has some relationship. This URL often begins with https://cloud.mongodb.com/api/atlas.links.#.rel
- Uniform Resource Locator (URL) that defines the semantic relationship between this resource and another API resource. This URL often begins with https://cloud.mongodb.com/api/atlas.roles.#.group_id
- Unique 24-hexadecimal digit string that identifies the project to which this role belongs. You can set a value for this parameter or orgId but not both in the same request.roles.#.org_id
- Unique 24-hexadecimal digit string that identifies the organization to which this role belongs. You can set a value for this parameter or groupId but not both in the same request.roles.#.role_name
- Human-readable label that identifies the collection of privileges that MongoDB Atlas grants a specific API key, user, or team. These roles include organization- and project-level roles. The MongoDB Documentation describes the valid roles that can be assigned.
- User
Id string - Username string
- Country string
- Two alphabet characters that identifies MongoDB Atlas user's geographic location. This parameter uses the ISO 3166-1a2 code format.
- Created
At string - Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC.
- Email
Address string - Email address that belongs to the MongoDB Atlas user.
- First
Name string - First or given name that belongs to the MongoDB Atlas user.
- Id string
- Last
Auth string - Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
- Last
Name string - Last name, family name, or surname that belongs to the MongoDB Atlas user.
- Links
[]Get
Atlas User Link - Mobile
Number string - Mobile phone number that belongs to the MongoDB Atlas user.
- Roles
[]Get
Atlas User Role - Team
Ids []string - List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Atlas user belongs.
links.#.href
- Uniform Resource Locator (URL) that points another API resource to which this response has some relationship. This URL often begins with https://cloud.mongodb.com/api/atlas.links.#.rel
- Uniform Resource Locator (URL) that defines the semantic relationship between this resource and another API resource. This URL often begins with https://cloud.mongodb.com/api/atlas.roles.#.group_id
- Unique 24-hexadecimal digit string that identifies the project to which this role belongs. You can set a value for this parameter or orgId but not both in the same request.roles.#.org_id
- Unique 24-hexadecimal digit string that identifies the organization to which this role belongs. You can set a value for this parameter or groupId but not both in the same request.roles.#.role_name
- Human-readable label that identifies the collection of privileges that MongoDB Atlas grants a specific API key, user, or team. These roles include organization- and project-level roles. The MongoDB Documentation describes the valid roles that can be assigned.
- User
Id string - Username string
- country String
- Two alphabet characters that identifies MongoDB Atlas user's geographic location. This parameter uses the ISO 3166-1a2 code format.
- created
At String - Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC.
- email
Address String - Email address that belongs to the MongoDB Atlas user.
- first
Name String - First or given name that belongs to the MongoDB Atlas user.
- id String
- last
Auth String - Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
- last
Name String - Last name, family name, or surname that belongs to the MongoDB Atlas user.
- links
List<Get
Atlas User Link> - mobile
Number String - Mobile phone number that belongs to the MongoDB Atlas user.
- roles
List<Get
Atlas User Role> - team
Ids List<String> - List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Atlas user belongs.
links.#.href
- Uniform Resource Locator (URL) that points another API resource to which this response has some relationship. This URL often begins with https://cloud.mongodb.com/api/atlas.links.#.rel
- Uniform Resource Locator (URL) that defines the semantic relationship between this resource and another API resource. This URL often begins with https://cloud.mongodb.com/api/atlas.roles.#.group_id
- Unique 24-hexadecimal digit string that identifies the project to which this role belongs. You can set a value for this parameter or orgId but not both in the same request.roles.#.org_id
- Unique 24-hexadecimal digit string that identifies the organization to which this role belongs. You can set a value for this parameter or groupId but not both in the same request.roles.#.role_name
- Human-readable label that identifies the collection of privileges that MongoDB Atlas grants a specific API key, user, or team. These roles include organization- and project-level roles. The MongoDB Documentation describes the valid roles that can be assigned.
- user
Id String - username String
- country string
- Two alphabet characters that identifies MongoDB Atlas user's geographic location. This parameter uses the ISO 3166-1a2 code format.
- created
At string - Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC.
- email
Address string - Email address that belongs to the MongoDB Atlas user.
- first
Name string - First or given name that belongs to the MongoDB Atlas user.
- id string
- last
Auth string - Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
- last
Name string - Last name, family name, or surname that belongs to the MongoDB Atlas user.
- links
Get
Atlas User Link[] - mobile
Number string - Mobile phone number that belongs to the MongoDB Atlas user.
- roles
Get
Atlas User Role[] - team
Ids string[] - List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Atlas user belongs.
links.#.href
- Uniform Resource Locator (URL) that points another API resource to which this response has some relationship. This URL often begins with https://cloud.mongodb.com/api/atlas.links.#.rel
- Uniform Resource Locator (URL) that defines the semantic relationship between this resource and another API resource. This URL often begins with https://cloud.mongodb.com/api/atlas.roles.#.group_id
- Unique 24-hexadecimal digit string that identifies the project to which this role belongs. You can set a value for this parameter or orgId but not both in the same request.roles.#.org_id
- Unique 24-hexadecimal digit string that identifies the organization to which this role belongs. You can set a value for this parameter or groupId but not both in the same request.roles.#.role_name
- Human-readable label that identifies the collection of privileges that MongoDB Atlas grants a specific API key, user, or team. These roles include organization- and project-level roles. The MongoDB Documentation describes the valid roles that can be assigned.
- user
Id string - username string
- country str
- Two alphabet characters that identifies MongoDB Atlas user's geographic location. This parameter uses the ISO 3166-1a2 code format.
- created_
at str - Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC.
- email_
address str - Email address that belongs to the MongoDB Atlas user.
- first_
name str - First or given name that belongs to the MongoDB Atlas user.
- id str
- last_
auth str - Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
- last_
name str - Last name, family name, or surname that belongs to the MongoDB Atlas user.
- links
Sequence[Get
Atlas User Link] - mobile_
number str - Mobile phone number that belongs to the MongoDB Atlas user.
- roles
Sequence[Get
Atlas User Role] - team_
ids Sequence[str] - List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Atlas user belongs.
links.#.href
- Uniform Resource Locator (URL) that points another API resource to which this response has some relationship. This URL often begins with https://cloud.mongodb.com/api/atlas.links.#.rel
- Uniform Resource Locator (URL) that defines the semantic relationship between this resource and another API resource. This URL often begins with https://cloud.mongodb.com/api/atlas.roles.#.group_id
- Unique 24-hexadecimal digit string that identifies the project to which this role belongs. You can set a value for this parameter or orgId but not both in the same request.roles.#.org_id
- Unique 24-hexadecimal digit string that identifies the organization to which this role belongs. You can set a value for this parameter or groupId but not both in the same request.roles.#.role_name
- Human-readable label that identifies the collection of privileges that MongoDB Atlas grants a specific API key, user, or team. These roles include organization- and project-level roles. The MongoDB Documentation describes the valid roles that can be assigned.
- user_
id str - username str
- country String
- Two alphabet characters that identifies MongoDB Atlas user's geographic location. This parameter uses the ISO 3166-1a2 code format.
- created
At String - Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC.
- email
Address String - Email address that belongs to the MongoDB Atlas user.
- first
Name String - First or given name that belongs to the MongoDB Atlas user.
- id String
- last
Auth String - Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
- last
Name String - Last name, family name, or surname that belongs to the MongoDB Atlas user.
- links List<Property Map>
- mobile
Number String - Mobile phone number that belongs to the MongoDB Atlas user.
- roles List<Property Map>
- team
Ids List<String> - List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Atlas user belongs.
links.#.href
- Uniform Resource Locator (URL) that points another API resource to which this response has some relationship. This URL often begins with https://cloud.mongodb.com/api/atlas.links.#.rel
- Uniform Resource Locator (URL) that defines the semantic relationship between this resource and another API resource. This URL often begins with https://cloud.mongodb.com/api/atlas.roles.#.group_id
- Unique 24-hexadecimal digit string that identifies the project to which this role belongs. You can set a value for this parameter or orgId but not both in the same request.roles.#.org_id
- Unique 24-hexadecimal digit string that identifies the organization to which this role belongs. You can set a value for this parameter or groupId but not both in the same request.roles.#.role_name
- Human-readable label that identifies the collection of privileges that MongoDB Atlas grants a specific API key, user, or team. These roles include organization- and project-level roles. The MongoDB Documentation describes the valid roles that can be assigned.
- user
Id String - username String
Supporting Types
GetAtlasUserLink
GetAtlasUserRole
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.