amazonka-rekognition-2.0: Amazon Rekognition SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Creating a Request

data PutProjectPolicy Source #

See: newPutProjectPolicy smart constructor.

Constructors

PutProjectPolicy' 

Fields

  • policyRevisionId :: Maybe Text

    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.

  • projectArn :: Text

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

  • policyName :: Text

    A name for the policy.

  • policyDocument :: Text

    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.

Instances

Instances details
ToJSON PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

ToHeaders PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

ToPath PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

ToQuery PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

AWSRequest PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

Associated Types

type AWSResponse PutProjectPolicy #

Generic PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

Associated Types

type Rep PutProjectPolicy :: Type -> Type #

Read PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

Show PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

NFData PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

Methods

rnf :: PutProjectPolicy -> () #

Eq PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

Hashable PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

type AWSResponse PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

type Rep PutProjectPolicy Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

type Rep PutProjectPolicy = D1 ('MetaData "PutProjectPolicy" "Amazonka.Rekognition.PutProjectPolicy" "amazonka-rekognition-2.0-EaCrS9R3rWADqefEZvOx5B" 'False) (C1 ('MetaCons "PutProjectPolicy'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "policyRevisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "projectArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "policyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "policyDocument") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newPutProjectPolicy Source #

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_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

Instances details
Generic PutProjectPolicyResponse Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

Associated Types

type Rep PutProjectPolicyResponse :: Type -> Type #

Read PutProjectPolicyResponse Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

Show PutProjectPolicyResponse Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

NFData PutProjectPolicyResponse Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

Eq PutProjectPolicyResponse Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

type Rep PutProjectPolicyResponse Source # 
Instance details

Defined in Amazonka.Rekognition.PutProjectPolicy

type Rep PutProjectPolicyResponse = D1 ('MetaData "PutProjectPolicyResponse" "Amazonka.Rekognition.PutProjectPolicy" "amazonka-rekognition-2.0-EaCrS9R3rWADqefEZvOx5B" 'False) (C1 ('MetaCons "PutProjectPolicyResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policyRevisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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