project_policies
Creates, updates, deletes, gets or lists a project_policies resource.
Overview
| Name | project_policies |
| Type | Resource |
| Id | aws.rekognition.project_policies |
Fields
The following fields are returned by SELECT queries:
- list_project_policies
| Name | Datatype | Description |
|---|---|---|
creation_timestamp | string (date-time) | The Unix datetime for the creation of the project policy. |
last_updated_timestamp | string (date-time) | The Unix datetime for when the project policy was last updated. |
policy_document | string | The JSON document for the project policy. (pattern: <code>[\u0009\u000A\u000D\u0020-\u00FF]+</code>) |
policy_name | string | The name of the project policy. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
policy_revision_id | string | The revision ID of the project policy. (pattern: <code>[0-9A-Fa-f]+</code>) |
project_arn | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_project_policies | select | region | 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. | |
put_project_policy | replace | region, ProjectArn, PolicyName, PolicyDocument | 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. | |
delete_project_policy | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_project_policies
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
- put_project_policy
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
- delete_project_policy
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
;