Skip to content

GlueClient.put_resource_policy

rboto-glue==0.4.0 · Service index · Types

Model summary (excerpt): Sets the Data Catalog resource policy for access control.

Install and imports

python -m pip install "rboto[glue]==0.4.0"
from rboto import GlueClient
from rboto_glue.types import (
    EnableHybridValues,
    ExistCondition,
    PutResourcePolicyOutput,
)

Signature

async def put_resource_policy(
    *,
    policy_in_json: str,
    resource_arn: str | None = None,
    policy_hash_condition: str | None = None,
    policy_exists_condition: ExistCondition | None = None,
    enable_hybrid: EnableHybridValues | None = None,
) -> PutResourcePolicyOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
policy_in_json Yes Contains the policy document to set, in JSON format.
resource_arn No Do not use. For internal use only.
policy_hash_condition No 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 No 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.
enable_hybrid No 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...

Output

PutResourcePolicyOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
policy_hash str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

EnableHybridValues, ExistCondition, PutResourcePolicyOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_glue.exceptions:

ConditionCheckFailureError, EntityNotFoundError, InternalServiceError, InvalidInputError, OperationTimeoutError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model