MongoDB Atlas v3.20.4 published on Wednesday, Oct 30, 2024 by Pulumi
mongodbatlas.getRolesOrgId
Explore with Pulumi AI
# Data Source: mongodbatlas.getRolesOrgId
mongodbatlas.getRolesOrgId
describes a MongoDB Atlas Roles Org ID. This represents a Roles Org ID.
Example Usage
Using data source to query
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = mongodbatlas.getRolesOrgId({});
export const orgId = test.then(test => test.orgId);
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.get_roles_org_id()
pulumi.export("orgId", test.org_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 {
test, err := mongodbatlas.GetRolesOrgId(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
ctx.Export("orgId", test.OrgId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = Mongodbatlas.GetRolesOrgId.Invoke();
return new Dictionary<string, object?>
{
["orgId"] = test.Apply(getRolesOrgIdResult => getRolesOrgIdResult.OrgId),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
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.getRolesOrgId();
ctx.export("orgId", test.applyValue(getRolesOrgIdResult -> getRolesOrgIdResult.orgId()));
}
}
variables:
test:
fn::invoke:
Function: mongodbatlas:getRolesOrgId
Arguments: {}
outputs:
orgId: ${test.orgId}
Using getRolesOrgId
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 getRolesOrgId(opts?: InvokeOptions): Promise<GetRolesOrgIdResult>
function getRolesOrgIdOutput(opts?: InvokeOptions): Output<GetRolesOrgIdResult>
def get_roles_org_id(opts: Optional[InvokeOptions] = None) -> GetRolesOrgIdResult
def get_roles_org_id_output(opts: Optional[InvokeOptions] = None) -> Output[GetRolesOrgIdResult]
func GetRolesOrgId(ctx *Context, opts ...InvokeOption) (*GetRolesOrgIdResult, error)
func GetRolesOrgIdOutput(ctx *Context, opts ...InvokeOption) GetRolesOrgIdResultOutput
> Note: This function is named GetRolesOrgId
in the Go SDK.
public static class GetRolesOrgId
{
public static Task<GetRolesOrgIdResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetRolesOrgIdResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetRolesOrgIdResult> getRolesOrgId(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: mongodbatlas:index/getRolesOrgId:getRolesOrgId
arguments:
# arguments dictionary
getRolesOrgId Result
The following output properties are available:
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.