1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dms
  5. EnterpriseProxy
Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 2024 by Pulumi

alicloud.dms.EnterpriseProxy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.49.0 published on Sunday, Feb 4, 2024 by Pulumi

    Provides a DMS Enterprise Proxy resource.

    For information about DMS Enterprise Proxy and how to use it, see What is Proxy.

    NOTE: Available since v1.188.0.

    Example Usage

    Basic Usage

    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 defaultRegions = AliCloud.GetRegions.Invoke(new()
        {
            Current = true,
        });
    
        var defaultUserTenants = AliCloud.Dms.GetUserTenants.Invoke(new()
        {
            Status = "ACTIVE",
        });
    
        var defaultZones = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            InstanceChargeType = "PostPaid",
            Category = "HighAvailability",
            DbInstanceStorageType = "cloud_essd",
        });
    
        var defaultInstanceClasses = AliCloud.Rds.GetInstanceClasses.Invoke(new()
        {
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            Engine = "MySQL",
            EngineVersion = "8.0",
            Category = "HighAvailability",
            DbInstanceStorageType = "cloud_essd",
            InstanceChargeType = "PostPaid",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        {
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Rds.Instance("defaultInstance", new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            DbInstanceStorageType = "cloud_essd",
            InstanceType = defaultInstanceClasses.Apply(getInstanceClassesResult => getInstanceClassesResult.InstanceClasses[0]?.InstanceClass),
            InstanceStorage = defaultInstanceClasses.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("defaultAccount", new()
        {
            DbInstanceId = defaultInstance.Id,
            AccountName = "tfexamplename",
            AccountPassword = "Example12345",
            AccountType = "Normal",
        });
    
        var defaultEnterpriseInstance = new AliCloud.Dms.EnterpriseInstance("defaultEnterpriseInstance", new()
        {
            Tid = defaultUserTenants.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 = "自由操作",
            QueryTimeout = 60,
            ExportTimeout = 600,
            EcsRegion = defaultRegions.Apply(getRegionsResult => getRegionsResult.Regions[0]?.Id),
        });
    
        var defaultEnterpriseProxy = new AliCloud.Dms.EnterpriseProxy("defaultEnterpriseProxy", new()
        {
            InstanceId = defaultEnterpriseInstance.InstanceId,
            Password = "Example12345",
            Username = "tfexamplename",
            Tid = defaultUserTenants.Apply(getUserTenantsResult => getUserTenantsResult.Ids[0]),
        });
    
    });
    
    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
    		}
    		defaultRegions, err := alicloud.GetRegions(ctx, &alicloud.GetRegionsArgs{
    			Current: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultUserTenants, err := dms.GetUserTenants(ctx, &dms.GetUserTenantsArgs{
    			Status: pulumi.StringRef("ACTIVE"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultZones, 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
    		}
    		defaultInstanceClasses, err := rds.GetInstanceClasses(ctx, &rds.GetInstanceClassesArgs{
    			ZoneId:                pulumi.StringRef(defaultZones.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, "defaultNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      *pulumi.String(defaultZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := rds.NewInstance(ctx, "defaultInstance", &rds.InstanceArgs{
    			Engine:                pulumi.String("MySQL"),
    			EngineVersion:         pulumi.String("8.0"),
    			DbInstanceStorageType: pulumi.String("cloud_essd"),
    			InstanceType:          *pulumi.String(defaultInstanceClasses.InstanceClasses[0].InstanceClass),
    			InstanceStorage:       *pulumi.String(defaultInstanceClasses.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, "defaultAccount", &rds.AccountArgs{
    			DbInstanceId:    defaultInstance.ID(),
    			AccountName:     pulumi.String("tfexamplename"),
    			AccountPassword: pulumi.String("Example12345"),
    			AccountType:     pulumi.String("Normal"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultEnterpriseInstance, err := dms.NewEnterpriseInstance(ctx, "defaultEnterpriseInstance", &dms.EnterpriseInstanceArgs{
    			Tid:              *pulumi.String(defaultUserTenants.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("自由操作"),
    			QueryTimeout:     pulumi.Int(60),
    			ExportTimeout:    pulumi.Int(600),
    			EcsRegion:        *pulumi.String(defaultRegions.Regions[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dms.NewEnterpriseProxy(ctx, "defaultEnterpriseProxy", &dms.EnterpriseProxyArgs{
    			InstanceId: defaultEnterpriseInstance.InstanceId,
    			Password:   pulumi.String("Example12345"),
    			Username:   pulumi.String("tfexamplename"),
    			Tid:        *pulumi.String(defaultUserTenants.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 com.pulumi.alicloud.dms.EnterpriseProxy;
    import com.pulumi.alicloud.dms.EnterpriseProxyArgs;
    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 defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
                .current(true)
                .build());
    
            final var defaultUserTenants = DmsFunctions.getUserTenants(GetUserTenantsArgs.builder()
                .status("ACTIVE")
                .build());
    
            final var defaultZones = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .instanceChargeType("PostPaid")
                .category("HighAvailability")
                .dbInstanceStorageType("cloud_essd")
                .build());
    
            final var defaultInstanceClasses = RdsFunctions.getInstanceClasses(GetInstanceClassesArgs.builder()
                .zoneId(defaultZones.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(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()        
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .engine("MySQL")
                .engineVersion("8.0")
                .dbInstanceStorageType("cloud_essd")
                .instanceType(defaultInstanceClasses.applyValue(getInstanceClassesResult -> getInstanceClassesResult.instanceClasses()[0].instanceClass()))
                .instanceStorage(defaultInstanceClasses.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(defaultUserTenants.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("自由操作")
                .queryTimeout(60)
                .exportTimeout(600)
                .ecsRegion(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id()))
                .build());
    
            var defaultEnterpriseProxy = new EnterpriseProxy("defaultEnterpriseProxy", EnterpriseProxyArgs.builder()        
                .instanceId(defaultEnterpriseInstance.instanceId())
                .password("Example12345")
                .username("tfexamplename")
                .tid(defaultUserTenants.applyValue(getUserTenantsResult -> getUserTenantsResult.ids()[0]))
                .build());
    
        }
    }
    
    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_regions = alicloud.get_regions(current=True)
    default_user_tenants = alicloud.dms.get_user_tenants(status="ACTIVE")
    default_zones = alicloud.rds.get_zones(engine="MySQL",
        engine_version="8.0",
        instance_charge_type="PostPaid",
        category="HighAvailability",
        db_instance_storage_type="cloud_essd")
    default_instance_classes = alicloud.rds.get_instance_classes(zone_id=default_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("defaultNetwork",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("defaultSwitch",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_network.id)
    default_instance = alicloud.rds.Instance("defaultInstance",
        engine="MySQL",
        engine_version="8.0",
        db_instance_storage_type="cloud_essd",
        instance_type=default_instance_classes.instance_classes[0].instance_class,
        instance_storage=default_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("defaultAccount",
        db_instance_id=default_instance.id,
        account_name="tfexamplename",
        account_password="Example12345",
        account_type="Normal")
    default_enterprise_instance = alicloud.dms.EnterpriseInstance("defaultEnterpriseInstance",
        tid=default_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="自由操作",
        query_timeout=60,
        export_timeout=600,
        ecs_region=default_regions.regions[0].id)
    default_enterprise_proxy = alicloud.dms.EnterpriseProxy("defaultEnterpriseProxy",
        instance_id=default_enterprise_instance.instance_id,
        password="Example12345",
        username="tfexamplename",
        tid=default_user_tenants.ids[0])
    
    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 defaultRegions = alicloud.getRegions({
        current: true,
    });
    const defaultUserTenants = alicloud.dms.getUserTenants({
        status: "ACTIVE",
    });
    const defaultZones = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "8.0",
        instanceChargeType: "PostPaid",
        category: "HighAvailability",
        dbInstanceStorageType: "cloud_essd",
    });
    const defaultInstanceClasses = defaultZones.then(defaultZones => alicloud.rds.getInstanceClasses({
        zoneId: defaultZones.zones?.[0]?.id,
        engine: "MySQL",
        engineVersion: "8.0",
        category: "HighAvailability",
        dbInstanceStorageType: "cloud_essd",
        instanceChargeType: "PostPaid",
    }));
    const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetwork.id});
    const defaultInstance = new alicloud.rds.Instance("defaultInstance", {
        engine: "MySQL",
        engineVersion: "8.0",
        dbInstanceStorageType: "cloud_essd",
        instanceType: defaultInstanceClasses.then(defaultInstanceClasses => defaultInstanceClasses.instanceClasses?.[0]?.instanceClass),
        instanceStorage: defaultInstanceClasses.then(defaultInstanceClasses => defaultInstanceClasses.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("defaultAccount", {
        dbInstanceId: defaultInstance.id,
        accountName: "tfexamplename",
        accountPassword: "Example12345",
        accountType: "Normal",
    });
    const defaultEnterpriseInstance = new alicloud.dms.EnterpriseInstance("defaultEnterpriseInstance", {
        tid: defaultUserTenants.then(defaultUserTenants => defaultUserTenants.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: "自由操作",
        queryTimeout: 60,
        exportTimeout: 600,
        ecsRegion: defaultRegions.then(defaultRegions => defaultRegions.regions?.[0]?.id),
    });
    const defaultEnterpriseProxy = new alicloud.dms.EnterpriseProxy("defaultEnterpriseProxy", {
        instanceId: defaultEnterpriseInstance.instanceId,
        password: "Example12345",
        username: "tfexamplename",
        tid: defaultUserTenants.then(defaultUserTenants => defaultUserTenants.ids?.[0]),
    });
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultZones.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        properties:
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:rds:Instance
        properties:
          engine: MySQL
          engineVersion: '8.0'
          dbInstanceStorageType: cloud_essd
          instanceType: ${defaultInstanceClasses.instanceClasses[0].instanceClass}
          instanceStorage: ${defaultInstanceClasses.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
        properties:
          dbInstanceId: ${defaultInstance.id}
          accountName: tfexamplename
          accountPassword: Example12345
          accountType: Normal
      defaultEnterpriseInstance:
        type: alicloud:dms:EnterpriseInstance
        properties:
          tid: ${defaultUserTenants.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: 自由操作
          queryTimeout: 60
          exportTimeout: 600
          ecsRegion: ${defaultRegions.regions[0].id}
      defaultEnterpriseProxy:
        type: alicloud:dms:EnterpriseProxy
        properties:
          instanceId: ${defaultEnterpriseInstance.instanceId}
          password: Example12345
          username: tfexamplename
          tid: ${defaultUserTenants.ids[0]}
    variables:
      current:
        fn::invoke:
          Function: alicloud:getAccount
          Arguments: {}
      defaultRegions:
        fn::invoke:
          Function: alicloud:getRegions
          Arguments:
            current: true
      defaultUserTenants:
        fn::invoke:
          Function: alicloud:dms:getUserTenants
          Arguments:
            status: ACTIVE
      defaultZones:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '8.0'
            instanceChargeType: PostPaid
            category: HighAvailability
            dbInstanceStorageType: cloud_essd
      defaultInstanceClasses:
        fn::invoke:
          Function: alicloud:rds:getInstanceClasses
          Arguments:
            zoneId: ${defaultZones.zones[0].id}
            engine: MySQL
            engineVersion: '8.0'
            category: HighAvailability
            dbInstanceStorageType: cloud_essd
            instanceChargeType: PostPaid
    

    Create EnterpriseProxy Resource

    new EnterpriseProxy(name: string, args: EnterpriseProxyArgs, opts?: CustomResourceOptions);
    @overload
    def EnterpriseProxy(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        instance_id: Optional[str] = None,
                        password: Optional[str] = None,
                        tid: Optional[str] = None,
                        username: Optional[str] = None)
    @overload
    def EnterpriseProxy(resource_name: str,
                        args: EnterpriseProxyArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewEnterpriseProxy(ctx *Context, name string, args EnterpriseProxyArgs, opts ...ResourceOption) (*EnterpriseProxy, error)
    public EnterpriseProxy(string name, EnterpriseProxyArgs args, CustomResourceOptions? opts = null)
    public EnterpriseProxy(String name, EnterpriseProxyArgs args)
    public EnterpriseProxy(String name, EnterpriseProxyArgs args, CustomResourceOptions options)
    
    type: alicloud:dms:EnterpriseProxy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EnterpriseProxyArgs
    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 EnterpriseProxyArgs
    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 EnterpriseProxyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnterpriseProxyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnterpriseProxyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    InstanceId string
    The ID of the database instance.
    Password string
    The password of the database account.
    Username string
    The username of the database account.
    Tid string
    The ID of the tenant.
    InstanceId string
    The ID of the database instance.
    Password string
    The password of the database account.
    Username string
    The username of the database account.
    Tid string
    The ID of the tenant.
    instanceId String
    The ID of the database instance.
    password String
    The password of the database account.
    username String
    The username of the database account.
    tid String
    The ID of the tenant.
    instanceId string
    The ID of the database instance.
    password string
    The password of the database account.
    username string
    The username of the database account.
    tid string
    The ID of the tenant.
    instance_id str
    The ID of the database instance.
    password str
    The password of the database account.
    username str
    The username of the database account.
    tid str
    The ID of the tenant.
    instanceId String
    The ID of the database instance.
    password String
    The password of the database account.
    username String
    The username of the database account.
    tid String
    The ID of the tenant.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EnterpriseProxy Resource

    Get an existing EnterpriseProxy 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?: EnterpriseProxyState, opts?: CustomResourceOptions): EnterpriseProxy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            instance_id: Optional[str] = None,
            password: Optional[str] = None,
            tid: Optional[str] = None,
            username: Optional[str] = None) -> EnterpriseProxy
    func GetEnterpriseProxy(ctx *Context, name string, id IDInput, state *EnterpriseProxyState, opts ...ResourceOption) (*EnterpriseProxy, error)
    public static EnterpriseProxy Get(string name, Input<string> id, EnterpriseProxyState? state, CustomResourceOptions? opts = null)
    public static EnterpriseProxy get(String name, Output<String> id, EnterpriseProxyState 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:
    InstanceId string
    The ID of the database instance.
    Password string
    The password of the database account.
    Tid string
    The ID of the tenant.
    Username string
    The username of the database account.
    InstanceId string
    The ID of the database instance.
    Password string
    The password of the database account.
    Tid string
    The ID of the tenant.
    Username string
    The username of the database account.
    instanceId String
    The ID of the database instance.
    password String
    The password of the database account.
    tid String
    The ID of the tenant.
    username String
    The username of the database account.
    instanceId string
    The ID of the database instance.
    password string
    The password of the database account.
    tid string
    The ID of the tenant.
    username string
    The username of the database account.
    instance_id str
    The ID of the database instance.
    password str
    The password of the database account.
    tid str
    The ID of the tenant.
    username str
    The username of the database account.
    instanceId String
    The ID of the database instance.
    password String
    The password of the database account.
    tid String
    The ID of the tenant.
    username String
    The username of the database account.

    Import

    DMS Enterprise Proxy can be imported using the id, e.g.

     $ pulumi import alicloud:dms/enterpriseProxy:EnterpriseProxy example <id>
    

    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.49.0 published on Sunday, Feb 4, 2024 by Pulumi