| 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.Glue.PutResourcePolicy
Description
Sets the Data Catalog resource policy for access control.
Synopsis
- data PutResourcePolicy = PutResourcePolicy' {}
- newPutResourcePolicy :: Text -> PutResourcePolicy
- putResourcePolicy_enableHybrid :: Lens' PutResourcePolicy (Maybe EnableHybridValues)
- putResourcePolicy_policyExistsCondition :: Lens' PutResourcePolicy (Maybe ExistCondition)
- putResourcePolicy_policyHashCondition :: Lens' PutResourcePolicy (Maybe Text)
- putResourcePolicy_resourceArn :: Lens' PutResourcePolicy (Maybe Text)
- putResourcePolicy_policyInJson :: Lens' PutResourcePolicy Text
- data PutResourcePolicyResponse = PutResourcePolicyResponse' {
- policyHash :: Maybe Text
- httpStatus :: Int
- newPutResourcePolicyResponse :: Int -> PutResourcePolicyResponse
- putResourcePolicyResponse_policyHash :: Lens' PutResourcePolicyResponse (Maybe Text)
- putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int
Creating a Request
data PutResourcePolicy Source #
See: newPutResourcePolicy smart constructor.
Constructors
| PutResourcePolicy' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> PutResourcePolicy |
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: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: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.
PutResourcePolicy, putResourcePolicy_policyInJson - Contains the policy document to set, in JSON format.
Request Lenses
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_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_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
| |
Instances
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:
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.
putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int Source #
The response's http status code.