CreateResourceGroup
Use the CreateResourceGroup operation to create a resource group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
pai:CreateResourceGroup |
create |
*ResourceGroup
|
None | None |
Request syntax
POST /api/v1/resources HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Request struct. |
|
| Name |
string |
No |
Resource group name. |
testResourceGroup |
| Description |
string |
No |
Resource group description. |
test_api_report |
| UserVpc | UserVpc |
No |
VPC connectivity information for the resource group. |
|
| ResourceType |
string |
No |
Resource type. Valid values:
|
Ecs |
| ComputingResourceProvider |
string |
No |
Compute resource type for the resource group. |
Ecs |
| Tag |
array<object> |
No |
List of tags to add. Maximum 20 items. |
|
|
object |
No |
|||
| Key |
string |
No |
The tag key of the instance. N ranges from 1 to 20. |
TestKey |
| Value |
string |
No |
Tag value for the resource group. N ranges from 1 to 20. |
TestValue |
| Version |
string |
No |
Resource group version. This parameter takes effect only when the resource type is ECS. |
1.0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Request ID. |
18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E |
| ResourceGroupID |
string |
Resource group ID. |
rgf0zhfqn1d4ity2 |
Examples
Success response
JSON format
{
"RequestId": "18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E\n",
"ResourceGroupID": "rgf0zhfqn1d4ity2"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.