1. Packages
  2. Packages
  3. Mongodbatlas Provider
  4. API Docs
  5. getStreamAccountDetails
Viewing docs for MongoDB Atlas v4.8.0
published on Thursday, Apr 23, 2026 by Pulumi
mongodbatlas logo
Viewing docs for MongoDB Atlas v4.8.0
published on Thursday, Apr 23, 2026 by Pulumi

    mongodbatlas.getStreamAccountDetails returns the AWS Account ID/Azure Subscription ID, and the AWS VPC ID/Azure Virtual Network Name for the group, cloud provider, and region that you specify.

    Example Usage

    S

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const accountDetails = mongodbatlas.getStreamAccountDetails({
        projectId: projectId,
        cloudProvider: "aws",
        regionName: "US_EAST_1",
    });
    export const awsAccountId = accountDetails.then(accountDetails => accountDetails.awsAccountId);
    export const cidrBlock = accountDetails.then(accountDetails => accountDetails.cidrBlock);
    export const cloudProvider = accountDetails.then(accountDetails => accountDetails.cloudProvider);
    export const vpcId = accountDetails.then(accountDetails => accountDetails.vpcId);
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    account_details = mongodbatlas.get_stream_account_details(project_id=project_id,
        cloud_provider="aws",
        region_name="US_EAST_1")
    pulumi.export("awsAccountId", account_details.aws_account_id)
    pulumi.export("cidrBlock", account_details.cidr_block)
    pulumi.export("cloudProvider", account_details.cloud_provider)
    pulumi.export("vpcId", account_details.vpc_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		accountDetails, err := mongodbatlas.GetStreamAccountDetails(ctx, &mongodbatlas.GetStreamAccountDetailsArgs{
    			ProjectId:     projectId,
    			CloudProvider: "aws",
    			RegionName:    "US_EAST_1",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("awsAccountId", accountDetails.AwsAccountId)
    		ctx.Export("cidrBlock", accountDetails.CidrBlock)
    		ctx.Export("cloudProvider", accountDetails.CloudProvider)
    		ctx.Export("vpcId", accountDetails.VpcId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var accountDetails = Mongodbatlas.Index.GetStreamAccountDetails.Invoke(new()
        {
            ProjectId = projectId,
            CloudProvider = "aws",
            RegionName = "US_EAST_1",
        });
    
        return new Dictionary<string, object?>
        {
            ["awsAccountId"] = accountDetails.Apply(getStreamAccountDetailsResult => getStreamAccountDetailsResult.AwsAccountId),
            ["cidrBlock"] = accountDetails.Apply(getStreamAccountDetailsResult => getStreamAccountDetailsResult.CidrBlock),
            ["cloudProvider"] = accountDetails.Apply(getStreamAccountDetailsResult => getStreamAccountDetailsResult.CloudProvider),
            ["vpcId"] = accountDetails.Apply(getStreamAccountDetailsResult => getStreamAccountDetailsResult.VpcId),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetStreamAccountDetailsArgs;
    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 accountDetails = MongodbatlasFunctions.getStreamAccountDetails(GetStreamAccountDetailsArgs.builder()
                .projectId(projectId)
                .cloudProvider("aws")
                .regionName("US_EAST_1")
                .build());
    
            ctx.export("awsAccountId", accountDetails.awsAccountId());
            ctx.export("cidrBlock", accountDetails.cidrBlock());
            ctx.export("cloudProvider", accountDetails.cloudProvider());
            ctx.export("vpcId", accountDetails.vpcId());
        }
    }
    
    variables:
      accountDetails:
        fn::invoke:
          function: mongodbatlas:getStreamAccountDetails
          arguments:
            projectId: ${projectId}
            cloudProvider: aws
            regionName: US_EAST_1
    outputs:
      awsAccountId: ${accountDetails.awsAccountId}
      cidrBlock: ${accountDetails.cidrBlock}
      cloudProvider: ${accountDetails.cloudProvider}
      vpcId: ${accountDetails.vpcId}
    

    Using getStreamAccountDetails

    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 getStreamAccountDetails(args: GetStreamAccountDetailsArgs, opts?: InvokeOptions): Promise<GetStreamAccountDetailsResult>
    function getStreamAccountDetailsOutput(args: GetStreamAccountDetailsOutputArgs, opts?: InvokeOptions): Output<GetStreamAccountDetailsResult>
    def get_stream_account_details(cloud_provider: Optional[str] = None,
                                   project_id: Optional[str] = None,
                                   region_name: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetStreamAccountDetailsResult
    def get_stream_account_details_output(cloud_provider: Optional[pulumi.Input[str]] = None,
                                   project_id: Optional[pulumi.Input[str]] = None,
                                   region_name: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetStreamAccountDetailsResult]
    func GetStreamAccountDetails(ctx *Context, args *GetStreamAccountDetailsArgs, opts ...InvokeOption) (*GetStreamAccountDetailsResult, error)
    func GetStreamAccountDetailsOutput(ctx *Context, args *GetStreamAccountDetailsOutputArgs, opts ...InvokeOption) GetStreamAccountDetailsResultOutput

    > Note: This function is named GetStreamAccountDetails in the Go SDK.

    public static class GetStreamAccountDetails 
    {
        public static Task<GetStreamAccountDetailsResult> InvokeAsync(GetStreamAccountDetailsArgs args, InvokeOptions? opts = null)
        public static Output<GetStreamAccountDetailsResult> Invoke(GetStreamAccountDetailsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStreamAccountDetailsResult> getStreamAccountDetails(GetStreamAccountDetailsArgs args, InvokeOptions options)
    public static Output<GetStreamAccountDetailsResult> getStreamAccountDetails(GetStreamAccountDetailsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: mongodbatlas:index/getStreamAccountDetails:getStreamAccountDetails
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CloudProvider string
    One of aws or azure.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    RegionName string
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    CloudProvider string
    One of aws or azure.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    RegionName string
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    cloudProvider String
    One of aws or azure.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    regionName String
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    cloudProvider string
    One of aws or azure.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    regionName string
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    cloud_provider str
    One of aws or azure.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    region_name str
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    cloudProvider String
    One of aws or azure.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    regionName String
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.

    getStreamAccountDetails Result

    The following output properties are available:

    AwsAccountId string
    The AWS Account ID.
    AzureSubscriptionId string
    The Azure Subscription ID.
    CidrBlock string
    The AWS VPC or Azure Virtual Network CIDR Block.
    CloudProvider string
    One of aws or azure.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    RegionName string
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    VirtualNetworkName string
    The name of the Azure Virtual Network.
    VpcId string
    The AWS VPC ID.
    AwsAccountId string
    The AWS Account ID.
    AzureSubscriptionId string
    The Azure Subscription ID.
    CidrBlock string
    The AWS VPC or Azure Virtual Network CIDR Block.
    CloudProvider string
    One of aws or azure.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    RegionName string
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    VirtualNetworkName string
    The name of the Azure Virtual Network.
    VpcId string
    The AWS VPC ID.
    awsAccountId String
    The AWS Account ID.
    azureSubscriptionId String
    The Azure Subscription ID.
    cidrBlock String
    The AWS VPC or Azure Virtual Network CIDR Block.
    cloudProvider String
    One of aws or azure.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    regionName String
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    virtualNetworkName String
    The name of the Azure Virtual Network.
    vpcId String
    The AWS VPC ID.
    awsAccountId string
    The AWS Account ID.
    azureSubscriptionId string
    The Azure Subscription ID.
    cidrBlock string
    The AWS VPC or Azure Virtual Network CIDR Block.
    cloudProvider string
    One of aws or azure.
    id string
    The provider-assigned unique ID for this managed resource.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    regionName string
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    virtualNetworkName string
    The name of the Azure Virtual Network.
    vpcId string
    The AWS VPC ID.
    aws_account_id str
    The AWS Account ID.
    azure_subscription_id str
    The Azure Subscription ID.
    cidr_block str
    The AWS VPC or Azure Virtual Network CIDR Block.
    cloud_provider str
    One of aws or azure.
    id str
    The provider-assigned unique ID for this managed resource.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    region_name str
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    virtual_network_name str
    The name of the Azure Virtual Network.
    vpc_id str
    The AWS VPC ID.
    awsAccountId String
    The AWS Account ID.
    azureSubscriptionId String
    The Azure Subscription ID.
    cidrBlock String
    The AWS VPC or Azure Virtual Network CIDR Block.
    cloudProvider String
    One of aws or azure.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project, also known as groupId in the official documentation.
    regionName String
    The cloud provider specific region name, i.e. US_EAST_1 for cloud provider aws.
    virtualNetworkName String
    The name of the Azure Virtual Network.
    vpcId String
    The AWS VPC ID.

    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
    Viewing docs for MongoDB Atlas v4.8.0
    published on Thursday, Apr 23, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.