pub struct CloudClient { /* private fields */ }Expand description
Redis Cloud API client
Implementations§
Source§impl CloudClient
impl CloudClient
Sourcepub fn builder() -> CloudClientBuilder
pub fn builder() -> CloudClientBuilder
Create a new builder for the client
Sourcepub fn timeout(&self) -> Duration
pub fn timeout(&self) -> Duration
Get the configured request timeout
Returns the timeout duration that was set when building the client. This timeout is applied to all HTTP requests made by this client.
Sourcepub fn account(&self) -> AccountHandler
pub fn account(&self) -> AccountHandler
Get an account handler for account management operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let account = client.account().get_current_account().await?;Sourcepub fn subscriptions(&self) -> SubscriptionHandler
pub fn subscriptions(&self) -> SubscriptionHandler
Get a subscription handler for Pro subscription operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let subscriptions = client.subscriptions().get_all_subscriptions().await?;Sourcepub fn databases(&self) -> DatabaseHandler
pub fn databases(&self) -> DatabaseHandler
Get a database handler for Pro database operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let databases = client.databases().get_subscription_databases(123, None, None).await?;Sourcepub fn fixed_subscriptions(&self) -> FixedSubscriptionHandler
pub fn fixed_subscriptions(&self) -> FixedSubscriptionHandler
Get a fixed subscription handler for Essentials subscription operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let subscriptions = client.fixed_subscriptions().list().await?;Sourcepub fn fixed_databases(&self) -> FixedDatabaseHandler
pub fn fixed_databases(&self) -> FixedDatabaseHandler
Get a fixed database handler for Essentials database operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let databases = client.fixed_databases().list(123, None, None).await?;Sourcepub fn acl(&self) -> AclHandler
pub fn acl(&self) -> AclHandler
Get an ACL handler for access control operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let users = client.acl().get_all_acl_users().await?;Sourcepub fn users(&self) -> UserHandler
pub fn users(&self) -> UserHandler
Get a users handler for user management operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let users = client.users().get_all_users().await?;Sourcepub fn tasks(&self) -> TaskHandler
pub fn tasks(&self) -> TaskHandler
Get a tasks handler for async operation tracking
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let tasks = client.tasks().get_all_tasks().await?;Sourcepub fn cloud_accounts(&self) -> CloudAccountHandler
pub fn cloud_accounts(&self) -> CloudAccountHandler
Get a cloud accounts handler for cloud provider integration
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let accounts = client.cloud_accounts().get_cloud_accounts().await?;Sourcepub fn vpc_peering(&self) -> VpcPeeringHandler
pub fn vpc_peering(&self) -> VpcPeeringHandler
Get a VPC peering handler for VPC peering operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let peering = client.vpc_peering().get(123).await?;Sourcepub fn transit_gateway(&self) -> TransitGatewayHandler
pub fn transit_gateway(&self) -> TransitGatewayHandler
Get a transit gateway handler for AWS Transit Gateway operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let attachments = client.transit_gateway().get_attachments(123).await?;Sourcepub fn psc(&self) -> PscHandler
pub fn psc(&self) -> PscHandler
Get a Private Service Connect handler for GCP PSC operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let service = client.psc().get_service(123).await?;Sourcepub fn private_link(&self) -> PrivateLinkHandler
pub fn private_link(&self) -> PrivateLinkHandler
Get a PrivateLink handler for AWS PrivateLink operations
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let config = client.private_link().get(123).await?;Sourcepub fn cost_reports(&self) -> CostReportHandler
pub fn cost_reports(&self) -> CostReportHandler
Get a cost report handler for generating cost reports
§Example
let client = CloudClient::builder()
.api_key("key")
.api_secret("secret")
.build()?;
let handler = client.cost_reports();Sourcepub async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T>
pub async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T>
Make a GET request with API key authentication
Sourcepub async fn post<B: Serialize, T: DeserializeOwned>(
&self,
path: &str,
body: &B,
) -> Result<T>
pub async fn post<B: Serialize, T: DeserializeOwned>( &self, path: &str, body: &B, ) -> Result<T>
Make a POST request
Sourcepub async fn put<B: Serialize, T: DeserializeOwned>(
&self,
path: &str,
body: &B,
) -> Result<T>
pub async fn put<B: Serialize, T: DeserializeOwned>( &self, path: &str, body: &B, ) -> Result<T>
Make a PUT request
Sourcepub async fn get_raw(&self, path: &str) -> Result<Value>
pub async fn get_raw(&self, path: &str) -> Result<Value>
Execute raw GET request returning JSON Value
Sourcepub async fn get_bytes(&self, path: &str) -> Result<Vec<u8>>
pub async fn get_bytes(&self, path: &str) -> Result<Vec<u8>>
Execute GET request returning raw bytes
Useful for downloading binary content like cost reports or other files.
Sourcepub async fn post_raw(&self, path: &str, body: Value) -> Result<Value>
pub async fn post_raw(&self, path: &str, body: Value) -> Result<Value>
Execute raw POST request with JSON body
Sourcepub async fn put_raw(&self, path: &str, body: Value) -> Result<Value>
pub async fn put_raw(&self, path: &str, body: Value) -> Result<Value>
Execute raw PUT request with JSON body
Sourcepub async fn patch_raw(&self, path: &str, body: Value) -> Result<Value>
pub async fn patch_raw(&self, path: &str, body: Value) -> Result<Value>
Execute raw PATCH request with JSON body
Sourcepub async fn delete_raw(&self, path: &str) -> Result<Value>
pub async fn delete_raw(&self, path: &str) -> Result<Value>
Execute raw DELETE request returning any response body
Sourcepub async fn delete_with_body<T: DeserializeOwned>(
&self,
path: &str,
body: Value,
) -> Result<T>
pub async fn delete_with_body<T: DeserializeOwned>( &self, path: &str, body: Value, ) -> Result<T>
Execute DELETE request with JSON body (used by some endpoints like PrivateLink principals)
Trait Implementations§
Source§impl Clone for CloudClient
impl Clone for CloudClient
Source§fn clone(&self) -> CloudClient
fn clone(&self) -> CloudClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more