All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::PAI::WorkspaceResource

更新時間:Jul 06, 2026

The ALIYUN::PAI::WorkspaceResource type creates a workspace resource.

Syntax

{
  "Type": "ALIYUN::PAI::WorkspaceResource",
  "Properties": {
    "EnvType": String,
    "ResourceType": String,
    "WorkspaceResourceName": String,
    "WorkspaceId": String,
    "GroupName": String,
    "IsDefault": Boolean,
    "Spec": Map
  }
}

Properties

Parameter

Type

Required

Update allowed

Description

Constraints

EnvType

String

Yes

No

The environment type.

Valid values:

  • dev: Development environment.

  • prod: Production environment.

ResourceType

String

Yes

No

The resource type.

Valid values:

  • MaxCompute

  • ECS

  • Lingjun

  • ACS

  • FLINK

WorkspaceId

String

Yes

No

The ID of the workspace to which the resource belongs.

None

WorkspaceResourceName

String

Yes

No

The resource name.

None

GroupName

String

No

No

The resource group name.

None

IsDefault

Boolean

No

No

Indicates whether the resource is the default resource.

Each resource type can have only one default resource. Valid values:

- true: The resource is the default.

- false: The resource is not the default.

Spec

Map

No

Yes

The resource configuration.

This parameter is required for public DLC resource groups. The value must be {"clusterType": "share"}.

Return values

Fn::GetAtt

  • GroupName: The resource group name. To obtain a list of available names, see [ListResources]( 449143 ).

  • IsDefault: Indicates whether this is the default resource for its type. Each resource type can have only one default resource.

  • ResourceId: The resource ID.

  • WorkspaceResourceName: The resource name.

  • CreateTime: The time when the resource was created. The time is in UTC and follows the ISO 8601 format.

  • WorkspaceId: The ID of the workspace to which the resource belongs.

  • ResourceType: The resource type.

  • Spec: The resource configuration.

  • EnvType: The environment type.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceType:
    Type: String
    Description:
      en: 'The resource type. Valid values: MaxCompute, ECS, Lingjun, ACS, and FLINK.'
    AllowedValues:
      - MaxCompute
      - ECS
      - Lingjun
      - ACS
      - FLINK
    Required: true
  EnvType:
    Type: String
    Description:
      en: 'The environment type. Valid values are `dev` (development) and `prod` (production).'
    AllowedValues:
      - dev
      - prod
    Required: true
  WorkspaceResourceName:
    Type: String
    Description:
      en: The resource name.
    Required: true
  GroupName:
    Type: String
    Description:
      en: 'The resource group name. To obtain a list of available names, see [ListResources](~~ 449143 ~~).'
    Default: Null
    Required: false
  WorkspaceId:
    Type: String
    Description:
      en: The ID of the workspace to which the resource belongs.
    Required: true
  Spec:
    Description:
      en: 'The resource configuration. This parameter is required for public DLC resource groups and must be set to `{"clusterType": "share"}`.'
    Required: false
    Default: Null
    Type: Json
  IsDefault:
    Type: Boolean
    Description:
      en: Specifies whether this is the default resource for its type. Each resource type can have only one default resource.
    Default: Null
    Required: false
Resources:
  ExtensionResource:
    Type: ALIYUN::PAI::WorkspaceResource
    Properties:
      ResourceType:
        Ref: ResourceType
      EnvType:
        Ref: EnvType
      WorkspaceResourceName:
        Ref: WorkspaceResourceName
      GroupName:
        Ref: GroupName
      WorkspaceId:
        Ref: WorkspaceId
      Spec:
        Ref: Spec
      IsDefault:
        Ref: IsDefault
Outputs:
  ResourceType:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceType
    Description: The resource type.
  ResourceId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceId
    Description: The resource ID.
  EnvType:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvType
    Description: The environment type.
  Spec:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Spec
    Description: The resource configuration.
  GroupName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GroupName
    Description: 'The resource group name. To obtain a list of available names, see [ListResources](~~ 449143 ~~).'
  WorkspaceId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - WorkspaceId
    Description: The ID of the workspace to which the resource belongs.
  WorkspaceResourceName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - WorkspaceResourceName
    Description: The resource name.
  CreateTime:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
    Description: The resource creation time, in UTC and ISO 8601 format.
  IsDefault:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - IsDefault
    Description: Indicates whether this is the default resource for its type. Each resource type can have only one default resource.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceType": {
      "Type": "String",
      "Description": {
        "en": "The resource type. Valid values: MaxCompute, ECS, Lingjun, ACS, and FLINK."
      },
      "AllowedValues": [
        "MaxCompute",
        "ECS",
        "Lingjun",
        "ACS",
        "FLINK"
      ],
      "Required": true
    },
    "EnvType": {
      "Type": "String",
      "Description": {
        "en": "The environment type. Valid values are `dev` (development) and `prod` (production)."
      },
      "AllowedValues": [
        "dev",
        "prod"
      ],
      "Required": true
    },
    "WorkspaceResourceName": {
      "Type": "String",
      "Description": {
        "en": "The resource name."
      },
      "Required": true
    },
    "GroupName": {
      "Type": "String",
      "Description": {
        "en": "The resource group name. To obtain a list of available names, see [ListResources](~~ 449143 ~~)."
      },
      "Default": null,
      "Required": false
    },
    "WorkspaceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the workspace to which the resource belongs."
      },
      "Required": true
    },
    "Spec": {
      "Description": {
        "en": "The resource configuration. This parameter is required for public DLC resource groups and must be set to `{\"clusterType\": \"share\"}`."
      },
      "Required": false,
      "Default": null,
      "Type": "Json"
    },
    "IsDefault": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether this is the default resource for its type. Each resource type can have only one default resource."
      },
      "Default": null,
      "Required": false
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::PAI::WorkspaceResource",
      "Properties": {
        "ResourceType": {
          "Ref": "ResourceType"
        },
        "EnvType": {
          "Ref": "EnvType"
        },
        "WorkspaceResourceName": {
          "Ref": "WorkspaceResourceName"
        },
        "GroupName": {
          "Ref": "GroupName"
        },
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        },
        "Spec": {
          "Ref": "Spec"
        },
        "IsDefault": {
          "Ref": "IsDefault"
        }
      }
    }
  },
  "Outputs": {
    "ResourceType": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceType"
        ]
      },
      "Description": "The resource type."
    },
    "ResourceId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceId"
        ]
      },
      "Description": "The resource ID."
    },
    "EnvType": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvType"
        ]
      },
      "Description": "The environment type."
    },
    "Spec": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Spec"
        ]
      },
      "Description": "The resource configuration."
    },
    "GroupName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GroupName"
        ]
      },
      "Description": "The resource group name. To obtain a list of available names, see [ListResources](~~ 449143 ~~)."
    },
    "WorkspaceId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "WorkspaceId"
        ]
      },
      "Description": "The ID of the workspace to which the resource belongs."
    },
    "WorkspaceResourceName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "WorkspaceResourceName"
        ]
      },
      "Description": "The resource name."
    },
    "CreateTime": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      },
      "Description": "The resource creation time, in UTC and ISO 8601 format."
    },
    "IsDefault": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "IsDefault"
        ]
      },
      "Description": "Indicates whether this is the default resource for its type. Each resource type can have only one default resource."
    }
  }
}