ALIYUN::DataWorks::ResourceGroupRelation

ALIYUN::DataWorks::ResourceGroupRelation类型用于关联资源组到某个工作空间。

语法

{
  "Type": "ALIYUN::DataWorks::ResourceGroupRelation",
  "Properties": {
    "ProjectId": Integer,
    "ResourceGroupId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ProjectId

Integer

要绑定的工作空间 ID。

ResourceGroupId

String

资源组唯一标识。

返回值

Fn::GetAtt

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceGroupId:
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
    Type: String
    Description:
      en: Unique ID of resource group
    Required: true
  ProjectId:
    Type: Number
    Description:
      en: Workspace ID to bind
    Required: true
Resources:
  ResourceGroupRelation:
    Type: ALIYUN::DataWorks::ResourceGroupRelation
    Properties:
      ResourceGroupId:
        Ref: ResourceGroupId
      ProjectId:
        Ref: ProjectId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceGroupId": {
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
      "Type": "String",
      "Description": {
        "en": "Unique ID of resource group"
      },
      "Required": true
    },
    "ProjectId": {
      "Type": "Number",
      "Description": {
        "en": "Workspace ID to bind"
      },
      "Required": true
    }
  },
  "Resources": {
    "ResourceGroupRelation": {
      "Type": "ALIYUN::DataWorks::ResourceGroupRelation",
      "Properties": {
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "ProjectId": {
          "Ref": "ProjectId"
        }
      }
    }
  }
}
                        
  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ResourceGroupId:
        AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
        Type: String
        Description:
          en: Unique ID of resource group
        Required: true
      ProjectId:
        Type: Number
        Description:
          en: Workspace ID to bind
        Required: true
    Resources:
      ResourceGroupRelation:
        Type: ALIYUN::DataWorks::ResourceGroupRelation
        Properties:
          ResourceGroupId:
            Ref: ResourceGroupId
          ProjectId:
            Ref: ProjectId
    
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ResourceGroupId": {
          "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
          "Type": "String",
          "Description": {
            "en": "Unique ID of resource group"
          },
          "Required": true
        },
        "ProjectId": {
          "Type": "Number",
          "Description": {
            "en": "Workspace ID to bind"
          },
          "Required": true
        }
      },
      "Resources": {
        "ResourceGroupRelation": {
          "Type": "ALIYUN::DataWorks::ResourceGroupRelation",
          "Properties": {
            "ResourceGroupId": {
              "Ref": "ResourceGroupId"
            },
            "ProjectId": {
              "Ref": "ProjectId"
            }
          }
        }
      }
    }