Updates the filter expression of an existing row-level security policy. The change applies to all attachments of the policy.
Parameters:
-
name
(NameString)
–
The name of the row-level security policy to update.
-
filter_expression
(Optional[PredicateString], default:
None
)
–
The new filter predicate, written in a SQL-like syntax, that replaces the policy's current filter expression.
Raises:
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
| async def update_rls_policy(
self,
name: "capo_lakeformation.types.name_string.NameString",
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
filter_expression: Optional[
"capo_lakeformation.types.predicate_string.PredicateString"
] = None,
) -> "capo_lakeformation.types.update_rls_policy_response.UpdateRLSPolicyResponse":
"""<p>Updates the filter expression of an existing row-level security policy. The change applies to all attachments of the policy.</p>
Args:
name: <p>The name of the row-level security policy to update.</p>
filter_expression: <p>The new filter predicate, written in a SQL-like syntax, that replaces the policy's current filter expression.</p>
Raises:
capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
capo_lakeformation.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</p>
capo_lakeformation.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist.</p>
capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
capo_lakeformation.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
capo_lakeformation.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
capo_lakeformation.errors.resource_number_limit_exceeded_exception.ResourceNumberLimitExceededException: <p>A resource numerical limit was exceeded.</p>
capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_lakeformation.types.update_rls_policy_request.UpdateRLSPolicyRequest]",
) -> AsyncOperationResponse[
"capo_lakeformation.types.update_rls_policy_response.UpdateRLSPolicyResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.update_rls_policy
(
output,
http_response,
) = await capo_lakeformation._operations.aws_lake_formation.update_rls_policy.async_update_rls_policy(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateRLSPolicy")
)
input_: capo_lakeformation.types.update_rls_policy_request.UpdateRLSPolicyRequest = {
"name": name
}
if filter_expression is not None:
input_["filter_expression"] = filter_expression
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|