- 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.
RemoveResourcePermissionCommand
Removes the permission for the specified principal from the specified resource.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkDocsClient, RemoveResourcePermissionCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, RemoveResourcePermissionCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // RemoveResourcePermissionRequest
AuthenticationToken: "STRING_VALUE",
ResourceId: "STRING_VALUE", // required
PrincipalId: "STRING_VALUE", // required
PrincipalType: "USER" || "GROUP" || "INVITE" || "ANONYMOUS" || "ORGANIZATION",
};
const command = new RemoveResourcePermissionCommand(input);
const response = await client.send(command);
// {};
RemoveResourcePermissionCommand Input
See RemoveResourcePermissionCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
PrincipalId Required | string | undefined | The principal ID of the resource. |
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. |
PrincipalType | PrincipalType | undefined | The principal type of the resource. |
RemoveResourcePermissionCommand Output
See RemoveResourcePermissionCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
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. |
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. |