본문으로 건너뛰기
cccskills
무료GitHub에 공개

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 tagging. Covers all 157 APIs of the R-KVStore 20150101 version.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Redis
설치 방법 보기

포함된 파일(1)

  • SKILL.md7.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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: 'MyP@ssw0rd!', 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: 'MyP@ssw0rd!', 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

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," or "hypothesis." For tracking implementation, see analytics-tracking.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ComeOnOliver/skillshub642026년 6월 24일 업데이트

ComeOnOliver의 스킬 모두 보기

이 스킬의 문제 신고