Creates a serverless resource group.
Operation description
- You can use this API operation only in DataWorks Basic Edition or an advanced edition.
- **Before you call this API operation, you must make sure that you have a good command of the billing details and pricing of serverless resource groups.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| dataworks:CreateResourceGroup | create | *DwResourceGroup acs:dataworks:{#regionId}:{#accountId}:dwresourcegroup/* |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Name | string | Yes | The name of the serverless resource group. The name can be a maximum of 128 characters in length and can contain letters, digits, and underscores (_). The name must start with a letter. | common_resource_group |
| Remark | string | No | The description of the serverless resource group. The description can be a maximum of 128 characters in length and can contain letters, digits, and underscores (_). | Create a serverless resource group for common tasks |
| PaymentType | string | Yes | The billing method of the serverless resource group. Valid values: PrePaid and PostPaid. The value PrePaid indicates the subscription billing method, and the value PostPaid indicates the pay-as-you-go billing method. | PrePaid |
| PaymentDurationUnit | string | No | The unit of the subscription duration. Valid values: Month and Year. | Month |
| PaymentDuration | integer | No | The subscription duration. | 1 |
| AutoRenewEnabled | boolean | No | Specifies whether to enable auto-renewal. | |
| Spec | integer | No | The specifications of the serverless resource group. Unit: CU. This parameter is required only if you set the PaymentType parameter to PrePaid. | 2 |
| VpcId | string | Yes | The ID of the virtual private cloud (VPC) with which the serverless resource group is associated by default. | vpc-m2et4f3oc8msfbccXXXXX |
| VswitchId | string | Yes | The ID of the vSwitch with which the serverless resource group is associated by default. | vsw-uf8usrhs7hjd9amsXXXXX |
| ClientToken | string | Yes | The client token that is used to ensure the idempotence of the request. | eb870033-74c8-4b1b-9664-04c4e7cc3465 |
| AliyunResourceGroupId | string | No | The ID of the Alibaba Cloud resource group. | rg-aek2kqofrgXXXXX |
| AliyunResourceTags | array<object> | No | The tags. | |
| object | No | The tag. | ||
| Key | string | No | The tag key. | key |
| Value | string | No | The tag value. | value |
Response parameters
Examples
Sample success responses
JSONformat
{
"Success": true,
"ResourceGroupOrder": {
"OrderId": 0,
"OrderInstanceId": "c442b330-3b10-4584-959e-736e4edXXXXX",
"Id": "Serverless_res_group_524257424564736_6831777003XXXXX"
},
"RequestId": "6A6CBE87-9F91-1323-B680-E7A7065XXXXX"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-01-02 | The request parameters of the API has changed | View Change Details |
