DeleteResourcePolicyCommand

Deletes a resource-based policy that is attached to a custom model.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ComprehendClient, DeleteResourcePolicyCommand } from "@aws-sdk/client-comprehend"; // ES Modules import
// const { ComprehendClient, DeleteResourcePolicyCommand } = require("@aws-sdk/client-comprehend"); // CommonJS import
const client = new ComprehendClient(config);
const input = { // DeleteResourcePolicyRequest
  ResourceArn: "STRING_VALUE", // required
  PolicyRevisionId: "STRING_VALUE",
};
const command = new DeleteResourcePolicyCommand(input);
const response = await client.send(command);
// {};

DeleteResourcePolicyCommand Input

Parameter
Type
Description
ResourceArn
Required
string | undefined

The Amazon Resource Name (ARN) of the custom model version that has the policy to delete.

PolicyRevisionId
string | undefined

The revision ID of the policy to delete.

DeleteResourcePolicyCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InternalServerException
server

An internal server error occurred. Retry your request.

InvalidRequestException
client

The request is invalid.

ResourceNotFoundException
client

The specified resource ARN was not found. Check the ARN and try your request again.

ComprehendServiceException
Base exception class for all service exceptions from Comprehend service.