v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1432172211.2 KB

Attaches or replaces a resource-based policy on an Amazon Web Services Payment Cryptography key. A resource-based policy can grant cross-account access to your key.

If the policy would grant public access, the request fails with a PublicPolicyException.

To remove a resource-based policy from a key, use DeleteResourcePolicy.

Cross-account use: This operation can't be used across different Amazon Web Services accounts.

Related operations:

post/#X-Amz-Target=PaymentCryptographyControlPlane.PutResourcePolicy

Headers

X-Amz-Target'PaymentCryptographyControlPlane.PutResourcePolicy' required

Request body

ResourceArnstring required

The <code>KeyARN</code> of the key to attach the resource-based policy to.

Policystring required

The resource-based policy to attach to the key, in JSON format.

Response

Success

ResourceArnstring required

The <code>KeyARN</code> of the key that the resource-based policy was attached to.

Policystring required

The resource-based policy that was attached to the key.