AclHandler

Struct AclHandler 

Source
pub struct AclHandler { /* private fields */ }
Expand description

Handler for Role-based Access Control (RBAC) operations

Manages ACLs for users, roles, Redis rules, and database-level access controls. Provides fine-grained permission management for Redis Cloud resources.

Implementations§

Source§

impl AclHandler

Source

pub fn new(client: CloudClient) -> Self

Create a new handler

Source

pub async fn get_all_redis_rules(&self) -> Result<AccountACLRedisRules>

Get Redis ACL rules Gets a list of all Redis ACL rules for this account.

GET /acl/redisRules

Source

pub async fn create_redis_rule( &self, request: &AclRedisRuleCreateRequest, ) -> Result<TaskStateUpdate>

Create Redis ACL rule Creates a new Redis ACL rule.

POST /acl/redisRules

Source

pub async fn delete_redis_rule( &self, acl_redis_rule_id: i32, ) -> Result<TaskStateUpdate>

Delete Redis ACL rule Deletes a Redis ACL rule.

DELETE /acl/redisRules/{aclRedisRuleId}

Source

pub async fn update_redis_rule( &self, acl_redis_rule_id: i32, request: &AclRedisRuleUpdateRequest, ) -> Result<TaskStateUpdate>

Update Redis ACL rule Updates a Redis ACL rule.

PUT /acl/redisRules/{aclRedisRuleId}

Source

pub async fn get_roles(&self) -> Result<AccountACLRoles>

Get database access roles Gets a list of all database access roles for this account.

GET /acl/roles

Source

pub async fn create_role( &self, request: &AclRoleCreateRequest, ) -> Result<TaskStateUpdate>

Create database access role Creates a new database access role with the assigned permissions and associates it with the provided databases.

POST /acl/roles

Source

pub async fn delete_acl_role(&self, acl_role_id: i32) -> Result<TaskStateUpdate>

Delete database access role Deletes a database access role.

DELETE /acl/roles/{aclRoleId}

Source

pub async fn update_role( &self, acl_role_id: i32, request: &AclRoleUpdateRequest, ) -> Result<TaskStateUpdate>

Update database access role Updates a database access role with new assigned permissions or associated databases.

PUT /acl/roles/{aclRoleId}

Source

pub async fn get_all_acl_users(&self) -> Result<AccountACLUsers>

Get access control users Gets a list of all access control users for this account.

GET /acl/users

Source

pub async fn create_user( &self, request: &AclUserCreateRequest, ) -> Result<TaskStateUpdate>

Create access control user Creates a new access control user with the assigned database access role.

POST /acl/users

Source

pub async fn delete_user(&self, acl_user_id: i32) -> Result<TaskStateUpdate>

Delete access control user Deletes a access control user.

DELETE /acl/users/{aclUserId}

Source

pub async fn get_user_by_id(&self, acl_user_id: i32) -> Result<ACLUser>

Get a single access control user Gets details and settings for single access control user.

GET /acl/users/{aclUserId}

Source

pub async fn update_acl_user( &self, acl_user_id: i32, request: &AclUserUpdateRequest, ) -> Result<TaskStateUpdate>

Update access control user Updates a access control user with a different role or database password.

PUT /acl/users/{aclUserId}

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,