- 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.
DescribeResourcePolicyCommand
Gets the details of a resource-based policy that is attached to a custom model, including the JSON body of the policy.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ComprehendClient, DescribeResourcePolicyCommand } from "@aws-sdk/client-comprehend"; // ES Modules import
// const { ComprehendClient, DescribeResourcePolicyCommand } = require("@aws-sdk/client-comprehend"); // CommonJS import
const client = new ComprehendClient(config);
const input = { // DescribeResourcePolicyRequest
ResourceArn: "STRING_VALUE", // required
};
const command = new DescribeResourcePolicyCommand(input);
const response = await client.send(command);
// { // DescribeResourcePolicyResponse
// ResourcePolicy: "STRING_VALUE",
// CreationTime: new Date("TIMESTAMP"),
// LastModifiedTime: new Date("TIMESTAMP"),
// PolicyRevisionId: "STRING_VALUE",
// };
DescribeResourcePolicyCommand Input
See DescribeResourcePolicyCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ResourceArn Required | string | undefined | The Amazon Resource Name (ARN) of the custom model version that has the resource policy. |
DescribeResourcePolicyCommand Output
See DescribeResourcePolicyCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
CreationTime | Date | undefined | The time at which the policy was created. |
LastModifiedTime | Date | undefined | The time at which the policy was last modified. |
PolicyRevisionId | string | undefined | The revision ID of the policy. Each time you modify a policy, Amazon Comprehend assigns a new revision ID, and it deletes the prior version of the policy. |
ResourcePolicy | string | undefined | The JSON body of the resource-based policy. |
Throws
Name | Fault | Details |
---|
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. |