Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Sets the Data Catalog resource policy for access control.
Synopsis
- data PutResourcePolicy = PutResourcePolicy' {}
- newPutResourcePolicy :: Text -> PutResourcePolicy
- putResourcePolicy_policyExistsCondition :: Lens' PutResourcePolicy (Maybe ExistCondition)
- putResourcePolicy_policyHashCondition :: Lens' PutResourcePolicy (Maybe Text)
- putResourcePolicy_resourceArn :: Lens' PutResourcePolicy (Maybe Text)
- putResourcePolicy_enableHybrid :: Lens' PutResourcePolicy (Maybe EnableHybridValues)
- 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.
PutResourcePolicy' | |
|
Instances
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.
PutResourcePolicyResponse' | |
|
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:
$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.
putResourcePolicyResponse_httpStatus :: Lens' PutResourcePolicyResponse Int Source #
The response's http status code.