put_resource_policy
¶
put_resource_policy(
policy_in_json: PolicyJsonString,
*,
config_overrides: Optional[GlueClientConfig] = None,
resource_arn: Optional[GlueResourceArn] = None,
policy_hash_condition: Optional[HashString] = None,
policy_exists_condition: Optional[ExistCondition] = None,
enable_hybrid: Optional[EnableHybridValues] = None,
) -> PutResourcePolicyResponse
Sets the Data Catalog resource policy for access control.
Parameters:
-
policy_in_json(PolicyJsonString) –Contains the policy document to set, in JSON format.
-
resource_arn(Optional[GlueResourceArn], default:None) –Do not use. For internal use only.
-
policy_hash_condition(Optional[HashString], default:None) –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. -
policy_exists_condition(Optional[ExistCondition], default:None) –A value of
MUST_EXISTis used to update a policy. A value ofNOT_EXISTis used to create a new policy. If a value ofNONEor a null value is used, the call does not depend on the existence of a policy. -
enable_hybrid(Optional[EnableHybridValues], default:None) –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'. -
Raises:
-
ConditionCheckFailureException–A specified condition was not satisfied.
-
EntityNotFoundException–A specified entity does not exist
-
InternalServiceException–An internal service error occurred.
-
InvalidInputException–The input provided was not valid.
-
OperationTimeoutException–The operation timed out.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_glue/_services/glue.py
16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 | |