1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. getRolesOrgId
MongoDB Atlas v3.14.3 published on Monday, Apr 1, 2024 by Pulumi

mongodbatlas.getRolesOrgId

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.14.3 published on Monday, Apr 1, 2024 by Pulumi

    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, nil, 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    The ID of the organization you want to retrieve associated to an API Key.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrgId string
    The ID of the organization you want to retrieve associated to an API Key.
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    The ID of the organization you want to retrieve associated to an API Key.
    id string
    The provider-assigned unique ID for this managed resource.
    orgId string
    The ID of the organization you want to retrieve associated to an API Key.
    id str
    The provider-assigned unique ID for this managed resource.
    org_id str
    The ID of the organization you want to retrieve associated to an API Key.
    id String
    The provider-assigned unique ID for this managed resource.
    orgId String
    The ID of the organization you want to retrieve associated to an API Key.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.14.3 published on Monday, Apr 1, 2024 by Pulumi