attach_rls_policy
¶
attach_rls_policy(
name: NameString,
resource: Resource,
*,
config_overrides: Optional[LakeFormationClientConfig] = None,
principal: Optional[DataLakePrincipal] = None,
condition: Optional[Condition] = None,
set_default: Optional[NullableBoolean] = None,
) -> AttachRLSPolicyResponse
Attaches a row-level security policy to a resource for a principal. When the principal queries the resource, Lake Formation applies the policy's filter expression so that only the permitted rows are returned.
Parameters:
-
name(NameString) –The name of the row-level security policy to attach.
-
resource(Resource) –The resource to which the row-level security policy is attached.
-
principal(Optional[DataLakePrincipal], default:None) –The principal to which the row-level security policy applies.
-
condition(Optional[Condition], default:None) –A Lake Formation condition, which applies to the row-level security policy attachment and contains an expression.
-
set_default(Optional[NullableBoolean], default:None) –Indicates whether this policy becomes the default row-level security policy for the resource. The default policy applies to all principals by default.
Raises:
-
AccessDeniedException–Access to a resource was denied.
-
AlreadyExistsException–A resource to be created or added already exists.
-
ConcurrentModificationException–Two processes are trying to modify a resource simultaneously.
-
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.
-
ResourceNumberLimitExceededException–A resource numerical limit was exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.