All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::PAI::Datasets

Last Updated:Dec 02, 2024

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

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

SourceId

String

No

Yes

The source ID.

Valid values:

  • If SourceType is set to USER, you can specify a custom value for SourceId.

  • If SourceType is set to ITAG to allow iTAG to process tags of the dataset, you can specify the ID of the iTAG job for SourceId.  

  • If SourceType is set to PAI_PUBLIC_DATASET to use a dataset created from a public dataset of Platform for AI (PAI), SourceId is empty by default.  

WorkspaceId

String

Yes

Yes

The ID of the workspace to which the dataset belongs.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

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 creation time.

None.

Options

String

The extended fields.

None.

DataType

String

The data type.

None.

SourceType

String

The source type.

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 dataset name.

None.

GmtModifiedTime

String

The update time.

None.

UserId

String

The user ID.

None.

DataSourceType

String

The type of the data source.

None.

SourceId

String

The source ID.

None.

Description

String

The description.

None.

DatasetId

String

The dataset ID.

None.

WorkspaceId

String

The ID of the workspace to which the dataset belongs.

None.

Examples

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