published on Tuesday, Apr 28, 2026 by Pulumi
published on Tuesday, Apr 28, 2026 by Pulumi
Provides a Cms Workspace resource.
For information about Cms Workspace and how to use it, see What is Workspace.
NOTE: Available since v1.276.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.log.Project("default", {projectName: name});
const defaultWorkspace = new alicloud.cms.Workspace("default", {
workspaceName: name,
slsProject: _default.projectName,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.log.Project("default", project_name=name)
default_workspace = alicloud.cms.Workspace("default",
workspace_name=name,
sls_project=default.project_name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
"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 := log.NewProject(ctx, "default", &log.ProjectArgs{
ProjectName: pulumi.String(pulumi.String(name)),
})
if err != nil {
return err
}
_, err = cms.NewWorkspace(ctx, "default", &cms.WorkspaceArgs{
WorkspaceName: pulumi.String(pulumi.String(name)),
SlsProject: _default.ProjectName,
})
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") ?? "terraform-example";
var @default = new AliCloud.Log.Project("default", new()
{
ProjectName = name,
});
var defaultWorkspace = new AliCloud.Cms.Workspace("default", new()
{
WorkspaceName = name,
SlsProject = @default.ProjectName,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.cms.Workspace;
import com.pulumi.alicloud.cms.WorkspaceArgs;
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 Project("default", ProjectArgs.builder()
.projectName(name)
.build());
var defaultWorkspace = new Workspace("defaultWorkspace", WorkspaceArgs.builder()
.workspaceName(name)
.slsProject(default_.projectName())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:log:Project
properties:
projectName: ${name}
defaultWorkspace:
type: alicloud:cms:Workspace
name: default
properties:
workspaceName: ${name}
slsProject: ${default.projectName}
📚 Need more examples? VIEW MORE EXAMPLES
Create Workspace Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Workspace(name: string, args: WorkspaceArgs, opts?: CustomResourceOptions);@overload
def Workspace(resource_name: str,
args: WorkspaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Workspace(resource_name: str,
opts: Optional[ResourceOptions] = None,
sls_project: Optional[str] = None,
workspace_name: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None)func NewWorkspace(ctx *Context, name string, args WorkspaceArgs, opts ...ResourceOption) (*Workspace, error)public Workspace(string name, WorkspaceArgs args, CustomResourceOptions? opts = null)
public Workspace(String name, WorkspaceArgs args)
public Workspace(String name, WorkspaceArgs args, CustomResourceOptions options)
type: alicloud:cms:Workspace
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 WorkspaceArgs
- 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 WorkspaceArgs
- 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 WorkspaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceArgs
- 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 workspaceResource = new AliCloud.Cms.Workspace("workspaceResource", new()
{
SlsProject = "string",
WorkspaceName = "string",
Description = "string",
DisplayName = "string",
});
example, err := cms.NewWorkspace(ctx, "workspaceResource", &cms.WorkspaceArgs{
SlsProject: pulumi.String("string"),
WorkspaceName: pulumi.String("string"),
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
})
var workspaceResource = new Workspace("workspaceResource", WorkspaceArgs.builder()
.slsProject("string")
.workspaceName("string")
.description("string")
.displayName("string")
.build());
workspace_resource = alicloud.cms.Workspace("workspaceResource",
sls_project="string",
workspace_name="string",
description="string",
display_name="string")
const workspaceResource = new alicloud.cms.Workspace("workspaceResource", {
slsProject: "string",
workspaceName: "string",
description: "string",
displayName: "string",
});
type: alicloud:cms:Workspace
properties:
description: string
displayName: string
slsProject: string
workspaceName: string
Workspace 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 Workspace resource accepts the following input properties:
- Sls
Project string - The project bind to workspace.
- Workspace
Name string - The name of the workspace.
- Description string
- The description of the workspace.
- Display
Name string - The dispalyName of the workspace.
- Sls
Project string - The project bind to workspace.
- Workspace
Name string - The name of the workspace.
- Description string
- The description of the workspace.
- Display
Name string - The dispalyName of the workspace.
- sls
Project String - The project bind to workspace.
- workspace
Name String - The name of the workspace.
- description String
- The description of the workspace.
- display
Name String - The dispalyName of the workspace.
- sls
Project string - The project bind to workspace.
- workspace
Name string - The name of the workspace.
- description string
- The description of the workspace.
- display
Name string - The dispalyName of the workspace.
- sls_
project str - The project bind to workspace.
- workspace_
name str - The name of the workspace.
- description str
- The description of the workspace.
- display_
name str - The dispalyName of the workspace.
- sls
Project String - The project bind to workspace.
- workspace
Name String - The name of the workspace.
- description String
- The description of the workspace.
- display
Name String - The dispalyName of the workspace.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workspace resource produces the following output properties:
- Create
Time string - The creation time of the workspace.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - The region of the workspace.
- Create
Time string - The creation time of the workspace.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - The region of the workspace.
- create
Time String - The creation time of the workspace.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - The region of the workspace.
- create
Time string - The creation time of the workspace.
- id string
- The provider-assigned unique ID for this managed resource.
- region
Id string - The region of the workspace.
- create_
time str - The creation time of the workspace.
- id str
- The provider-assigned unique ID for this managed resource.
- region_
id str - The region of the workspace.
- create
Time String - The creation time of the workspace.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - The region of the workspace.
Look up Existing Workspace Resource
Get an existing Workspace 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?: WorkspaceState, opts?: CustomResourceOptions): Workspace@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
region_id: Optional[str] = None,
sls_project: Optional[str] = None,
workspace_name: Optional[str] = None) -> Workspacefunc GetWorkspace(ctx *Context, name string, id IDInput, state *WorkspaceState, opts ...ResourceOption) (*Workspace, error)public static Workspace Get(string name, Input<string> id, WorkspaceState? state, CustomResourceOptions? opts = null)public static Workspace get(String name, Output<String> id, WorkspaceState state, CustomResourceOptions options)resources: _: type: alicloud:cms:Workspace 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.
- Create
Time string - The creation time of the workspace.
- Description string
- The description of the workspace.
- Display
Name string - The dispalyName of the workspace.
- Region
Id string - The region of the workspace.
- Sls
Project string - The project bind to workspace.
- Workspace
Name string - The name of the workspace.
- Create
Time string - The creation time of the workspace.
- Description string
- The description of the workspace.
- Display
Name string - The dispalyName of the workspace.
- Region
Id string - The region of the workspace.
- Sls
Project string - The project bind to workspace.
- Workspace
Name string - The name of the workspace.
- create
Time String - The creation time of the workspace.
- description String
- The description of the workspace.
- display
Name String - The dispalyName of the workspace.
- region
Id String - The region of the workspace.
- sls
Project String - The project bind to workspace.
- workspace
Name String - The name of the workspace.
- create
Time string - The creation time of the workspace.
- description string
- The description of the workspace.
- display
Name string - The dispalyName of the workspace.
- region
Id string - The region of the workspace.
- sls
Project string - The project bind to workspace.
- workspace
Name string - The name of the workspace.
- create_
time str - The creation time of the workspace.
- description str
- The description of the workspace.
- display_
name str - The dispalyName of the workspace.
- region_
id str - The region of the workspace.
- sls_
project str - The project bind to workspace.
- workspace_
name str - The name of the workspace.
- create
Time String - The creation time of the workspace.
- description String
- The description of the workspace.
- display
Name String - The dispalyName of the workspace.
- region
Id String - The region of the workspace.
- sls
Project String - The project bind to workspace.
- workspace
Name String - The name of the workspace.
Import
Cms Workspace can be imported using the id, e.g.
$ pulumi import alicloud:cms/workspace:Workspace example <workspace_name>
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
alicloudTerraform Provider.
published on Tuesday, Apr 28, 2026 by Pulumi
