1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dms
  5. EnterpriseInstance
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

alicloud.dms.EnterpriseInstance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

    Provides a DMS Enterprise Instance resource.

    NOTE: API users must first register in DMS.

    NOTE: Available since v1.81.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const current = alicloud.getAccount({});
    const default = alicloud.getRegions({
        current: true,
    });
    const defaultGetUserTenants = alicloud.dms.getUserTenants({
        status: "ACTIVE",
    });
    const defaultGetZones = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "8.0",
        instanceChargeType: "PostPaid",
        category: "HighAvailability",
        dbInstanceStorageType: "cloud_essd",
    });
    const defaultGetInstanceClasses = defaultGetZones.then(defaultGetZones => alicloud.rds.getInstanceClasses({
        zoneId: defaultGetZones.zones?.[0]?.id,
        engine: "MySQL",
        engineVersion: "8.0",
        category: "HighAvailability",
        dbInstanceStorageType: "cloud_essd",
        instanceChargeType: "PostPaid",
    }));
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        name: name,
        vpcId: defaultNetwork.id,
    });
    const defaultInstance = new alicloud.rds.Instance("default", {
        engine: "MySQL",
        engineVersion: "8.0",
        dbInstanceStorageType: "cloud_essd",
        instanceType: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[0]?.instanceClass),
        instanceStorage: defaultGetInstanceClasses.then(defaultGetInstanceClasses => defaultGetInstanceClasses.instanceClasses?.[0]?.storageRange?.min),
        vswitchId: defaultSwitch.id,
        instanceName: name,
        securityIps: [
            "100.104.5.0/24",
            "192.168.0.6",
        ],
        tags: {
            Created: "TF",
            For: "example",
        },
    });
    const defaultAccount = new alicloud.rds.Account("default", {
        dbInstanceId: defaultInstance.id,
        accountName: "tfexamplename",
        accountPassword: "Example12345",
        accountType: "Normal",
    });
    const defaultEnterpriseInstance = new alicloud.dms.EnterpriseInstance("default", {
        tid: defaultGetUserTenants.then(defaultGetUserTenants => defaultGetUserTenants.ids?.[0]),
        instanceType: "mysql",
        instanceSource: "RDS",
        networkType: "VPC",
        envType: "dev",
        host: defaultInstance.connectionString,
        port: 3306,
        databaseUser: defaultAccount.accountName,
        databasePassword: defaultAccount.accountPassword,
        instanceName: name,
        dbaUid: current.then(current => current.id),
        safeRule: "904496",
        useDsql: 1,
        queryTimeout: 60,
        exportTimeout: 600,
        ecsRegion: _default.then(_default => _default.regions?.[0]?.id),
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    current = alicloud.get_account()
    default = alicloud.get_regions(current=True)
    default_get_user_tenants = alicloud.dms.get_user_tenants(status="ACTIVE")
    default_get_zones = alicloud.rds.get_zones(engine="MySQL",
        engine_version="8.0",
        instance_charge_type="PostPaid",
        category="HighAvailability",
        db_instance_storage_type="cloud_essd")
    default_get_instance_classes = alicloud.rds.get_instance_classes(zone_id=default_get_zones.zones[0].id,
        engine="MySQL",
        engine_version="8.0",
        category="HighAvailability",
        db_instance_storage_type="cloud_essd",
        instance_charge_type="PostPaid")
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default_get_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("default",
        name=name,
        vpc_id=default_network.id)
    default_instance = alicloud.rds.Instance("default",
        engine="MySQL",
        engine_version="8.0",
        db_instance_storage_type="cloud_essd",
        instance_type=default_get_instance_classes.instance_classes[0].instance_class,
        instance_storage=default_get_instance_classes.instance_classes[0].storage_range.min,
        vswitch_id=default_switch.id,
        instance_name=name,
        security_ips=[
            "100.104.5.0/24",
            "192.168.0.6",
        ],
        tags={
            "Created": "TF",
            "For": "example",
        })
    default_account = alicloud.rds.Account("default",
        db_instance_id=default_instance.id,
        account_name="tfexamplename",
        account_password="Example12345",
        account_type="Normal")
    default_enterprise_instance = alicloud.dms.EnterpriseInstance("default",
        tid=default_get_user_tenants.ids[0],
        instance_type="mysql",
        instance_source="RDS",
        network_type="VPC",
        env_type="dev",
        host=default_instance.connection_string,
        port=3306,
        database_user=default_account.account_name,
        database_password=default_account.account_password,
        instance_name=name,
        dba_uid=current.id,
        safe_rule="904496",
        use_dsql=1,
        query_timeout=60,
        export_timeout=600,
        ecs_region=default.regions[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"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 := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		current, err := alicloud.GetAccount(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_default, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetUserTenants, err := dms.GetUserTenants(ctx, &dms.GetUserTenantsArgs{
    			Status: pulumi.StringRef("ACTIVE"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetZones, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			InstanceChargeType:    pulumi.StringRef("PostPaid"),
    			Category:              pulumi.StringRef("HighAvailability"),
    			DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
    			ZoneId:                pulumi.StringRef(defaultGetZones.Zones[0].Id),
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			Category:              pulumi.StringRef("HighAvailability"),
    			DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
    			InstanceChargeType:    pulumi.StringRef("PostPaid"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultGetZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := rds.NewInstance(ctx, "default", &rds.InstanceArgs{
    			Engine:                pulumi.String("MySQL"),
    			EngineVersion:         pulumi.String("8.0"),
    			DbInstanceStorageType: pulumi.String("cloud_essd"),
    			InstanceType:          pulumi.String(defaultGetInstanceClasses.InstanceClasses[0].InstanceClass),
    			InstanceStorage:       pulumi.String(defaultGetInstanceClasses.InstanceClasses[0].StorageRange.Min),
    			VswitchId:             defaultSwitch.ID(),
    			InstanceName:          pulumi.String(name),
    			SecurityIps: pulumi.StringArray{
    				pulumi.String("100.104.5.0/24"),
    				pulumi.String("192.168.0.6"),
    			},
    			Tags: pulumi.Map{
    				"Created": pulumi.Any("TF"),
    				"For":     pulumi.Any("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultAccount, err := rds.NewAccount(ctx, "default", &rds.AccountArgs{
    			DbInstanceId:    defaultInstance.ID(),
    			AccountName:     pulumi.String("tfexamplename"),
    			AccountPassword: pulumi.String("Example12345"),
    			AccountType:     pulumi.String("Normal"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dms.NewEnterpriseInstance(ctx, "default", &dms.EnterpriseInstanceArgs{
    			Tid:              pulumi.String(defaultGetUserTenants.Ids[0]),
    			InstanceType:     pulumi.String("mysql"),
    			InstanceSource:   pulumi.String("RDS"),
    			NetworkType:      pulumi.String("VPC"),
    			EnvType:          pulumi.String("dev"),
    			Host:             defaultInstance.ConnectionString,
    			Port:             pulumi.Int(3306),
    			DatabaseUser:     defaultAccount.AccountName,
    			DatabasePassword: defaultAccount.AccountPassword,
    			InstanceName:     pulumi.String(name),
    			DbaUid:           pulumi.String(current.Id),
    			SafeRule:         pulumi.String("904496"),
    			UseDsql:          pulumi.Int(1),
    			QueryTimeout:     pulumi.Int(60),
    			ExportTimeout:    pulumi.Int(600),
    			EcsRegion:        pulumi.String(_default.Regions[0].Id),
    		})
    		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 config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var current = AliCloud.GetAccount.Invoke();
    
        var @default = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        var defaultGetUserTenants = AliCloud.Dms.GetUserTenants.Invoke(new()
        {
            Status = "ACTIVE",
        });
    
        var defaultGetZones = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            InstanceChargeType = "PostPaid",
            Category = "HighAvailability",
            DbInstanceStorageType = "cloud_essd",
        });
    
        var defaultGetInstanceClasses = AliCloud.Rds.GetInstanceClasses.Invoke(new()
        {
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            Engine = "MySQL",
            EngineVersion = "8.0",
            Category = "HighAvailability",
            DbInstanceStorageType = "cloud_essd",
            InstanceChargeType = "PostPaid",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            Name = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Rds.Instance("default", new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            DbInstanceStorageType = "cloud_essd",
            InstanceType = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.InstanceClass),
            InstanceStorage = defaultGetInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.StorageRange?.Min),
            VswitchId = defaultSwitch.Id,
            InstanceName = name,
            SecurityIps = new[]
            {
                "100.104.5.0/24",
                "192.168.0.6",
            },
            Tags = 
            {
                { "Created", "TF" },
                { "For", "example" },
            },
        });
    
        var defaultAccount = new AliCloud.Rds.Account("default", new()
        {
            DbInstanceId = defaultInstance.Id,
            AccountName = "tfexamplename",
            AccountPassword = "Example12345",
            AccountType = "Normal",
        });
    
        var defaultEnterpriseInstance = new AliCloud.Dms.EnterpriseInstance("default", new()
        {
            Tid = defaultGetUserTenants.Apply(getUserTenantsResult => getUserTenantsResult.Ids[0]),
            InstanceType = "mysql",
            InstanceSource = "RDS",
            NetworkType = "VPC",
            EnvType = "dev",
            Host = defaultInstance.ConnectionString,
            Port = 3306,
            DatabaseUser = defaultAccount.AccountName,
            DatabasePassword = defaultAccount.AccountPassword,
            InstanceName = name,
            DbaUid = current.Apply(getAccountResult => getAccountResult.Id),
            SafeRule = "904496",
            UseDsql = 1,
            QueryTimeout = 60,
            ExportTimeout = 600,
            EcsRegion = @default.Apply(@default => @default.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id)),
        });
    
    });
    
    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.GetRegionsArgs;
    import com.pulumi.alicloud.dms.DmsFunctions;
    import com.pulumi.alicloud.dms.inputs.GetUserTenantsArgs;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.inputs.GetZonesArgs;
    import com.pulumi.alicloud.rds.inputs.GetInstanceClassesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.rds.Instance;
    import com.pulumi.alicloud.rds.InstanceArgs;
    import com.pulumi.alicloud.rds.Account;
    import com.pulumi.alicloud.rds.AccountArgs;
    import com.pulumi.alicloud.dms.EnterpriseInstance;
    import com.pulumi.alicloud.dms.EnterpriseInstanceArgs;
    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("tf-example");
            final var current = AlicloudFunctions.getAccount();
    
            final var default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .build());
    
            final var defaultGetUserTenants = DmsFunctions.getUserTenants(GetUserTenantsArgs.builder()
                .status("ACTIVE")
                .build());
    
            final var defaultGetZones = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .instanceChargeType("PostPaid")
                .category("HighAvailability")
                .dbInstanceStorageType("cloud_essd")
                .build());
    
            final var defaultGetInstanceClasses = RdsFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .engine("MySQL")
                .engineVersion("8.0")
                .category("HighAvailability")
                .dbInstanceStorageType("cloud_essd")
                .instanceChargeType("PostPaid")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .dbInstanceStorageType("cloud_essd")
                .instanceType(defaultGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].instanceClass()))
                .instanceStorage(defaultGetInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].storageRange().min()))
                .vswitchId(defaultSwitch.id())
                .instanceName(name)
                .securityIps(            
                    "100.104.5.0/24",
                    "192.168.0.6")
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "example")
                ))
                .build());
    
            var defaultAccount = new Account("defaultAccount", AccountArgs.builder()
                .dbInstanceId(defaultInstance.id())
                .accountName("tfexamplename")
                .accountPassword("Example12345")
                .accountType("Normal")
                .build());
    
            var defaultEnterpriseInstance = new EnterpriseInstance("defaultEnterpriseInstance", EnterpriseInstanceArgs.builder()
                .tid(defaultGetUserTenants.applyValue(getUserTenantsResult -> getUserTenantsResult.ids()[0]))
                .instanceType("mysql")
                .instanceSource("RDS")
                .networkType("VPC")
                .envType("dev")
                .host(defaultInstance.connectionString())
                .port(3306)
                .databaseUser(defaultAccount.accountName())
                .databasePassword(defaultAccount.accountPassword())
                .instanceName(name)
                .dbaUid(current.applyValue(getAccountResult -> getAccountResult.id()))
                .safeRule("904496")
                .useDsql(1)
                .queryTimeout(60)
                .exportTimeout(600)
                .ecsRegion(default_.regions()[0].id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultGetZones.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          name: ${name}
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:rds:Instance
        name: default
        properties:
          engine: MySQL
          engineVersion: '8.0'
          dbInstanceStorageType: cloud_essd
          instanceType: ${defaultGetInstanceClasses.instanceClasses[0].instanceClass}
          instanceStorage: ${defaultGetInstanceClasses.instanceClasses[0].storageRange.min}
          vswitchId: ${defaultSwitch.id}
          instanceName: ${name}
          securityIps:
            - 100.104.5.0/24
            - 192.168.0.6
          tags:
            Created: TF
            For: example
      defaultAccount:
        type: alicloud:rds:Account
        name: default
        properties:
          dbInstanceId: ${defaultInstance.id}
          accountName: tfexamplename
          accountPassword: Example12345
          accountType: Normal
      defaultEnterpriseInstance:
        type: alicloud:dms:EnterpriseInstance
        name: default
        properties:
          tid: ${defaultGetUserTenants.ids[0]}
          instanceType: mysql
          instanceSource: RDS
          networkType: VPC
          envType: dev
          host: ${defaultInstance.connectionString}
          port: 3306
          databaseUser: ${defaultAccount.accountName}
          databasePassword: ${defaultAccount.accountPassword}
          instanceName: ${name}
          dbaUid: ${current.id}
          safeRule: '904496'
          useDsql: 1
          queryTimeout: 60
          exportTimeout: 600
          ecsRegion: ${default.regions[0].id}
    variables:
      current:
        fn::invoke:
          Function: alicloud:getAccount
          Arguments: {}
      default:
        fn::invoke:
          Function: alicloud:getRegions
          Arguments:
            current: true
      defaultGetUserTenants:
        fn::invoke:
          Function: alicloud:dms:getUserTenants
          Arguments:
            status: ACTIVE
      defaultGetZones:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '8.0'
            instanceChargeType: PostPaid
            category: HighAvailability
            dbInstanceStorageType: cloud_essd
      defaultGetInstanceClasses:
        fn::invoke:
          Function: alicloud:rds:getInstanceClasses
          Arguments:
            zoneId: ${defaultGetZones.zones[0].id}
            engine: MySQL
            engineVersion: '8.0'
            category: HighAvailability
            dbInstanceStorageType: cloud_essd
            instanceChargeType: PostPaid
    

    Create EnterpriseInstance Resource

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

    Constructor syntax

    new EnterpriseInstance(name: string, args: EnterpriseInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def EnterpriseInstance(resource_name: str,
                           args: EnterpriseInstanceArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnterpriseInstance(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           instance_source: Optional[str] = None,
                           database_password: Optional[str] = None,
                           database_user: Optional[str] = None,
                           safe_rule: Optional[str] = None,
                           dba_uid: Optional[int] = None,
                           query_timeout: Optional[int] = None,
                           port: Optional[int] = None,
                           network_type: Optional[str] = None,
                           env_type: Optional[str] = None,
                           export_timeout: Optional[int] = None,
                           host: Optional[str] = None,
                           instance_type: Optional[str] = None,
                           ecs_instance_id: Optional[str] = None,
                           dba_id: Optional[str] = None,
                           instance_id: Optional[str] = None,
                           instance_alias: Optional[str] = None,
                           ecs_region: Optional[str] = None,
                           data_link_name: Optional[str] = None,
                           ddl_online: Optional[int] = None,
                           instance_name: Optional[str] = None,
                           safe_rule_id: Optional[str] = None,
                           sid: Optional[str] = None,
                           skip_test: Optional[bool] = None,
                           tid: Optional[int] = None,
                           use_dsql: Optional[int] = None,
                           vpc_id: Optional[str] = None)
    func NewEnterpriseInstance(ctx *Context, name string, args EnterpriseInstanceArgs, opts ...ResourceOption) (*EnterpriseInstance, error)
    public EnterpriseInstance(string name, EnterpriseInstanceArgs args, CustomResourceOptions? opts = null)
    public EnterpriseInstance(String name, EnterpriseInstanceArgs args)
    public EnterpriseInstance(String name, EnterpriseInstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:dms:EnterpriseInstance
    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 EnterpriseInstanceArgs
    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 EnterpriseInstanceArgs
    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 EnterpriseInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnterpriseInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnterpriseInstanceArgs
    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 enterpriseInstanceResource = new AliCloud.Dms.EnterpriseInstance("enterpriseInstanceResource", new()
    {
        InstanceSource = "string",
        DatabasePassword = "string",
        DatabaseUser = "string",
        SafeRule = "string",
        DbaUid = 0,
        QueryTimeout = 0,
        Port = 0,
        NetworkType = "string",
        EnvType = "string",
        ExportTimeout = 0,
        Host = "string",
        InstanceType = "string",
        EcsInstanceId = "string",
        DbaId = "string",
        InstanceId = "string",
        EcsRegion = "string",
        DataLinkName = "string",
        DdlOnline = 0,
        InstanceName = "string",
        SafeRuleId = "string",
        Sid = "string",
        SkipTest = false,
        Tid = 0,
        UseDsql = 0,
        VpcId = "string",
    });
    
    example, err := dms.NewEnterpriseInstance(ctx, "enterpriseInstanceResource", &dms.EnterpriseInstanceArgs{
    	InstanceSource:   pulumi.String("string"),
    	DatabasePassword: pulumi.String("string"),
    	DatabaseUser:     pulumi.String("string"),
    	SafeRule:         pulumi.String("string"),
    	DbaUid:           pulumi.Int(0),
    	QueryTimeout:     pulumi.Int(0),
    	Port:             pulumi.Int(0),
    	NetworkType:      pulumi.String("string"),
    	EnvType:          pulumi.String("string"),
    	ExportTimeout:    pulumi.Int(0),
    	Host:             pulumi.String("string"),
    	InstanceType:     pulumi.String("string"),
    	EcsInstanceId:    pulumi.String("string"),
    	DbaId:            pulumi.String("string"),
    	InstanceId:       pulumi.String("string"),
    	EcsRegion:        pulumi.String("string"),
    	DataLinkName:     pulumi.String("string"),
    	DdlOnline:        pulumi.Int(0),
    	InstanceName:     pulumi.String("string"),
    	SafeRuleId:       pulumi.String("string"),
    	Sid:              pulumi.String("string"),
    	SkipTest:         pulumi.Bool(false),
    	Tid:              pulumi.Int(0),
    	UseDsql:          pulumi.Int(0),
    	VpcId:            pulumi.String("string"),
    })
    
    var enterpriseInstanceResource = new EnterpriseInstance("enterpriseInstanceResource", EnterpriseInstanceArgs.builder()
        .instanceSource("string")
        .databasePassword("string")
        .databaseUser("string")
        .safeRule("string")
        .dbaUid(0)
        .queryTimeout(0)
        .port(0)
        .networkType("string")
        .envType("string")
        .exportTimeout(0)
        .host("string")
        .instanceType("string")
        .ecsInstanceId("string")
        .dbaId("string")
        .instanceId("string")
        .ecsRegion("string")
        .dataLinkName("string")
        .ddlOnline(0)
        .instanceName("string")
        .safeRuleId("string")
        .sid("string")
        .skipTest(false)
        .tid(0)
        .useDsql(0)
        .vpcId("string")
        .build());
    
    enterprise_instance_resource = alicloud.dms.EnterpriseInstance("enterpriseInstanceResource",
        instance_source="string",
        database_password="string",
        database_user="string",
        safe_rule="string",
        dba_uid=0,
        query_timeout=0,
        port=0,
        network_type="string",
        env_type="string",
        export_timeout=0,
        host="string",
        instance_type="string",
        ecs_instance_id="string",
        dba_id="string",
        instance_id="string",
        ecs_region="string",
        data_link_name="string",
        ddl_online=0,
        instance_name="string",
        safe_rule_id="string",
        sid="string",
        skip_test=False,
        tid=0,
        use_dsql=0,
        vpc_id="string")
    
    const enterpriseInstanceResource = new alicloud.dms.EnterpriseInstance("enterpriseInstanceResource", {
        instanceSource: "string",
        databasePassword: "string",
        databaseUser: "string",
        safeRule: "string",
        dbaUid: 0,
        queryTimeout: 0,
        port: 0,
        networkType: "string",
        envType: "string",
        exportTimeout: 0,
        host: "string",
        instanceType: "string",
        ecsInstanceId: "string",
        dbaId: "string",
        instanceId: "string",
        ecsRegion: "string",
        dataLinkName: "string",
        ddlOnline: 0,
        instanceName: "string",
        safeRuleId: "string",
        sid: "string",
        skipTest: false,
        tid: 0,
        useDsql: 0,
        vpcId: "string",
    });
    
    type: alicloud:dms:EnterpriseInstance
    properties:
        dataLinkName: string
        databasePassword: string
        databaseUser: string
        dbaId: string
        dbaUid: 0
        ddlOnline: 0
        ecsInstanceId: string
        ecsRegion: string
        envType: string
        exportTimeout: 0
        host: string
        instanceId: string
        instanceName: string
        instanceSource: string
        instanceType: string
        networkType: string
        port: 0
        queryTimeout: 0
        safeRule: string
        safeRuleId: string
        sid: string
        skipTest: false
        tid: 0
        useDsql: 0
        vpcId: string
    

    EnterpriseInstance 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 EnterpriseInstance resource accepts the following input properties:

    DatabasePassword string
    Database access password.
    DatabaseUser string
    Database access account.
    DbaUid int
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    EnvType string
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    ExportTimeout int
    Export timeout, unit: s (seconds).
    Host string
    Host address of the target database.
    InstanceSource string
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    InstanceType string
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    NetworkType string
    Network type. Valid values: CLASSIC, VPC.
    Port int
    Access port of the target database.
    QueryTimeout int
    Query timeout time, unit: s (seconds).
    SafeRule string
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    DataLinkName string
    Cross-database query datalink name.
    DbaId string
    The dba id of the database instance.
    DdlOnline int
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    EcsInstanceId string
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    EcsRegion string
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    InstanceAlias string
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    InstanceId string
    The instance id of the database instance.
    InstanceName string
    Instance name, to help users quickly distinguish positioning.
    SafeRuleId string
    The safe rule id of the database instance.
    Sid string
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    SkipTest bool
    Whether the instance ignores test connectivity. Valid values: true, false.
    Tid int
    The tenant ID.
    UseDsql int
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    VpcId string
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    DatabasePassword string
    Database access password.
    DatabaseUser string
    Database access account.
    DbaUid int
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    EnvType string
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    ExportTimeout int
    Export timeout, unit: s (seconds).
    Host string
    Host address of the target database.
    InstanceSource string
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    InstanceType string
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    NetworkType string
    Network type. Valid values: CLASSIC, VPC.
    Port int
    Access port of the target database.
    QueryTimeout int
    Query timeout time, unit: s (seconds).
    SafeRule string
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    DataLinkName string
    Cross-database query datalink name.
    DbaId string
    The dba id of the database instance.
    DdlOnline int
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    EcsInstanceId string
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    EcsRegion string
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    InstanceAlias string
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    InstanceId string
    The instance id of the database instance.
    InstanceName string
    Instance name, to help users quickly distinguish positioning.
    SafeRuleId string
    The safe rule id of the database instance.
    Sid string
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    SkipTest bool
    Whether the instance ignores test connectivity. Valid values: true, false.
    Tid int
    The tenant ID.
    UseDsql int
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    VpcId string
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    databasePassword String
    Database access password.
    databaseUser String
    Database access account.
    dbaUid Integer
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    envType String
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    exportTimeout Integer
    Export timeout, unit: s (seconds).
    host String
    Host address of the target database.
    instanceSource String
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    instanceType String
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    networkType String
    Network type. Valid values: CLASSIC, VPC.
    port Integer
    Access port of the target database.
    queryTimeout Integer
    Query timeout time, unit: s (seconds).
    safeRule String
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    dataLinkName String
    Cross-database query datalink name.
    dbaId String
    The dba id of the database instance.
    ddlOnline Integer
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    ecsInstanceId String
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    ecsRegion String
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    instanceAlias String
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    instanceId String
    The instance id of the database instance.
    instanceName String
    Instance name, to help users quickly distinguish positioning.
    safeRuleId String
    The safe rule id of the database instance.
    sid String
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    skipTest Boolean
    Whether the instance ignores test connectivity. Valid values: true, false.
    tid Integer
    The tenant ID.
    useDsql Integer
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    vpcId String
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    databasePassword string
    Database access password.
    databaseUser string
    Database access account.
    dbaUid number
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    envType string
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    exportTimeout number
    Export timeout, unit: s (seconds).
    host string
    Host address of the target database.
    instanceSource string
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    instanceType string
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    networkType string
    Network type. Valid values: CLASSIC, VPC.
    port number
    Access port of the target database.
    queryTimeout number
    Query timeout time, unit: s (seconds).
    safeRule string
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    dataLinkName string
    Cross-database query datalink name.
    dbaId string
    The dba id of the database instance.
    ddlOnline number
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    ecsInstanceId string
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    ecsRegion string
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    instanceAlias string
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    instanceId string
    The instance id of the database instance.
    instanceName string
    Instance name, to help users quickly distinguish positioning.
    safeRuleId string
    The safe rule id of the database instance.
    sid string
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    skipTest boolean
    Whether the instance ignores test connectivity. Valid values: true, false.
    tid number
    The tenant ID.
    useDsql number
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    vpcId string
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    database_password str
    Database access password.
    database_user str
    Database access account.
    dba_uid int
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    env_type str
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    export_timeout int
    Export timeout, unit: s (seconds).
    host str
    Host address of the target database.
    instance_source str
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    instance_type str
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    network_type str
    Network type. Valid values: CLASSIC, VPC.
    port int
    Access port of the target database.
    query_timeout int
    Query timeout time, unit: s (seconds).
    safe_rule str
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    data_link_name str
    Cross-database query datalink name.
    dba_id str
    The dba id of the database instance.
    ddl_online int
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    ecs_instance_id str
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    ecs_region str
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    instance_alias str
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    instance_id str
    The instance id of the database instance.
    instance_name str
    Instance name, to help users quickly distinguish positioning.
    safe_rule_id str
    The safe rule id of the database instance.
    sid str
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    skip_test bool
    Whether the instance ignores test connectivity. Valid values: true, false.
    tid int
    The tenant ID.
    use_dsql int
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    vpc_id str
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    databasePassword String
    Database access password.
    databaseUser String
    Database access account.
    dbaUid Number
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    envType String
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    exportTimeout Number
    Export timeout, unit: s (seconds).
    host String
    Host address of the target database.
    instanceSource String
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    instanceType String
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    networkType String
    Network type. Valid values: CLASSIC, VPC.
    port Number
    Access port of the target database.
    queryTimeout Number
    Query timeout time, unit: s (seconds).
    safeRule String
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    dataLinkName String
    Cross-database query datalink name.
    dbaId String
    The dba id of the database instance.
    ddlOnline Number
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    ecsInstanceId String
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    ecsRegion String
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    instanceAlias String
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    instanceId String
    The instance id of the database instance.
    instanceName String
    Instance name, to help users quickly distinguish positioning.
    safeRuleId String
    The safe rule id of the database instance.
    sid String
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    skipTest Boolean
    Whether the instance ignores test connectivity. Valid values: true, false.
    tid Number
    The tenant ID.
    useDsql Number
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    vpcId String
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.

    Outputs

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

    DbaNickName string
    The instance dba nickname.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    Status string
    The instance status.
    DbaNickName string
    The instance dba nickname.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    Status string
    The instance status.
    dbaNickName String
    The instance dba nickname.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    status String
    The instance status.
    dbaNickName string
    The instance dba nickname.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    status string
    The instance status.
    dba_nick_name str
    The instance dba nickname.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    status str
    The instance status.
    dbaNickName String
    The instance dba nickname.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    status String
    The instance status.

    Look up Existing EnterpriseInstance Resource

    Get an existing EnterpriseInstance 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?: EnterpriseInstanceState, opts?: CustomResourceOptions): EnterpriseInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            data_link_name: Optional[str] = None,
            database_password: Optional[str] = None,
            database_user: Optional[str] = None,
            dba_id: Optional[str] = None,
            dba_nick_name: Optional[str] = None,
            dba_uid: Optional[int] = None,
            ddl_online: Optional[int] = None,
            ecs_instance_id: Optional[str] = None,
            ecs_region: Optional[str] = None,
            env_type: Optional[str] = None,
            export_timeout: Optional[int] = None,
            host: Optional[str] = None,
            instance_alias: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_name: Optional[str] = None,
            instance_source: Optional[str] = None,
            instance_type: Optional[str] = None,
            network_type: Optional[str] = None,
            port: Optional[int] = None,
            query_timeout: Optional[int] = None,
            safe_rule: Optional[str] = None,
            safe_rule_id: Optional[str] = None,
            sid: Optional[str] = None,
            skip_test: Optional[bool] = None,
            state: Optional[str] = None,
            status: Optional[str] = None,
            tid: Optional[int] = None,
            use_dsql: Optional[int] = None,
            vpc_id: Optional[str] = None) -> EnterpriseInstance
    func GetEnterpriseInstance(ctx *Context, name string, id IDInput, state *EnterpriseInstanceState, opts ...ResourceOption) (*EnterpriseInstance, error)
    public static EnterpriseInstance Get(string name, Input<string> id, EnterpriseInstanceState? state, CustomResourceOptions? opts = null)
    public static EnterpriseInstance get(String name, Output<String> id, EnterpriseInstanceState 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:
    DataLinkName string
    Cross-database query datalink name.
    DatabasePassword string
    Database access password.
    DatabaseUser string
    Database access account.
    DbaId string
    The dba id of the database instance.
    DbaNickName string
    The instance dba nickname.
    DbaUid int
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    DdlOnline int
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    EcsInstanceId string
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    EcsRegion string
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    EnvType string
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    ExportTimeout int
    Export timeout, unit: s (seconds).
    Host string
    Host address of the target database.
    InstanceAlias string
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    InstanceId string
    The instance id of the database instance.
    InstanceName string
    Instance name, to help users quickly distinguish positioning.
    InstanceSource string
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    InstanceType string
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    NetworkType string
    Network type. Valid values: CLASSIC, VPC.
    Port int
    Access port of the target database.
    QueryTimeout int
    Query timeout time, unit: s (seconds).
    SafeRule string
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    SafeRuleId string
    The safe rule id of the database instance.
    Sid string
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    SkipTest bool
    Whether the instance ignores test connectivity. Valid values: true, false.
    State string
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    Status string
    The instance status.
    Tid int
    The tenant ID.
    UseDsql int
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    VpcId string
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    DataLinkName string
    Cross-database query datalink name.
    DatabasePassword string
    Database access password.
    DatabaseUser string
    Database access account.
    DbaId string
    The dba id of the database instance.
    DbaNickName string
    The instance dba nickname.
    DbaUid int
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    DdlOnline int
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    EcsInstanceId string
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    EcsRegion string
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    EnvType string
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    ExportTimeout int
    Export timeout, unit: s (seconds).
    Host string
    Host address of the target database.
    InstanceAlias string
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    InstanceId string
    The instance id of the database instance.
    InstanceName string
    Instance name, to help users quickly distinguish positioning.
    InstanceSource string
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    InstanceType string
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    NetworkType string
    Network type. Valid values: CLASSIC, VPC.
    Port int
    Access port of the target database.
    QueryTimeout int
    Query timeout time, unit: s (seconds).
    SafeRule string
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    SafeRuleId string
    The safe rule id of the database instance.
    Sid string
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    SkipTest bool
    Whether the instance ignores test connectivity. Valid values: true, false.
    State string
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    Status string
    The instance status.
    Tid int
    The tenant ID.
    UseDsql int
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    VpcId string
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    dataLinkName String
    Cross-database query datalink name.
    databasePassword String
    Database access password.
    databaseUser String
    Database access account.
    dbaId String
    The dba id of the database instance.
    dbaNickName String
    The instance dba nickname.
    dbaUid Integer
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    ddlOnline Integer
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    ecsInstanceId String
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    ecsRegion String
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    envType String
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    exportTimeout Integer
    Export timeout, unit: s (seconds).
    host String
    Host address of the target database.
    instanceAlias String
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    instanceId String
    The instance id of the database instance.
    instanceName String
    Instance name, to help users quickly distinguish positioning.
    instanceSource String
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    instanceType String
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    networkType String
    Network type. Valid values: CLASSIC, VPC.
    port Integer
    Access port of the target database.
    queryTimeout Integer
    Query timeout time, unit: s (seconds).
    safeRule String
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    safeRuleId String
    The safe rule id of the database instance.
    sid String
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    skipTest Boolean
    Whether the instance ignores test connectivity. Valid values: true, false.
    state String
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    status String
    The instance status.
    tid Integer
    The tenant ID.
    useDsql Integer
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    vpcId String
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    dataLinkName string
    Cross-database query datalink name.
    databasePassword string
    Database access password.
    databaseUser string
    Database access account.
    dbaId string
    The dba id of the database instance.
    dbaNickName string
    The instance dba nickname.
    dbaUid number
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    ddlOnline number
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    ecsInstanceId string
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    ecsRegion string
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    envType string
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    exportTimeout number
    Export timeout, unit: s (seconds).
    host string
    Host address of the target database.
    instanceAlias string
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    instanceId string
    The instance id of the database instance.
    instanceName string
    Instance name, to help users quickly distinguish positioning.
    instanceSource string
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    instanceType string
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    networkType string
    Network type. Valid values: CLASSIC, VPC.
    port number
    Access port of the target database.
    queryTimeout number
    Query timeout time, unit: s (seconds).
    safeRule string
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    safeRuleId string
    The safe rule id of the database instance.
    sid string
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    skipTest boolean
    Whether the instance ignores test connectivity. Valid values: true, false.
    state string
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    status string
    The instance status.
    tid number
    The tenant ID.
    useDsql number
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    vpcId string
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    data_link_name str
    Cross-database query datalink name.
    database_password str
    Database access password.
    database_user str
    Database access account.
    dba_id str
    The dba id of the database instance.
    dba_nick_name str
    The instance dba nickname.
    dba_uid int
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    ddl_online int
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    ecs_instance_id str
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    ecs_region str
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    env_type str
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    export_timeout int
    Export timeout, unit: s (seconds).
    host str
    Host address of the target database.
    instance_alias str
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    instance_id str
    The instance id of the database instance.
    instance_name str
    Instance name, to help users quickly distinguish positioning.
    instance_source str
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    instance_type str
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    network_type str
    Network type. Valid values: CLASSIC, VPC.
    port int
    Access port of the target database.
    query_timeout int
    Query timeout time, unit: s (seconds).
    safe_rule str
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    safe_rule_id str
    The safe rule id of the database instance.
    sid str
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    skip_test bool
    Whether the instance ignores test connectivity. Valid values: true, false.
    state str
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    status str
    The instance status.
    tid int
    The tenant ID.
    use_dsql int
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    vpc_id str
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.
    dataLinkName String
    Cross-database query datalink name.
    databasePassword String
    Database access password.
    databaseUser String
    Database access account.
    dbaId String
    The dba id of the database instance.
    dbaNickName String
    The instance dba nickname.
    dbaUid Number
    The DBA of the instance is passed into the Alibaba Cloud uid of the DBA.
    ddlOnline Number
    Whether to use online services, currently only supports MySQL and PolarDB. Valid values: 0 Not used, 1 Native online DDL priority, 2 DMS lock-free table structure change priority.
    ecsInstanceId String
    ECS instance ID. The value of InstanceSource is the ECS self-built library. This value must be passed.
    ecsRegion String
    The region where the instance is located. This value must be passed when the value of InstanceSource is RDS, ECS self-built library, and VPC dedicated line IDC.
    envType String
    Environment type. Valid values: product production environment, dev development environment, pre pre-release environment, test test environment, sit SIT environment, uat UAT environment, pet pressure test environment, stag STAG environment.
    exportTimeout Number
    Export timeout, unit: s (seconds).
    host String
    Host address of the target database.
    instanceAlias String
    Field instance_alias has been deprecated from version 1.100.0. Use instance_name instead.

    Deprecated: Field 'instance_alias' has been deprecated from version 1.100.0. Use 'instance_name' instead.

    instanceId String
    The instance id of the database instance.
    instanceName String
    Instance name, to help users quickly distinguish positioning.
    instanceSource String
    The source of the database instance. Valid values: PUBLIC_OWN, RDS, ECS_OWN, VPC_IDC.
    instanceType String
    Database type. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis.
    networkType String
    Network type. Valid values: CLASSIC, VPC.
    port Number
    Access port of the target database.
    queryTimeout Number
    Query timeout time, unit: s (seconds).
    safeRule String
    The security rule of the instance is passed into the name of the security rule in the enterprise.
    safeRuleId String
    The safe rule id of the database instance.
    sid String
    The SID. This value must be passed when InstanceType is PostgreSQL or Oracle.
    skipTest Boolean
    Whether the instance ignores test connectivity. Valid values: true, false.
    state String
    It has been deprecated from provider version 1.100.0 and 'status' instead.

    Deprecated: Field 'state' has been deprecated from version 1.100.0. Use 'status' instead.

    status String
    The instance status.
    tid Number
    The tenant ID.
    useDsql Number
    Whether to enable cross-instance query. Valid values: 0 not open, 1 open.
    vpcId String
    VPC ID. This value must be passed when the value of InstanceSource is VPC dedicated line IDC.

    Import

    DMS Enterprise can be imported using host and port, e.g.

    $ pulumi import alicloud:dms/enterpriseInstance:EnterpriseInstance example rm-uf648hgs7874xxxx.mysql.rds.aliyuncs.com:3306
    

    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.56.0 published on Friday, May 31, 2024 by Pulumi