1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. MongodbStandbyInstance
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.MongodbStandbyInstance

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provide a resource to create a Mongodb standby instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const shanghai = new tencentcloud.Provider("shanghai", {region: "ap-shanghai"});
    const mongodbMongodbInstance = new tencentcloud.MongodbInstance("mongodbMongodbInstance", {
        instanceName: "tf-mongodb-test",
        memory: 4,
        volume: 100,
        engineVersion: "MONGO_40_WT",
        machineType: "HIO10G",
        availableZone: _var.availability_zone,
        projectId: 0,
        password: "test1234",
        tags: {
            test: "test",
        },
    });
    const mongodbMongodbStandbyInstance = new tencentcloud.MongodbStandbyInstance("mongodbMongodbStandbyInstance", {
        instanceName: "tf-mongodb-standby-test",
        memory: 4,
        volume: 100,
        availableZone: "ap-shanghai-2",
        projectId: 0,
        fatherInstanceId: mongodbMongodbInstance.mongodbInstanceId,
        fatherInstanceRegion: "ap-guangzhou",
        tags: {
            test: "test",
        },
    }, {
        provider: tencentcloud.shanghai,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    shanghai = tencentcloud.Provider("shanghai", region="ap-shanghai")
    mongodb_mongodb_instance = tencentcloud.MongodbInstance("mongodbMongodbInstance",
        instance_name="tf-mongodb-test",
        memory=4,
        volume=100,
        engine_version="MONGO_40_WT",
        machine_type="HIO10G",
        available_zone=var["availability_zone"],
        project_id=0,
        password="test1234",
        tags={
            "test": "test",
        })
    mongodb_mongodb_standby_instance = tencentcloud.MongodbStandbyInstance("mongodbMongodbStandbyInstance",
        instance_name="tf-mongodb-standby-test",
        memory=4,
        volume=100,
        available_zone="ap-shanghai-2",
        project_id=0,
        father_instance_id=mongodb_mongodb_instance.mongodb_instance_id,
        father_instance_region="ap-guangzhou",
        tags={
            "test": "test",
        },
        opts = pulumi.ResourceOptions(provider=tencentcloud["shanghai"]))
    
    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.NewProvider(ctx, "shanghai", &tencentcloud.ProviderArgs{
    			Region: pulumi.String("ap-shanghai"),
    		})
    		if err != nil {
    			return err
    		}
    		mongodbMongodbInstance, err := tencentcloud.NewMongodbInstance(ctx, "mongodbMongodbInstance", &tencentcloud.MongodbInstanceArgs{
    			InstanceName:  pulumi.String("tf-mongodb-test"),
    			Memory:        pulumi.Float64(4),
    			Volume:        pulumi.Float64(100),
    			EngineVersion: pulumi.String("MONGO_40_WT"),
    			MachineType:   pulumi.String("HIO10G"),
    			AvailableZone: pulumi.Any(_var.Availability_zone),
    			ProjectId:     pulumi.Float64(0),
    			Password:      pulumi.String("test1234"),
    			Tags: pulumi.StringMap{
    				"test": pulumi.String("test"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewMongodbStandbyInstance(ctx, "mongodbMongodbStandbyInstance", &tencentcloud.MongodbStandbyInstanceArgs{
    			InstanceName:         pulumi.String("tf-mongodb-standby-test"),
    			Memory:               pulumi.Float64(4),
    			Volume:               pulumi.Float64(100),
    			AvailableZone:        pulumi.String("ap-shanghai-2"),
    			ProjectId:            pulumi.Float64(0),
    			FatherInstanceId:     mongodbMongodbInstance.MongodbInstanceId,
    			FatherInstanceRegion: pulumi.String("ap-guangzhou"),
    			Tags: pulumi.StringMap{
    				"test": pulumi.String("test"),
    			},
    		}, pulumi.Provider(tencentcloud.Shanghai))
    		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 shanghai = new Tencentcloud.Provider("shanghai", new()
        {
            Region = "ap-shanghai",
        });
    
        var mongodbMongodbInstance = new Tencentcloud.MongodbInstance("mongodbMongodbInstance", new()
        {
            InstanceName = "tf-mongodb-test",
            Memory = 4,
            Volume = 100,
            EngineVersion = "MONGO_40_WT",
            MachineType = "HIO10G",
            AvailableZone = @var.Availability_zone,
            ProjectId = 0,
            Password = "test1234",
            Tags = 
            {
                { "test", "test" },
            },
        });
    
        var mongodbMongodbStandbyInstance = new Tencentcloud.MongodbStandbyInstance("mongodbMongodbStandbyInstance", new()
        {
            InstanceName = "tf-mongodb-standby-test",
            Memory = 4,
            Volume = 100,
            AvailableZone = "ap-shanghai-2",
            ProjectId = 0,
            FatherInstanceId = mongodbMongodbInstance.MongodbInstanceId,
            FatherInstanceRegion = "ap-guangzhou",
            Tags = 
            {
                { "test", "test" },
            },
        }, new CustomResourceOptions
        {
            Provider = tencentcloud.Shanghai,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Provider;
    import com.pulumi.tencentcloud.ProviderArgs;
    import com.pulumi.tencentcloud.MongodbInstance;
    import com.pulumi.tencentcloud.MongodbInstanceArgs;
    import com.pulumi.tencentcloud.MongodbStandbyInstance;
    import com.pulumi.tencentcloud.MongodbStandbyInstanceArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            var shanghai = new Provider("shanghai", ProviderArgs.builder()
                .region("ap-shanghai")
                .build());
    
            var mongodbMongodbInstance = new MongodbInstance("mongodbMongodbInstance", MongodbInstanceArgs.builder()
                .instanceName("tf-mongodb-test")
                .memory(4)
                .volume(100)
                .engineVersion("MONGO_40_WT")
                .machineType("HIO10G")
                .availableZone(var_.availability_zone())
                .projectId(0)
                .password("test1234")
                .tags(Map.of("test", "test"))
                .build());
    
            var mongodbMongodbStandbyInstance = new MongodbStandbyInstance("mongodbMongodbStandbyInstance", MongodbStandbyInstanceArgs.builder()
                .instanceName("tf-mongodb-standby-test")
                .memory(4)
                .volume(100)
                .availableZone("ap-shanghai-2")
                .projectId(0)
                .fatherInstanceId(mongodbMongodbInstance.mongodbInstanceId())
                .fatherInstanceRegion("ap-guangzhou")
                .tags(Map.of("test", "test"))
                .build(), CustomResourceOptions.builder()
                    .provider(tencentcloud.shanghai())
                    .build());
    
        }
    }
    
    resources:
      shanghai:
        type: pulumi:providers:tencentcloud
        properties:
          region: ap-shanghai
      mongodbMongodbInstance:
        type: tencentcloud:MongodbInstance
        properties:
          instanceName: tf-mongodb-test
          memory: 4
          volume: 100
          engineVersion: MONGO_40_WT
          machineType: HIO10G
          availableZone: ${var.availability_zone}
          projectId: 0
          password: test1234
          tags:
            test: test
      mongodbMongodbStandbyInstance:
        type: tencentcloud:MongodbStandbyInstance
        properties:
          instanceName: tf-mongodb-standby-test
          memory: 4
          volume: 100
          availableZone: ap-shanghai-2
          projectId: 0
          fatherInstanceId: ${mongodbMongodbInstance.mongodbInstanceId}
          fatherInstanceRegion: ap-guangzhou
          tags:
            test: test
        options:
          provider: ${tencentcloud.shanghai}
    

    Create MongodbStandbyInstance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MongodbStandbyInstance(name: string, args: MongodbStandbyInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def MongodbStandbyInstance(resource_name: str,
                               args: MongodbStandbyInstanceArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def MongodbStandbyInstance(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               instance_name: Optional[str] = None,
                               available_zone: Optional[str] = None,
                               volume: Optional[float] = None,
                               father_instance_id: Optional[str] = None,
                               father_instance_region: Optional[str] = None,
                               memory: Optional[float] = None,
                               mongodb_standby_instance_id: Optional[str] = None,
                               in_maintenance: Optional[float] = None,
                               auto_renew_flag: Optional[float] = None,
                               prepaid_period: Optional[float] = None,
                               project_id: Optional[float] = None,
                               security_groups: Optional[Sequence[str]] = None,
                               subnet_id: Optional[str] = None,
                               tags: Optional[Mapping[str, str]] = None,
                               charge_type: Optional[str] = None,
                               vpc_id: Optional[str] = None)
    func NewMongodbStandbyInstance(ctx *Context, name string, args MongodbStandbyInstanceArgs, opts ...ResourceOption) (*MongodbStandbyInstance, error)
    public MongodbStandbyInstance(string name, MongodbStandbyInstanceArgs args, CustomResourceOptions? opts = null)
    public MongodbStandbyInstance(String name, MongodbStandbyInstanceArgs args)
    public MongodbStandbyInstance(String name, MongodbStandbyInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MongodbStandbyInstance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MongodbStandbyInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MongodbStandbyInstanceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MongodbStandbyInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MongodbStandbyInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MongodbStandbyInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    MongodbStandbyInstance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MongodbStandbyInstance resource accepts the following input properties:

    AvailableZone string
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    FatherInstanceId string
    Indicates the main instance ID of standby instances.
    FatherInstanceRegion string
    Indicates the region of main instance.
    InstanceName string
    Name of the Mongodb instance.
    Memory double
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    Volume double
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    AutoRenewFlag double
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    ChargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    InMaintenance double
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    MongodbStandbyInstanceId string
    ID of the resource.
    PrepaidPeriod double
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    ProjectId double
    ID of the project which the instance belongs.
    SecurityGroups List<string>
    ID of the security group.
    SubnetId string
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    Tags Dictionary<string, string>
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    VpcId string
    ID of the VPC.
    AvailableZone string
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    FatherInstanceId string
    Indicates the main instance ID of standby instances.
    FatherInstanceRegion string
    Indicates the region of main instance.
    InstanceName string
    Name of the Mongodb instance.
    Memory float64
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    Volume float64
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    AutoRenewFlag float64
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    ChargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    InMaintenance float64
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    MongodbStandbyInstanceId string
    ID of the resource.
    PrepaidPeriod float64
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    ProjectId float64
    ID of the project which the instance belongs.
    SecurityGroups []string
    ID of the security group.
    SubnetId string
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    Tags map[string]string
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    VpcId string
    ID of the VPC.
    availableZone String
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    fatherInstanceId String
    Indicates the main instance ID of standby instances.
    fatherInstanceRegion String
    Indicates the region of main instance.
    instanceName String
    Name of the Mongodb instance.
    memory Double
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    volume Double
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    autoRenewFlag Double
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    chargeType String
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    inMaintenance Double
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    mongodbStandbyInstanceId String
    ID of the resource.
    prepaidPeriod Double
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    projectId Double
    ID of the project which the instance belongs.
    securityGroups List<String>
    ID of the security group.
    subnetId String
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    tags Map<String,String>
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    vpcId String
    ID of the VPC.
    availableZone string
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    fatherInstanceId string
    Indicates the main instance ID of standby instances.
    fatherInstanceRegion string
    Indicates the region of main instance.
    instanceName string
    Name of the Mongodb instance.
    memory number
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    volume number
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    autoRenewFlag number
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    chargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    inMaintenance number
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    mongodbStandbyInstanceId string
    ID of the resource.
    prepaidPeriod number
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    projectId number
    ID of the project which the instance belongs.
    securityGroups string[]
    ID of the security group.
    subnetId string
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    tags {[key: string]: string}
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    vpcId string
    ID of the VPC.
    available_zone str
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    father_instance_id str
    Indicates the main instance ID of standby instances.
    father_instance_region str
    Indicates the region of main instance.
    instance_name str
    Name of the Mongodb instance.
    memory float
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    volume float
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    auto_renew_flag float
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    charge_type str
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    in_maintenance float
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    mongodb_standby_instance_id str
    ID of the resource.
    prepaid_period float
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    project_id float
    ID of the project which the instance belongs.
    security_groups Sequence[str]
    ID of the security group.
    subnet_id str
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    tags Mapping[str, str]
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    vpc_id str
    ID of the VPC.
    availableZone String
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    fatherInstanceId String
    Indicates the main instance ID of standby instances.
    fatherInstanceRegion String
    Indicates the region of main instance.
    instanceName String
    Name of the Mongodb instance.
    memory Number
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    volume Number
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    autoRenewFlag Number
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    chargeType String
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    inMaintenance Number
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    mongodbStandbyInstanceId String
    ID of the resource.
    prepaidPeriod Number
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    projectId Number
    ID of the project which the instance belongs.
    securityGroups List<String>
    ID of the security group.
    subnetId String
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    tags Map<String>
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    vpcId String
    ID of the VPC.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MongodbStandbyInstance resource produces the following output properties:

    CreateTime string
    Creation time of the Mongodb instance.
    EngineVersion string
    Version of the standby Mongodb instance and must be same as the version of main instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    MachineType string
    Type of standby Mongodb instance and must be same as the type of main instance.
    Status double
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    Vip string
    IP of the Mongodb instance.
    Vport double
    IP port of the Mongodb instance.
    CreateTime string
    Creation time of the Mongodb instance.
    EngineVersion string
    Version of the standby Mongodb instance and must be same as the version of main instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    MachineType string
    Type of standby Mongodb instance and must be same as the type of main instance.
    Status float64
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    Vip string
    IP of the Mongodb instance.
    Vport float64
    IP port of the Mongodb instance.
    createTime String
    Creation time of the Mongodb instance.
    engineVersion String
    Version of the standby Mongodb instance and must be same as the version of main instance.
    id String
    The provider-assigned unique ID for this managed resource.
    machineType String
    Type of standby Mongodb instance and must be same as the type of main instance.
    status Double
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    vip String
    IP of the Mongodb instance.
    vport Double
    IP port of the Mongodb instance.
    createTime string
    Creation time of the Mongodb instance.
    engineVersion string
    Version of the standby Mongodb instance and must be same as the version of main instance.
    id string
    The provider-assigned unique ID for this managed resource.
    machineType string
    Type of standby Mongodb instance and must be same as the type of main instance.
    status number
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    vip string
    IP of the Mongodb instance.
    vport number
    IP port of the Mongodb instance.
    create_time str
    Creation time of the Mongodb instance.
    engine_version str
    Version of the standby Mongodb instance and must be same as the version of main instance.
    id str
    The provider-assigned unique ID for this managed resource.
    machine_type str
    Type of standby Mongodb instance and must be same as the type of main instance.
    status float
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    vip str
    IP of the Mongodb instance.
    vport float
    IP port of the Mongodb instance.
    createTime String
    Creation time of the Mongodb instance.
    engineVersion String
    Version of the standby Mongodb instance and must be same as the version of main instance.
    id String
    The provider-assigned unique ID for this managed resource.
    machineType String
    Type of standby Mongodb instance and must be same as the type of main instance.
    status Number
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    vip String
    IP of the Mongodb instance.
    vport Number
    IP port of the Mongodb instance.

    Look up Existing MongodbStandbyInstance Resource

    Get an existing MongodbStandbyInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MongodbStandbyInstanceState, opts?: CustomResourceOptions): MongodbStandbyInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_renew_flag: Optional[float] = None,
            available_zone: Optional[str] = None,
            charge_type: Optional[str] = None,
            create_time: Optional[str] = None,
            engine_version: Optional[str] = None,
            father_instance_id: Optional[str] = None,
            father_instance_region: Optional[str] = None,
            in_maintenance: Optional[float] = None,
            instance_name: Optional[str] = None,
            machine_type: Optional[str] = None,
            memory: Optional[float] = None,
            mongodb_standby_instance_id: Optional[str] = None,
            prepaid_period: Optional[float] = None,
            project_id: Optional[float] = None,
            security_groups: Optional[Sequence[str]] = None,
            status: Optional[float] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vip: Optional[str] = None,
            volume: Optional[float] = None,
            vpc_id: Optional[str] = None,
            vport: Optional[float] = None) -> MongodbStandbyInstance
    func GetMongodbStandbyInstance(ctx *Context, name string, id IDInput, state *MongodbStandbyInstanceState, opts ...ResourceOption) (*MongodbStandbyInstance, error)
    public static MongodbStandbyInstance Get(string name, Input<string> id, MongodbStandbyInstanceState? state, CustomResourceOptions? opts = null)
    public static MongodbStandbyInstance get(String name, Output<String> id, MongodbStandbyInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MongodbStandbyInstance    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutoRenewFlag double
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    AvailableZone string
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    ChargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    CreateTime string
    Creation time of the Mongodb instance.
    EngineVersion string
    Version of the standby Mongodb instance and must be same as the version of main instance.
    FatherInstanceId string
    Indicates the main instance ID of standby instances.
    FatherInstanceRegion string
    Indicates the region of main instance.
    InMaintenance double
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    InstanceName string
    Name of the Mongodb instance.
    MachineType string
    Type of standby Mongodb instance and must be same as the type of main instance.
    Memory double
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    MongodbStandbyInstanceId string
    ID of the resource.
    PrepaidPeriod double
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    ProjectId double
    ID of the project which the instance belongs.
    SecurityGroups List<string>
    ID of the security group.
    Status double
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    SubnetId string
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    Tags Dictionary<string, string>
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    Vip string
    IP of the Mongodb instance.
    Volume double
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    VpcId string
    ID of the VPC.
    Vport double
    IP port of the Mongodb instance.
    AutoRenewFlag float64
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    AvailableZone string
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    ChargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    CreateTime string
    Creation time of the Mongodb instance.
    EngineVersion string
    Version of the standby Mongodb instance and must be same as the version of main instance.
    FatherInstanceId string
    Indicates the main instance ID of standby instances.
    FatherInstanceRegion string
    Indicates the region of main instance.
    InMaintenance float64
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    InstanceName string
    Name of the Mongodb instance.
    MachineType string
    Type of standby Mongodb instance and must be same as the type of main instance.
    Memory float64
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    MongodbStandbyInstanceId string
    ID of the resource.
    PrepaidPeriod float64
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    ProjectId float64
    ID of the project which the instance belongs.
    SecurityGroups []string
    ID of the security group.
    Status float64
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    SubnetId string
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    Tags map[string]string
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    Vip string
    IP of the Mongodb instance.
    Volume float64
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    VpcId string
    ID of the VPC.
    Vport float64
    IP port of the Mongodb instance.
    autoRenewFlag Double
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    availableZone String
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    chargeType String
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    createTime String
    Creation time of the Mongodb instance.
    engineVersion String
    Version of the standby Mongodb instance and must be same as the version of main instance.
    fatherInstanceId String
    Indicates the main instance ID of standby instances.
    fatherInstanceRegion String
    Indicates the region of main instance.
    inMaintenance Double
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    instanceName String
    Name of the Mongodb instance.
    machineType String
    Type of standby Mongodb instance and must be same as the type of main instance.
    memory Double
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    mongodbStandbyInstanceId String
    ID of the resource.
    prepaidPeriod Double
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    projectId Double
    ID of the project which the instance belongs.
    securityGroups List<String>
    ID of the security group.
    status Double
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    subnetId String
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    tags Map<String,String>
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    vip String
    IP of the Mongodb instance.
    volume Double
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    vpcId String
    ID of the VPC.
    vport Double
    IP port of the Mongodb instance.
    autoRenewFlag number
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    availableZone string
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    chargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    createTime string
    Creation time of the Mongodb instance.
    engineVersion string
    Version of the standby Mongodb instance and must be same as the version of main instance.
    fatherInstanceId string
    Indicates the main instance ID of standby instances.
    fatherInstanceRegion string
    Indicates the region of main instance.
    inMaintenance number
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    instanceName string
    Name of the Mongodb instance.
    machineType string
    Type of standby Mongodb instance and must be same as the type of main instance.
    memory number
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    mongodbStandbyInstanceId string
    ID of the resource.
    prepaidPeriod number
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    projectId number
    ID of the project which the instance belongs.
    securityGroups string[]
    ID of the security group.
    status number
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    subnetId string
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    tags {[key: string]: string}
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    vip string
    IP of the Mongodb instance.
    volume number
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    vpcId string
    ID of the VPC.
    vport number
    IP port of the Mongodb instance.
    auto_renew_flag float
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    available_zone str
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    charge_type str
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    create_time str
    Creation time of the Mongodb instance.
    engine_version str
    Version of the standby Mongodb instance and must be same as the version of main instance.
    father_instance_id str
    Indicates the main instance ID of standby instances.
    father_instance_region str
    Indicates the region of main instance.
    in_maintenance float
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    instance_name str
    Name of the Mongodb instance.
    machine_type str
    Type of standby Mongodb instance and must be same as the type of main instance.
    memory float
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    mongodb_standby_instance_id str
    ID of the resource.
    prepaid_period float
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    project_id float
    ID of the project which the instance belongs.
    security_groups Sequence[str]
    ID of the security group.
    status float
    Status of the Mongodb instance, 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 within this VPC. The value is required if vpc_id is set.
    tags Mapping[str, str]
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    vip str
    IP of the Mongodb instance.
    volume float
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    vpc_id str
    ID of the VPC.
    vport float
    IP port of the Mongodb instance.
    autoRenewFlag Number
    Auto renew flag. Valid values are 0(NOTIFY_AND_MANUAL_RENEW), 1(NOTIFY_AND_AUTO_RENEW) and 2(DISABLE_NOTIFY_AND_MANUAL_RENEW). Default value is 0. Note: only works for PREPAID instance. Only supports0 and 1 for creation.
    availableZone String
    The available zone of the Mongodb standby instance. NOTE: must not be same with father instance's.
    chargeType String
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR. Note: TencentCloud International only supports POSTPAID_BY_HOUR. Caution that update operation on this field will delete old instances and create new one with new charge type.
    createTime String
    Creation time of the Mongodb instance.
    engineVersion String
    Version of the standby Mongodb instance and must be same as the version of main instance.
    fatherInstanceId String
    Indicates the main instance ID of standby instances.
    fatherInstanceRegion String
    Indicates the region of main instance.
    inMaintenance Number
    Switch time for instance configuration changes.

    • 0: When the adjustment is completed, perform the configuration task immediately. Default is 0.
    • 1: Perform reconfiguration tasks within the maintenance time window. Note: Adjusting the number of nodes and slices does not support changes within the maintenance window.
    instanceName String
    Name of the Mongodb instance.
    machineType String
    Type of standby Mongodb instance and must be same as the type of main instance.
    memory Number
    Memory size. The minimum value is 2, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    mongodbStandbyInstanceId String
    ID of the resource.
    prepaidPeriod Number
    The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
    projectId Number
    ID of the project which the instance belongs.
    securityGroups List<String>
    ID of the security group.
    status Number
    Status of the Mongodb instance, and available values include pending initialization(expressed with 0), processing(expressed with 1), running(expressed with 2) and expired(expressed with -2).
    subnetId String
    ID of the subnet within this VPC. The value is required if vpc_id is set.
    tags Map<String>
    The tags of the Mongodb. Key name project is system reserved and can't be used.
    vip String
    IP of the Mongodb instance.
    volume Number
    Disk size. The minimum value is 25, and unit is GB. Memory and volume must be upgraded or degraded simultaneously.
    vpcId String
    ID of the VPC.
    vport Number
    IP port of the Mongodb instance.

    Import

    Mongodb instance can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/mongodbStandbyInstance:MongodbStandbyInstance mongodb cmgo-41s6jwy4
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack