Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::PAI::Dataset

Última atualização: Jun 27, 2026

Cria um dataset do PAI para gerenciar dados de machine learning.

Sintaxe

{
  "Type": "ALIYUN::PAI::Dataset",
  "Properties": {
    "Options": String,
    "Description": String,
    "Accessibility": String,
    "DatasetName": String,
    "SourceType": String,
    "SourceId": String,
    "DataSourceType": String,
    "WorkspaceId": String,
    "DataType": String,
    "Uri": String,
    "Property": String
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatório

Atualização permitida

Descrição

Restrições

Options

String

Não

Sim

Campo de extensão.

Ao usar o dataset com o DLC, defina mountPath como o caminho de montagem padrão. Exemplo:

{ "mountPath": "/mnt/data/" }

Description

String

Não

Sim

Descrição do recurso.

Dados usados para anotação.

Accessibility

String

Não

Sim

Visibilidade do dataset.

Valores válidos:

  • PRIVATE (padrão): visível apenas para você e para o administrador do workspace.

  • PUBLIC: visível para todos os usuários do workspace.

DatasetName

String

Sim

Sim

Nome do dataset.

Regras de nomenclatura:

  • Deve começar com uma letra, dígito ou caractere chinês.

  • Pode conter sublinhados (_) e hifens (-).

  • Comprimento: de 1 a 127 caracteres.

SourceType

String

Não

Não

Tipo da origem dos dados.

Valores válidos:

  • USER (padrão): dataset criado pelo usuário.

  • ITAG: plataforma de anotação iTag.

  • PAI_PUBLIC_DATASET: dataset público do PAI.

SourceId

String

Não

Não

ID da origem dos dados.

Valores:

  • Se SourceType for USER, especifique um valor personalizado.

  • Se SourceType for ITAG, defina como o ID da tarefa do iTag.

  • Se SourceType for PAI_PUBLIC_DATASET, deixe em branco.

DataSourceType

String

Sim

Não

Tipo da origem dos dados.

Valores válidos:

  • NAS: NAS da Alibaba Cloud.

  • OSS: Object Storage Service da Alibaba Cloud.

WorkspaceId

String

Sim

Não

ID do workspace.

Nenhuma

DataType

String

Não

Não

Tipo do dataset.

Valores válidos:

  • COMMON (padrão): uso geral.

  • PIC: imagem.

  • TEXT: texto.

  • VIDEO: vídeo.

  • AUDIO: áudio.

Uri

String

Sim

Não

URI dos dados.

Valores:

  • Para source de dados OSS: oss://bucket.endpoint/object

  • Para source de dados NAS:

    • NAS de uso geral: nas://<nasfisid>.region/subpath/to/dir/

    • Para CPFS 1.0:

      nas://<cpfs-fsid>.region/subpath/to/dir/

    • Para CPFS 2.0:

      nas://<cpfs-fsid>.region/<protocolserviceid>/

    Nota

    Formato fsid do CPFS 1.0: CPFS-<8 caracteres ASCII>. Formato fsid do CPFS 2.0: CPFS-<16 caracteres ASCII>.

Property

String

Sim

Não

Propriedade do dataset.

Valores válidos:

  • FILE: um arquivo.

  • DIRECTORY: um diretório.

Valores de retorno

Fn::GetAtt

  • Options: o campo de extensão.

  • Description: a descrição do dataset.

  • Accessibility: a visibilidade do dataset.

  • SourceId: o ID da source.

  • CreateTime: a hora de criação.

  • SourceType: o tipo da source.

  • WorkspaceId: o ID do workspace.

  • Uri: a URI dos dados.

  • GmtModifiedTime: a hora da última modificação.

  • DatasetId: o ID do dataset.

  • OwnerId: o ID da conta Alibaba Cloud.

  • DatasetName: o nome do dataset.

  • UserId: o ID do usuário.

  • DataSourceType: o tipo da source dos dados.

  • DataType: o tipo de dados.

  • Property: a propriedade do dataset.

Exemplos

YAML formato

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DataSourceType:
    AllowedValues:
    - OSS
    - NAS
    Description: 'The type of the data source. Valid values:
      - OSS: Alibaba Cloud Object Storage Service (OSS).
      - NAS: Alibaba Cloud NAS.'
    Type: String
  DatasetName:
    Description: 'The name of the dataset. The naming convention is as follows:
      - Must start with a lowercase letter, an uppercase letter, a digit, or a Chinese character.
      - Can contain underscores (_) or hyphens (-).
      - The length must be 1 to 127 characters.'
    Type: String
  Property:
    AllowedValues:
    - FILE
    - DIRECTORY
    Description: 'The property of the dataset. Valid values:
      - FILE: A file.
      - DIRECTORY: A directory.'
    Type: String
  Uri:
    Description: 'The URI configuration. The format varies based on the data source type. Examples:
      - If the data source type is OSS: ''oss://bucket.endpoint/object''
      - If the data source type is NAS:
      For a General-purpose NAS file system: ''nas://<nasfisid>.region/subpath/to/dir/''
      For CPFS 1.0: ''nas://<cpfs-fsid>.region/subpath/to/dir/''
      For CPFS 2.0: ''nas://<cpfs-fsid>.region/<protocolserviceid>/''
      Note: CPFS 1.0 and CPFS 2.0 are distinguished by the format of the fsid. The format for CPFS 1.0 is `CPFS-<8 ASCII characters>`. The format for CPFS 2.0 is `CPFS-<16 ASCII characters>`.'
    Type: String
  WorkspaceId:
    Description: 'The ID of the workspace where the dataset resides. For more information about how to obtain the workspace ID, see [ListWorkspaces](~~449124~~).
      If you do not specify this parameter, the default workspace is used. If the default workspace does not exist, an error is reported.'
    Type: String
Resources:
  ExtensionResource:
    Properties:
      DataSourceType:
        Ref: DataSourceType
      DatasetName:
        Ref: DatasetName
      Property:
        Ref: Property
      Uri:
        Ref: Uri
      WorkspaceId:
        Ref: WorkspaceId
    Type: ALIYUN::PAI::Dataset
Outputs:
  Accessibility:
    Description: The visibility of the workspace.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - Accessibility
  CreateTime:
    Description: The time when the resource was created.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - CreateTime
  DataSourceType:
    Description: The type of the data source.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - DataSourceType
  DataType:
    Description: The type of the dataset. The default value is COMMON.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - DataType
  DatasetId:
    Description: The ID of the resource.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - DatasetId
  DatasetName:
    Description: The name of the dataset.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - DatasetName
  Description:
    Description: The custom description of the dataset.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - Description
  GmtModifiedTime:
    Description: The time when the dataset was last updated.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - GmtModifiedTime
  Options:
    Description: The extension field, in the JSON string format.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - Options
  OwnerId:
    Description: The ID of the Alibaba Cloud account.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - OwnerId
  Property:
    Description: The property of the dataset.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - Property
  SourceId:
    Description: The ID of the data source.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - SourceId
  SourceType:
    Description: The type of the data source. The default value is USER.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - SourceType
  Uri:
    Description: The URI configuration.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - Uri
  UserId:
    Description: The ID of the user who owns the dataset.
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - UserId
  WorkspaceId:
    Description: 'The ID of the workspace where the dataset resides. For more information about how to obtain the workspace ID, see [ListWorkspaces](~~449124~~).'
    Value:
      Fn::GetAtt:
      - ExtensionResource
      - WorkspaceId

JSON formato

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DataSourceType": {
      "AllowedValues": [
        "OSS",
        "NAS"
      ],
      "Description": "The type of the data source. Valid values:\n- OSS: Alibaba Cloud Object Storage Service (OSS).\n- NAS: Alibaba Cloud NAS.",
      "Type": "String"
    },
    "DatasetName": {
      "Description": "The name of the dataset. The naming convention is as follows:\n- Must start with a lowercase letter, an uppercase letter, a digit, or a Chinese character.\n- Can contain underscores (_) or hyphens (-).\n- The length must be 1 to 127 characters.",
      "Type": "String"
    },
    "Property": {
      "AllowedValues": [
        "FILE",
        "DIRECTORY"
      ],
      "Description": "The property of the dataset. Valid values:\n- FILE: A file.\n- DIRECTORY: A directory.",
      "Type": "String"
    },
    "Uri": {
      "Description": "The URI configuration. The format varies based on the data source type. Examples:\n- If the data source type is OSS: 'oss://bucket.endpoint/object'\n- If the data source type is NAS:\nFor a General-purpose NAS file system: 'nas://<nasfisid>.region/subpath/to/dir/'\nFor CPFS 1.0: 'nas://<cpfs-fsid>.region/subpath/to/dir/'\nFor CPFS 2.0: 'nas://<cpfs-fsid>.region/<protocolserviceid>/'\nNote: CPFS 1.0 and CPFS 2.0 are distinguished by the format of the fsid. The format for CPFS 1.0 is `CPFS-<8 ASCII characters>`. The format for CPFS 2.0 is `CPFS-<16 ASCII characters>`.",
      "Type": "String"
    },
    "WorkspaceId": {
      "Description": "The ID of the workspace where the dataset resides. For more information about how to obtain the workspace ID, see [ListWorkspaces](~~449124~~).\nIf you do not specify this parameter, the default workspace is used. If the default workspace does not exist, an error is reported.",
      "Type": "String"
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Properties": {
        "DataSourceType": {
          "Ref": "DataSourceType"
        },
        "DatasetName": {
          "Ref": "DatasetName"
        },
        "Property": {
          "Ref": "Property"
        },
        "Uri": {
          "Ref": "Uri"
        },
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        }
      },
      "Type": "ALIYUN::PAI::Dataset"
    }
  },
  "Outputs": {
    "Accessibility": {
      "Description": "The visibility of the workspace.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Accessibility"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the resource was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "DataSourceType": {
      "Description": "The type of the data source.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DataSourceType"
        ]
      }
    },
    "DataType": {
      "Description": "The type of the dataset. The default value is COMMON.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DataType"
        ]
      }
    },
    "DatasetId": {
      "Description": "The ID of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DatasetId"
        ]
      }
    },
    "DatasetName": {
      "Description": "The name of the dataset.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DatasetName"
        ]
      }
    },
    "Description": {
      "Description": "The custom description of the dataset.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Description"
        ]
      }
    },
    "GmtModifiedTime": {
      "Description": "The time when the dataset was last updated.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GmtModifiedTime"
        ]
      }
    },
    "Options": {
      "Description": "The extension field, in the JSON string format.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Options"
        ]
      }
    },
    "OwnerId": {
      "Description": "The ID of the Alibaba Cloud account.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "OwnerId"
        ]
      }
    },
    "Property": {
      "Description": "The property of the dataset.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Property"
        ]
      }
    },
    "SourceId": {
      "Description": "The ID of the data source.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SourceId"
        ]
      }
    },
    "SourceType": {
      "Description": "The type of the data source. The default value is USER.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SourceType"
        ]
      }
    },
    "Uri": {
      "Description": "The URI configuration.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Uri"
        ]
      }
    },
    "UserId": {
      "Description": "The ID of the user who owns the dataset.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UserId"
        ]
      }
    },
    "WorkspaceId": {
      "Description": "The ID of the workspace where the dataset resides. For more information about how to obtain the workspace ID, see [ListWorkspaces](~~449124~~).",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "WorkspaceId"
        ]
      }
    }
  }
}