All Products
Search
Document Center

Security Center:ListGroups

Last Updated:Nov 25, 2024

Queries the server groups.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-sas:ListGroupslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language of the content within the request and response. Default value: zh. Valid values:

  • zh: Chinese
  • en: English
zh
CurrentPageintegerNo

The page number. Pages start from page 1. Default value: 1.

89
PageSizeintegerNo

The number of entries per page. Default value: 20. Maximum value: 2000.

10
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. If the return value of NextToken is empty, no next query is to be sent. If a value of NextToken is returned, the value indicates the token that is used for the next query.

1426C575705AE8545E8360A6EFA3B***
UseNextTokenbooleanNo

Specifies whether to use NextToken to query vulnerabilities. If you set this parameter to true, TotalCount is not returned. Valid values:

  • true
  • false
true

Response parameters

ParameterTypeDescriptionExample
object

PageResult

Listarray<object>

The groups.

Listobject
GroupIdlong

The server group ID.

11028542
GroupNamestring

The server group name.

cn-shenzhen+dir-1440978***
GroupFlaginteger

The server group type. Valid values:

  • 0: default group
  • 1: other group
1
PageInfoobject

The pagination information.

CurrentPageinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
TotalCountinteger

The total number of entries returned.

202
Countinteger

The number of entries returned on the current page.

4
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results.

B604532DEF982B875E8360A6EFA3B***
Successboolean

Indicates whether exceptions are handled. Valid values:

  • true
  • false
true
Codestring

The status code.

200
Messagestring

The error message.

successful
RequestIdstring

The request ID.

CB414DB5-F692-5DAB-9F0F-975C060AF***
HttpStatusCodeinteger

The HTTP status code.

200

Examples

Sample success responses

JSONformat

{
  "List": [
    {
      "GroupId": 11028542,
      "GroupName": "cn-shenzhen+dir-1440978***",
      "GroupFlag": 1
    }
  ],
  "PageInfo": {
    "CurrentPage": 1,
    "PageSize": 10,
    "TotalCount": 202,
    "Count": 4,
    "NextToken": "B604532DEF982B875E8360A6EFA3B***"
  },
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "RequestId": "CB414DB5-F692-5DAB-9F0F-975C060AF***",
  "HttpStatusCode": 200
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

For a list of error codes, visit the Service error codes.