All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::PAI::WorkspaceResourceDlc

Last Updated:Oct 14, 2024

DATASOURCE::PAI::WorkspaceResourceDlc is used to query the information about a Deep Learning Containers (DLC) resource that is associated with a Platform for AI (PAI) workspace.

Syntax

{
  "Type": "DATASOURCE::PAI::WorkspaceResourceDlc",
  "Properties": {
    "GroupName": String,
    "WorkspaceId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

GroupName

String

Yes

Yes

The name of the resource group.

None.

WorkspaceId

String

Yes

Yes

The ID of the PAI workspace.

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

  • IsDefault: indicates whether the resource is a default resource.

  • GroupName: the name of the resource group.

  • CreateTime: the time when the resource was created. The time follows the ISO 8601 standard and is displayed in UTC.

  • Resources: the resources.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  GroupName:
    Type: String
    Description:
      en: Resource group name. If you want to obtain a resource group name, see [ListResources].
    Required: true
  WorkspaceId:
    Type: String
    Description:
      en: The ID of the workspace to which the workspace belongs.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::PAI::WorkspaceResourceDlc
    Properties:
      GroupName:
        Ref: GroupName
      WorkspaceId:
        Ref: WorkspaceId
Outputs:
  IsDefault:
    Description: Indicates whether it is the default resource. Currently, this parameter only supports the input of true and does not support false.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - IsDefault
  GroupName:
    Description: Resource group name. If you want to obtain a resource group name, see [ListResources].
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GroupName
  CreateTime:
    Description: The creation time of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  Resources:
    Description: Resource List.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Resources
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GroupName": {
      "Type": "String",
      "Description": {
        "en": "Resource group name. If you want to obtain a resource group name, see [ListResources]."
      },
      "Required": true
    },
    "WorkspaceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the workspace to which the workspace belongs."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PAI::WorkspaceResourceDlc",
      "Properties": {
        "GroupName": {
          "Ref": "GroupName"
        },
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        }
      }
    }
  },
  "Outputs": {
    "IsDefault": {
      "Description": "Indicates whether it is the default resource. Currently, this parameter only supports the input of true and does not support false.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "IsDefault"
        ]
      }
    },
    "GroupName": {
      "Description": "Resource group name. If you want to obtain a resource group name, see [ListResources].",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GroupName"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "Resources": {
      "Description": "Resource List.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Resources"
        ]
      }
    }
  }
}