tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getMongodbInstances
Start a Neo task
Explain and create a tencentcloud.getMongodbInstances resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query detailed information of Mongodb instances.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const mongodb = tencentcloud.getMongodbInstances({
instanceId: "cmgo-l6lwdsel",
clusterType: "REPLSET",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
mongodb = tencentcloud.get_mongodb_instances(instance_id="cmgo-l6lwdsel",
cluster_type="REPLSET")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.GetMongodbInstances(ctx, &tencentcloud.GetMongodbInstancesArgs{
InstanceId: pulumi.StringRef("cmgo-l6lwdsel"),
ClusterType: pulumi.StringRef("REPLSET"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var mongodb = Tencentcloud.GetMongodbInstances.Invoke(new()
{
InstanceId = "cmgo-l6lwdsel",
ClusterType = "REPLSET",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetMongodbInstancesArgs;
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 mongodb = TencentcloudFunctions.getMongodbInstances(GetMongodbInstancesArgs.builder()
.instanceId("cmgo-l6lwdsel")
.clusterType("REPLSET")
.build());
}
}
variables:
mongodb:
fn::invoke:
function: tencentcloud:getMongodbInstances
arguments:
instanceId: cmgo-l6lwdsel
clusterType: REPLSET
Using getMongodbInstances
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 getMongodbInstances(args: GetMongodbInstancesArgs, opts?: InvokeOptions): Promise<GetMongodbInstancesResult>
function getMongodbInstancesOutput(args: GetMongodbInstancesOutputArgs, opts?: InvokeOptions): Output<GetMongodbInstancesResult>def get_mongodb_instances(cluster_type: Optional[str] = None,
id: Optional[str] = None,
instance_id: Optional[str] = None,
instance_name_prefix: Optional[str] = None,
result_output_file: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetMongodbInstancesResult
def get_mongodb_instances_output(cluster_type: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
instance_name_prefix: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMongodbInstancesResult]func GetMongodbInstances(ctx *Context, args *GetMongodbInstancesArgs, opts ...InvokeOption) (*GetMongodbInstancesResult, error)
func GetMongodbInstancesOutput(ctx *Context, args *GetMongodbInstancesOutputArgs, opts ...InvokeOption) GetMongodbInstancesResultOutput> Note: This function is named GetMongodbInstances in the Go SDK.
public static class GetMongodbInstances
{
public static Task<GetMongodbInstancesResult> InvokeAsync(GetMongodbInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetMongodbInstancesResult> Invoke(GetMongodbInstancesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMongodbInstancesResult> getMongodbInstances(GetMongodbInstancesArgs args, InvokeOptions options)
public static Output<GetMongodbInstancesResult> getMongodbInstances(GetMongodbInstancesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getMongodbInstances:getMongodbInstances
arguments:
# arguments dictionaryThe following arguments are supported:
- Cluster
Type string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - Id string
- Instance
Id string - ID of the Mongodb instance to be queried.
- Instance
Name stringPrefix - Name prefix of the Mongodb instance.
- Result
Output stringFile - Used to store results.
- Dictionary<string, string>
- Tags of the Mongodb instance to be queried.
- Cluster
Type string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - Id string
- Instance
Id string - ID of the Mongodb instance to be queried.
- Instance
Name stringPrefix - Name prefix of the Mongodb instance.
- Result
Output stringFile - Used to store results.
- map[string]string
- Tags of the Mongodb instance to be queried.
- cluster
Type String - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - id String
- instance
Id String - ID of the Mongodb instance to be queried.
- instance
Name StringPrefix - Name prefix of the Mongodb instance.
- result
Output StringFile - Used to store results.
- Map<String,String>
- Tags of the Mongodb instance to be queried.
- cluster
Type string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - id string
- instance
Id string - ID of the Mongodb instance to be queried.
- instance
Name stringPrefix - Name prefix of the Mongodb instance.
- result
Output stringFile - Used to store results.
- {[key: string]: string}
- Tags of the Mongodb instance to be queried.
- cluster_
type str - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - id str
- instance_
id str - ID of the Mongodb instance to be queried.
- instance_
name_ strprefix - Name prefix of the Mongodb instance.
- result_
output_ strfile - Used to store results.
- Mapping[str, str]
- Tags of the Mongodb instance to be queried.
- cluster
Type String - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - id String
- instance
Id String - ID of the Mongodb instance to be queried.
- instance
Name StringPrefix - Name prefix of the Mongodb instance.
- result
Output StringFile - Used to store results.
- Map<String>
- Tags of the Mongodb instance to be queried.
getMongodbInstances Result
The following output properties are available:
- Id string
- Instance
Lists List<GetMongodb Instances Instance List> - A list of instances. Each element contains the following attributes:
- Cluster
Type string - Type of Mongodb cluster.
- Instance
Id string - ID of the Mongodb instance.
- Instance
Name stringPrefix - Result
Output stringFile - Dictionary<string, string>
- Tags of the Mongodb instance.
- Id string
- Instance
Lists []GetMongodb Instances Instance List - A list of instances. Each element contains the following attributes:
- Cluster
Type string - Type of Mongodb cluster.
- Instance
Id string - ID of the Mongodb instance.
- Instance
Name stringPrefix - Result
Output stringFile - map[string]string
- Tags of the Mongodb instance.
- id String
- instance
Lists List<GetMongodb Instances Instance List> - A list of instances. Each element contains the following attributes:
- cluster
Type String - Type of Mongodb cluster.
- instance
Id String - ID of the Mongodb instance.
- instance
Name StringPrefix - result
Output StringFile - Map<String,String>
- Tags of the Mongodb instance.
- id string
- instance
Lists GetMongodb Instances Instance List[] - A list of instances. Each element contains the following attributes:
- cluster
Type string - Type of Mongodb cluster.
- instance
Id string - ID of the Mongodb instance.
- instance
Name stringPrefix - result
Output stringFile - {[key: string]: string}
- Tags of the Mongodb instance.
- id str
- instance_
lists Sequence[GetMongodb Instances Instance List] - A list of instances. Each element contains the following attributes:
- cluster_
type str - Type of Mongodb cluster.
- instance_
id str - ID of the Mongodb instance.
- instance_
name_ strprefix - result_
output_ strfile - Mapping[str, str]
- Tags of the Mongodb instance.
- id String
- instance
Lists List<Property Map> - A list of instances. Each element contains the following attributes:
- cluster
Type String - Type of Mongodb cluster.
- instance
Id String - ID of the Mongodb instance.
- instance
Name StringPrefix - result
Output StringFile - Map<String>
- Tags of the Mongodb instance.
Supporting Types
GetMongodbInstancesInstanceList
- Auto
Renew doubleFlag - Auto renew flag.
- Available
Zone string - The available zone of the Mongodb.
- Charge
Type string - The charge type of instance.
- Cluster
Type string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - Cpu double
- Number of cpu's core.
- Create
Time string - Creation time of the Mongodb instance.
- Engine
Version string - Version of the Mongodb engine.
- Instance
Id string - ID of the Mongodb instance to be queried.
- Instance
Name string - Name of the Mongodb instance.
- Machine
Type string - Type of Mongodb instance.
- Memory double
- Memory size.
- Project
Id double - ID of the project which the instance belongs.
- double
- Number of sharding.
- Status double
- Status of the Mongodb, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
- Subnet
Id string - ID of the subnet.
- Dictionary<string, string>
- Tags of the Mongodb instance to be queried.
- Vip string
- IP of the Mongodb instance.
- Volume double
- Disk size.
- Vpc
Id string - ID of the VPC.
- Vport double
- IP port of the Mongodb instance.
- Auto
Renew float64Flag - Auto renew flag.
- Available
Zone string - The available zone of the Mongodb.
- Charge
Type string - The charge type of instance.
- Cluster
Type string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - Cpu float64
- Number of cpu's core.
- Create
Time string - Creation time of the Mongodb instance.
- Engine
Version string - Version of the Mongodb engine.
- Instance
Id string - ID of the Mongodb instance to be queried.
- Instance
Name string - Name of the Mongodb instance.
- Machine
Type string - Type of Mongodb instance.
- Memory float64
- Memory size.
- Project
Id float64 - ID of the project which the instance belongs.
- float64
- Number of sharding.
- Status float64
- Status of the Mongodb, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
- Subnet
Id string - ID of the subnet.
- map[string]string
- Tags of the Mongodb instance to be queried.
- Vip string
- IP of the Mongodb instance.
- Volume float64
- Disk size.
- Vpc
Id string - ID of the VPC.
- Vport float64
- IP port of the Mongodb instance.
- auto
Renew DoubleFlag - Auto renew flag.
- available
Zone String - The available zone of the Mongodb.
- charge
Type String - The charge type of instance.
- cluster
Type String - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - cpu Double
- Number of cpu's core.
- create
Time String - Creation time of the Mongodb instance.
- engine
Version String - Version of the Mongodb engine.
- instance
Id String - ID of the Mongodb instance to be queried.
- instance
Name String - Name of the Mongodb instance.
- machine
Type String - Type of Mongodb instance.
- memory Double
- Memory size.
- project
Id Double - ID of the project which the instance belongs.
- Double
- Number of sharding.
- status Double
- Status of the Mongodb, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
- subnet
Id String - ID of the subnet.
- Map<String,String>
- Tags of the Mongodb instance to be queried.
- vip String
- IP of the Mongodb instance.
- volume Double
- Disk size.
- vpc
Id String - ID of the VPC.
- vport Double
- IP port of the Mongodb instance.
- auto
Renew numberFlag - Auto renew flag.
- available
Zone string - The available zone of the Mongodb.
- charge
Type string - The charge type of instance.
- cluster
Type string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - cpu number
- Number of cpu's core.
- create
Time string - Creation time of the Mongodb instance.
- engine
Version string - Version of the Mongodb engine.
- instance
Id string - ID of the Mongodb instance to be queried.
- instance
Name string - Name of the Mongodb instance.
- machine
Type string - Type of Mongodb instance.
- memory number
- Memory size.
- project
Id number - ID of the project which the instance belongs.
- number
- Number of sharding.
- status number
- Status of the Mongodb, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
- subnet
Id string - ID of the subnet.
- {[key: string]: string}
- Tags of the Mongodb instance to be queried.
- vip string
- IP of the Mongodb instance.
- volume number
- Disk size.
- vpc
Id string - ID of the VPC.
- vport number
- IP port of the Mongodb instance.
- auto_
renew_ floatflag - Auto renew flag.
- available_
zone str - The available zone of the Mongodb.
- charge_
type str - The charge type of instance.
- cluster_
type str - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - cpu float
- Number of cpu's core.
- create_
time str - Creation time of the Mongodb instance.
- engine_
version str - Version of the Mongodb engine.
- instance_
id str - ID of the Mongodb instance to be queried.
- instance_
name str - Name of the Mongodb instance.
- machine_
type str - Type of Mongodb instance.
- memory float
- Memory size.
- project_
id float - ID of the project which the instance belongs.
- float
- Number of sharding.
- status float
- Status of the Mongodb, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
- subnet_
id str - ID of the subnet.
- Mapping[str, str]
- Tags of the Mongodb instance to be queried.
- vip str
- IP of the Mongodb instance.
- volume float
- Disk size.
- vpc_
id str - ID of the VPC.
- vport float
- IP port of the Mongodb instance.
- auto
Renew NumberFlag - Auto renew flag.
- available
Zone String - The available zone of the Mongodb.
- charge
Type String - The charge type of instance.
- cluster
Type String - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET), sharding cluster(expressed withSHARD). - cpu Number
- Number of cpu's core.
- create
Time String - Creation time of the Mongodb instance.
- engine
Version String - Version of the Mongodb engine.
- instance
Id String - ID of the Mongodb instance to be queried.
- instance
Name String - Name of the Mongodb instance.
- machine
Type String - Type of Mongodb instance.
- memory Number
- Memory size.
- project
Id Number - ID of the project which the instance belongs.
- Number
- Number of sharding.
- status Number
- Status of the Mongodb, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
- subnet
Id String - ID of the subnet.
- Map<String>
- Tags of the Mongodb instance to be queried.
- vip String
- IP of the Mongodb instance.
- volume Number
- Disk size.
- vpc
Id String - ID of the VPC.
- vport Number
- IP port of the Mongodb instance.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
