Skip to main content

project_policies

Creates, updates, deletes, gets or lists a project_policies resource.

Overview

Nameproject_policies
TypeResource
Idaws.rekognition.project_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestampstring (date-time)The Unix datetime for the creation of the project policy.
last_updated_timestampstring (date-time)The Unix datetime for when the project policy was last updated.
policy_documentstringThe JSON document for the project policy. (pattern: <code>[\u0009\u000A\u000D\u0020-\u00FF]+</code>)
policy_namestringThe name of the project policy. (pattern: <code>[a-zA-Z0-9_.-]+</code>)
policy_revision_idstringThe revision ID of the project policy. (pattern: <code>[0-9A-Fa-f]+</code>)
project_arnstringThe Amazon Resource Name (ARN) of the project to which the project policy is attached. (pattern: <code>(^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:project/[a-zA-Z0-9_.-]{1,255}/[0-9]+$)</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_project_policiesselectregionThis operation applies only to Amazon Rekognition Custom Labels. Gets a list of the project policies attached to a project. To attach a project policy to a project, call PutProjectPolicy. To remove a project policy from a project, call DeleteProjectPolicy. This operation requires permissions to perform the rekognition:ListProjectPolicies action.
put_project_policyreplaceregion, ProjectArn, PolicyName, PolicyDocumentThis operation applies only to Amazon Rekognition Custom Labels. 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. Only applies to Custom Labels projects. 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.
delete_project_policydeleteregionThis operation applies only to Amazon Rekognition Custom Labels. Deletes an existing project policy. To get a list of project policies attached to a project, call ListProjectPolicies. To attach a project policy to a project, call PutProjectPolicy. This operation requires permissions to perform the rekognition:DeleteProjectPolicy action.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

This operation applies only to Amazon Rekognition Custom Labels. Gets a list of the project policies attached to a project. To attach a project policy to a project, call PutProjectPolicy. To remove a project policy from a project, call DeleteProjectPolicy. This operation requires permissions to perform the rekognition:ListProjectPolicies action.

SELECT
creation_timestamp,
last_updated_timestamp,
policy_document,
policy_name,
policy_revision_id,
project_arn
FROM aws.rekognition.project_policies
WHERE region = '{{ region }}' -- required
;

REPLACE examples

This operation applies only to Amazon Rekognition Custom Labels. 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. Only applies to Custom Labels projects. 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.

REPLACE aws.rekognition.project_policies
SET
ProjectArn = '{{ ProjectArn }}',
PolicyName = '{{ PolicyName }}',
PolicyRevisionId = '{{ PolicyRevisionId }}',
PolicyDocument = '{{ PolicyDocument }}'
WHERE
region = '{{ region }}' --required
AND ProjectArn = '{{ ProjectArn }}' --required
AND PolicyName = '{{ PolicyName }}' --required
AND PolicyDocument = '{{ PolicyDocument }}' --required
RETURNING
policy_revision_id;

DELETE examples

This operation applies only to Amazon Rekognition Custom Labels. Deletes an existing project policy. To get a list of project policies attached to a project, call ListProjectPolicies. To attach a project policy to a project, call PutProjectPolicy. This operation requires permissions to perform the rekognition:DeleteProjectPolicy action.

DELETE FROM aws.rekognition.project_policies
WHERE region = '{{ region }}' --required
;