Workspace Workspace
Provides a PAI Workspace Workspace resource. For information about PAI Workspace Workspace and how to use it, see What is Workspace.
NOTE: Available since v1.233.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.pai.WorkspaceWorkspace("default", {
description: name,
workspaceName: name,
displayName: name,
envTypes: ["prod"],
});
Content copied to clipboard
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform_example"
default = alicloud.pai.WorkspaceWorkspace("default",
description=name,
workspace_name=name,
display_name=name,
env_types=["prod"])
Content copied to clipboard
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.Pai.WorkspaceWorkspace("default", new()
{
Description = name,
WorkspaceName = name,
DisplayName = name,
EnvTypes = new[]
{
"prod",
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pai"
"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
}
_, err := pai.NewWorkspaceWorkspace(ctx, "default", &pai.WorkspaceWorkspaceArgs{
Description: pulumi.String(name),
WorkspaceName: pulumi.String(name),
DisplayName: pulumi.String(name),
EnvTypes: pulumi.StringArray{
pulumi.String("prod"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.pai.WorkspaceWorkspace;
import com.pulumi.alicloud.pai.WorkspaceWorkspaceArgs;
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 WorkspaceWorkspace("default", WorkspaceWorkspaceArgs.builder()
.description(name)
.workspaceName(name)
.displayName(name)
.envTypes("prod")
.build());
}
}
Content copied to clipboard
configuration:
name:
type: string
default: terraform_example
resources:
default:
type: alicloud:pai:WorkspaceWorkspace
properties:
description: ${name}
workspaceName: ${name}
displayName: ${name}
envTypes:
- prod
Content copied to clipboard
Import
PAI Workspace Workspace can be imported using the id, e.g.
$ pulumi import alicloud:pai/workspaceWorkspace:WorkspaceWorkspace example <id>
Content copied to clipboard
Properties
Link copied to clipboard
The UTC time when the workspace is created. The time format is ISO8601.
Link copied to clipboard
Workspace description, no more than 80 characters.
Link copied to clipboard
It is recommended that you name the workspace based on the business attribute to identify the purpose of the workspace. If not configured, the default value is the workspace name.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The workspace name. The format is as follows: