All Products
Search
Document Center

CloudSSO:GetDirectoryStatistics

Last Updated:Jun 14, 2024

Queries the statistics of a directory.

Operation description

This topic provides an example on how to query the statistics of a directory whose ID is d-00fc2p61****. The statistics include the number of users, quota for users, number of groups, quota for groups, number of access configurations, quota for access configurations, number of access permissions that are assigned, number of system policies that can be configured for an access configuration, number of System for Cross-domain Identity Management (SCIM) credentials, number of asynchronous tasks, status of single sign-on (SSO) logon, and status of SCIM synchronization.

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
cloudsso:GetDirectoryStatisticsRead
  • Directory
    acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DirectoryIdstringYes

The ID of the directory.

d-00fc2p61****

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

7B7228B0-A435-5D27-A6B2-ED3571F0654B
DirectoryStatisticsobject

The statistics of the directory.

UserCountinteger

The number of users.

16
GroupCountinteger

The number of user groups.

4
UserQuotainteger

The quota for users.

1000
GroupQuotainteger

The quota for user groups.

500
AccessConfigurationQuotainteger

The quota for access configurations.

1000
AccessAssignmentCountinteger

The number of access permissions that are assigned.

5
SCIMServerCredentialCountinteger

The number of SCIM credentials.

2
DirectoryIdstring

The ID of the directory.

d-00fc2p61****
SSOEnabledboolean

Indicates whether SSO is enabled. Valid values:

  • true
  • false
false
Regionstring

The region ID of the directory.

cn-shanghai
AccessConfigurationCountinteger

The number of access configurations.

6
DirectoryNamestring

The name of the directory.

new-example
InProgressTaskCountinteger

The number of tasks that are being performed.

0
SCIMSyncEnabledboolean

Indicates whether SCIM synchronization is enabled. Valid values:

  • true
  • false
true
SystemPolicyPerAccessConfigurationQuotainteger

The quota for system policies that can be configured for an access configuration.

20
InlinePolicyPerAccessConfigurationQuotainteger

The number of inline policies that can be configured for an access configuration.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "7B7228B0-A435-5D27-A6B2-ED3571F0654B",
  "DirectoryStatistics": {
    "UserCount": 16,
    "GroupCount": 4,
    "UserQuota": 1000,
    "GroupQuota": 500,
    "AccessConfigurationQuota": 1000,
    "AccessAssignmentCount": 5,
    "SCIMServerCredentialCount": 2,
    "DirectoryId": "d-00fc2p61****",
    "SSOEnabled": false,
    "Region": "cn-shanghai",
    "AccessConfigurationCount": 6,
    "DirectoryName": "new-example",
    "InProgressTaskCount": 0,
    "SCIMSyncEnabled": true,
    "SystemPolicyPerAccessConfigurationQuota": 20,
    "InlinePolicyPerAccessConfigurationQuota": 1
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-04-22The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-09-04The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.