| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.Rekognition.PutProjectPolicy
Description
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.
Synopsis
- data PutProjectPolicy = PutProjectPolicy' {}
- newPutProjectPolicy :: Text -> Text -> Text -> PutProjectPolicy
- putProjectPolicy_policyRevisionId :: Lens' PutProjectPolicy (Maybe Text)
- putProjectPolicy_projectArn :: Lens' PutProjectPolicy Text
- putProjectPolicy_policyName :: Lens' PutProjectPolicy Text
- putProjectPolicy_policyDocument :: Lens' PutProjectPolicy Text
- data PutProjectPolicyResponse = PutProjectPolicyResponse' {}
- newPutProjectPolicyResponse :: Int -> PutProjectPolicyResponse
- putProjectPolicyResponse_policyRevisionId :: Lens' PutProjectPolicyResponse (Maybe Text)
- putProjectPolicyResponse_httpStatus :: Lens' PutProjectPolicyResponse Int
Creating a Request
data PutProjectPolicy Source #
See: newPutProjectPolicy smart constructor.
Constructors
| PutProjectPolicy' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> Text | |
| -> Text | |
| -> PutProjectPolicy |
Create a value of PutProjectPolicy with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
PutProjectPolicy, putProjectPolicy_policyRevisionId - The revision ID for the Project Policy. Each time you modify a policy,
Amazon Rekognition Custom Labels generates and assigns a new
PolicyRevisionId and then deletes the previous version of the policy.
PutProjectPolicy, putProjectPolicy_projectArn - The Amazon Resource Name (ARN) of the project that the project policy is
attached to.
PutProjectPolicy, putProjectPolicy_policyName - A name for the policy.
PutProjectPolicy, putProjectPolicy_policyDocument - 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
IAM JSON policy reference.
Request Lenses
putProjectPolicy_policyRevisionId :: Lens' PutProjectPolicy (Maybe Text) Source #
The revision ID for the Project Policy. Each time you modify a policy,
Amazon Rekognition Custom Labels generates and assigns a new
PolicyRevisionId and then deletes the previous version of the policy.
putProjectPolicy_projectArn :: Lens' PutProjectPolicy Text Source #
The Amazon Resource Name (ARN) of the project that the project policy is attached to.
putProjectPolicy_policyName :: Lens' PutProjectPolicy Text Source #
A name for the policy.
putProjectPolicy_policyDocument :: Lens' PutProjectPolicy Text Source #
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 IAM JSON policy reference.
Destructuring the Response
data PutProjectPolicyResponse Source #
See: newPutProjectPolicyResponse smart constructor.
Constructors
| PutProjectPolicyResponse' | |
Fields
| |
Instances
newPutProjectPolicyResponse Source #
Create a value of PutProjectPolicyResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
PutProjectPolicy, putProjectPolicyResponse_policyRevisionId - The ID of the project policy.
$sel:httpStatus:PutProjectPolicyResponse', putProjectPolicyResponse_httpStatus - The response's http status code.
Response Lenses
putProjectPolicyResponse_policyRevisionId :: Lens' PutProjectPolicyResponse (Maybe Text) Source #
The ID of the project policy.
putProjectPolicyResponse_httpStatus :: Lens' PutProjectPolicyResponse Int Source #
The response's http status code.