Queries the ID of an asset group by using the name of the asset group.

Usage notes

You can call the QueryGroupIdByGroupName operation to query the ID of an asset group to which your assets belong by using the name of the asset group. When you call operations such as GetSuspiciousStatistics and DeleteGroup, you must specify the ID of the asset group. To query the ID of an asset group, call the QueryGroupIdByGroupName operation.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes QueryGroupIdByGroupName

The operation that you want to perform. Set the value to QueryGroupIdByGroupName.

SourceIp String No 10.12.XX.XX

The source IP address of the request.

GroupName String Yes Servers not deployed on Alibaba Cloud

The name of the asset group.

Response parameters

Parameter Type Example Description
RequestId String 24A20733-10A0-4AF6-BE6B-E3322413BB68

The ID of the request, which is used to locate and troubleshoot issues.

GroupId Long 9935302

The ID of the asset group.

Examples

Sample requests

http(s)://[Endpoint]/?Action=QueryGroupIdByGroupName
&SourceIp=10.12.XX.XX
&GroupName=Servers not deployed on Alibaba Cloud
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<QueryGroupIdByGroupNameResponse>
    <RequestId>24A20733-10A0-4AF6-BE6B-E3322413BB68</RequestId>
    <GroupId>9935302</GroupId>
</QueryGroupIdByGroupNameResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "24A20733-10A0-4AF6-BE6B-E3322413BB68",
  "GroupId" : 9935302
}

Error codes

For a list of error codes, visit the API Error Center.