Skip to content
alicloud-redis logo

Alibaba Cloud Redis (R-KVStore) Skill

alicloud-redis

Manage Alibaba Cloud Redis (Tair / R-KVStore) using the @alicloud/r-kvstore20150101 TypeScript SDK. Use when working with Redis or Tair instances, accounts, backups, security (whitelist/SSL/TDE/audit), parameters, monitoring, cluster scaling, direct connection, Tair Custom instances, and resource...

SKILL.md

Full skill instructions

Alibaba Cloud Redis (R-KVStore) Skill

Manage Redis and Tair instances via the @alicloud/​r-kvstore20150101 TypeScript SDK.

Prerequisites

npm install @alicloud/​r-kvstore20150101 @alicloud/​openapi-core @darabonba/​typescript
export ALIBABA_CLOUD_ACCESS_KEY_ID="<your-key-id>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<your-key-secret>"

See scripts/​setup_client.ts for a reusable client factory, and references/​quickstart.md for full setup including endpoints, instance types, architectures, Redis versions, pagination, and async polling.

Client Initialization

import Client from '@alicloud/​r-kvstore20150101';
import { Config } from '@alicloud/​openapi-core';

const client = new Client(new Config({
  accessKeyId: process.env.ALIBABA_CLOUD_ACCESS_KEY_ID,
  accessKeySecret: process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET,
  endpoint: 'r-kvstore.aliyuncs.com',
  regionId: 'cn-hangzhou',
}));

API Overview (157 APIs in 8 Domains)

DomainAPIsKey OperationsReference
Instance Management82createInstance, describeInstances, modifyInstanceSpecreferences/​instance.md
Account Management7createAccount, grantAccountPrivilege, resetAccountPasswordreferences/​account.md
Backup & Recovery11createBackup, describeBackups, modifyBackupPolicy, restoreInstancereferences/​backup.md
Security & Encryption23modifySecurityIps, modifyInstanceSSL, modifyInstanceTDE, modifyAuditLogConfigreferences/​security.md
Parameter Management11describeParameters, createParameterGroup, modifyInstanceParameterreferences/​parameter.md
Monitoring & Performance8describeHistoryMonitorValues, describeSlowLogRecordsreferences/​monitoring.md
Tair Custom Instance12createTairKVCacheCustomInstance, describeTairKVCacheCustomInstancesreferences/​tair-custom.md
Tag & Resource5tagResources, untagResources, listTagResourcesreferences/​tag-resource.md

Core Patterns

RPC-Style with instanceId

Most APIs require instanceId as the primary identifier:

import * as models from '@alicloud/​r-kvstore20150101/​dist/​models';

const { body } = await client.describeInstanceAttribute(
  new models.DescribeInstanceAttributeRequest({
    instanceId: 'r-bp1xxxxxxxxxxxxx',
  })
);

Page-Based Pagination

let pageNumber = 1;
let all: any[] = [];
while (true) {
  const { body } = await client.describeInstances(new models.DescribeInstancesRequest({
    regionId: 'cn-hangzhou', pageSize: 50, pageNumber,
  }));
  all.push(...(body.instances?.KVStoreInstance || []));
  if (all.length >= (body.totalCount || 0)) break;
  pageNumber++;
}

Async Operation Polling

Many operations are async — poll instance status until target state:

while (true) {
  const { body } = await client.describeInstanceAttribute(
    new models.DescribeInstanceAttributeRequest({ instanceId })
  );
  const status = body.instances?.DBInstanceAttribute?.[0]?.instanceStatus;
  if (status === 'Normal') break;
  await new Promise(r => setTimeout(r, 5000));
}

Multi-Type Support

R-KVStore supports Redis Community and Tair (DRAM/​Persistent Memory/​ESSD):

// Redis Community
const { body: redis } = await client.createInstance(new models.CreateInstanceRequest({
  regionId: 'cn-hangzhou', instanceType: 'Redis', engineVersion: '7.0',
  instanceClass: 'redis.master.small.default', chargeType: 'PostPaid',
  password: process.env.REDIS_PASSWORD!, vpcId: 'vpc-xxx', vSwitchId: 'vsw-xxx',
}));

// Tair (Enhanced Redis)
const { body: tair } = await client.createTairInstance(new models.CreateTairInstanceRequest({
  regionId: 'cn-hangzhou', instanceType: 'tair_rdb',
  instanceClass: 'tair.rdb.2g', chargeType: 'PostPaid',
  password: process.env.REDIS_PASSWORD!, vpcId: 'vpc-xxx', vSwitchId: 'vsw-xxx',
}));

Config as JSON String

Instance configuration is passed as a JSON string:

await client.modifyInstanceConfig(new models.ModifyInstanceConfigRequest({
  instanceId,
  config: JSON.stringify({
    'maxmemory-policy': 'allkeys-lru',
    'timeout': '300',
  }),
}));

