Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::PAI::Workspace

Última atualização: Jun 27, 2026

Cria um workspace do PAI.

Sintaxe

{
  "Type": "ALIYUN::PAI::Workspace",
  "Properties": {
    "Description": String,
    "DisplayName": String,
    "WorkspaceName": String,
    "EnvTypes": List
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

Description

String

Sim

Sim

Descrição do workspace.

A descrição pode ter no máximo 80 caracteres.

DisplayName

String

Não

Sim

Nome de exibição do workspace.

Recomendamos defina um nome de exibição conforme a finalidade do workspace. Caso esta propriedade fique vazia, o sistema usará o nome do workspace.

O nome deve atender aos seguintes requisitos de formato:

  • Ter entre 3 e 23 caracteres, podendo conter letras, sublinhados (_) e dígitos.

  • Começar com uma letra.

  • Ser único na região atual.

WorkspaceName

String

Sim

Não

Nome do workspace.

O nome deve atender aos seguintes requisitos de formato:

  • Ter entre 3 e 23 caracteres, podendo conter letras, sublinhados (_) e dígitos.

  • Começar com uma letra.

  • Ser único na região atual.

EnvTypes

List

Sim

Não

Ambientes do workspace.

Valores válidos: prod e dev. O valor prod indica o ambiente de produção, enquanto dev indica o ambiente de desenvolvimento.

  • Workspaces no modo básico operam apenas no ambiente de produção.

  • Workspaces no modo padrão operam nos ambientes de desenvolvimento e produção.

Exemplo:

["dev", "prod"]

Valores de retorno

Fn::GetAtt

  • Owner: ID do proprietário do workspace.

  • Description: descrição do workspace, com limite de 80 caracteres.

  • AdminNames: nomes das contas de administrador.

  • DisplayName: nome de exibição do workspace.

  • WorkspaceId: ID do workspace.

  • WorkspaceName: nome do workspace.

  • ExtraInfos: informações adicionais, incluindo TenantId (ID do tenant).

  • Creator: ID de usuário do criador.

  • Users: usuários associados.

  • EnvTypes: ambientes do workspace.

Exemplos

YAML format

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 format

{
  "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"
        ]
      }
    }
  }
}