All Products
Search
Document Center

Security Center:CreateOrUpdateAssetGroup

Last Updated:Aug 27, 2026

Modifies the mapping between an asset and an asset group, such as the server group to which an asset belongs or the asset list of a server group.

Operation description

A server can belong to only one server group. If the server specified in the request already belongs to another group, it is removed from that group and added to the newly created or specified group.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-sas:CreateOrUpdateAssetGroup

create

*Group

acs:yundun-sas:{#regionId}:{#accountId}:group/*

None None

Request parameters

Parameter

Type

Required

Description

Example

Uuids

string

No

The UUID of the server in the server group that you want to create or the server group for which you want to add or remove servers. Separate multiple UUIDs with commas (,).

Note

You can call the DescribeCloudCenterInstances operation to query the UUIDs of servers.

aq12-***,s23***

GroupName

string

No

The name of the server group that you want to create or the server group for which you want to add or remove a server.

Note

To modify the mapping between a server and a server group, you must provide the name of the server group. You can call the DescribeAllGroups operation to query the names of server groups. If you do not specify GroupId when you call this operation, a server group is created. In this case, you must specify GroupName.

test

GroupId

integer

No

The ID of the server group to which you want to add servers or from which you want to remove servers.

Note

To modify the mapping between an asset and an asset group, you must provide the ID of the asset group. You can call the DescribeAllGroups operation to query the IDs of asset groups. If you do not specify this parameter when you call this operation, an asset group is created.

55426

The following list describes how request parameters differ when you create a server group versus when you add or remove servers:

  • Create a server group: You do not need to specify GroupId but must specify GroupName. The Uuids parameter is optional.

  • Add servers to or remove servers from a server group: You must specify both GroupId and Uuids. The GroupName parameter is optional.

Response elements

Element

Type

Description

Example

object

GroupId

integer

The ID of the server group.

9935302

RequestId

string

The request ID, used to locate and troubleshoot issues.

E70074C8-DFB4-44C5-96C7-909DD231D68A

Examples

Success response

JSON format

{
  "GroupId": 9935302,
  "RequestId": "E70074C8-DFB4-44C5-96C7-909DD231D68A"
}

Error codes

HTTP status code

Error code

Error message

Description

400 GroupNameRepeated group name repeated
400 IllegalParam Illegal param
500 ServerError Service error, please try again later.
403 NoPermission caller has no permission You are not authorized to do this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.