Error Handling

try {
  await client.createInstance(request);
} catch (err: any) {
  console.error(`Code: ${err.code}, Message: ${err.message}, RequestId: ${err.data?.RequestId}`);
}

Common Workflows

1. Create Redis Instance with Account

createInstance → waitForNormal → createAccount → modifySecurityIps

2. Create Tair Cluster

createTairInstance → waitForNormal → describeClusterMemberInfo

3. Backup and Recovery

modifyBackupPolicy → createBackup → describeBackups → restoreInstance

4. Security Hardening

modifySecurityIps → modifyInstanceSSL → modifyInstanceTDE → modifyAuditLogConfig

5. Cluster Scaling

describeClusterMemberInfo → addShardingNode / deleteShardingNode

6. Direct Connection Mode

allocateDirectConnection → describeDBInstanceNetInfo → releaseDirectConnection

7. Parameter Tuning

describeParameterTemplates → createParameterGroup → modifyInstanceParameter

8. Performance Monitoring

describeMonitorItems → describeHistoryMonitorValues → describeSlowLogRecords → createCacheAnalysisTask

See references/​workflows.md for detailed workflow examples with full code.

API Reference Quick Index

Load the corresponding reference file for parameter details:

  • Instance CRUD/​lifecycle/​spec/​network/​cluster/​proxy: references/​instance.md
  • Account CRUD/​password/​privileges: references/​account.md
  • Backup/​restore/​cache analysis: references/​backup.md
  • IP whitelist/​SSL/​TDE/​audit/​global whitelist: references/​security.md
  • Parameters/​parameter groups/​templates: references/​parameter.md
  • Performance monitoring/​slow logs/​running logs: references/​monitoring.md
  • TairKVCache custom instances: references/​tair-custom.md
  • Resource tagging: references/​tag-resource.md

Each reference file contains per-API documentation with method signatures and parameter tables.

Code Examples

See scripts/​examples.ts for ready-to-use code covering:

  • Instance listing, creation, and deletion
  • Account management
  • Backup creation and listing
  • IP whitelist and SSL configuration
  • Audit log management
  • Performance monitoring and slow log analysis
  • Parameter management
  • Resource tagging

More skills from diegosouzapw

accessibility logo
diegosouzapw/awesome-omni-skill

accessibility

Accessibility guidelines for VS Code features — covers accessibility help dialogs, accessible views, verbosity settings, accessibility signals, ARIA alerts/status announcements, keyboard navigation, and ARIA labels/roles. Applies to both new interactive UI surfaces and updates to existing feature...

62 1
View
mermaid-diagrams logo
diegosouzapw/awesome-omni-skill

mermaid-diagrams

Mermaid diagram creation for flowcharts, sequences, ERDs, and more. Generate diagrams from text in markdown files. Use for documentation, architecture diagrams, and visual representations. Triggers on mermaid, flowchart, sequence diagram, ERD, entity relationship, gantt chart, pie chart, class di...

62 1
View
tauri2-react-rust logo
diegosouzapw/awesome-omni-skill

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built...

62 1
View
fp-ts-errors logo
diegosouzapw/awesome-omni-skill

fp-ts-errors

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

62 0
View
ring:pre-dev-research logo
diegosouzapw/awesome-omni-skill

ring:pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agents to gather codebase patterns, external best practices, and framework documentation BEFORE creating PRD/TRD. Outputs research.md with file:line references.

62 0
View
create-assistant logo
diegosouzapw/awesome-omni-skill

create-assistant

Create and configure Vapi voice AI assistants with models, voices, transcribers, tools, hooks, and advanced settings. Use when building voice agents, phone bots, customer support assistants, or any conversational AI that handles phone or web calls.

62 0
View
codex-headless logo
diegosouzapw/awesome-omni-skill

codex-headless

Delegiere Aufgaben an OpenAI Codex CLI im Headless-Mode. Nutzt ChatGPT Subscription (KEIN API Key). Nur Workspace-Zugriff, KEIN System-Zugriff. Auto-Accept mit --full-auto. Web-Recherche mit --search.

62 0
View
social-media-scheduler logo
diegosouzapw/awesome-omni-skill

social-media-scheduler

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

62 0
View
Data Privacy Compliance logo
diegosouzapw/awesome-omni-skill

Data Privacy Compliance

Data privacy and regulatory compliance specialist for GDPR, CCPA, HIPAA, and international data protection laws. Use when implementing privacy controls, conducting data protection impact assessments, ensuring regulatory compliance, or managing data subject rights. Expert in consent management, da...

62 0
View
triple-review logo
diegosouzapw/awesome-omni-skill

triple-review

Reviews a task using the TRIPLE protocol, as the review agent.

62 0
View
Tech Stack & Architecture Decision logo
diegosouzapw/awesome-omni-skill

Tech Stack & Architecture Decision

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies...

62 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View