1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dms
  5. EnterpriseWorkspace
Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi

alicloud.dms.EnterpriseWorkspace

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi

    Provides a DMS Enterprise Workspace resource.

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

    NOTE: Available since v1.259.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform_example";
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const vpcCreate = new alicloud.vpc.Network("vpc_create", {
        isDefault: false,
        description: "example vpc",
        cidrBlock: "192.168.0.0/16",
        vpcName: `${name}-${_default.result}`,
    });
    const defaultEnterpriseWorkspace = new alicloud.dms.EnterpriseWorkspace("default", {
        description: name,
        workspaceName: `${name}-${_default.result}`,
        vpcId: vpcCreate.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform_example"
    default = random.index.Integer("default",
        min=10000,
        max=99999)
    vpc_create = alicloud.vpc.Network("vpc_create",
        is_default=False,
        description="example vpc",
        cidr_block="192.168.0.0/16",
        vpc_name=f"{name}-{default['result']}")
    default_enterprise_workspace = alicloud.dms.EnterpriseWorkspace("default",
        description=name,
        workspace_name=f"{name}-{default['result']}",
        vpc_id=vpc_create.id)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform_example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		vpcCreate, err := vpc.NewNetwork(ctx, "vpc_create", &vpc.NetworkArgs{
    			IsDefault:   pulumi.Bool(false),
    			Description: pulumi.String("example vpc"),
    			CidrBlock:   pulumi.String("192.168.0.0/16"),
    			VpcName:     pulumi.Sprintf("%v-%v", name, _default.Result),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dms.NewEnterpriseWorkspace(ctx, "default", &dms.EnterpriseWorkspaceArgs{
    			Description:   pulumi.String(name),
    			WorkspaceName: pulumi.Sprintf("%v-%v", name, _default.Result),
    			VpcId:         vpcCreate.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform_example";
        var @default = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var vpcCreate = new AliCloud.Vpc.Network("vpc_create", new()
        {
            IsDefault = false,
            Description = "example vpc",
            CidrBlock = "192.168.0.0/16",
            VpcName = $"{name}-{@default.Result}",
        });
    
        var defaultEnterpriseWorkspace = new AliCloud.Dms.EnterpriseWorkspace("default", new()
        {
            Description = name,
            WorkspaceName = $"{name}-{@default.Result}",
            VpcId = vpcCreate.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.Integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.dms.EnterpriseWorkspace;
    import com.pulumi.alicloud.dms.EnterpriseWorkspaceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform_example");
            var default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var vpcCreate = new Network("vpcCreate", NetworkArgs.builder()
                .isDefault(false)
                .description("example vpc")
                .cidrBlock("192.168.0.0/16")
                .vpcName(String.format("%s-%s", name,default_.result()))
                .build());
    
            var defaultEnterpriseWorkspace = new EnterpriseWorkspace("defaultEnterpriseWorkspace", EnterpriseWorkspaceArgs.builder()
                .description(name)
                .workspaceName(String.format("%s-%s", name,default_.result()))
                .vpcId(vpcCreate.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform_example
    resources:
      default:
        type: random:Integer
        properties:
          min: 10000
          max: 99999
      vpcCreate:
        type: alicloud:vpc:Network
        name: vpc_create
        properties:
          isDefault: false
          description: example vpc
          cidrBlock: 192.168.0.0/16
          vpcName: ${name}-${default.result}
      defaultEnterpriseWorkspace:
        type: alicloud:dms:EnterpriseWorkspace
        name: default
        properties:
          description: ${name}
          workspaceName: ${name}-${default.result}
          vpcId: ${vpcCreate.id}
    

    Create EnterpriseWorkspace Resource

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

    Constructor syntax

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

    Constructor example

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

    var enterpriseWorkspaceResource = new AliCloud.Dms.EnterpriseWorkspace("enterpriseWorkspaceResource", new()
    {
        Description = "string",
        VpcId = "string",
        WorkspaceName = "string",
    });
    
    example, err := dms.NewEnterpriseWorkspace(ctx, "enterpriseWorkspaceResource", &dms.EnterpriseWorkspaceArgs{
    	Description:   pulumi.String("string"),
    	VpcId:         pulumi.String("string"),
    	WorkspaceName: pulumi.String("string"),
    })
    
    var enterpriseWorkspaceResource = new EnterpriseWorkspace("enterpriseWorkspaceResource", EnterpriseWorkspaceArgs.builder()
        .description("string")
        .vpcId("string")
        .workspaceName("string")
        .build());
    
    enterprise_workspace_resource = alicloud.dms.EnterpriseWorkspace("enterpriseWorkspaceResource",
        description="string",
        vpc_id="string",
        workspace_name="string")
    
    const enterpriseWorkspaceResource = new alicloud.dms.EnterpriseWorkspace("enterpriseWorkspaceResource", {
        description: "string",
        vpcId: "string",
        workspaceName: "string",
    });
    
    type: alicloud:dms:EnterpriseWorkspace
    properties:
        description: string
        vpcId: string
        workspaceName: string
    

    EnterpriseWorkspace Resource Properties

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

    Inputs

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

    The EnterpriseWorkspace resource accepts the following input properties:

    Description string
    The description of the Workspace.
    VpcId string
    The ID of the VPC.
    WorkspaceName string
    The name of the Workspace.
    Description string
    The description of the Workspace.
    VpcId string
    The ID of the VPC.
    WorkspaceName string
    The name of the Workspace.
    description String
    The description of the Workspace.
    vpcId String
    The ID of the VPC.
    workspaceName String
    The name of the Workspace.
    description string
    The description of the Workspace.
    vpcId string
    The ID of the VPC.
    workspaceName string
    The name of the Workspace.
    description str
    The description of the Workspace.
    vpc_id str
    The ID of the VPC.
    workspace_name str
    The name of the Workspace.
    description String
    The description of the Workspace.
    vpcId String
    The ID of the VPC.
    workspaceName String
    The name of the Workspace.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    The region ID of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    The region ID of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    The region ID of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    regionId string
    The region ID of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    region_id str
    The region ID of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    The region ID of the resource.

    Look up Existing EnterpriseWorkspace Resource

    Get an existing EnterpriseWorkspace 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?: EnterpriseWorkspaceState, opts?: CustomResourceOptions): EnterpriseWorkspace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            region_id: Optional[str] = None,
            vpc_id: Optional[str] = None,
            workspace_name: Optional[str] = None) -> EnterpriseWorkspace
    func GetEnterpriseWorkspace(ctx *Context, name string, id IDInput, state *EnterpriseWorkspaceState, opts ...ResourceOption) (*EnterpriseWorkspace, error)
    public static EnterpriseWorkspace Get(string name, Input<string> id, EnterpriseWorkspaceState? state, CustomResourceOptions? opts = null)
    public static EnterpriseWorkspace get(String name, Output<String> id, EnterpriseWorkspaceState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:dms:EnterpriseWorkspace    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    The description of the Workspace.
    RegionId string
    The region ID of the resource.
    VpcId string
    The ID of the VPC.
    WorkspaceName string
    The name of the Workspace.
    Description string
    The description of the Workspace.
    RegionId string
    The region ID of the resource.
    VpcId string
    The ID of the VPC.
    WorkspaceName string
    The name of the Workspace.
    description String
    The description of the Workspace.
    regionId String
    The region ID of the resource.
    vpcId String
    The ID of the VPC.
    workspaceName String
    The name of the Workspace.
    description string
    The description of the Workspace.
    regionId string
    The region ID of the resource.
    vpcId string
    The ID of the VPC.
    workspaceName string
    The name of the Workspace.
    description str
    The description of the Workspace.
    region_id str
    The region ID of the resource.
    vpc_id str
    The ID of the VPC.
    workspace_name str
    The name of the Workspace.
    description String
    The description of the Workspace.
    regionId String
    The region ID of the resource.
    vpcId String
    The ID of the VPC.
    workspaceName String
    The name of the Workspace.

    Import

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

    $ pulumi import alicloud:dms/enterpriseWorkspace:EnterpriseWorkspace example <id>
    

    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.85.0 published on Tuesday, Sep 9, 2025 by Pulumi