PutPolicyCommand

Updates the resource-based policy.

Example Syntax

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

import { EntityResolutionClient, PutPolicyCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import
// const { EntityResolutionClient, PutPolicyCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import
const client = new EntityResolutionClient(config);
const input = { // PutPolicyInput
  arn: "STRING_VALUE", // required
  token: "STRING_VALUE",
  policy: "STRING_VALUE", // required
};
const command = new PutPolicyCommand(input);
const response = await client.send(command);
// { // PutPolicyOutput
//   arn: "STRING_VALUE", // required
//   token: "STRING_VALUE", // required
//   policy: "STRING_VALUE",
// };

PutPolicyCommand Input

See PutPolicyCommandInput for more details

Parameter
Type
Description
arn
Required
string | undefined

The Amazon Resource Name (ARN) of the resource for which the policy needs to be updated.

policy
Required
string | undefined

The resource-based policy.

If you set the value of the effect parameter in the policy to Deny for the PutPolicy operation, you must also set the value of the effect parameter to Deny for the AddPolicyStatement operation.

token
string | undefined

A unique identifier for the current revision of the policy.

PutPolicyCommand Output

See PutPolicyCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
arn
Required
string | undefined

The Entity Resolution resource ARN.

token
Required
string | undefined

A unique identifier for the current revision of the policy.

policy
string | undefined

The resource-based policy.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ConflictException
client

The request could not be processed because of conflict in the current state of the resource. Example: Workflow already exists, Schema already exists, Workflow is currently running, etc.

InternalServerException
server

This exception occurs when there is an internal failure in the Entity Resolution service.

ResourceNotFoundException
client

The resource could not be found.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the constraints specified by Entity Resolution.

EntityResolutionServiceException
Base exception class for all service exceptions from EntityResolution service.