All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::PAI::Datasets

Last Updated:Jul 03, 2023

DATASOURCE::PAI::Datasets is used to query the basic information about datasets.

Syntax

{
  "Type": "DATASOURCE::PAI::Datasets",
  "Properties": {
    "SourceId": String,
    "WorkspaceId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

SourceId

String

No

Yes

The ID of the data source.

Valid values:

  • Set the value of this property to a custom ID when SourceType is set to USER.

  • Set the value of this property to a job ID when SourceType is set to ITAG. The job refers to the labeling job that iTAG processes based on the dataset.  

  • This property is automatically left empty when SourceType is set to PAI_PUBLIC_DATASET. A value of PAI_PUBLIC_DATASET specifies that the dataset is created from a public dataset of Machine Learning Platform for AI (PAI).  

WorkspaceId

String

Yes

Yes

The ID of the workspace to which the dataset belongs.

None.

Return values

Fn::GetAtt

  • Datasets: details of the datasets.

  • DatasetIds: the IDs of the datasets.

Property

Type

Description

Constraint

DatasetIds

List

The IDs of the datasets.

None.

Datasets

List

Details of the datasets.

None.

Accessibility

String

The accessibility of the workspace.

None.

CreateTime

String

The time when the dataset was created.

None.

Options

String

The extended fields.

None.

DataType

String

The data type.

None.

SourceType

String

The type of the data source.

None.

Property

String

The property of the dataset.

None.

Uri

String

The URI configuration.

None.

OwnerId

String

The ID of the Alibaba Cloud account.

None.

DatasetName

String

The name of the dataset.

None.

GmtModifiedTime

String

The time when the dataset was updated.

None.

UserId

String

The user ID.

None.

DataSourceType

String

The type of the data source.

None.

SourceId

String

The ID of the data source.

None.

Description

String

The description of the dataset.

None.

DatasetId

String

The ID of the dataset.

None.

WorkspaceId

String

The ID of the workspace to which the dataset belongs.

None.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  WorkspaceId:
    Description: 'The ID of the workspace where the dataset is located. For details
      about how to obtain the workspace ID, see [ListWorkspaces](~~ 449124 ~~).

      If this parameter is not configured, the default workspace is used. If the default
      workspace does not exist, an error is reported.'
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      WorkspaceId:
        Ref: WorkspaceId
    Type: DATASOURCE::PAI::Datasets
Outputs:
  DatasetIds:
    Description: The list of dataset IDs.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - DatasetIds
  Datasets:
    Description: The list of datasets.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Datasets

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "WorkspaceId": {
      "Type": "String",
      "Description": "The ID of the workspace where the dataset is located. For details about how to obtain the workspace ID, see [ListWorkspaces](~~ 449124 ~~).\nIf this parameter is not configured, the default workspace is used. If the default workspace does not exist, an error is reported."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PAI::Datasets",
      "Properties": {
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        }
      }
    }
  },
  "Outputs": {
    "Datasets": {
      "Description": "The list of datasets.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Datasets"
        ]
      }
    },
    "DatasetIds": {
      "Description": "The list of dataset IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DatasetIds"
        ]
      }
    }
  }
}