- 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
Returns a list of users.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MemoryDBClient, DescribeUsersCommand } from "@aws-sdk/client-memorydb"; // ES Modules import
// const { MemoryDBClient, DescribeUsersCommand } = require("@aws-sdk/client-memorydb"); // CommonJS import
const client = new MemoryDBClient(config);
const input = { // DescribeUsersRequest
UserName: "STRING_VALUE",
Filters: [ // FilterList
{ // Filter
Name: "STRING_VALUE", // required
Values: [ // FilterValueList // required
"STRING_VALUE",
],
},
],
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new DescribeUsersCommand(input);
const response = await client.send(command);
// { // DescribeUsersResponse
// Users: [ // UserList
// { // User
// Name: "STRING_VALUE",
// Status: "STRING_VALUE",
// AccessString: "STRING_VALUE",
// ACLNames: [ // ACLNameList
// "STRING_VALUE",
// ],
// MinimumEngineVersion: "STRING_VALUE",
// Authentication: { // Authentication
// Type: "password" || "no-password" || "iam",
// PasswordCount: Number("int"),
// },
// ARN: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
DescribeUsersCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Filters | Filter[] | undefined | Filter to determine the list of users to return. |
MaxResults | number | undefined | The maximum number of records to include in the response. If more records exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved. |
NextToken | string | undefined | An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. |
UserName | string | undefined | The name of the user. |
DescribeUsersCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextToken | string | undefined | An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. |
Users | User[] | undefined | A list of users. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParameterCombinationException | client | |
UserNotFoundFault | client | |
MemoryDBServiceException | Base exception class for all service exceptions from MemoryDB service. |