All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::PAI::WorkspaceResourceMaxComputes

更新時間:Oct 14, 2024

DATASOURCE::PAI::WorkspaceResourceMaxComputes is used to query the MaxCompute resources that are associated with a workspace.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

WorkspaceId

String

Yes

Yes

The ID of the workspace.

None.

GroupName

String

No

Yes

The name of the resource group.

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

  • GroupNames: the names of resource groups.

  • WorkspaceResourceMaxComputes: the resources.

Property

Type

Description

Constraint

GroupNames

List

The names of resource groups.

None

WorkspaceResourceDlcs

List

The resources.

None

IsDefault

String

Indicates whether the resources are default resources.

None

GroupName

String

The name of the resource group.

None

CreateTime

String

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

None

Resources

String

The resources.

None

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: false
  WorkspaceId:
    Type: String
    Description:
      en: The ID of the workspace to which the workspace belongs.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::PAI::WorkspaceResourceMaxComputes
    Properties:
      GroupName:
        Ref: GroupName
      WorkspaceId:
        Ref: WorkspaceId
Outputs:
  GroupNames:
    Description: The list of group names.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GroupNames
  WorkspaceResourceDlcs:
    Description: The list of workspace resource dlcs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - WorkspaceResourceDlcs
{
  "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": false
    },
    "WorkspaceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the workspace to which the workspace belongs."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::PAI::WorkspaceResourceMaxComputes",
      "Properties": {
        "GroupName": {
          "Ref": "GroupName"
        },
        "WorkspaceId": {
          "Ref": "WorkspaceId"
        }
      }
    }
  },
  "Outputs": {
    "GroupNames": {
      "Description": "The list of group names.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GroupNames"
        ]
      }
    },
    "WorkspaceResourceDlcs": {
      "Description": "The list of workspace resource dlcs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "WorkspaceResourceDlcs"
        ]
      }
    }
  }
}