1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. pai
  5. WorkspaceModel
Alibaba Cloud v3.79.0 published on Friday, May 30, 2025 by Pulumi

alicloud.pai.WorkspaceModel

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.79.0 published on Friday, May 30, 2025 by Pulumi

    Provides a PAI Workspace Model resource.

    For information about PAI Workspace Model and how to use it, see What is Model.

    NOTE: Available since v1.249.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 defaultENuC6u = new alicloud.pai.WorkspaceWorkspace("defaultENuC6u", {
        description: "156",
        displayName: name,
        workspaceName: `${name}_${_default.result}`,
        envTypes: ["prod"],
    });
    const defaultWorkspaceModel = new alicloud.pai.WorkspaceModel("default", {
        origin: "Civitai",
        task: "text-to-image-synthesis",
        modelName: name,
        accessibility: "PRIVATE",
        workspaceId: defaultENuC6u.id,
        modelType: "Checkpoint",
        labels: [{
            key: "base_model",
            value: "SD 1.5",
        }],
        orderNumber: 1,
        extraInfo: {
            test: "15",
        },
        modelDescription: "ModelDescription.",
        modelDoc: "https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors",
        domain: "aigc",
    });
    
    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)
    default_e_nu_c6u = alicloud.pai.WorkspaceWorkspace("defaultENuC6u",
        description="156",
        display_name=name,
        workspace_name=f"{name}_{default['result']}",
        env_types=["prod"])
    default_workspace_model = alicloud.pai.WorkspaceModel("default",
        origin="Civitai",
        task="text-to-image-synthesis",
        model_name=name,
        accessibility="PRIVATE",
        workspace_id=default_e_nu_c6u.id,
        model_type="Checkpoint",
        labels=[{
            "key": "base_model",
            "value": "SD 1.5",
        }],
        order_number=1,
        extra_info={
            "test": "15",
        },
        model_description="ModelDescription.",
        model_doc="https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors",
        domain="aigc")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pai"
    	"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
    		}
    		defaultENuC6u, err := pai.NewWorkspaceWorkspace(ctx, "defaultENuC6u", &pai.WorkspaceWorkspaceArgs{
    			Description:   pulumi.String("156"),
    			DisplayName:   pulumi.String(name),
    			WorkspaceName: pulumi.Sprintf("%v_%v", name, _default.Result),
    			EnvTypes: pulumi.StringArray{
    				pulumi.String("prod"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = pai.NewWorkspaceModel(ctx, "default", &pai.WorkspaceModelArgs{
    			Origin:        pulumi.String("Civitai"),
    			Task:          pulumi.String("text-to-image-synthesis"),
    			ModelName:     pulumi.String(name),
    			Accessibility: pulumi.String("PRIVATE"),
    			WorkspaceId:   defaultENuC6u.ID(),
    			ModelType:     pulumi.String("Checkpoint"),
    			Labels: pai.WorkspaceModelLabelArray{
    				&pai.WorkspaceModelLabelArgs{
    					Key:   pulumi.String("base_model"),
    					Value: pulumi.String("SD 1.5"),
    				},
    			},
    			OrderNumber: pulumi.Int(1),
    			ExtraInfo: pulumi.StringMap{
    				"test": pulumi.String("15"),
    			},
    			ModelDescription: pulumi.String("ModelDescription."),
    			ModelDoc:         pulumi.String("https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors"),
    			Domain:           pulumi.String("aigc"),
    		})
    		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 defaultENuC6u = new AliCloud.Pai.WorkspaceWorkspace("defaultENuC6u", new()
        {
            Description = "156",
            DisplayName = name,
            WorkspaceName = $"{name}_{@default.Result}",
            EnvTypes = new[]
            {
                "prod",
            },
        });
    
        var defaultWorkspaceModel = new AliCloud.Pai.WorkspaceModel("default", new()
        {
            Origin = "Civitai",
            Task = "text-to-image-synthesis",
            ModelName = name,
            Accessibility = "PRIVATE",
            WorkspaceId = defaultENuC6u.Id,
            ModelType = "Checkpoint",
            Labels = new[]
            {
                new AliCloud.Pai.Inputs.WorkspaceModelLabelArgs
                {
                    Key = "base_model",
                    Value = "SD 1.5",
                },
            },
            OrderNumber = 1,
            ExtraInfo = 
            {
                { "test", "15" },
            },
            ModelDescription = "ModelDescription.",
            ModelDoc = "https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors",
            Domain = "aigc",
        });
    
    });
    
    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.pai.WorkspaceWorkspace;
    import com.pulumi.alicloud.pai.WorkspaceWorkspaceArgs;
    import com.pulumi.alicloud.pai.WorkspaceModel;
    import com.pulumi.alicloud.pai.WorkspaceModelArgs;
    import com.pulumi.alicloud.pai.inputs.WorkspaceModelLabelArgs;
    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 defaultENuC6u = new WorkspaceWorkspace("defaultENuC6u", WorkspaceWorkspaceArgs.builder()
                .description("156")
                .displayName(name)
                .workspaceName(String.format("%s_%s", name,default_.result()))
                .envTypes("prod")
                .build());
    
            var defaultWorkspaceModel = new WorkspaceModel("defaultWorkspaceModel", WorkspaceModelArgs.builder()
                .origin("Civitai")
                .task("text-to-image-synthesis")
                .modelName(name)
                .accessibility("PRIVATE")
                .workspaceId(defaultENuC6u.id())
                .modelType("Checkpoint")
                .labels(WorkspaceModelLabelArgs.builder()
                    .key("base_model")
                    .value("SD 1.5")
                    .build())
                .orderNumber(1)
                .extraInfo(Map.of("test", "15"))
                .modelDescription("ModelDescription.")
                .modelDoc("https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors")
                .domain("aigc")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform_example
    resources:
      default:
        type: random:integer
        properties:
          min: 10000
          max: 99999
      defaultENuC6u:
        type: alicloud:pai:WorkspaceWorkspace
        properties:
          description: '156'
          displayName: ${name}
          workspaceName: ${name}_${default.result}
          envTypes:
            - prod
      defaultWorkspaceModel:
        type: alicloud:pai:WorkspaceModel
        name: default
        properties:
          origin: Civitai
          task: text-to-image-synthesis
          modelName: ${name}
          accessibility: PRIVATE
          workspaceId: ${defaultENuC6u.id}
          modelType: Checkpoint
          labels:
            - key: base_model
              value: SD 1.5
          orderNumber: '1'
          extraInfo:
            test: '15'
          modelDescription: ModelDescription.
          modelDoc: https://eas-***.oss-cn-hangzhou.aliyuncs.com/s**.safetensors
          domain: aigc
    

    Create WorkspaceModel Resource

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

    Constructor syntax

    new WorkspaceModel(name: string, args: WorkspaceModelArgs, opts?: CustomResourceOptions);
    @overload
    def WorkspaceModel(resource_name: str,
                       args: WorkspaceModelArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkspaceModel(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       model_name: Optional[str] = None,
                       accessibility: Optional[str] = None,
                       domain: Optional[str] = None,
                       extra_info: Optional[Mapping[str, str]] = None,
                       labels: Optional[Sequence[WorkspaceModelLabelArgs]] = None,
                       model_description: Optional[str] = None,
                       model_doc: Optional[str] = None,
                       model_type: Optional[str] = None,
                       order_number: Optional[int] = None,
                       origin: Optional[str] = None,
                       task: Optional[str] = None,
                       workspace_id: Optional[str] = None)
    func NewWorkspaceModel(ctx *Context, name string, args WorkspaceModelArgs, opts ...ResourceOption) (*WorkspaceModel, error)
    public WorkspaceModel(string name, WorkspaceModelArgs args, CustomResourceOptions? opts = null)
    public WorkspaceModel(String name, WorkspaceModelArgs args)
    public WorkspaceModel(String name, WorkspaceModelArgs args, CustomResourceOptions options)
    
    type: alicloud:pai:WorkspaceModel
    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 WorkspaceModelArgs
    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 WorkspaceModelArgs
    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 WorkspaceModelArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkspaceModelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkspaceModelArgs
    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 workspaceModelResource = new AliCloud.Pai.WorkspaceModel("workspaceModelResource", new()
    {
        ModelName = "string",
        Accessibility = "string",
        Domain = "string",
        ExtraInfo = 
        {
            { "string", "string" },
        },
        Labels = new[]
        {
            new AliCloud.Pai.Inputs.WorkspaceModelLabelArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        ModelDescription = "string",
        ModelDoc = "string",
        ModelType = "string",
        OrderNumber = 0,
        Origin = "string",
        Task = "string",
        WorkspaceId = "string",
    });
    
    example, err := pai.NewWorkspaceModel(ctx, "workspaceModelResource", &pai.WorkspaceModelArgs{
    	ModelName:     pulumi.String("string"),
    	Accessibility: pulumi.String("string"),
    	Domain:        pulumi.String("string"),
    	ExtraInfo: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Labels: pai.WorkspaceModelLabelArray{
    		&pai.WorkspaceModelLabelArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	ModelDescription: pulumi.String("string"),
    	ModelDoc:         pulumi.String("string"),
    	ModelType:        pulumi.String("string"),
    	OrderNumber:      pulumi.Int(0),
    	Origin:           pulumi.String("string"),
    	Task:             pulumi.String("string"),
    	WorkspaceId:      pulumi.String("string"),
    })
    
    var workspaceModelResource = new WorkspaceModel("workspaceModelResource", WorkspaceModelArgs.builder()
        .modelName("string")
        .accessibility("string")
        .domain("string")
        .extraInfo(Map.of("string", "string"))
        .labels(WorkspaceModelLabelArgs.builder()
            .key("string")
            .value("string")
            .build())
        .modelDescription("string")
        .modelDoc("string")
        .modelType("string")
        .orderNumber(0)
        .origin("string")
        .task("string")
        .workspaceId("string")
        .build());
    
    workspace_model_resource = alicloud.pai.WorkspaceModel("workspaceModelResource",
        model_name="string",
        accessibility="string",
        domain="string",
        extra_info={
            "string": "string",
        },
        labels=[{
            "key": "string",
            "value": "string",
        }],
        model_description="string",
        model_doc="string",
        model_type="string",
        order_number=0,
        origin="string",
        task="string",
        workspace_id="string")
    
    const workspaceModelResource = new alicloud.pai.WorkspaceModel("workspaceModelResource", {
        modelName: "string",
        accessibility: "string",
        domain: "string",
        extraInfo: {
            string: "string",
        },
        labels: [{
            key: "string",
            value: "string",
        }],
        modelDescription: "string",
        modelDoc: "string",
        modelType: "string",
        orderNumber: 0,
        origin: "string",
        task: "string",
        workspaceId: "string",
    });
    
    type: alicloud:pai:WorkspaceModel
    properties:
        accessibility: string
        domain: string
        extraInfo:
            string: string
        labels:
            - key: string
              value: string
        modelDescription: string
        modelDoc: string
        modelName: string
        modelType: string
        orderNumber: 0
        origin: string
        task: string
        workspaceId: string
    

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

    ModelName string
    The name of the model. The name must be 1 to 127 characters in length.
    Accessibility string
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    Domain string
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    ExtraInfo Dictionary<string, string>
    Other information about the model.
    Labels List<Pulumi.AliCloud.Pai.Inputs.WorkspaceModelLabel>
    A list of tags. See labels below.
    ModelDescription string
    The model description, used to distinguish different models.
    ModelDoc string
    The documentation of the model.
    ModelType string
    The model type. Example: Checkpoint or LoRA.
    OrderNumber int
    The sequence number of the model. Can be used for custom sorting.
    Origin string
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    Task string
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    WorkspaceId string
    The ID of the workspace.
    ModelName string
    The name of the model. The name must be 1 to 127 characters in length.
    Accessibility string
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    Domain string
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    ExtraInfo map[string]string
    Other information about the model.
    Labels []WorkspaceModelLabelArgs
    A list of tags. See labels below.
    ModelDescription string
    The model description, used to distinguish different models.
    ModelDoc string
    The documentation of the model.
    ModelType string
    The model type. Example: Checkpoint or LoRA.
    OrderNumber int
    The sequence number of the model. Can be used for custom sorting.
    Origin string
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    Task string
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    WorkspaceId string
    The ID of the workspace.
    modelName String
    The name of the model. The name must be 1 to 127 characters in length.
    accessibility String
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    domain String
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    extraInfo Map<String,String>
    Other information about the model.
    labels List<WorkspaceModelLabel>
    A list of tags. See labels below.
    modelDescription String
    The model description, used to distinguish different models.
    modelDoc String
    The documentation of the model.
    modelType String
    The model type. Example: Checkpoint or LoRA.
    orderNumber Integer
    The sequence number of the model. Can be used for custom sorting.
    origin String
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    task String
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    workspaceId String
    The ID of the workspace.
    modelName string
    The name of the model. The name must be 1 to 127 characters in length.
    accessibility string
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    domain string
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    extraInfo {[key: string]: string}
    Other information about the model.
    labels WorkspaceModelLabel[]
    A list of tags. See labels below.
    modelDescription string
    The model description, used to distinguish different models.
    modelDoc string
    The documentation of the model.
    modelType string
    The model type. Example: Checkpoint or LoRA.
    orderNumber number
    The sequence number of the model. Can be used for custom sorting.
    origin string
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    task string
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    workspaceId string
    The ID of the workspace.
    model_name str
    The name of the model. The name must be 1 to 127 characters in length.
    accessibility str
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    domain str
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    extra_info Mapping[str, str]
    Other information about the model.
    labels Sequence[WorkspaceModelLabelArgs]
    A list of tags. See labels below.
    model_description str
    The model description, used to distinguish different models.
    model_doc str
    The documentation of the model.
    model_type str
    The model type. Example: Checkpoint or LoRA.
    order_number int
    The sequence number of the model. Can be used for custom sorting.
    origin str
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    task str
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    workspace_id str
    The ID of the workspace.
    modelName String
    The name of the model. The name must be 1 to 127 characters in length.
    accessibility String
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    domain String
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    extraInfo Map<String>
    Other information about the model.
    labels List<Property Map>
    A list of tags. See labels below.
    modelDescription String
    The model description, used to distinguish different models.
    modelDoc String
    The documentation of the model.
    modelType String
    The model type. Example: Checkpoint or LoRA.
    orderNumber Number
    The sequence number of the model. Can be used for custom sorting.
    origin String
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    task String
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    workspaceId String
    The ID of the workspace.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkspaceModel 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 WorkspaceModel Resource

    Get an existing WorkspaceModel 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?: WorkspaceModelState, opts?: CustomResourceOptions): WorkspaceModel
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accessibility: Optional[str] = None,
            domain: Optional[str] = None,
            extra_info: Optional[Mapping[str, str]] = None,
            labels: Optional[Sequence[WorkspaceModelLabelArgs]] = None,
            model_description: Optional[str] = None,
            model_doc: Optional[str] = None,
            model_name: Optional[str] = None,
            model_type: Optional[str] = None,
            order_number: Optional[int] = None,
            origin: Optional[str] = None,
            task: Optional[str] = None,
            workspace_id: Optional[str] = None) -> WorkspaceModel
    func GetWorkspaceModel(ctx *Context, name string, id IDInput, state *WorkspaceModelState, opts ...ResourceOption) (*WorkspaceModel, error)
    public static WorkspaceModel Get(string name, Input<string> id, WorkspaceModelState? state, CustomResourceOptions? opts = null)
    public static WorkspaceModel get(String name, Output<String> id, WorkspaceModelState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:pai:WorkspaceModel    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:
    Accessibility string
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    Domain string
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    ExtraInfo Dictionary<string, string>
    Other information about the model.
    Labels List<Pulumi.AliCloud.Pai.Inputs.WorkspaceModelLabel>
    A list of tags. See labels below.
    ModelDescription string
    The model description, used to distinguish different models.
    ModelDoc string
    The documentation of the model.
    ModelName string
    The name of the model. The name must be 1 to 127 characters in length.
    ModelType string
    The model type. Example: Checkpoint or LoRA.
    OrderNumber int
    The sequence number of the model. Can be used for custom sorting.
    Origin string
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    Task string
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    WorkspaceId string
    The ID of the workspace.
    Accessibility string
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    Domain string
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    ExtraInfo map[string]string
    Other information about the model.
    Labels []WorkspaceModelLabelArgs
    A list of tags. See labels below.
    ModelDescription string
    The model description, used to distinguish different models.
    ModelDoc string
    The documentation of the model.
    ModelName string
    The name of the model. The name must be 1 to 127 characters in length.
    ModelType string
    The model type. Example: Checkpoint or LoRA.
    OrderNumber int
    The sequence number of the model. Can be used for custom sorting.
    Origin string
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    Task string
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    WorkspaceId string
    The ID of the workspace.
    accessibility String
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    domain String
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    extraInfo Map<String,String>
    Other information about the model.
    labels List<WorkspaceModelLabel>
    A list of tags. See labels below.
    modelDescription String
    The model description, used to distinguish different models.
    modelDoc String
    The documentation of the model.
    modelName String
    The name of the model. The name must be 1 to 127 characters in length.
    modelType String
    The model type. Example: Checkpoint or LoRA.
    orderNumber Integer
    The sequence number of the model. Can be used for custom sorting.
    origin String
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    task String
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    workspaceId String
    The ID of the workspace.
    accessibility string
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    domain string
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    extraInfo {[key: string]: string}
    Other information about the model.
    labels WorkspaceModelLabel[]
    A list of tags. See labels below.
    modelDescription string
    The model description, used to distinguish different models.
    modelDoc string
    The documentation of the model.
    modelName string
    The name of the model. The name must be 1 to 127 characters in length.
    modelType string
    The model type. Example: Checkpoint or LoRA.
    orderNumber number
    The sequence number of the model. Can be used for custom sorting.
    origin string
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    task string
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    workspaceId string
    The ID of the workspace.
    accessibility str
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    domain str
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    extra_info Mapping[str, str]
    Other information about the model.
    labels Sequence[WorkspaceModelLabelArgs]
    A list of tags. See labels below.
    model_description str
    The model description, used to distinguish different models.
    model_doc str
    The documentation of the model.
    model_name str
    The name of the model. The name must be 1 to 127 characters in length.
    model_type str
    The model type. Example: Checkpoint or LoRA.
    order_number int
    The sequence number of the model. Can be used for custom sorting.
    origin str
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    task str
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    workspace_id str
    The ID of the workspace.
    accessibility String
    The visibility of the model in the workspace. Default value: PRIVATE. Valid values:

    • PRIVATE: In this workspace, it is only visible to you and the administrator.
    • PUBLIC: In this workspace, it is visible to everyone.
    domain String
    The domain of the model. Describe the domain in which the model solves the problem. For example: nlp (natural language processing), cv (computer vision), etc.
    extraInfo Map<String>
    Other information about the model.
    labels List<Property Map>
    A list of tags. See labels below.
    modelDescription String
    The model description, used to distinguish different models.
    modelDoc String
    The documentation of the model.
    modelName String
    The name of the model. The name must be 1 to 127 characters in length.
    modelType String
    The model type. Example: Checkpoint or LoRA.
    orderNumber Number
    The sequence number of the model. Can be used for custom sorting.
    origin String
    The source of the model. The community or organization to which the source model belongs, such as ModelScope or HuggingFace.
    task String
    The task of the model. Describes the specific problem that the model solves. Example: text-classification.
    workspaceId String
    The ID of the workspace.

    Supporting Types

    WorkspaceModelLabel, WorkspaceModelLabelArgs

    Key string
    label key
    Value string
    label value
    Key string
    label key
    Value string
    label value
    key String
    label key
    value String
    label value
    key string
    label key
    value string
    label value
    key str
    label key
    value str
    label value
    key String
    label key
    value String
    label value

    Import

    PAI Workspace Model can be imported using the id, e.g.

    $ pulumi import alicloud:pai/workspaceModel:WorkspaceModel 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.79.0 published on Friday, May 30, 2025 by Pulumi