All Products
Search
Document Center

Resource Management:GetResourceDirectory

Last Updated:Jun 05, 2024

Queries the information of a resource directory. If you use a management account to call this API operation, the system returns the information of the resource directory that is enabled by using the management account. If you use a member to call this operation, the system returns the information of

Operation description

This topic provides an example on how to use a management account to call the API operation to query the information of the resource directory that is enabled by using the management account.

Debugging

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

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
resourcemanager:GetResourceDirectoryRead
  • ResourceDirectory
    acs:resourcemanager:*:{#accountId}:*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
The current API does not require request parameters

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

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

CD76D376-2517-4924-92C5-DBC52262F93A
ResourceDirectoryobject

The information of the resource directory.

RootFolderIdstring

The ID of the Root folder.

r-Zo****
ResourceDirectoryIdstring

The ID of the resource directory.

rd-St****
CreateTimestring

The time when the resource directory was enabled.

2019-02-18T15:32:10.473Z
MasterAccountIdstring

The ID of the management account.

172845045600****
MasterAccountNamestring

The name of the management account.

aliyun-admin
ControlPolicyStatusstring

The status of the Control Policy feature. Valid values:

  • Enabled: The feature is enabled.
  • PendingEnable: The feature is being enabled.
  • Disabled: The feature is disabled.
  • PendingDisable: The feature is being disabled.
Enabled
MemberDeletionStatusstring

The status of the member deletion feature. Valid values:

  • Enabled: The feature is enabled. You can call the DeleteAccount operation to delete members of the resource account type.
  • Disabled: The feature is disabled. You cannot delete members of the resource account type.
Enabled
IdentityInformationstring

The real-name verification information.

\*\*\* Co., Ltd.

Examples

Sample success responses

JSONformat

{
  "RequestId": "CD76D376-2517-4924-92C5-DBC52262F93A",
  "ResourceDirectory": {
    "RootFolderId": "r-Zo****",
    "ResourceDirectoryId": "rd-St****",
    "CreateTime": "2019-02-18T15:32:10.473Z",
    "MasterAccountId": "172845045600****",
    "MasterAccountName": "aliyun-admin",
    "ControlPolicyStatus": "Enabled",
    "MemberDeletionStatus": "Enabled",
    "IdentityInformation": "\\*\\*\\* Co., Ltd."
  }
}

Error codes

HTTP status codeError codeError messageDescription
404ResourceDirectoryNotInUseThe specified account is not an Alibaba Cloud account or a member account of the resource directory.The specified account is not an Alibaba Cloud account or a member account of the resource directory.

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

Change history

Change timeSummary of changesOperation
No change history