Smaws_Client_Rekognition.PutProjectPolicyThis 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.
val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `AccessDeniedException of Types.access_denied_exception
| `InternalServerError of Types.internal_server_error
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidPolicyRevisionIdException of
Types.invalid_policy_revision_id_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `MalformedPolicyDocumentException of
Types.malformed_policy_document_exception
| `ProvisionedThroughputExceededException of
Types.provisioned_throughput_exceeded_exception
| `ResourceAlreadyExistsException of Types.resource_already_exists_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `ServiceQuotaExceededException of Types.service_quota_exceeded_exception
| `ThrottlingException of Types.throttling_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.put_project_policy_request ->
(Types.put_project_policy_response,
[> Smaws_Lib.Protocols.AwsJson.error
| `AccessDeniedException of Types.access_denied_exception
| `InternalServerError of Types.internal_server_error
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidPolicyRevisionIdException of
Types.invalid_policy_revision_id_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `MalformedPolicyDocumentException of
Types.malformed_policy_document_exception
| `ProvisionedThroughputExceededException of
Types.provisioned_throughput_exceeded_exception
| `ResourceAlreadyExistsException of
Types.resource_already_exists_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `ServiceQuotaExceededException of Types.service_quota_exceeded_exception
| `ThrottlingException of Types.throttling_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.put_project_policy_request ->
(Types.put_project_policy_response Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `AccessDeniedException of Types.access_denied_exception
| `InternalServerError of Types.internal_server_error
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidPolicyRevisionIdException of
Types.invalid_policy_revision_id_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `MalformedPolicyDocumentException of
Types.malformed_policy_document_exception
| `ProvisionedThroughputExceededException of
Types.provisioned_throughput_exceeded_exception
| `ResourceAlreadyExistsException of
Types.resource_already_exists_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `ServiceQuotaExceededException of Types.service_quota_exceeded_exception
| `ThrottlingException of Types.throttling_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result