Help Center> Cloud Eye> API Reference> API v2> Resource Groups> Modifying a Resource Group
Updated on 2024-05-16 GMT+08:00

Modifying a Resource Group

Function

This API is used to modify a resource group.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

PUT /v2/{project_id}/resource-groups/{group_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the tenant ID.

Minimum: 1

Maximum: 64

group_id

Yes

String

Specifies the resource group ID, which starts with rg and is followed by 22 characters, including letters and digits.

Minimum: 2

Maximum: 24

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the tenant token.

Minimum: 1

Maximum: 16384

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

group_name

Yes

String

Specifies the resource group name. The value can contain up to 128 characters, including letters, digits, hyphens (-), and underscores (_).

Minimum: 1

Maximum: 128

tags

No

Array of ResourceGroupTagRelation objects

Specifies the associated tag during dynamic tag matching. This parameter must be specified when type is set to TAG.

Array Length: 1 - 10

Table 4 ResourceGroupTagRelation

Parameter

Mandatory

Type

Description

key

Yes

String

Specifies the tag key.

Minimum: 1

Maximum: 36

value

No

String

Specifies the tag value.

Minimum: 1

Maximum: 42

Response Parameters

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the status codes customized by each cloud service when a request error occurs.

Minimum: 0

Maximum: 256

error_msg

String

Specifies the request error message.

Minimum: 0

Maximum: 256

request_id

String

Specifies the request ID.

Minimum: 0

Maximum: 256

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the status codes customized by each cloud service when a request error occurs.

Minimum: 0

Maximum: 256

error_msg

String

Specifies the request error message.

Minimum: 0

Maximum: 256

request_id

String

Specifies the request ID.

Minimum: 0

Maximum: 256

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the status codes customized by each cloud service when a request error occurs.

Minimum: 0

Maximum: 256

error_msg

String

Specifies the request error message.

Minimum: 0

Maximum: 256

request_id

String

Specifies the request ID.

Minimum: 0

Maximum: 256

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the status codes customized by each cloud service when a request error occurs.

Minimum: 0

Maximum: 256

error_msg

String

Specifies the request error message.

Minimum: 0

Maximum: 256

request_id

String

Specifies the request ID.

Minimum: 0

Maximum: 256

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Specifies the status codes customized by each cloud service when a request error occurs.

Minimum: 0

Maximum: 256

error_msg

String

Specifies the request error message.

Minimum: 0

Maximum: 256

request_id

String

Specifies the request ID.

Minimum: 0

Maximum: 256

Example Requests

Modifying the resource group named rg_test

{
  "group_name" : "test",
  "tags" : [ {
    "key" : "key1",
    "value" : "value1"
  } ]
}

Example Responses

None

Status Codes

Status Code

Description

204

No Content

400

Failed to verify parameters.

401

Not authenticated.

403

Authentication failed.

404

Resource not found.

500

Internal system error.

Error Codes

See Error Codes.