GetDatabaseUser
mongodbatlas.DatabaseUser
describe a Database User. This represents a database user which will be applied to all clusters within the project.
Each user has a set of roles that provide access to the project’s databases. User’s roles apply to all the clusters in the project: if two clusters have a products
database and a user has a role granting read
access on the products database, the user has that access on both clusters.
NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.
Using GetDatabaseUser
function getDatabaseUser(args: GetDatabaseUserArgs, opts?: InvokeOptions): Promise<GetDatabaseUserResult>
def get_database_user(auth_database_name: Optional[str] = None, database_name: Optional[str] = None, project_id: Optional[str] = None, username: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetDatabaseUserResult
func LookupDatabaseUser(ctx *Context, args *LookupDatabaseUserArgs, opts ...InvokeOption) (*LookupDatabaseUserResult, error)
Note: This function is named
LookupDatabaseUser
in the Go SDK.
public static class GetDatabaseUser {
public static Task<GetDatabaseUserResult> InvokeAsync(GetDatabaseUserArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- Project
Id string The unique ID for the project to create the database user.
- Username string
Username for authenticating to MongoDB.
- Auth
Database stringName The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- Database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.
- Project
Id string The unique ID for the project to create the database user.
- Username string
Username for authenticating to MongoDB.
- Auth
Database stringName The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- Database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.
- project
Id string The unique ID for the project to create the database user.
- username string
Username for authenticating to MongoDB.
- auth
Database stringName The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.
- project_
id str The unique ID for the project to create the database user.
- username str
Username for authenticating to MongoDB.
- auth_
database_ strname The user’s authentication database. A user must provide both a username and authentication database to log into MongoDB. In Atlas deployments of MongoDB, the authentication database is almost always the admin database, for X509 it is $external.
- database_
name str Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.
GetDatabaseUser Result
The following output properties are available:
- Aws
Iam stringType The new database user authenticates with AWS IAM credentials. Default is
NONE
,USER
means user has AWS IAM user credentials,ROLE
- means user has credentials associated with an AWS IAM role.- Id string
The provider-assigned unique ID for this managed resource.
- Labels
List<Get
Database User Label> - Project
Id string - Roles
List<Get
Database User Role> List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- Scopes
List<Get
Database User Scope> Array of clusters and Atlas Data Lakes that this user has access to.
- Username string
- X509Type string
X.509 method by which the provided username is authenticated.
- Auth
Database stringName - Database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.
- Aws
Iam stringType The new database user authenticates with AWS IAM credentials. Default is
NONE
,USER
means user has AWS IAM user credentials,ROLE
- means user has credentials associated with an AWS IAM role.- Id string
The provider-assigned unique ID for this managed resource.
- Labels
[]Get
Database User Label - Project
Id string - Roles
[]Get
Database User Role List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- Scopes
[]Get
Database User Scope Array of clusters and Atlas Data Lakes that this user has access to.
- Username string
- X509Type string
X.509 method by which the provided username is authenticated.
- Auth
Database stringName - Database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.
- aws
Iam stringType The new database user authenticates with AWS IAM credentials. Default is
NONE
,USER
means user has AWS IAM user credentials,ROLE
- means user has credentials associated with an AWS IAM role.- id string
The provider-assigned unique ID for this managed resource.
- labels
Get
Database User Label[] - project
Id string - roles
Get
Database User Role[] List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- scopes
Get
Database User Scope[] Array of clusters and Atlas Data Lakes that this user has access to.
- username string
- x509Type string
X.509 method by which the provided username is authenticated.
- auth
Database stringName - database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.
- aws_
iam_ strtype The new database user authenticates with AWS IAM credentials. Default is
NONE
,USER
means user has AWS IAM user credentials,ROLE
- means user has credentials associated with an AWS IAM role.- id str
The provider-assigned unique ID for this managed resource.
- labels
Sequence[Get
Database User Label] - project_
id str - roles
Sequence[Get
Database User Role] List of user’s roles and the databases / collections on which the roles apply. A role allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well. See Roles below for more details.
- scopes
Sequence[Get
Database User Scope] Array of clusters and Atlas Data Lakes that this user has access to.
- username str
- x509_
type str X.509 method by which the provided username is authenticated.
- auth_
database_ strname - database_
name str Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.
Supporting Types
GetDatabaseUserLabel
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetDatabaseUserRole
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Collection
Name string Collection for which the role applies. You can specify a collection for the
read
andreadWrite
roles. If you do not specify a collection forread
andreadWrite
, the role applies to all collections in the database (excluding some collections in thesystem
. database).- Database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.- Role
Name string
- Collection
Name string Collection for which the role applies. You can specify a collection for the
read
andreadWrite
roles. If you do not specify a collection forread
andreadWrite
, the role applies to all collections in the database (excluding some collections in thesystem
. database).- Database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.- Role
Name string
- collection
Name string Collection for which the role applies. You can specify a collection for the
read
andreadWrite
roles. If you do not specify a collection forread
andreadWrite
, the role applies to all collections in the database (excluding some collections in thesystem
. database).- database
Name string Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.- role
Name string
- collection_
name str Collection for which the role applies. You can specify a collection for the
read
andreadWrite
roles. If you do not specify a collection forread
andreadWrite
, the role applies to all collections in the database (excluding some collections in thesystem
. database).- database_
name str Database on which the user has the specified role. A role on the
admin
database can include privileges that apply to the other databases.- role_
name str
GetDatabaseUserScope
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.