DescribeResourceGroups

Updated at:

Viewing resource groups

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

ecd:DescribeResourceGroups

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ResourceGroupName

string

No

The name of the resource group.

部门A资源组

ResourceGroupIds

array

No

The IDs of the resource groups.

string

No

The ID of the resource group.

rg-9th3k8twp3ox2***

PageSize

integer

No

The number of entries per page.

20

PageNumber

integer

No

The page number.

1

NeedContainResourceGroupWithOfficeSite

integer

No

Note

This parameter is for internal use only.

0

Platform

string

No

Note

The value must be AliyunConsole.

  • For Wuying Workspace Enterprise Edition, you must set this parameter to AliyunConsole. Other values are not supported.

AliyunConsole

BusinessChannel

string

No

The business channel.

ENTERPRISE

AliyunResourceGroupIds

array

No

The IDs of the Alibaba Cloud resource groups.

string

No

The ID of the resource group.

rg-as8nlsbsxsldk***

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

68BA1DF7-8814-5AED-B844-F8F7F7****

ResourceGroup

array<object>

A list of resource groups.

array<object>

Details of a resource group.

ResourceGroupId

string

The resource group ID.

rg-cyo0il2pzge1***

ResourceGroupName

string

The resource group name.

测试资源组

ResourceCount

string

The number of resources in the resource group.

119

AuthCount

string

The number of administrators authorized for the resource group.

3

CreateTime

string

The time when the resource group was created.

2022-11-29T17:25:40.000000000Z

Policies

array<object>

Note

The policies associated with the resource group.

  • These policies apply to the cloud desktops in the resource group. If multiple policies are associated, they are applied based on priority.

  • The policies associated with the resource group override any policies that are already assigned to a cloud desktop within that group.

object

Id

string

The policy ID.

pl-a8jnatl8kjasb***

Name

string

The policy name.

测试策略123

IsDefault

boolean

Specifies whether this is the default policy.

False

Timers

array<object>

Note

The scheduled tasks associated with the resource group.

  • The associated scheduled tasks apply to the cloud desktops in the resource group. These tasks take precedence over any other scheduled tasks that are already associated with a cloud desktop in the group.

object

Id

string

The scheduled task ID.

t-asdzx0mbjhg***

Name

string

The scheduled task name.

测试任务123

TimerStatus

string

BindStatus

string

AppRules

array<object>

object

Id

string

Name

string

Type

integer

AliyunResourceGroupId

string

The ID of the Alibaba Cloud resource group.

rg-123456

TotalCount

string

The total number of resource groups returned.

7

Examples

Success response

JSON format

{
  "RequestId": "68BA1DF7-8814-5AED-B844-F8F7F7****",
  "ResourceGroup": [
    {
      "ResourceGroupId": "rg-cyo0il2pzge1***",
      "ResourceGroupName": "测试资源组",
      "ResourceCount": "119",
      "AuthCount": "3",
      "CreateTime": "2022-11-29T17:25:40.000000000Z",
      "Policies": [
        {
          "Id": "pl-a8jnatl8kjasb***",
          "Name": "测试策略123",
          "IsDefault": true
        }
      ],
      "Timers": [
        {
          "Id": "t-asdzx0mbjhg***",
          "Name": "测试任务123",
          "TimerStatus": "",
          "BindStatus": ""
        }
      ],
      "AppRules": [
        {
          "Id": "",
          "Name": "",
          "Type": 0
        }
      ],
      "AliyunResourceGroupId": "rg-123456"
    }
  ],
  "TotalCount": "7"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.