全部产品
Search
文档中心

资源编排:DATASOURCE::PAI::Workspace

更新时间:Sep 02, 2024

DATASOURCE::PAI::Workspace类型用于获取PAI工作空间详细信息。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

WorkspaceId

String

PAI工作空间ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • IsDefault:是否为默认工作空间

  • Description:工作空间描述。

  • AdminNames:管理员账户名称列表。

  • DisplayName:显示名。

  • WorkspaceId:工作空间 ID。

  • WorkspaceName:工作空间名称。

  • ExtraInfos:附加信息,目前包含 TenantId(租户 ID)。

  • Creator:创建者用户 ID。

  • Users:工作空间所有者信息。

  • EnvTypes:工作空间包含的环境

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  WorkspaceId:
    Type: String
    Description:
      en: The ID of the workspace.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::PAI::Workspace
    Properties:
      WorkspaceId:
        Ref: WorkspaceId
Outputs:
  IsDefault:
    Description: Default Workspace.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - IsDefault
  Description:
    Description: The description of the workspace.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Description
  AdminNames:
    Description: List of administrator account names.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AdminNames
  DisplayName:
    Description: The display name of the workspace.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DisplayName
  WorkspaceId:
    Description: The first ID of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - WorkspaceId
  WorkspaceName:
    Description: The name of the workspace.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - WorkspaceName
  ExtraInfos:
    Description: Additional information, currently including TenantId (tenant ID).
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ExtraInfos
  Creator:
    Description: The user ID of the creator.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Creator
  Users:
    Description: List of users.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Users
  EnvTypes:
    Description: The environments of the workspace.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnvTypes
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "WorkspaceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the workspace."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PAI::Workspace",
      "Properties": {
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        }
      }
    }
  },
  "Outputs": {
    "IsDefault": {
      "Description": "Default Workspace.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "IsDefault"
        ]
      }
    },
    "Description": {
      "Description": "The description of the workspace.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Description"
        ]
      }
    },
    "AdminNames": {
      "Description": "List of administrator account names.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AdminNames"
        ]
      }
    },
    "DisplayName": {
      "Description": "The display name of the workspace.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DisplayName"
        ]
      }
    },
    "WorkspaceId": {
      "Description": "The first ID of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "WorkspaceId"
        ]
      }
    },
    "WorkspaceName": {
      "Description": "The name of the workspace.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "WorkspaceName"
        ]
      }
    },
    "ExtraInfos": {
      "Description": "Additional information, currently including TenantId (tenant ID).",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ExtraInfos"
        ]
      }
    },
    "Creator": {
      "Description": "The user ID of the creator.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Creator"
        ]
      }
    },
    "Users": {
      "Description": "List of users.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Users"
        ]
      }
    },
    "EnvTypes": {
      "Description": "The environments of the workspace.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnvTypes"
        ]
      }
    }
  }
}