- 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.
ListResourceDelegatesCommand
Lists the delegates associated with a resource. Users and groups can be resource delegates and answer requests on behalf of the resource.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkMailClient, ListResourceDelegatesCommand } from "@aws-sdk/client-workmail"; // ES Modules import
// const { WorkMailClient, ListResourceDelegatesCommand } = require("@aws-sdk/client-workmail"); // CommonJS import
const client = new WorkMailClient(config);
const input = { // ListResourceDelegatesRequest
OrganizationId: "STRING_VALUE", // required
ResourceId: "STRING_VALUE", // required
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new ListResourceDelegatesCommand(input);
const response = await client.send(command);
// { // ListResourceDelegatesResponse
// Delegates: [ // ResourceDelegates
// { // Delegate
// Id: "STRING_VALUE", // required
// Type: "GROUP" || "USER", // required
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListResourceDelegatesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
OrganizationId Required | string | undefined | The identifier for the organization that contains the resource for which delegates are listed. |
ResourceId Required | string | undefined | The identifier for the resource whose delegates are listed. The identifier can accept ResourceId, Resourcename, or email. The following identity formats are available:
|
MaxResults | number | undefined | The number of maximum results in a page. |
NextToken | string | undefined | The token used to paginate through the delegates associated with a resource. |
ListResourceDelegatesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Delegates | Delegate[] | undefined | One page of the resource's delegates. |
NextToken | string | undefined | The token used to paginate through the delegates associated with a resource. While results are still available, it has an associated value. When the last page is reached, the token is empty. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EntityNotFoundException | client | The identifier supplied for the user, group, or resource does not exist in your organization. |
EntityStateException | client | You are performing an operation on a user, group, or resource that isn't in the expected state, such as trying to delete an active user. |
InvalidParameterException | client | One or more of the input parameters don't match the service's restrictions. |
OrganizationNotFoundException | client | An operation received a valid organization identifier that either doesn't belong or exist in the system. |
OrganizationStateException | client | The organization must have a valid state to perform certain operations on the organization or its members. |
UnsupportedOperationException | client | You can't perform a write operation against a read-only directory. |
WorkMailServiceException | Base exception class for all service exceptions from WorkMail service. |