pub struct Redis { /* private fields */ }Expand description
Represents the Redis service, encapsulating the client information required to interact with the Volcengine Redis service.
Trait Implementations§
Source§impl RedisService for Redis
Implementation of RedisService trait for Redis struct.
Provides core functionality for interacting with Volcengine Redis service,
including instance lifecycle management and security configurations.
impl RedisService for Redis
Implementation of RedisService trait for Redis struct. Provides core functionality for interacting with Volcengine Redis service, including instance lifecycle management and security configurations.
Source§fn new_redis(session: Session) -> Result<Self, Error>
fn new_redis(session: Session) -> Result<Self, Error>
Initializes a new Redis service client from a session configuration.
§Parameters
session: Authenticated session containing credentials and regional configuration
§Workflow
- Creates service-specific client configuration
- Constructs client information (service metadata)
- Initializes network handles
- Builds complete client instance
§Returns
Ok(Redis): Configured Redis client ready for API operationsErr(error::Error): Configuration errors during client setup
Source§async fn new_create_db_instance(
&self,
request: RedisCreateDbInstanceReq,
) -> Result<RedisCreateDbInstanceResp, Error>
async fn new_create_db_instance( &self, request: RedisCreateDbInstanceReq, ) -> Result<RedisCreateDbInstanceResp, Error>
Creates a new Redis database instance with specified configuration.
§Parameters
request: CreateDbInstanceReq containing:- Instance specifications (memory, version, etc.)
- Network configuration (VPC, subnet)
- Authentication parameters
§Returns
Ok(CreateDbInstanceResp): Contains created instance ID and statusErr(error::Error): Creation failures (quota exceeded, invalid params)
Source§async fn new_describe_db_instance_detail(
&self,
request: RedisDescribeDbInstanceDetailReq,
) -> Result<RedisDescribeDbInstanceDetailResp, Error>
async fn new_describe_db_instance_detail( &self, request: RedisDescribeDbInstanceDetailReq, ) -> Result<RedisDescribeDbInstanceDetailResp, Error>
Retrieves detailed configuration and status of a Redis instance.
§Parameters
request: DescribeDbInstanceDetailReq with target instance ID
§Returns
Ok(DescribeDbInstanceDetailResp): Detailed instance metadata including:- Current state (running/creating/error)
- Connection endpoints
- Resource utilization metrics
- Configuration parameters
Source§async fn new_modify_allow_list(
&self,
request: RedisModifyAllowListReq,
) -> Result<RedisModifyAllowListResp, Error>
async fn new_modify_allow_list( &self, request: RedisModifyAllowListReq, ) -> Result<RedisModifyAllowListResp, Error>
Updates network access rules (allow list) for a Redis instance.
§Security Note
- Modifies IP whitelist rules controlling instance access
- Supports CIDR ranges and individual IP addresses
§Parameters
request: ModifyAllowListReq containing:- Allow list ID to modify
- New IP/CIDR rules
- Optional rule description
§Returns
Ok(ModifyAllowListResp): Updated allow list version and status
Source§async fn new_increase_db_instance_node_number(
&self,
request: RedisIncreaseDbInstanceNodeNumberReq,
) -> Result<RedisIncreaseDbInstanceNodeNumberResp, Error>
async fn new_increase_db_instance_node_number( &self, request: RedisIncreaseDbInstanceNodeNumberReq, ) -> Result<RedisIncreaseDbInstanceNodeNumberResp, Error>
Increases the node number of a Redis database instance.
This function sends a request to the Volcengine Redis service to increase the number of nodes
in a Redis database instance. It delegates the actual request handling to the
ApiIncreaseDbInstanceNodeNumber struct.
§Arguments
request- AIncreaseDbInstanceNodeNumberReqstructure containing the request parameters.
§Returns
Result<IncreaseDbInstanceNodeNumberResp, error::Error>- On success, returns aIncreaseDbInstanceNodeNumberRespstructure containing the response from the Redis service. On failure, returns anerror::Errorindicating the cause of the failure.
Source§async fn new_decrease_db_instance_node_number(
&self,
request: RedisDecreaseDbInstanceNodeNumberReq,
) -> Result<RedisDecreaseDbInstanceNodeNumberResp, Error>
async fn new_decrease_db_instance_node_number( &self, request: RedisDecreaseDbInstanceNodeNumberReq, ) -> Result<RedisDecreaseDbInstanceNodeNumberResp, Error>
Decreases the node number of a Redis database instance.
This function sends a request to the Volcengine Redis service to decrease the number of nodes
in a Redis database instance. It delegates the actual request handling to the
ApiDecreaseDBInstanceNodeNumber struct.
§Arguments
request- ADecreaseDbInstanceNodeNumberReqstructure containing the request parameters.
§Returns
Result<DecreaseDbInstanceNodeNumberResp, error::Error>- On success, returns aDecreaseDbInstanceNodeNumberRespstructure containing the response from the Redis service. On failure, returns anerror::Errorindicating the cause of the failure.
Source§async fn new_modify_db_instance_shard_capacity(
&self,
request: RedisModifyDbInstanceShardCapacityReq,
) -> Result<RedisModifyDbInstanceShardCapacityResp, Error>
async fn new_modify_db_instance_shard_capacity( &self, request: RedisModifyDbInstanceShardCapacityReq, ) -> Result<RedisModifyDbInstanceShardCapacityResp, Error>
Modifies the shard capacity of a Redis database instance.
This function sends a request to the Volcengine Redis service to modify the shard capacity
of a Redis database instance. It delegates the actual request handling to the
ApiModifyDBInstanceShardCapacity struct.
§Arguments
request- AModifyDbInstanceShardCapacityReqstructure containing the request parameters.
§Returns
Result<ModifyDbInstanceShardCapacityResp, error::Error>- On success, returns aModifyDbInstanceShardCapacityRespstructure containing the response from the Redis service. On failure, returns anerror::Errorindicating the cause of the failure.
Source§async fn new_modify_db_instance_shard_number(
&self,
request: RedisModifyDbInstanceShardNumberReq,
) -> Result<RedisModifyDbInstanceShardNumberResp, Error>
async fn new_modify_db_instance_shard_number( &self, request: RedisModifyDbInstanceShardNumberReq, ) -> Result<RedisModifyDbInstanceShardNumberResp, Error>
Modifies the shard number of a Redis database instance.
This function sends a request to the Volcengine Redis service to modify the shard number
of a Redis database instance. It delegates the actual request handling to the
ApiModifyDBInstanceShardNumber struct.
§Arguments
request- AModifyDbInstanceShardNumberReqstructure containing the request parameters.
§Returns
Result<ModifyDbInstanceShardNumberResp, error::Error>- On success, returns aModifyDbInstanceShardNumberRespstructure containing the response from the Redis service. On failure, returns anerror::Errorindicating the cause of the failure.
Source§async fn new_enable_sharded_cluster(
&self,
request: RedisEnableShardedClusterReq,
) -> Result<RedisEnableShardedClusterResp, Error>
async fn new_enable_sharded_cluster( &self, request: RedisEnableShardedClusterReq, ) -> Result<RedisEnableShardedClusterResp, Error>
Enables sharded cluster mode for a Redis database instance.
This function sends a request to the Volcengine Redis service to enable sharded cluster mode
for a Redis database instance. It delegates the actual request handling to the
ApiEnableShardedCluster struct.
§Arguments
request- AEnableShardedClusterReqstructure containing the request parameters.
§Returns
Result<EnableShardedClusterResp, error::Error>- On success, returns aEnableShardedClusterRespstructure containing the response from the Redis service. On failure, returns anerror::Errorindicating the cause of the failure.
Source§async fn new_describe_db_instances(
&self,
request: RedisDescribeDbInstancesReq,
) -> Result<RedisDescribeDbInstancesResp, Error>
async fn new_describe_db_instances( &self, request: RedisDescribeDbInstancesReq, ) -> Result<RedisDescribeDbInstancesResp, Error>
Public method to describe the details of a Redis database instance.
This method acts as a wrapper to call the new_describe_db_instances method of the ApiDescribeDBInstancesRedis struct.
It is used to send a request to the Volcengine Redis service to retrieve detailed information about Redis database instances.
§Arguments
&self: Reference to the current instance of the struct.request: ARedisDescribeDbInstancesReqstructure containing the request parameters.
§Returns
Result<RedisDescribeDbInstancesResp, error::Error>: On success, returns aRedisDescribeDbInstancesRespstructure containing the response from the Redis service. On failure, returns anerror::Errorindicating the cause of the failure.
Auto Trait Implementations§
impl Freeze for Redis
impl RefUnwindSafe for Redis
impl Send for Redis
impl Sync for Redis
impl Unpin for Redis
impl UnwindSafe for Redis
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request