All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::PAI::WorkspaceResourceFlink

Last Updated:Aug 13, 2024

ALIYUN::PAI::WorkspaceResourceFlink is used to associate Realtime Compute for Apache Flink resources with a workspace.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

GroupName

String

Yes

No

The name of the resource group.

None.

Resources

List

Yes

No

The resources.

For more information, see Resources properties

WorkspaceId

String

Yes

No

The workspace ID of the resources.

None.

IsDefault

Boolean

No

Yes

Specifies whether the resource is the default one. Each type of resources has a default resource.

Valid values:

  • false (default)

  • true

Option

String

No

No

The option for creating resources.

Valid values:

  • CreateAndAttach: creates resources and associates them with a workspace.

  • Attach: associates resources with a workspace.

Resources syntax

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

Resources properties

Property

Type

Required

Editable

Description

Constraint

EnvType

String

Yes

No

The environment type.

Valid values:

  • dev: development environment

  • prod: production environment

WorkspaceResourceWorkspaceId

String

Yes

No

The workspace ID of the resource.

None.

WorkspaceResourceName

String

Yes

No

The resource name.

None.

Spec

Map

No

No

The specifications of the resource.

Example:

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

Return values

Fn::GetAtt

  • GroupName: the name of the resource group.

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

  • CreateTime: the time when the resources were created.

  • Resources: the resources.

Examples

YAML format

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 format

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