1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. drds
  5. Instance
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.drds.Instance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Distributed Relational Database Service (DRDS) is a lightweight (stateless), flexible, stable, and efficient middleware product independently developed by Alibaba Group to resolve scalability issues with single-host relational databases. With its compatibility with MySQL protocols and syntaxes, DRDS enables database/table sharding, smooth scaling, configuration upgrade/downgrade, transparent read/write splitting, and distributed transactions, providing O&M capabilities for distributed databases throughout their entire lifecycle.

    For information about DRDS and how to use it, see What is DRDS.

    NOTE: At present, DRDS instance only can be supported in the regions: cn-shenzhen, cn-beijing, cn-hangzhou, cn-hongkong, cn-qingdao, ap-southeast-1.

    NOTE: Currently, this resource only support Domestic Site Account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultZones = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const config = new pulumi.Config();
    const instanceSeries = config.get("instanceSeries") || "drds.sn1.4c8g";
    const defaultNetworks = alicloud.vpc.getNetworks({
        nameRegex: "default-NODELETING",
    });
    const defaultSwitches = defaultNetworks.then(defaultNetworks => alicloud.vpc.getSwitches({
        vpcId: defaultNetworks.ids?.[0],
    }));
    const defaultInstance = new alicloud.drds.Instance("defaultInstance", {
        description: "drds instance",
        instanceChargeType: "PostPaid",
        zoneId: defaultSwitches.then(defaultSwitches => defaultSwitches.vswitches?.[0]?.zoneId),
        vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.vswitches?.[0]?.id),
        instanceSeries: instanceSeries,
        specification: "drds.sn1.4c8g.8C16G",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_zones = alicloud.get_zones(available_resource_creation="VSwitch")
    config = pulumi.Config()
    instance_series = config.get("instanceSeries")
    if instance_series is None:
        instance_series = "drds.sn1.4c8g"
    default_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
    default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0])
    default_instance = alicloud.drds.Instance("defaultInstance",
        description="drds instance",
        instance_charge_type="PostPaid",
        zone_id=default_switches.vswitches[0].zone_id,
        vswitch_id=default_switches.vswitches[0].id,
        instance_series=instance_series,
        specification="drds.sn1.4c8g.8C16G")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/drds"
    	"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 {
    		_, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cfg := config.New(ctx, "")
    		instanceSeries := "drds.sn1.4c8g"
    		if param := cfg.Get("instanceSeries"); param != "" {
    			instanceSeries = param
    		}
    		defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("default-NODELETING"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId: pulumi.StringRef(defaultNetworks.Ids[0]),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = drds.NewInstance(ctx, "defaultInstance", &drds.InstanceArgs{
    			Description:        pulumi.String("drds instance"),
    			InstanceChargeType: pulumi.String("PostPaid"),
    			ZoneId:             pulumi.String(defaultSwitches.Vswitches[0].ZoneId),
    			VswitchId:          pulumi.String(defaultSwitches.Vswitches[0].Id),
    			InstanceSeries:     pulumi.String(instanceSeries),
    			Specification:      pulumi.String("drds.sn1.4c8g.8C16G"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var config = new Config();
        var instanceSeries = config.Get("instanceSeries") ?? "drds.sn1.4c8g";
        var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "default-NODELETING",
        });
    
        var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        });
    
        var defaultInstance = new AliCloud.Drds.Instance("defaultInstance", new()
        {
            Description = "drds instance",
            InstanceChargeType = "PostPaid",
            ZoneId = defaultSwitches.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.ZoneId),
            VswitchId = defaultSwitches.Apply(getSwitchesResult => getSwitchesResult.Vswitches[0]?.Id),
            InstanceSeries = instanceSeries,
            Specification = "drds.sn1.4c8g.8C16G",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.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.drds.Instance;
    import com.pulumi.alicloud.drds.InstanceArgs;
    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 defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            final var instanceSeries = config.get("instanceSeries").orElse("drds.sn1.4c8g");
            final var defaultNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("default-NODELETING")
                .build());
    
            final var defaultSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .description("drds instance")
                .instanceChargeType("PostPaid")
                .zoneId(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].zoneId()))
                .vswitchId(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].id()))
                .instanceSeries(instanceSeries)
                .specification("drds.sn1.4c8g.8C16G")
                .build());
    
        }
    }
    
    configuration:
      instanceSeries:
        type: string
        default: drds.sn1.4c8g
    resources:
      defaultInstance:
        type: alicloud:drds:Instance
        properties:
          description: drds instance
          instanceChargeType: PostPaid
          zoneId: ${defaultSwitches.vswitches[0].zoneId}
          vswitchId: ${defaultSwitches.vswitches[0].id}
          instanceSeries: ${instanceSeries}
          specification: drds.sn1.4c8g.8C16G
    variables:
      defaultZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
      defaultNetworks:
        fn::invoke:
          Function: alicloud:vpc:getNetworks
          Arguments:
            nameRegex: default-NODELETING
      defaultSwitches:
        fn::invoke:
          Function: alicloud:vpc:getSwitches
          Arguments:
            vpcId: ${defaultNetworks.ids[0]}
    

    Create Instance Resource

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

    Constructor syntax

    new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: InstanceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 description: Optional[str] = None,
                 instance_series: Optional[str] = None,
                 specification: Optional[str] = None,
                 vswitch_id: Optional[str] = None,
                 zone_id: Optional[str] = None,
                 instance_charge_type: Optional[str] = None,
                 mysql_version: Optional[int] = None,
                 vpc_id: Optional[str] = None)
    func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:drds:Instance
    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 InstanceArgs
    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 InstanceArgs
    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 InstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var exampleinstanceResourceResourceFromDrdsinstance = new AliCloud.Drds.Instance("exampleinstanceResourceResourceFromDrdsinstance", new()
    {
        Description = "string",
        InstanceSeries = "string",
        Specification = "string",
        VswitchId = "string",
        ZoneId = "string",
        InstanceChargeType = "string",
        MysqlVersion = 0,
        VpcId = "string",
    });
    
    example, err := drds.NewInstance(ctx, "exampleinstanceResourceResourceFromDrdsinstance", &drds.InstanceArgs{
    	Description:        pulumi.String("string"),
    	InstanceSeries:     pulumi.String("string"),
    	Specification:      pulumi.String("string"),
    	VswitchId:          pulumi.String("string"),
    	ZoneId:             pulumi.String("string"),
    	InstanceChargeType: pulumi.String("string"),
    	MysqlVersion:       pulumi.Int(0),
    	VpcId:              pulumi.String("string"),
    })
    
    var exampleinstanceResourceResourceFromDrdsinstance = new Instance("exampleinstanceResourceResourceFromDrdsinstance", InstanceArgs.builder()        
        .description("string")
        .instanceSeries("string")
        .specification("string")
        .vswitchId("string")
        .zoneId("string")
        .instanceChargeType("string")
        .mysqlVersion(0)
        .vpcId("string")
        .build());
    
    exampleinstance_resource_resource_from_drdsinstance = alicloud.drds.Instance("exampleinstanceResourceResourceFromDrdsinstance",
        description="string",
        instance_series="string",
        specification="string",
        vswitch_id="string",
        zone_id="string",
        instance_charge_type="string",
        mysql_version=0,
        vpc_id="string")
    
    const exampleinstanceResourceResourceFromDrdsinstance = new alicloud.drds.Instance("exampleinstanceResourceResourceFromDrdsinstance", {
        description: "string",
        instanceSeries: "string",
        specification: "string",
        vswitchId: "string",
        zoneId: "string",
        instanceChargeType: "string",
        mysqlVersion: 0,
        vpcId: "string",
    });
    
    type: alicloud:drds:Instance
    properties:
        description: string
        instanceChargeType: string
        instanceSeries: string
        mysqlVersion: 0
        specification: string
        vpcId: string
        vswitchId: string
        zoneId: string
    

    Instance Resource Properties

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

    Inputs

    The Instance resource accepts the following input properties:

    Description string
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    InstanceSeries string
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    Specification string
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    VswitchId string
    The VSwitch ID to launch in.
    ZoneId string
    The Zone to launch the DRDS instance.
    InstanceChargeType string
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    MysqlVersion int
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    VpcId string
    The id of the VPC.
    Description string
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    InstanceSeries string
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    Specification string
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    VswitchId string
    The VSwitch ID to launch in.
    ZoneId string
    The Zone to launch the DRDS instance.
    InstanceChargeType string
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    MysqlVersion int
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    VpcId string
    The id of the VPC.
    description String
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    instanceSeries String
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    specification String
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    vswitchId String
    The VSwitch ID to launch in.
    zoneId String
    The Zone to launch the DRDS instance.
    instanceChargeType String
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    mysqlVersion Integer
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    vpcId String
    The id of the VPC.
    description string
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    instanceSeries string
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    specification string
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    vswitchId string
    The VSwitch ID to launch in.
    zoneId string
    The Zone to launch the DRDS instance.
    instanceChargeType string
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    mysqlVersion number
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    vpcId string
    The id of the VPC.
    description str
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    instance_series str
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    specification str
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    vswitch_id str
    The VSwitch ID to launch in.
    zone_id str
    The Zone to launch the DRDS instance.
    instance_charge_type str
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    mysql_version int
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    vpc_id str
    The id of the VPC.
    description String
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    instanceSeries String
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    specification String
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    vswitchId String
    The VSwitch ID to launch in.
    zoneId String
    The Zone to launch the DRDS instance.
    instanceChargeType String
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    mysqlVersion Number
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    vpcId String
    The id of the VPC.

    Outputs

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

    ConnectionString string
    (Available in 1.196.0+) The connection string of the DRDS instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Port string
    (Available in 1.196.0+) The connection port of the DRDS instance.
    ConnectionString string
    (Available in 1.196.0+) The connection string of the DRDS instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Port string
    (Available in 1.196.0+) The connection port of the DRDS instance.
    connectionString String
    (Available in 1.196.0+) The connection string of the DRDS instance.
    id String
    The provider-assigned unique ID for this managed resource.
    port String
    (Available in 1.196.0+) The connection port of the DRDS instance.
    connectionString string
    (Available in 1.196.0+) The connection string of the DRDS instance.
    id string
    The provider-assigned unique ID for this managed resource.
    port string
    (Available in 1.196.0+) The connection port of the DRDS instance.
    connection_string str
    (Available in 1.196.0+) The connection string of the DRDS instance.
    id str
    The provider-assigned unique ID for this managed resource.
    port str
    (Available in 1.196.0+) The connection port of the DRDS instance.
    connectionString String
    (Available in 1.196.0+) The connection string of the DRDS instance.
    id String
    The provider-assigned unique ID for this managed resource.
    port String
    (Available in 1.196.0+) The connection port of the DRDS instance.

    Look up Existing Instance Resource

    Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_string: Optional[str] = None,
            description: Optional[str] = None,
            instance_charge_type: Optional[str] = None,
            instance_series: Optional[str] = None,
            mysql_version: Optional[int] = None,
            port: Optional[str] = None,
            specification: Optional[str] = None,
            vpc_id: Optional[str] = None,
            vswitch_id: Optional[str] = None,
            zone_id: Optional[str] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    ConnectionString string
    (Available in 1.196.0+) The connection string of the DRDS instance.
    Description string
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    InstanceChargeType string
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    InstanceSeries string
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    MysqlVersion int
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    Port string
    (Available in 1.196.0+) The connection port of the DRDS instance.
    Specification string
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    VpcId string
    The id of the VPC.
    VswitchId string
    The VSwitch ID to launch in.
    ZoneId string
    The Zone to launch the DRDS instance.
    ConnectionString string
    (Available in 1.196.0+) The connection string of the DRDS instance.
    Description string
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    InstanceChargeType string
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    InstanceSeries string
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    MysqlVersion int
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    Port string
    (Available in 1.196.0+) The connection port of the DRDS instance.
    Specification string
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    VpcId string
    The id of the VPC.
    VswitchId string
    The VSwitch ID to launch in.
    ZoneId string
    The Zone to launch the DRDS instance.
    connectionString String
    (Available in 1.196.0+) The connection string of the DRDS instance.
    description String
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    instanceChargeType String
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    instanceSeries String
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    mysqlVersion Integer
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    port String
    (Available in 1.196.0+) The connection port of the DRDS instance.
    specification String
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    vpcId String
    The id of the VPC.
    vswitchId String
    The VSwitch ID to launch in.
    zoneId String
    The Zone to launch the DRDS instance.
    connectionString string
    (Available in 1.196.0+) The connection string of the DRDS instance.
    description string
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    instanceChargeType string
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    instanceSeries string
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    mysqlVersion number
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    port string
    (Available in 1.196.0+) The connection port of the DRDS instance.
    specification string
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    vpcId string
    The id of the VPC.
    vswitchId string
    The VSwitch ID to launch in.
    zoneId string
    The Zone to launch the DRDS instance.
    connection_string str
    (Available in 1.196.0+) The connection string of the DRDS instance.
    description str
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    instance_charge_type str
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    instance_series str
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    mysql_version int
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    port str
    (Available in 1.196.0+) The connection port of the DRDS instance.
    specification str
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    vpc_id str
    The id of the VPC.
    vswitch_id str
    The VSwitch ID to launch in.
    zone_id str
    The Zone to launch the DRDS instance.
    connectionString String
    (Available in 1.196.0+) The connection string of the DRDS instance.
    description String
    Description of the DRDS instance, This description can have a string of 2 to 256 characters.
    instanceChargeType String
    Valid values are PrePaid, PostPaid, Default to PostPaid.
    instanceSeries String
    The parameter of the instance series. NOTE: drds.sn1.4c8g,drds.sn1.8c16g,drds.sn1.16c32g,drds.sn1.32c64g are no longer supported. Valid values:

    • drds.sn2.4c16g Starter Edition.
    • drds.sn2.8c32g Standard Edition.
    • drds.sn2.16c64g Enterprise Edition.
    mysqlVersion Number
    The MySQL version supported by the instance, with the following range of values. 5: Fully compatible with MySQL 5.x (default) 8: Fully compatible with MySQL 8.0. This parameter takes effect when the primary instance is created, and the read-only instance has the same MySQL version as the primary instance by default.
    port String
    (Available in 1.196.0+) The connection port of the DRDS instance.
    specification String
    User-defined DRDS instance specification. Value range:

    • drds.sn1.4c8g for DRDS instance Starter version;
    • value range : drds.sn1.4c8g.8c16g, drds.sn1.4c8g.16c32g, drds.sn1.4c8g.32c64g, drds.sn1.4c8g.64c128g
    • drds.sn1.8c16g for DRDS instance Standard edition;
    • value range : drds.sn1.8c16g.16c32g, drds.sn1.8c16g.32c64g, drds.sn1.8c16g.64c128g
    • drds.sn1.16c32g for DRDS instance Enterprise Edition;
    • value range : drds.sn1.16c32g.32c64g, drds.sn1.16c32g.64c128g
    • drds.sn1.32c64g for DRDS instance Extreme Edition;
    • value range : drds.sn1.32c64g.128c256g
    vpcId String
    The id of the VPC.
    vswitchId String
    The VSwitch ID to launch in.
    zoneId String
    The Zone to launch the DRDS instance.

    Import

    Distributed Relational Database Service (DRDS) can be imported using the id, e.g.

    $ pulumi import alicloud:drds/instance:Instance example drds-abc123456
    

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

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi