- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeUsersCommand
Describes the specified users. You can describe all users or filter the results (for example, by status or organization).
By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkDocsClient, DescribeUsersCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, DescribeUsersCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // DescribeUsersRequest
AuthenticationToken: "STRING_VALUE",
OrganizationId: "STRING_VALUE",
UserIds: "STRING_VALUE",
Query: "STRING_VALUE",
Include: "ALL" || "ACTIVE_PENDING",
Order: "ASCENDING" || "DESCENDING",
Sort: "USER_NAME" || "FULL_NAME" || "STORAGE_LIMIT" || "USER_STATUS" || "STORAGE_USED",
Marker: "STRING_VALUE",
Limit: Number("int"),
Fields: "STRING_VALUE",
};
const command = new DescribeUsersCommand(input);
const response = await client.send(command);
// { // DescribeUsersResponse
// Users: [ // OrganizationUserList
// { // User
// Id: "STRING_VALUE",
// Username: "STRING_VALUE",
// EmailAddress: "STRING_VALUE",
// GivenName: "STRING_VALUE",
// Surname: "STRING_VALUE",
// OrganizationId: "STRING_VALUE",
// RootFolderId: "STRING_VALUE",
// RecycleBinFolderId: "STRING_VALUE",
// Status: "ACTIVE" || "INACTIVE" || "PENDING",
// Type: "USER" || "ADMIN" || "POWERUSER" || "MINIMALUSER" || "WORKSPACESUSER",
// CreatedTimestamp: new Date("TIMESTAMP"),
// ModifiedTimestamp: new Date("TIMESTAMP"),
// TimeZoneId: "STRING_VALUE",
// Locale: "en" || "fr" || "ko" || "de" || "es" || "ja" || "ru" || "zh_CN" || "zh_TW" || "pt_BR" || "default",
// Storage: { // UserStorageMetadata
// StorageUtilizedInBytes: Number("long"),
// StorageRule: { // StorageRuleType
// StorageAllocatedInBytes: Number("long"),
// StorageType: "UNLIMITED" || "QUOTA",
// },
// },
// },
// ],
// TotalNumberOfUsers: Number("long"),
// Marker: "STRING_VALUE",
// };
DescribeUsersCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AuthenticationToken | string | undefined | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
Fields | string | undefined | A comma-separated list of values. Specify "STORAGE_METADATA" to include the user storage quota and utilization information. |
Include | UserFilterType | undefined | The state of the users. Specify "ALL" to include inactive users. |
Limit | number | undefined | The maximum number of items to return. |
Marker | string | undefined | The marker for the next set of results. (You received this marker from a previous call.) |
Order | OrderType | undefined | The order for the results. |
OrganizationId | string | undefined | The ID of the organization. |
Query | string | undefined | A query to filter users by user name. Remember the following about the
|
Sort | UserSortType | undefined | The sorting criteria. |
UserIds | string | undefined | The IDs of the users. |
DescribeUsersCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Marker | string | undefined | The marker to use when requesting the next set of results. If there are no additional results, the string is empty. |
TotalNumberOfUsers | number | undefined | The total number of users included in the results. |
Users | User[] | undefined | The users. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotExistsException | client | The resource does not exist. |
FailedDependencyException | client | The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory. |
InvalidArgumentException | client | The pagination marker or limit fields are not valid. |
RequestedEntityTooLargeException | client | The response is too large to return. The request must include a filter to reduce the size of the response. |
ServiceUnavailableException | server | One or more of the dependencies is unavailable. |
UnauthorizedOperationException | client | The operation is not permitted. |
UnauthorizedResourceAccessException | client | The caller does not have access to perform the action on the resource. |
WorkDocsServiceException | Base exception class for all service exceptions from WorkDocs service. |