- 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.
DescribeResourcePermissionsCommand
Describes the permissions of a specified resource.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkDocsClient, DescribeResourcePermissionsCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, DescribeResourcePermissionsCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // DescribeResourcePermissionsRequest
AuthenticationToken: "STRING_VALUE",
ResourceId: "STRING_VALUE", // required
PrincipalId: "STRING_VALUE",
Limit: Number("int"),
Marker: "STRING_VALUE",
};
const command = new DescribeResourcePermissionsCommand(input);
const response = await client.send(command);
// { // DescribeResourcePermissionsResponse
// Principals: [ // PrincipalList
// { // Principal
// Id: "STRING_VALUE",
// Type: "USER" || "GROUP" || "INVITE" || "ANONYMOUS" || "ORGANIZATION",
// Roles: [ // PermissionInfoList
// { // PermissionInfo
// Role: "VIEWER" || "CONTRIBUTOR" || "OWNER" || "COOWNER",
// Type: "DIRECT" || "INHERITED",
// },
// ],
// },
// ],
// Marker: "STRING_VALUE",
// };
DescribeResourcePermissionsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ResourceId Required | string | undefined | The ID of the resource. |
AuthenticationToken | string | undefined | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
Limit | number | undefined | The maximum number of items to return with this call. |
Marker | string | undefined | The marker for the next set of results. (You received this marker from a previous call) |
PrincipalId | string | undefined | The ID of the principal to filter permissions by. |
DescribeResourcePermissionsCommand 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. |
Principals | Principal[] | undefined | The principals. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
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. |
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. |