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
17495 17496 17497 17498 17499 17500 17501 17502 17503 17504 17505 17506 17507 17508 17509 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 17525 17526 17527 17528 17529 17530 17531 17532 17533 17534 17535 17536 17537 17538 17539 17540 17541 17542 17543 17544 17545 17546 17547 17548 17549 17550 17551 17552 17553 17554 17555 17556 17557 17558 17559 17560 17561 17562 17563 17564 17565 17566 17567 | |