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
17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 17229 17230 17231 17232 17233 17234 17235 17236 17237 17238 17239 17240 17241 17242 17243 17244 17245 17246 17247 17248 17249 17250 17251 17252 17253 17254 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 17268 17269 17270 17271 17272 17273 17274 17275 17276 17277 17278 17279 17280 17281 17282 17283 17284 17285 | |