put_resource_policy
async
¶
put_resource_policy(
policy_in_json: PolicyJsonString,
*,
config_overrides: Optional[AsyncGlueClientConfig] = 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/async_glue.py
16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 | |