All Products
Search
Document Center

Resource Management:GetResourceGroup

Last Updated:Jun 05, 2024

Queries the information of a resource group.

Operation description

For more information about common request parameters, see Common parameters.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringYes

Specifies whether to return the information of tags. Valid values:

  • false (default value)
  • true
rg-9gLOoK****
IncludeTagsbooleanNo

The ID of the request.

true

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

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The information of the resource group.

2D69A58F-345C-4FDE-88E4-BF5189484043
ResourceGroupobject

The display name of the resource group.

DisplayNamestring

The status of the resource group. Valid values:

  • Creating: The resource group is being created.
  • OK: The resource group is created.
  • PendingDelete: The resource group is waiting to be deleted.
my-project
Statusstring

The status of the resource group in all regions.

OK
RegionStatusesobject []

The status of the resource group. Valid values:

  • Creating: The resource group is being created.
  • OK: The resource group is created.
  • PendingDelete: The resource group is waiting to be deleted.
  • Deleting: The resource group is being deleted.
Statusstring

The region ID.

OK
RegionIdstring

The ID of the Alibaba Cloud account to which the resource group belongs.

cn-qingdao
AccountIdstring

The identifier of the resource group.

123456789****
Namestring

The time when the resource group was created. The time is displayed in UTC.

my-project
CreateDatestring

The ID of the resource group.

2015-01-23T12:33:18Z
Idstring

The tags that are added to the resource group.

rg-9gLOoK****
Tagsobject []

The tag key.

TagKeystring

The tag value.

k1

Examples

Sample success responses

JSONformat

{
  "RequestId": "2D69A58F-345C-4FDE-88E4-BF5189484043",
  "ResourceGroup": {
    "DisplayName": "my-project",
    "Status": "OK",
    "RegionStatuses": {
      "RegionStatus": [
        {
          "Status": "OK",
          "RegionId": "cn-qingdao"
        }
      ]
    },
    "AccountId": "123456789****",
    "Name": "my-project",
    "CreateDate": "2015-01-23T12:33:18Z",
    "Id": "rg-9gLOoK****",
    "Tags": {
      "Tag": [
        {
          "TagKey": "k1",
          "TagValue": "v1"
        }
      ]
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.ResourceGroupIdThe ResourceGroupId is invalid.The resource group ID is invalid.
403NoPermissionYou are not authorized to perform the operation.You are not authorized to perform the operation.
404EntityNotExists.ResourceGroupThe specified resource group does not exist. You must first create a resource group.The specified resource group does not exist. You must first create a resource group.

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

Change history

Change timeSummary of changesOperation
No change history