alicloud.pai.WorkspaceWorkspace
Explore with Pulumi AI
Provides a P A I Workspace Workspace resource.
For information about P A I 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"],
});
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"])
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
})
}
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",
},
});
});
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());
}
}
configuration:
name:
type: string
default: terraform_example
resources:
default:
type: alicloud:pai:WorkspaceWorkspace
properties:
description: ${name}
workspaceName: ${name}
displayName: ${name}
envTypes:
- prod
Create WorkspaceWorkspace Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkspaceWorkspace(name: string, args: WorkspaceWorkspaceArgs, opts?: CustomResourceOptions);
@overload
def WorkspaceWorkspace(resource_name: str,
args: WorkspaceWorkspaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkspaceWorkspace(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
env_types: Optional[Sequence[str]] = None,
workspace_name: Optional[str] = None,
display_name: Optional[str] = None)
func NewWorkspaceWorkspace(ctx *Context, name string, args WorkspaceWorkspaceArgs, opts ...ResourceOption) (*WorkspaceWorkspace, error)
public WorkspaceWorkspace(string name, WorkspaceWorkspaceArgs args, CustomResourceOptions? opts = null)
public WorkspaceWorkspace(String name, WorkspaceWorkspaceArgs args)
public WorkspaceWorkspace(String name, WorkspaceWorkspaceArgs args, CustomResourceOptions options)
type: alicloud:pai:WorkspaceWorkspace
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 WorkspaceWorkspaceArgs
- 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 WorkspaceWorkspaceArgs
- 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 WorkspaceWorkspaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceWorkspaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceWorkspaceArgs
- 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 workspaceWorkspaceResource = new AliCloud.Pai.WorkspaceWorkspace("workspaceWorkspaceResource", new()
{
Description = "string",
EnvTypes = new[]
{
"string",
},
WorkspaceName = "string",
DisplayName = "string",
});
example, err := pai.NewWorkspaceWorkspace(ctx, "workspaceWorkspaceResource", &pai.WorkspaceWorkspaceArgs{
Description: pulumi.String("string"),
EnvTypes: pulumi.StringArray{
pulumi.String("string"),
},
WorkspaceName: pulumi.String("string"),
DisplayName: pulumi.String("string"),
})
var workspaceWorkspaceResource = new WorkspaceWorkspace("workspaceWorkspaceResource", WorkspaceWorkspaceArgs.builder()
.description("string")
.envTypes("string")
.workspaceName("string")
.displayName("string")
.build());
workspace_workspace_resource = alicloud.pai.WorkspaceWorkspace("workspaceWorkspaceResource",
description="string",
env_types=["string"],
workspace_name="string",
display_name="string")
const workspaceWorkspaceResource = new alicloud.pai.WorkspaceWorkspace("workspaceWorkspaceResource", {
description: "string",
envTypes: ["string"],
workspaceName: "string",
displayName: "string",
});
type: alicloud:pai:WorkspaceWorkspace
properties:
description: string
displayName: string
envTypes:
- string
workspaceName: string
WorkspaceWorkspace 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 WorkspaceWorkspace resource accepts the following input properties:
- Description string
- Workspace description, no more than 80 characters.
- Env
Types List<string> - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- Workspace
Name string - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- Display
Name string - 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.
- Description string
- Workspace description, no more than 80 characters.
- Env
Types []string - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- Workspace
Name string - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- Display
Name string - 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.
- description String
- Workspace description, no more than 80 characters.
- env
Types List<String> - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- workspace
Name String - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- display
Name String - 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.
- description string
- Workspace description, no more than 80 characters.
- env
Types string[] - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- workspace
Name string - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- display
Name string - 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.
- description str
- Workspace description, no more than 80 characters.
- env_
types Sequence[str] - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- workspace_
name str - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- display_
name str - 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.
- description String
- Workspace description, no more than 80 characters.
- env
Types List<String> - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- workspace
Name String - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- display
Name String - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkspaceWorkspace resource produces the following output properties:
- Create
Time string - The UTC time when the workspace is created. The time format is ISO8601.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Workspace state, possible values:
- Create
Time string - The UTC time when the workspace is created. The time format is ISO8601.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- Workspace state, possible values:
- create
Time String - The UTC time when the workspace is created. The time format is ISO8601.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Workspace state, possible values:
- create
Time string - The UTC time when the workspace is created. The time format is ISO8601.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- Workspace state, possible values:
- create_
time str - The UTC time when the workspace is created. The time format is ISO8601.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- Workspace state, possible values:
- create
Time String - The UTC time when the workspace is created. The time format is ISO8601.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- Workspace state, possible values:
Look up Existing WorkspaceWorkspace Resource
Get an existing WorkspaceWorkspace 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?: WorkspaceWorkspaceState, opts?: CustomResourceOptions): WorkspaceWorkspace
@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,
env_types: Optional[Sequence[str]] = None,
status: Optional[str] = None,
workspace_name: Optional[str] = None) -> WorkspaceWorkspace
func GetWorkspaceWorkspace(ctx *Context, name string, id IDInput, state *WorkspaceWorkspaceState, opts ...ResourceOption) (*WorkspaceWorkspace, error)
public static WorkspaceWorkspace Get(string name, Input<string> id, WorkspaceWorkspaceState? state, CustomResourceOptions? opts = null)
public static WorkspaceWorkspace get(String name, Output<String> id, WorkspaceWorkspaceState 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.
- Create
Time string - The UTC time when the workspace is created. The time format is ISO8601.
- Description string
- Workspace description, no more than 80 characters.
- Display
Name string - 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.
- Env
Types List<string> - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- Status string
- Workspace state, possible values:
- Workspace
Name string - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- Create
Time string - The UTC time when the workspace is created. The time format is ISO8601.
- Description string
- Workspace description, no more than 80 characters.
- Display
Name string - 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.
- Env
Types []string - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- Status string
- Workspace state, possible values:
- Workspace
Name string - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- create
Time String - The UTC time when the workspace is created. The time format is ISO8601.
- description String
- Workspace description, no more than 80 characters.
- display
Name String - 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.
- env
Types List<String> - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- status String
- Workspace state, possible values:
- workspace
Name String - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- create
Time string - The UTC time when the workspace is created. The time format is ISO8601.
- description string
- Workspace description, no more than 80 characters.
- display
Name string - 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.
- env
Types string[] - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- status string
- Workspace state, possible values:
- workspace
Name string - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- create_
time str - The UTC time when the workspace is created. The time format is ISO8601.
- description str
- Workspace description, no more than 80 characters.
- display_
name str - 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.
- env_
types Sequence[str] - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- status str
- Workspace state, possible values:
- workspace_
name str - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
- create
Time String - The UTC time when the workspace is created. The time format is ISO8601.
- description String
- Workspace description, no more than 80 characters.
- display
Name String - 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.
- env
Types List<String> - Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment (prod).
- status String
- Workspace state, possible values:
- workspace
Name String - The workspace name. The format is as follows:
- 3 to 23 characters in length and can contain letters, underscores, or numbers.
- Must start with a large or small letter.
- Unique in the current region.
Import
P A I Workspace Workspace can be imported using the id, e.g.
$ pulumi import alicloud:pai/workspaceWorkspace:WorkspaceWorkspace 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.