libZSservicesZSamazonka-glueZSamazonka-glue
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Glue.PutResourcePolicy

Description

Sets the Data Catalog resource policy for access control.

Synopsis

Creating a Request

data PutResourcePolicy Source #

See: newPutResourcePolicy smart constructor.

Constructors

PutResourcePolicy' 

Fields

  • policyExistsCondition :: Maybe ExistCondition

    A value of MUST_EXIST is used to update a policy. A value of NOT_EXIST is used to create a new policy. If a value of NONE or a null value is used, the call does not depend on the existence of a policy.

  • policyHashCondition :: Maybe Text

    The hash value returned when the previous policy was set using PutResourcePolicy. Its purpose is to prevent concurrent modifications of a policy. Do not use this parameter if no previous policy has been set.

  • resourceArn :: Maybe Text

    Do not use. For internal use only.

  • enableHybrid :: Maybe EnableHybridValues

    If 'TRUE', indicates that you are using both methods to grant cross-account access to Data Catalog resources:

    • By directly updating the resource policy with PutResourePolicy
    • By using the Grant permissions command on the Amazon Web Services Management Console.

    Must be set to 'TRUE' if you have already used the Management Console to grant cross-account access, otherwise the call fails. Default is 'FALSE'.

  • policyInJson :: Text

    Contains the policy document to set, in JSON format.

Instances

Instances details
Eq PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Read PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Show PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Generic PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Associated Types

type Rep PutResourcePolicy :: Type -> Type #

NFData PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Methods

rnf :: PutResourcePolicy -> () #

Hashable PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

ToJSON PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

AWSRequest PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Associated Types

type AWSResponse PutResourcePolicy #

ToHeaders PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

ToPath PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

ToQuery PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

type Rep PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

type Rep PutResourcePolicy = D1 ('MetaData "PutResourcePolicy" "Amazonka.Glue.PutResourcePolicy" "libZSservicesZSamazonka-glueZSamazonka-glue" 'False) (C1 ('MetaCons "PutResourcePolicy'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "policyExistsCondition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ExistCondition)) :*: S1 ('MetaSel ('Just "policyHashCondition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "resourceArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "enableHybrid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EnableHybridValues)) :*: S1 ('MetaSel ('Just "policyInJson") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse PutResourcePolicy Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

newPutResourcePolicy Source #

Create a value of PutResourcePolicy 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:

$sel:policyExistsCondition:PutResourcePolicy', putResourcePolicy_policyExistsCondition - A value of MUST_EXIST is used to update a policy. A value of NOT_EXIST is used to create a new policy. If a value of NONE or a null value is used, the call does not depend on the existence of a policy.

$sel:policyHashCondition:PutResourcePolicy', putResourcePolicy_policyHashCondition - The hash value returned when the previous policy was set using PutResourcePolicy. Its purpose is to prevent concurrent modifications of a policy. Do not use this parameter if no previous policy has been set.

$sel:resourceArn:PutResourcePolicy', putResourcePolicy_resourceArn - Do not use. For internal use only.

$sel:enableHybrid:PutResourcePolicy', putResourcePolicy_enableHybrid - If 'TRUE', indicates that you are using both methods to grant cross-account access to Data Catalog resources:

  • By directly updating the resource policy with PutResourePolicy
  • By using the Grant permissions command on the Amazon Web Services Management Console.

Must be set to 'TRUE' if you have already used the Management Console to grant cross-account access, otherwise the call fails. Default is 'FALSE'.

$sel:policyInJson:PutResourcePolicy', putResourcePolicy_policyInJson - Contains the policy document to set, in JSON format.

Request Lenses

putResourcePolicy_policyExistsCondition :: Lens' PutResourcePolicy (Maybe ExistCondition) Source #

A value of MUST_EXIST is used to update a policy. A value of NOT_EXIST is used to create a new policy. If a value of NONE or a null value is used, the call does not depend on the existence of a policy.

putResourcePolicy_policyHashCondition :: Lens' PutResourcePolicy (Maybe Text) Source #

The hash value returned when the previous policy was set using PutResourcePolicy. Its purpose is to prevent concurrent modifications of a policy. Do not use this parameter if no previous policy has been set.

putResourcePolicy_resourceArn :: Lens' PutResourcePolicy (Maybe Text) Source #

Do not use. For internal use only.

putResourcePolicy_enableHybrid :: Lens' PutResourcePolicy (Maybe EnableHybridValues) Source #

If 'TRUE', indicates that you are using both methods to grant cross-account access to Data Catalog resources:

  • By directly updating the resource policy with PutResourePolicy
  • By using the Grant permissions command on the Amazon Web Services Management Console.

Must be set to 'TRUE' if you have already used the Management Console to grant cross-account access, otherwise the call fails. Default is 'FALSE'.

putResourcePolicy_policyInJson :: Lens' PutResourcePolicy Text Source #

Contains the policy document to set, in JSON format.

Destructuring the Response

data PutResourcePolicyResponse Source #

See: newPutResourcePolicyResponse smart constructor.

Constructors

PutResourcePolicyResponse' 

Fields

  • policyHash :: Maybe Text

    A hash of the policy that has just been set. This must be included in a subsequent call that overwrites or updates this policy.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Read PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Show PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Generic PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

Associated Types

type Rep PutResourcePolicyResponse :: Type -> Type #

NFData PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

type Rep PutResourcePolicyResponse Source # 
Instance details

Defined in Amazonka.Glue.PutResourcePolicy

type Rep PutResourcePolicyResponse = D1 ('MetaData "PutResourcePolicyResponse" "Amazonka.Glue.PutResourcePolicy" "libZSservicesZSamazonka-glueZSamazonka-glue" 'False) (C1 ('MetaCons "PutResourcePolicyResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "policyHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newPutResourcePolicyResponse Source #

Create a value of PutResourcePolicyResponse 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:

$sel:policyHash:PutResourcePolicyResponse', putResourcePolicyResponse_policyHash - A hash of the policy that has just been set. This must be included in a subsequent call that overwrites or updates this policy.

$sel:httpStatus:PutResourcePolicyResponse', putResourcePolicyResponse_httpStatus - The response's http status code.

Response Lenses

putResourcePolicyResponse_policyHash :: Lens' PutResourcePolicyResponse (Maybe Text) Source #

A hash of the policy that has just been set. This must be included in a subsequent call that overwrites or updates this policy.