GetCustomDbRoles
mongodbatlas..getCustomDbRoles describe all Custom DB Roles. This represents a custom db roles.
NOTE: Groups and projects are synonymous terms. You may find
groupIdin the official documentation.
Example Usage
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
class MyStack : Stack
{
public MyStack()
{
var testDatabaseUser = new Mongodbatlas.DatabaseUser("testDatabaseUser", new Mongodbatlas.DatabaseUserArgs
{
DatabaseName = "admin",
Password = "test-acc-password",
ProjectId = "<PROJECT-ID>",
Roles =
{
new Mongodbatlas.Inputs.DatabaseUserRoleArgs
{
DatabaseName = "admin",
RoleName = "readWrite",
},
new Mongodbatlas.Inputs.DatabaseUserRoleArgs
{
DatabaseName = "admin",
RoleName = "atlasAdmin",
},
},
Username = "test-acc-username",
});
var testCustomDbRoles = Output.Create(Mongodbatlas.GetCustomDbRoles.InvokeAsync(new Mongodbatlas.GetCustomDbRolesArgs
{
ProjectId = mongodbatlas_custom_db_role.Test.Project_id,
}));
}
}
Coming soon!
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_database_user = mongodbatlas.DatabaseUser("testDatabaseUser",
database_name="admin",
password="test-acc-password",
project_id="<PROJECT-ID>",
roles=[
{
"database_name": "admin",
"role_name": "readWrite",
},
{
"database_name": "admin",
"role_name": "atlasAdmin",
},
],
username="test-acc-username")
test_custom_db_roles = mongodbatlas.get_custom_db_roles(project_id=mongodbatlas_custom_db_role["test"]["project_id"])import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testDatabaseUser = new mongodbatlas.DatabaseUser("test", {
databaseName: "admin",
password: "test-acc-password",
projectId: "<PROJECT-ID>",
roles: [
{
databaseName: "admin",
roleName: "readWrite",
},
{
databaseName: "admin",
roleName: "atlasAdmin",
},
],
username: "test-acc-username",
});
const testCustomDbRoles = mongodbatlas_custom_db_role_test.projectId.apply(projectId => mongodbatlas.getCustomDbRoles({
projectId: projectId,
}, { async: true }));Using GetCustomDbRoles
function getCustomDbRoles(args: GetCustomDbRolesArgs, opts?: InvokeOptions): Promise<GetCustomDbRolesResult>function get_custom_db_roles(project_id=None, opts=None)func GetCustomDbRoles(ctx *Context, args *GetCustomDbRolesArgs, opts ...InvokeOption) (*GetCustomDbRolesResult, error)public static class GetCustomDbRoles {
public static Task<GetCustomDbRolesResult> InvokeAsync(GetCustomDbRolesArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- project_
id str The unique ID for the project to get all custom db roles.
GetCustomDbRoles Result
The following output properties are available:
- id str
The provider-assigned unique ID for this managed resource.
- project_
id str - results
List[Get
Custom Db Roles Result] A list where each represents a custom db roles.
Supporting Types
GetCustomDbRolesResult
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetCustomDbRolesResultAction
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Action string
(Required) Name of the privilege action. For a complete list of actions available in the Atlas API, see Custom Role Actions.
- Resources
List<Get
Custom Db Roles Result Action Resource Args> (Required) Contains information on where the action is granted. Each object in the array either indicates a database and collection on which the action is granted, or indicates that the action is granted on the cluster resource.
- Action string
(Required) Name of the privilege action. For a complete list of actions available in the Atlas API, see Custom Role Actions.
- Resources
[]Get
Custom Db Roles Result Action Resource (Required) Contains information on where the action is granted. Each object in the array either indicates a database and collection on which the action is granted, or indicates that the action is granted on the cluster resource.
- action string
(Required) Name of the privilege action. For a complete list of actions available in the Atlas API, see Custom Role Actions.
- resources
Get
Custom Db Roles Result Action Resource[] (Required) Contains information on where the action is granted. Each object in the array either indicates a database and collection on which the action is granted, or indicates that the action is granted on the cluster resource.
- action str
(Required) Name of the privilege action. For a complete list of actions available in the Atlas API, see Custom Role Actions.
- resources
List[Get
Custom Db Roles Result Action Resource] (Required) Contains information on where the action is granted. Each object in the array either indicates a database and collection on which the action is granted, or indicates that the action is granted on the cluster resource.
GetCustomDbRolesResultActionResource
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetCustomDbRolesResultInheritedRole
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
mongodbatlasTerraform Provider.