All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::DataWorks::ResourceGroup

更新时间:May 07, 2025

ALIYUN::DataWorks::ResourceGroup is used to create a serverless resource group.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

Name

String

Yes

Yes

The name of the serverless resource group.

The name can be up to 128 characters in length and can contain letters, digits, and underscores (_). It must start with a letter.

PaymentType

String

Yes

No

The billing method of the serverless resource group.

Valid values:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

VpcId

String

Yes

No

The ID of the virtual private cloud (VPC) with which the serverless resource group is associated by default.

None.

VSwitchId

String

Yes

No

The ID of the vSwitch with which the serverless resource group is associated by default.

None.

AutoRenewEnabled

Boolean

No

No

Specifies whether to enable auto-renewal.

None.

PaymentDurationUnit

String

No

No

The unit of the billing cycle.

Valid values:

  • Month

  • Year

PaymentDuration

Integer

No

No

The billing cycle.

Valid values:

1 to 9.

ResourceGroupId

String

No

Yes

The ID of the Alibaba Cloud resource group.

None.

Remark

String

No

Yes

The description of the serverless resource group.

The description can be up to 128 characters in length and can contain letters, digits, and underscores (_).

Spec

Integer

No

No

The specifications of the serverless resource group.

Unit: CU. This property must be specified when PaymentType is set to PrePaid.

Tags

List

No

No

The tags.

You can add up to 20 tags. For more information, see Tags properties.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The key of the tag.

None.

Value

String

No

No

The value of the tag.

None.

Return values

Fn::GetAtt

Id: the unique ID of the serverless resource group.

Examples

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