Nesco.Upstash.RedisDeveloper
0.0.2
dotnet add package Nesco.Upstash.RedisDeveloper --version 0.0.2
NuGet\Install-Package Nesco.Upstash.RedisDeveloper -Version 0.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nesco.Upstash.RedisDeveloper" Version="0.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nesco.Upstash.RedisDeveloper --version 0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nesco.Upstash.RedisDeveloper, 0.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Nesco.Upstash.RedisDeveloper as a Cake Addin #addin nuget:?package=Nesco.Upstash.RedisDeveloper&version=0.0.2 // Install Nesco.Upstash.RedisDeveloper as a Cake Tool #tool nuget:?package=Nesco.Upstash.RedisDeveloper&version=0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
This package includes an implementation of the Upstash Redis Developer API.
Usage
- add it to your script file before using
using Nesco.Upstash.RedisDeveloper;
- This package requires an instance of IAuthUser interface for all calls.
IAuthUser authUser = new AuthUser(YOUR_EMAIL, YOUR_API_KEY);
<details open> <summary>Create a Redis Database</summary>
IUpstashRedisDeveloperService redisDeveloperService = new UpstashRedisDeveloperService();
INewRedisDatabaseRequest databaseRequest = new NewRedisDatabaseRequest(name:"test-db", Region.EU_WEST_1, tls:true);
RedisDatabase db = await redisDeveloperService.CreateDatabaseAsync(authUser, newRedisDatabaseRequest);
/* ===== db includes
* string? database_id
* string? database_name
* string? database_type
* string? region
* string? type
* int port
* int creation_time
* int budget
* string? state
* string? password
* string? user_email
* string? endpoint
* bool tls
* bool eviction
* bool auto_upgrade
* bool consistent
* int reserved_per_region_price
* string? modifying_state
* string? rest_token
* string? read_only_rest_token
*/
</details> <details> <summary>Get detailed stats of a given database</summary>
IUpstashRedisDeveloperService redisDeveloperService = new UpstashRedisDeveloperService();
RedisDatabaseStats dbStats = await redisDeveloperService.GetDatabaseStatsAsync(authUser, db.database_id)
</details>
</br> </br> </br> </br>
API Pool
// Creates a new Redis database
RedisDatabase? CreateDatabaseAsync(IAuthUser authUser, INewRedisDatabaseRequest newRedisDatabaseRequest)
// creates a new Global Redis database
RedisDatabase? CreateGlobalDatabaseAsync(IAuthUser authUser, INewGlobalRedisDatabaseRequest newGlobalRedisDatabaseRequest)
// deletes a database
bool DeleteDatabaseAsync(IAuthUser authUser, string id)
// deletes a database
void DeleteDatabase(IAuthUser authUser, string id)
// list all databases of user
RedisDatabase[]? ListDatabasesAsync(IAuthUser authUser)
// gets details of a database
RedisDatabaseDetails? GetDatabaseDetailsAsync(IAuthUser authUser, string id, bool hideCredentials)
// gets detailed stats of a database
RedisDatabaseStats? GetDatabaseStatsAsync(IAuthUser authUser, string id)
// Update the regions of global database
bool UpdateGlobalDatabaseRegionsAsync(IAuthUser authUser, string id, string[] readRegions)
// Update the regions of global database
void UpdateGlobalDatabaseRegions(IAuthUser authUser, string id, string[] readRegions)
// updates the password of a database and returns database
RedisDatabase? ResetPasswordAndGetDatabaseAsync(IAuthUser authUser, string id)
// updates the password of a database
bool ResetPasswordAsync(IAuthUser authUser, string id)
// updates the password of a database
void ResetPassword(IAuthUser authUser, string id)
// renames a database and returns database
RedisDatabase? RenameAndGetDatabaseAsync(IAuthUser authUser, string id, string name)
// renames a database
bool RenameDatabaseAsync(IAuthUser authUser, string id, string name)
// renames a database
void RenameDatabase(IAuthUser authUser, string id, string name)
// enables tls on a database
bool EnableTLSAsync(IAuthUser authUser, string id)
// enables tls on a database
void EnableTLS(IAuthUser authUser, string id)
// enables eviction for given database
bool EnableEvictionAsync(IAuthUser authUser, string id)
// enables eviction for given database
void EnableEviction(IAuthUser authUser, string id)
// disables eviction for given database
bool DisableEvictionAsync(IAuthUser authUser, string id)
// disables eviction for given database
void DisableEviction(IAuthUser authUser, string id)
// enables Auto Upgrade for given database
bool EnableAutoUpgradeAsync(IAuthUser authUser, string id)
// enables Auto Upgrade for given database
void EnableAutoUpgrade(IAuthUser authUser, string id)
// disables Auto Upgrade for given database
bool DisableAutoUpgradeAsync(IAuthUser authUser, string id)
// disables Auto Upgrade for given database
void DisableAutoUpgrade(IAuthUser authUser, string id)
// moves database under a target team
bool MoveToTeamAsync(IAuthUser authUser, string teamID, string databaseID)
// moves database under a target team
void MoveToTeam(IAuthUser authUser, string teamID, string databaseID)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
bind region endpoints