Class GetCustomDbRole
Inheritance
System.Object
GetCustomDbRole
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Mongodbatlas
Assembly: Pulumi.Mongodbatlas.dll
Syntax
public static class GetCustomDbRole
Methods
View SourceInvokeAsync(GetCustomDbRoleArgs, InvokeOptions)
mongodbatlas..CustomDbRole describe a Custom DB Role. This represents a custom db role.
NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
class MyStack : Stack
{
public MyStack()
{
var testRole = new Mongodbatlas.CustomDbRole("testRole", new Mongodbatlas.CustomDbRoleArgs
{
Actions =
{
new Mongodbatlas.Inputs.CustomDbRoleActionArgs
{
Action = "UPDATE",
Resources =
{
new Mongodbatlas.Inputs.CustomDbRoleActionResourceArgs
{
CollectionName = "",
DatabaseName = "anyDatabase",
},
},
},
new Mongodbatlas.Inputs.CustomDbRoleActionArgs
{
Action = "INSERT",
Resources =
{
new Mongodbatlas.Inputs.CustomDbRoleActionResourceArgs
{
CollectionName = "",
DatabaseName = "anyDatabase",
},
},
},
},
ProjectId = "<PROJECT-ID>",
RoleName = "myCustomRole",
});
var test = Output.Tuple(testRole.ProjectId, testRole.RoleName).Apply(values =>
{
var projectId = values.Item1;
var roleName = values.Item2;
return Mongodbatlas.GetCustomDbRole.InvokeAsync(new Mongodbatlas.GetCustomDbRoleArgs
{
ProjectId = projectId,
RoleName = roleName,
});
});
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetCustomDbRoleResult> InvokeAsync(GetCustomDbRoleArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetCustomDbRoleArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetCustomDbRoleResult> |