ALIYUN::DataWorks::ResourceGroup

ALIYUN::DataWorks::ResourceGroup类型用于创建资源组。

语法

{
  "Type": "ALIYUN::DataWorks::ResourceGroup",
  "Properties": {
    "Name": String,
    "PaymentType": String,
    "VpcId": String,
    "VSwitchId": String,
    "AutoRenewEnabled": Boolean,
    "PaymentDurationUnit": String,
    "PaymentDuration": Integer,
    "ResourceGroupId": String,
    "Remark": String,
    "Spec": Integer,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Name

String

创建通用资源组的名称。

必须以字母开头,可包含字母、数字、下划线(_),最多 128 个字符。

PaymentType

String

资源组的付费类型。

取值:

  • PrePaid:包年包月。

  • PostPaid:按量付费。

VpcId

String

默认绑定的 VPC ID。

VSwitchId

String

默认绑定的交换机 ID。

AutoRenewEnabled

Boolean

是否自动续费。

PaymentDurationUnit

String

付费时长单位。

取值:

  • Month:月

  • Year:年

PaymentDuration

Integer

付费时长。

取值范围:

1~9。

ResourceGroupId

String

阿里云资源组 ID。

Remark

String

创建通用资源组的备注。

可包含字母、中文、数字、下划线(_),最多 128 个字符。

Spec

Integer

资源组规格。

单位 CU,当资源组付费模式为 PrePaid 时,必填。

Tags

List

阿里云标签列表。

最多支持配置20组标签。更多信息,请参考Tags属性

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

返回值

Fn::GetAtt

Id:创建通用资源组的唯一标识符。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      en: The default bound VPC ID.
    Required: true
  VSwitchId:
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    Type: String
    Description:
      en: The default bound switch ID.
    Required: true
  PaymentType:
    Type: String
    Description:
      en: The type of payment for resource groups, PrePaid represents annual and monthly payments, and PostPaid represents payment by volume.
    AllowedValues:
      - PayAsYouGo
      - Subscription
    Required: true
  Name:
    Type: String
    Description:
      en: The name of a common resource group that creates a common resource group must start with a letter and can contain letters, numbers, underscores (_), up to 128 characters.
    Required: true
Resources:
  ResourceGroup:
    Type: ALIYUN::DataWorks::ResourceGroup
    Properties:
      VpcId:
        Ref: VpcId
      VSwitchId:
        Ref: VSwitchId
      PaymentType:
        Ref: PaymentType
      Name:
        Ref: Name
Outputs:
  Id:
    Description: Creates a unique identifier for a common resource group.
    Value:
      Fn::GetAtt:
        - ResourceGroup
        - Id
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "en": "The default bound VPC ID."
      },
      "Required": true
    },
    "VSwitchId": {
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      },
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "Type": "String",
      "Description": {
        "en": "The default bound switch ID."
      },
      "Required": true
    },
    "PaymentType": {
      "Type": "String",
      "Description": {
        "en": "The type of payment for resource groups, PrePaid represents annual and monthly payments, and PostPaid represents payment by volume."
      },
      "AllowedValues": [
        "PayAsYouGo",
        "Subscription"
      ],
      "Required": true
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of a common resource group that creates a common resource group must start with a letter and can contain letters, numbers, underscores (_), up to 128 characters."
      },
      "Required": true
    }
  },
  "Resources": {
    "ResourceGroup": {
      "Type": "ALIYUN::DataWorks::ResourceGroup",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "PaymentType": {
          "Ref": "PaymentType"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "Id": {
      "Description": "Creates a unique identifier for a common resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ResourceGroup",
          "Id"
        ]
      }
    }
  }
}