v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1465453454.1 KB

Attaches a project policy to a Amazon Rekognition Custom Labels project in a trusting AWS account. A project policy specifies that a trusted AWS account can copy a model version from a trusting AWS account to a project in the trusted AWS account. To copy a model version you use the CopyProjectVersion operation.

For more information about the format of a project policy document, see Attaching a project policy (SDK) in the Amazon Rekognition Custom Labels Developer Guide.

The response from PutProjectPolicy is a revision ID for the project policy. You can attach multiple project policies to a project. You can also update an existing project policy by specifying the policy revision ID of the existing policy.

To remove a project policy from a project, call DeleteProjectPolicy. To get a list of project policies attached to a project, call ListProjectPolicies.

You copy a model version by calling CopyProjectVersion.

This operation requires permissions to perform the rekognition:PutProjectPolicy action.

post/#X-Amz-Target=RekognitionService.PutProjectPolicy

Headers

X-Amz-Target'RekognitionService.PutProjectPolicy' required

Request body

ProjectArnstring required

The Amazon Resource Name (ARN) of the project that the project policy is attached to.

PolicyNamestring required

A name for the policy.

PolicyRevisionIdstring

The revision ID for the Project Policy. Each time you modify a policy, Amazon Rekognition Custom Labels generates and assigns a new <code>PolicyRevisionId</code> and then deletes the previous version of the policy.

PolicyDocumentstring required

A resource policy to add to the model. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html">IAM JSON policy reference</a>.

Response

Success

PolicyRevisionIdstring

The ID of the project policy.

Example response

{
  "PolicyRevisionId": "0123456789abcdef"
}