tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack
tencentcloud.getMongodbInstances
Explore with Pulumi AI
tencentcloud 1.81.183 published on Wednesday, Apr 16, 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({
clusterType: "REPLSET",
instanceId: "cmgo-l6lwdsel",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
mongodb = tencentcloud.get_mongodb_instances(cluster_type="REPLSET",
instance_id="cmgo-l6lwdsel")
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{
ClusterType: pulumi.StringRef("REPLSET"),
InstanceId: pulumi.StringRef("cmgo-l6lwdsel"),
}, 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()
{
ClusterType = "REPLSET",
InstanceId = "cmgo-l6lwdsel",
});
});
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()
.clusterType("REPLSET")
.instanceId("cmgo-l6lwdsel")
.build());
}
}
variables:
mongodb:
fn::invoke:
function: tencentcloud:getMongodbInstances
arguments:
clusterType: REPLSET
instanceId: cmgo-l6lwdsel
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 dictionary
The 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 Flag This property is required. double - Auto renew flag.
- Available
Zone This property is required. string - The available zone of the Mongodb.
- Charge
Type This property is required. string - The charge type of instance.
- Cluster
Type This property is required. string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET
), sharding cluster(expressed withSHARD
). - Cpu
This property is required. double - Number of cpu's core.
- Create
Time This property is required. string - Creation time of the Mongodb instance.
- Engine
Version This property is required. string - Version of the Mongodb engine.
- Instance
Id This property is required. string - ID of the Mongodb instance to be queried.
- Instance
Name This property is required. string - Name of the Mongodb instance.
- Machine
Type This property is required. string - Type of Mongodb instance.
- Memory
This property is required. double - Memory size.
- Project
Id This property is required. double - ID of the project which the instance belongs.
This property is required. double- Number of sharding.
- Status
This property is required. 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 This property is required. string - ID of the subnet.
This property is required. Dictionary<string, string>- Tags of the Mongodb instance to be queried.
- Vip
This property is required. string - IP of the Mongodb instance.
- Volume
This property is required. double - Disk size.
- Vpc
Id This property is required. string - ID of the VPC.
- Vport
This property is required. double - IP port of the Mongodb instance.
- Auto
Renew Flag This property is required. float64 - Auto renew flag.
- Available
Zone This property is required. string - The available zone of the Mongodb.
- Charge
Type This property is required. string - The charge type of instance.
- Cluster
Type This property is required. string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET
), sharding cluster(expressed withSHARD
). - Cpu
This property is required. float64 - Number of cpu's core.
- Create
Time This property is required. string - Creation time of the Mongodb instance.
- Engine
Version This property is required. string - Version of the Mongodb engine.
- Instance
Id This property is required. string - ID of the Mongodb instance to be queried.
- Instance
Name This property is required. string - Name of the Mongodb instance.
- Machine
Type This property is required. string - Type of Mongodb instance.
- Memory
This property is required. float64 - Memory size.
- Project
Id This property is required. float64 - ID of the project which the instance belongs.
This property is required. float64- Number of sharding.
- Status
This property is required. 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 This property is required. string - ID of the subnet.
This property is required. map[string]string- Tags of the Mongodb instance to be queried.
- Vip
This property is required. string - IP of the Mongodb instance.
- Volume
This property is required. float64 - Disk size.
- Vpc
Id This property is required. string - ID of the VPC.
- Vport
This property is required. float64 - IP port of the Mongodb instance.
- auto
Renew Flag This property is required. Double - Auto renew flag.
- available
Zone This property is required. String - The available zone of the Mongodb.
- charge
Type This property is required. String - The charge type of instance.
- cluster
Type This property is required. String - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET
), sharding cluster(expressed withSHARD
). - cpu
This property is required. Double - Number of cpu's core.
- create
Time This property is required. String - Creation time of the Mongodb instance.
- engine
Version This property is required. String - Version of the Mongodb engine.
- instance
Id This property is required. String - ID of the Mongodb instance to be queried.
- instance
Name This property is required. String - Name of the Mongodb instance.
- machine
Type This property is required. String - Type of Mongodb instance.
- memory
This property is required. Double - Memory size.
- project
Id This property is required. Double - ID of the project which the instance belongs.
This property is required. Double- Number of sharding.
- status
This property is required. 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 This property is required. String - ID of the subnet.
This property is required. Map<String,String>- Tags of the Mongodb instance to be queried.
- vip
This property is required. String - IP of the Mongodb instance.
- volume
This property is required. Double - Disk size.
- vpc
Id This property is required. String - ID of the VPC.
- vport
This property is required. Double - IP port of the Mongodb instance.
- auto
Renew Flag This property is required. number - Auto renew flag.
- available
Zone This property is required. string - The available zone of the Mongodb.
- charge
Type This property is required. string - The charge type of instance.
- cluster
Type This property is required. string - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET
), sharding cluster(expressed withSHARD
). - cpu
This property is required. number - Number of cpu's core.
- create
Time This property is required. string - Creation time of the Mongodb instance.
- engine
Version This property is required. string - Version of the Mongodb engine.
- instance
Id This property is required. string - ID of the Mongodb instance to be queried.
- instance
Name This property is required. string - Name of the Mongodb instance.
- machine
Type This property is required. string - Type of Mongodb instance.
- memory
This property is required. number - Memory size.
- project
Id This property is required. number - ID of the project which the instance belongs.
This property is required. number- Number of sharding.
- status
This property is required. 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 This property is required. string - ID of the subnet.
This property is required. {[key: string]: string}- Tags of the Mongodb instance to be queried.
- vip
This property is required. string - IP of the Mongodb instance.
- volume
This property is required. number - Disk size.
- vpc
Id This property is required. string - ID of the VPC.
- vport
This property is required. number - IP port of the Mongodb instance.
- auto_
renew_ flag This property is required. float - Auto renew flag.
- available_
zone This property is required. str - The available zone of the Mongodb.
- charge_
type This property is required. str - The charge type of instance.
- cluster_
type This property is required. str - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET
), sharding cluster(expressed withSHARD
). - cpu
This property is required. float - Number of cpu's core.
- create_
time This property is required. str - Creation time of the Mongodb instance.
- engine_
version This property is required. str - Version of the Mongodb engine.
- instance_
id This property is required. str - ID of the Mongodb instance to be queried.
- instance_
name This property is required. str - Name of the Mongodb instance.
- machine_
type This property is required. str - Type of Mongodb instance.
- memory
This property is required. float - Memory size.
- project_
id This property is required. float - ID of the project which the instance belongs.
This property is required. float- Number of sharding.
- status
This property is required. 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 This property is required. str - ID of the subnet.
This property is required. Mapping[str, str]- Tags of the Mongodb instance to be queried.
- vip
This property is required. str - IP of the Mongodb instance.
- volume
This property is required. float - Disk size.
- vpc_
id This property is required. str - ID of the VPC.
- vport
This property is required. float - IP port of the Mongodb instance.
- auto
Renew Flag This property is required. Number - Auto renew flag.
- available
Zone This property is required. String - The available zone of the Mongodb.
- charge
Type This property is required. String - The charge type of instance.
- cluster
Type This property is required. String - Type of Mongodb cluster, and available values include replica set cluster(expressed with
REPLSET
), sharding cluster(expressed withSHARD
). - cpu
This property is required. Number - Number of cpu's core.
- create
Time This property is required. String - Creation time of the Mongodb instance.
- engine
Version This property is required. String - Version of the Mongodb engine.
- instance
Id This property is required. String - ID of the Mongodb instance to be queried.
- instance
Name This property is required. String - Name of the Mongodb instance.
- machine
Type This property is required. String - Type of Mongodb instance.
- memory
This property is required. Number - Memory size.
- project
Id This property is required. Number - ID of the project which the instance belongs.
This property is required. Number- Number of sharding.
- status
This property is required. 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 This property is required. String - ID of the subnet.
This property is required. Map<String>- Tags of the Mongodb instance to be queried.
- vip
This property is required. String - IP of the Mongodb instance.
- volume
This property is required. Number - Disk size.
- vpc
Id This property is required. String - ID of the VPC.
- vport
This property is required. Number - IP port of the Mongodb instance.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack