1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. mongodb
  5. getInstances
Alibaba Cloud v3.95.0 published on Thursday, Feb 12, 2026 by Pulumi
alicloud logo
Alibaba Cloud v3.95.0 published on Thursday, Feb 12, 2026 by Pulumi

    This data source provides the MongoDB Instances of the current Alibaba Cloud user.

    NOTE: Available since v1.13.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = alicloud.mongodb.getZones({});
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "default-NODELETING",
    });
    const defaultGetSwitches = Promise.all([defaultGetNetworks, _default]).then(([defaultGetNetworks, _default]) => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: _default.zones?.[0]?.id,
    }));
    const defaultGetSecurityGroups = defaultGetNetworks.then(defaultGetNetworks => alicloud.ecs.getSecurityGroups({
        vpcId: defaultGetNetworks.ids?.[0],
    }));
    const defaultInstance = new alicloud.mongodb.Instance("default", {
        engineVersion: "4.4",
        dbInstanceClass: "mdb.shard.2x.xlarge.d",
        dbInstanceStorage: 20,
        vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
        name: name,
        tags: {
            Created: "TF",
            For: "Instance",
        },
    });
    const ids = alicloud.mongodb.getInstancesOutput({
        ids: [defaultInstance.id],
    });
    export const mongodbInstancesId0 = ids.apply(ids => ids.instances?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.mongodb.get_zones()
    default_get_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
        zone_id=default.zones[0].id)
    default_get_security_groups = alicloud.ecs.get_security_groups(vpc_id=default_get_networks.ids[0])
    default_instance = alicloud.mongodb.Instance("default",
        engine_version="4.4",
        db_instance_class="mdb.shard.2x.xlarge.d",
        db_instance_storage=20,
        vswitch_id=default_get_switches.ids[0],
        name=name,
        tags={
            "Created": "TF",
            "For": "Instance",
        })
    ids = alicloud.mongodb.get_instances_output(ids=[default_instance.id])
    pulumi.export("mongodbInstancesId0", ids.instances[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mongodb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := mongodb.GetZones(ctx, &mongodb.GetZonesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("default-NODELETING"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(_default.Zones[0].Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ecs.GetSecurityGroups(ctx, &ecs.GetSecurityGroupsArgs{
    			VpcId: pulumi.StringRef(defaultGetNetworks.Ids[0]),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := mongodb.NewInstance(ctx, "default", &mongodb.InstanceArgs{
    			EngineVersion:     pulumi.String("4.4"),
    			DbInstanceClass:   pulumi.String("mdb.shard.2x.xlarge.d"),
    			DbInstanceStorage: pulumi.Int(20),
    			VswitchId:         pulumi.String(defaultGetSwitches.Ids[0]),
    			Name:              pulumi.String(name),
    			Tags: pulumi.StringMap{
    				"Created": pulumi.String("TF"),
    				"For":     pulumi.String("Instance"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ids := mongodb.GetInstancesOutput(ctx, mongodb.GetInstancesOutputArgs{
    			Ids: pulumi.StringArray{
    				defaultInstance.ID(),
    			},
    		}, nil)
    		ctx.Export("mongodbInstancesId0", ids.ApplyT(func(ids mongodb.GetInstancesResult) (*string, error) {
    			return &ids.Instances[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.MongoDB.GetZones.Invoke();
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "default-NODELETING",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultGetSecurityGroups = AliCloud.Ecs.GetSecurityGroups.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        });
    
        var defaultInstance = new AliCloud.MongoDB.Instance("default", new()
        {
            EngineVersion = "4.4",
            DbInstanceClass = "mdb.shard.2x.xlarge.d",
            DbInstanceStorage = 20,
            VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            Name = name,
            Tags = 
            {
                { "Created", "TF" },
                { "For", "Instance" },
            },
        });
    
        var ids = AliCloud.MongoDB.GetInstances.Invoke(new()
        {
            Ids = new[]
            {
                defaultInstance.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["mongodbInstancesId0"] = ids.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.mongodb.MongodbFunctions;
    import com.pulumi.alicloud.mongodb.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetSecurityGroupsArgs;
    import com.pulumi.alicloud.mongodb.Instance;
    import com.pulumi.alicloud.mongodb.InstanceArgs;
    import com.pulumi.alicloud.mongodb.inputs.GetInstancesArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var default = MongodbFunctions.getZones(GetZonesArgs.builder()
                .build());
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("default-NODELETING")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.ids()[0])
                .zoneId(default_.zones()[0].id())
                .build());
    
            final var defaultGetSecurityGroups = EcsFunctions.getSecurityGroups(GetSecurityGroupsArgs.builder()
                .vpcId(defaultGetNetworks.ids()[0])
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .engineVersion("4.4")
                .dbInstanceClass("mdb.shard.2x.xlarge.d")
                .dbInstanceStorage(20)
                .vswitchId(defaultGetSwitches.ids()[0])
                .name(name)
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "Instance")
                ))
                .build());
    
            final var ids = MongodbFunctions.getInstances(GetInstancesArgs.builder()
                .ids(defaultInstance.id())
                .build());
    
            ctx.export("mongodbInstancesId0", ids.applyValue(_ids -> _ids.instances()[0].id()));
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultInstance:
        type: alicloud:mongodb:Instance
        name: default
        properties:
          engineVersion: '4.4'
          dbInstanceClass: mdb.shard.2x.xlarge.d
          dbInstanceStorage: 20
          vswitchId: ${defaultGetSwitches.ids[0]}
          name: ${name}
          tags:
            Created: TF
            For: Instance
    variables:
      default:
        fn::invoke:
          function: alicloud:mongodb:getZones
          arguments: {}
      defaultGetNetworks:
        fn::invoke:
          function: alicloud:vpc:getNetworks
          arguments:
            nameRegex: default-NODELETING
      defaultGetSwitches:
        fn::invoke:
          function: alicloud:vpc:getSwitches
          arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
            zoneId: ${default.zones[0].id}
      defaultGetSecurityGroups:
        fn::invoke:
          function: alicloud:ecs:getSecurityGroups
          arguments:
            vpcId: ${defaultGetNetworks.ids[0]}
      ids:
        fn::invoke:
          function: alicloud:mongodb:getInstances
          arguments:
            ids:
              - ${defaultInstance.id}
    outputs:
      mongodbInstancesId0: ${ids.instances[0].id}
    

    Using getInstances

    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 getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
    function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>
    def get_instances(availability_zone: Optional[str] = None,
                      enable_details: Optional[bool] = None,
                      ids: Optional[Sequence[str]] = None,
                      instance_class: Optional[str] = None,
                      instance_type: Optional[str] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      status: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInstancesResult
    def get_instances_output(availability_zone: Optional[pulumi.Input[str]] = None,
                      enable_details: Optional[pulumi.Input[bool]] = None,
                      ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      instance_class: Optional[pulumi.Input[str]] = None,
                      instance_type: Optional[pulumi.Input[str]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]
    func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
    func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput

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

    public static class GetInstances 
    {
        public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
    public static Output<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: alicloud:mongodb/getInstances:getInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AvailabilityZone string
    The zone ID.
    EnableDetails bool
    Whether to query the detailed list of resource attributes. Default value: false.
    Ids List<string>
    A list of Instance IDs.
    InstanceClass string
    The instance type.
    InstanceType string
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    NameRegex string
    A regex string to filter results by Instance name.
    OutputFile string
    The name of file that can save the collection of instances after running pulumi preview.
    Status string
    The instance status.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    AvailabilityZone string
    The zone ID.
    EnableDetails bool
    Whether to query the detailed list of resource attributes. Default value: false.
    Ids []string
    A list of Instance IDs.
    InstanceClass string
    The instance type.
    InstanceType string
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    NameRegex string
    A regex string to filter results by Instance name.
    OutputFile string
    The name of file that can save the collection of instances after running pulumi preview.
    Status string
    The instance status.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    availabilityZone String
    The zone ID.
    enableDetails Boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids List<String>
    A list of Instance IDs.
    instanceClass String
    The instance type.
    instanceType String
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    nameRegex String
    A regex string to filter results by Instance name.
    outputFile String
    The name of file that can save the collection of instances after running pulumi preview.
    status String
    The instance status.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    availabilityZone string
    The zone ID.
    enableDetails boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids string[]
    A list of Instance IDs.
    instanceClass string
    The instance type.
    instanceType string
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    nameRegex string
    A regex string to filter results by Instance name.
    outputFile string
    The name of file that can save the collection of instances after running pulumi preview.
    status string
    The instance status.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    availability_zone str
    The zone ID.
    enable_details bool
    Whether to query the detailed list of resource attributes. Default value: false.
    ids Sequence[str]
    A list of Instance IDs.
    instance_class str
    The instance type.
    instance_type str
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    name_regex str
    A regex string to filter results by Instance name.
    output_file str
    The name of file that can save the collection of instances after running pulumi preview.
    status str
    The instance status.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    availabilityZone String
    The zone ID.
    enableDetails Boolean
    Whether to query the detailed list of resource attributes. Default value: false.
    ids List<String>
    A list of Instance IDs.
    instanceClass String
    The instance type.
    instanceType String
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    nameRegex String
    A regex string to filter results by Instance name.
    outputFile String
    The name of file that can save the collection of instances after running pulumi preview.
    status String
    The instance status.
    tags Map<String>
    A mapping of tags to assign to the resource.

    getInstances Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Instances List<Pulumi.AliCloud.MongoDB.Outputs.GetInstancesInstance>
    A list of Instances. Each element contains the following attributes:
    Names List<string>
    (Available since v1.42.0) A list of Instance names.
    AvailabilityZone string
    The zone ID of the instance.
    EnableDetails bool
    InstanceClass string
    The instance type.
    InstanceType string
    The instance architecture.
    NameRegex string
    OutputFile string
    Status string
    The instance status.
    Tags Dictionary<string, string>
    (Available since v1.66.0) The details of the resource tags.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Instances []GetInstancesInstance
    A list of Instances. Each element contains the following attributes:
    Names []string
    (Available since v1.42.0) A list of Instance names.
    AvailabilityZone string
    The zone ID of the instance.
    EnableDetails bool
    InstanceClass string
    The instance type.
    InstanceType string
    The instance architecture.
    NameRegex string
    OutputFile string
    Status string
    The instance status.
    Tags map[string]string
    (Available since v1.66.0) The details of the resource tags.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<GetInstancesInstance>
    A list of Instances. Each element contains the following attributes:
    names List<String>
    (Available since v1.42.0) A list of Instance names.
    availabilityZone String
    The zone ID of the instance.
    enableDetails Boolean
    instanceClass String
    The instance type.
    instanceType String
    The instance architecture.
    nameRegex String
    outputFile String
    status String
    The instance status.
    tags Map<String,String>
    (Available since v1.66.0) The details of the resource tags.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instances GetInstancesInstance[]
    A list of Instances. Each element contains the following attributes:
    names string[]
    (Available since v1.42.0) A list of Instance names.
    availabilityZone string
    The zone ID of the instance.
    enableDetails boolean
    instanceClass string
    The instance type.
    instanceType string
    The instance architecture.
    nameRegex string
    outputFile string
    status string
    The instance status.
    tags {[key: string]: string}
    (Available since v1.66.0) The details of the resource tags.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instances Sequence[GetInstancesInstance]
    A list of Instances. Each element contains the following attributes:
    names Sequence[str]
    (Available since v1.42.0) A list of Instance names.
    availability_zone str
    The zone ID of the instance.
    enable_details bool
    instance_class str
    The instance type.
    instance_type str
    The instance architecture.
    name_regex str
    output_file str
    status str
    The instance status.
    tags Mapping[str, str]
    (Available since v1.66.0) The details of the resource tags.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instances List<Property Map>
    A list of Instances. Each element contains the following attributes:
    names List<String>
    (Available since v1.42.0) A list of Instance names.
    availabilityZone String
    The zone ID of the instance.
    enableDetails Boolean
    instanceClass String
    The instance type.
    instanceType String
    The instance architecture.
    nameRegex String
    outputFile String
    status String
    The instance status.
    tags Map<String>
    (Available since v1.66.0) The details of the resource tags.

    Supporting Types

    GetInstancesInstance

    AvailabilityZone string
    The zone ID.
    ChargeType string
    The billing method of the instance.
    CreationTime string
    The time when the instance was created.
    Engine string
    The database engine.
    EngineVersion string
    The database engine version.
    ExpirationTime string
    The time when the instance expires.
    Id string
    The instance ID.
    InstanceClass string
    The instance type.
    InstanceType string
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    LockMode string
    The lock status of the instance.
    Mongos List<Pulumi.AliCloud.MongoDB.Inputs.GetInstancesInstanceMongo>
    The mongo nodes of the instance. Note: mongos takes effect only if instance_type is set to sharding.
    Name string
    The name of the instance.
    NetworkType string
    The network type of the instance.
    RegionId string
    The region ID of the instance.
    Replication string
    The number of nodes in the instance.
    RestoreRanges List<Pulumi.AliCloud.MongoDB.Inputs.GetInstancesInstanceRestoreRange>
    (Available since v1.271.0) A list of time ranges available for point-in-time recovery. Note: restore_ranges takes effect only if enable_details is set to true.
    Shards List<Pulumi.AliCloud.MongoDB.Inputs.GetInstancesInstanceShard>
    The information of the shard node. Note: shards takes effect only if instance_type is set to sharding.
    Status string
    The instance status.
    Storage int
    The storage space of the shard node.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    AvailabilityZone string
    The zone ID.
    ChargeType string
    The billing method of the instance.
    CreationTime string
    The time when the instance was created.
    Engine string
    The database engine.
    EngineVersion string
    The database engine version.
    ExpirationTime string
    The time when the instance expires.
    Id string
    The instance ID.
    InstanceClass string
    The instance type.
    InstanceType string
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    LockMode string
    The lock status of the instance.
    Mongos []GetInstancesInstanceMongo
    The mongo nodes of the instance. Note: mongos takes effect only if instance_type is set to sharding.
    Name string
    The name of the instance.
    NetworkType string
    The network type of the instance.
    RegionId string
    The region ID of the instance.
    Replication string
    The number of nodes in the instance.
    RestoreRanges []GetInstancesInstanceRestoreRange
    (Available since v1.271.0) A list of time ranges available for point-in-time recovery. Note: restore_ranges takes effect only if enable_details is set to true.
    Shards []GetInstancesInstanceShard
    The information of the shard node. Note: shards takes effect only if instance_type is set to sharding.
    Status string
    The instance status.
    Storage int
    The storage space of the shard node.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    availabilityZone String
    The zone ID.
    chargeType String
    The billing method of the instance.
    creationTime String
    The time when the instance was created.
    engine String
    The database engine.
    engineVersion String
    The database engine version.
    expirationTime String
    The time when the instance expires.
    id String
    The instance ID.
    instanceClass String
    The instance type.
    instanceType String
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    lockMode String
    The lock status of the instance.
    mongos List<GetInstancesInstanceMongo>
    The mongo nodes of the instance. Note: mongos takes effect only if instance_type is set to sharding.
    name String
    The name of the instance.
    networkType String
    The network type of the instance.
    regionId String
    The region ID of the instance.
    replication String
    The number of nodes in the instance.
    restoreRanges List<GetInstancesInstanceRestoreRange>
    (Available since v1.271.0) A list of time ranges available for point-in-time recovery. Note: restore_ranges takes effect only if enable_details is set to true.
    shards List<GetInstancesInstanceShard>
    The information of the shard node. Note: shards takes effect only if instance_type is set to sharding.
    status String
    The instance status.
    storage Integer
    The storage space of the shard node.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    availabilityZone string
    The zone ID.
    chargeType string
    The billing method of the instance.
    creationTime string
    The time when the instance was created.
    engine string
    The database engine.
    engineVersion string
    The database engine version.
    expirationTime string
    The time when the instance expires.
    id string
    The instance ID.
    instanceClass string
    The instance type.
    instanceType string
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    lockMode string
    The lock status of the instance.
    mongos GetInstancesInstanceMongo[]
    The mongo nodes of the instance. Note: mongos takes effect only if instance_type is set to sharding.
    name string
    The name of the instance.
    networkType string
    The network type of the instance.
    regionId string
    The region ID of the instance.
    replication string
    The number of nodes in the instance.
    restoreRanges GetInstancesInstanceRestoreRange[]
    (Available since v1.271.0) A list of time ranges available for point-in-time recovery. Note: restore_ranges takes effect only if enable_details is set to true.
    shards GetInstancesInstanceShard[]
    The information of the shard node. Note: shards takes effect only if instance_type is set to sharding.
    status string
    The instance status.
    storage number
    The storage space of the shard node.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    availability_zone str
    The zone ID.
    charge_type str
    The billing method of the instance.
    creation_time str
    The time when the instance was created.
    engine str
    The database engine.
    engine_version str
    The database engine version.
    expiration_time str
    The time when the instance expires.
    id str
    The instance ID.
    instance_class str
    The instance type.
    instance_type str
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    lock_mode str
    The lock status of the instance.
    mongos Sequence[GetInstancesInstanceMongo]
    The mongo nodes of the instance. Note: mongos takes effect only if instance_type is set to sharding.
    name str
    The name of the instance.
    network_type str
    The network type of the instance.
    region_id str
    The region ID of the instance.
    replication str
    The number of nodes in the instance.
    restore_ranges Sequence[GetInstancesInstanceRestoreRange]
    (Available since v1.271.0) A list of time ranges available for point-in-time recovery. Note: restore_ranges takes effect only if enable_details is set to true.
    shards Sequence[GetInstancesInstanceShard]
    The information of the shard node. Note: shards takes effect only if instance_type is set to sharding.
    status str
    The instance status.
    storage int
    The storage space of the shard node.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    availabilityZone String
    The zone ID.
    chargeType String
    The billing method of the instance.
    creationTime String
    The time when the instance was created.
    engine String
    The database engine.
    engineVersion String
    The database engine version.
    expirationTime String
    The time when the instance expires.
    id String
    The instance ID.
    instanceClass String
    The instance type.
    instanceType String
    The instance architecture. Default value: replicate. Valid values: replicate, sharding.
    lockMode String
    The lock status of the instance.
    mongos List<Property Map>
    The mongo nodes of the instance. Note: mongos takes effect only if instance_type is set to sharding.
    name String
    The name of the instance.
    networkType String
    The network type of the instance.
    regionId String
    The region ID of the instance.
    replication String
    The number of nodes in the instance.
    restoreRanges List<Property Map>
    (Available since v1.271.0) A list of time ranges available for point-in-time recovery. Note: restore_ranges takes effect only if enable_details is set to true.
    shards List<Property Map>
    The information of the shard node. Note: shards takes effect only if instance_type is set to sharding.
    status String
    The instance status.
    storage Number
    The storage space of the shard node.
    tags Map<String>
    A mapping of tags to assign to the resource.

    GetInstancesInstanceMongo

    Class string
    The instance type of the shard node.
    Description string
    The description of the shard node.
    NodeId string
    The ID of the shard node.
    Class string
    The instance type of the shard node.
    Description string
    The description of the shard node.
    NodeId string
    The ID of the shard node.
    class_ String
    The instance type of the shard node.
    description String
    The description of the shard node.
    nodeId String
    The ID of the shard node.
    class string
    The instance type of the shard node.
    description string
    The description of the shard node.
    nodeId string
    The ID of the shard node.
    class_ str
    The instance type of the shard node.
    description str
    The description of the shard node.
    node_id str
    The ID of the shard node.
    class String
    The instance type of the shard node.
    description String
    The description of the shard node.
    nodeId String
    The ID of the shard node.

    GetInstancesInstanceRestoreRange

    RestoreBeginTime string
    The beginning of the recoverable time range.
    RestoreEndTime string
    The end of the recoverable time range.
    RestoreType string
    The restoration method.
    RestoreBeginTime string
    The beginning of the recoverable time range.
    RestoreEndTime string
    The end of the recoverable time range.
    RestoreType string
    The restoration method.
    restoreBeginTime String
    The beginning of the recoverable time range.
    restoreEndTime String
    The end of the recoverable time range.
    restoreType String
    The restoration method.
    restoreBeginTime string
    The beginning of the recoverable time range.
    restoreEndTime string
    The end of the recoverable time range.
    restoreType string
    The restoration method.
    restore_begin_time str
    The beginning of the recoverable time range.
    restore_end_time str
    The end of the recoverable time range.
    restore_type str
    The restoration method.
    restoreBeginTime String
    The beginning of the recoverable time range.
    restoreEndTime String
    The end of the recoverable time range.
    restoreType String
    The restoration method.

    GetInstancesInstanceShard

    Class string
    The instance type of the shard node.
    Description string
    The description of the shard node.
    NodeId string
    The ID of the shard node.
    Storage int
    The storage space of the shard node.
    Class string
    The instance type of the shard node.
    Description string
    The description of the shard node.
    NodeId string
    The ID of the shard node.
    Storage int
    The storage space of the shard node.
    class_ String
    The instance type of the shard node.
    description String
    The description of the shard node.
    nodeId String
    The ID of the shard node.
    storage Integer
    The storage space of the shard node.
    class string
    The instance type of the shard node.
    description string
    The description of the shard node.
    nodeId string
    The ID of the shard node.
    storage number
    The storage space of the shard node.
    class_ str
    The instance type of the shard node.
    description str
    The description of the shard node.
    node_id str
    The ID of the shard node.
    storage int
    The storage space of the shard node.
    class String
    The instance type of the shard node.
    description String
    The description of the shard node.
    nodeId String
    The ID of the shard node.
    storage Number
    The storage space of the shard node.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.95.0 published on Thursday, Feb 12, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate