ALIYUN::PAI::Workspace类型用于创建工作空间。
语法
{
"Type": "ALIYUN::PAI::Workspace",
"Properties": {
"Description": String,
"DisplayName": String,
"WorkspaceName": String,
"EnvTypes": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Description | String | 是 | 是 | 工作空间描述。 | 不超过80个字符。 |
DisplayName | String | 否 | 是 | 显示名称。 | 建议基于业务属性命名,便于标识工作空间用途。如果不配置,默认为工作空间名称。 格式如下:
|
WorkspaceName | String | 是 | 否 | 工作空间名称。 | 格式如下:
|
EnvTypes | List | 是 | 否 | 工作空间包含的环境。 | 取值:
示例:
|
返回值
Fn::GetAtt
Owner:工作区所有者ID。
Description:工作空间描述,不超过80个字符。
AdminNames:管理员账户名称列表。
DisplayName:显示名称。
WorkspaceId:工作空间ID。
WorkspaceName:工作空间名称。
ExtraInfos:附加信息,当前包括TenantId(租户ID)。
Creator:创建者的用户ID。
Users:用户列表。
EnvTypes:工作空间包含的环境。
示例
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DisplayName:
AllowedPattern: ^[a-zA-Z][_a-zA-Z0-9]{2,22}$
Description: '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. 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.'
Type: String
EnvTypes:
Description: 'Environments contained in the workspace:
- Simple mode only production environment (prod).
- Standard mode includes development environment (dev) and production environment
(prod).'
Type: Json
WorkspaceName:
AllowedPattern: ^[a-zA-Z][_a-zA-Z0-9]{2,22}$
Description: '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.'
Type: String
Resources:
ExtensionResource:
Properties:
DisplayName:
Ref: DisplayName
EnvTypes:
Ref: EnvTypes
WorkspaceName:
Ref: WorkspaceName
Type: ALIYUN::PAI::Workspace
Outputs:
AdminNames:
Description: List of administrator account names.
Value:
Fn::GetAtt:
- ExtensionResource
- AdminNames
Creator:
Description: The user ID of the creator.
Value:
Fn::GetAtt:
- ExtensionResource
- Creator
Description:
Description: Workspace description, no more than 80 characters.
Value:
Fn::GetAtt:
- ExtensionResource
- Description
DisplayName:
Description: 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.
Value:
Fn::GetAtt:
- ExtensionResource
- DisplayName
EnvTypes:
Description: Environments contained in the workspace:.
Value:
Fn::GetAtt:
- ExtensionResource
- EnvTypes
ExtraInfos:
Description: Additional information, currently including TenantId (tenant ID).
Value:
Fn::GetAtt:
- ExtensionResource
- ExtraInfos
Owner:
Description: Workspace owner ID, displayed when Verbose is true.
Value:
Fn::GetAtt:
- ExtensionResource
- Owner
Users:
Description: List of users.
Value:
Fn::GetAtt:
- ExtensionResource
- Users
WorkspaceId:
Description: The ID of the workspace.
Value:
Fn::GetAtt:
- ExtensionResource
- WorkspaceId
WorkspaceName:
Description: The workspace name.
Value:
Fn::GetAtt:
- ExtensionResource
- WorkspaceName
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DisplayName": {
"Type": "String",
"Description": "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. The format is as follows:\n- 3 to 23 characters in length and can contain letters, underscores, or numbers.\n- Must start with a large or small letter.\n- Unique in the current region.",
"AllowedPattern": "^[a-zA-Z][_a-zA-Z0-9]{2,22}$"
},
"WorkspaceName": {
"Type": "String",
"Description": "The workspace name. The format is as follows:\n- 3 to 23 characters in length and can contain letters, underscores, or numbers.\n- Must start with a large or small letter.\n- Unique in the current region.",
"AllowedPattern": "^[a-zA-Z][_a-zA-Z0-9]{2,22}$"
},
"EnvTypes": {
"Type": "Json",
"Description": "Environments contained in the workspace:\n- Simple mode only production environment (prod).\n- Standard mode includes development environment (dev) and production environment (prod)."
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::PAI::Workspace",
"Properties": {
"DisplayName": {
"Ref": "DisplayName"
},
"WorkspaceName": {
"Ref": "WorkspaceName"
},
"EnvTypes": {
"Ref": "EnvTypes"
}
}
}
},
"Outputs": {
"Owner": {
"Description": "Workspace owner ID, displayed when Verbose is true.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Owner"
]
}
},
"Description": {
"Description": "Workspace description, no more than 80 characters.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Description"
]
}
},
"AdminNames": {
"Description": "List of administrator account names.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AdminNames"
]
}
},
"DisplayName": {
"Description": "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.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DisplayName"
]
}
},
"WorkspaceId": {
"Description": "The ID of the workspace.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"WorkspaceId"
]
}
},
"WorkspaceName": {
"Description": "The workspace name.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"WorkspaceName"
]
}
},
"ExtraInfos": {
"Description": "Additional information, currently including TenantId (tenant ID).",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ExtraInfos"
]
}
},
"Creator": {
"Description": "The user ID of the creator.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Creator"
]
}
},
"Users": {
"Description": "List of users.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Users"
]
}
},
"EnvTypes": {
"Description": "Environments contained in the workspace:.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvTypes"
]
}
}
}
}