全部产品
Search
文档中心

资源编排:ALIYUN::PAI::WorkspaceResourceFlink

更新时间:Jun 24, 2024

ALIYUN::PAI::WorkspaceResourceFlink类型用于添加Flink资源引用到工作空间。

语法

{
  "Type": "ALIYUN::PAI::WorkspaceResourceFlink",
  "Properties": {
    "GroupName": String,
    "Resources": List,
    "WorkspaceId": String,
    "IsDefault": Boolean,
    "Option": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

GroupName

String

资源分组名。

Resources

List

资源列表。

更多信息,请参见Resources属性

WorkspaceId

String

所属的工作空间ID。

IsDefault

Boolean

是否为默认资源(每种资源类型有一个默认的资源)。

取值:

  • false(默认值):不是默认资源。

  • true:是默认资源。

Option

String

创建行为。

取值:

  • CreateAndAttach:创建资源并绑定到工作空间。

  • Attach:绑定资源到工作空间。

Resources语法

"Resources": [
  {
    "WorkspaceResourceWorkspaceId": String,
    "WorkspaceResourceName": String,
    "Spec": Map,
    "EnvType": String
  }
]

Resources属性

属性名称

类型

必须

允许更新

描述

约束

EnvType

String

环境类型。

取值:

  • dev:开发环境。

  • prod:生产环境。

WorkspaceResourceWorkspaceId

String

所属的工作空间ID。

WorkspaceResourceName

String

资源名。

Spec

Map

资源规格说明。

示例:

{"Endpoint": "odps.alibaba-inc.com", "Project": "mignshi"}

返回值

Fn::GetAtt

  • GroupName:资源分组名

  • IsDefault:是否为默认资源

  • CreateTime:资源创建时间。

  • Resources:资源集合

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionResource:
    Type: ALIYUN::PAI::WorkspaceResourceFlink
    Properties:
      GroupName: group_flink_59a2ceb0-cef7-11ee-98b8-a94eed7a2fe9
      WorkspaceId: '45970'
      Resources:
        - WorkspaceResourceName: public-cluster1
          WorkspaceResourceWorkspaceId: '45970'
          EnvType: prod
          Spec:
            ClusterType: share
            ResourceId: ''
            ResourceName: public-cluster1
            ProductType: ECS
            ResourceType: ECS
            Key: ECS-share-public-cluster
Outputs:
  GroupName:
    Description: Resource group name. If you want to obtain a resource group name, see [ListResources](~~ 449143 ~~).
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GroupName
  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:
        - ExtensionResource
        - IsDefault
  CreateTime:
    Description: The creation time of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  Resources:
    Description: Resource List.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Resources

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::PAI::WorkspaceResourceFlink",
      "Properties": {
        "GroupName": "group_flink_59a2ceb0-cef7-11ee-98b8-a94eed7a2fe9",
        "WorkspaceId": "45970",
        "Resources": [
          {
            "WorkspaceResourceName": "public-cluster1",
            "WorkspaceResourceWorkspaceId": "45970",
            "EnvType": "prod",
            "Spec": {
              "ClusterType": "share",
              "ResourceId": "",
              "ResourceName": "public-cluster1",
              "ProductType": "ECS",
              "ResourceType": "ECS",
              "Key": "ECS-share-public-cluster"
            }
          }
        ]
      }
    }
  },
  "Outputs": {
    "GroupName": {
      "Description": "Resource group name. If you want to obtain a resource group name, see [ListResources](~~ 449143 ~~).",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GroupName"
        ]
      }
    },
    "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": [
          "ExtensionResource",
          "IsDefault"
        ]
      }
    },
    "CreateTime": {
      "Description": "The creation time of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "Resources": {
      "Description": "Resource List.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Resources"
        ]
      }
    }
  }
}