本文へ移動
cccskills
無料GitHub で公開

alicloud-cdn

Manage Alibaba Cloud CDN using the @alicloud/cdn20180510 TypeScript SDK. Use when working with CDN domain acceleration, domain configuration, SSL certificates, cache refresh/prefetch, real-time monitoring, traffic analysis, log management, usage/billing, IP tools, Function Compute triggers, delivery tasks, and resource tagging. Covers all 168 APIs of the CDN 20180510 version.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md7.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Alibaba Cloud CDN Skill

Manage CDN content delivery network via the @alicloud/cdn20180510 TypeScript SDK.

Prerequisites

npm install @alicloud/cdn20180510 @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, domain types, source types, function configurations, and time formats.

Client Initialization

import Client from '@alicloud/cdn20180510';
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: 'cdn.aliyuncs.com',
}));

CDN is a global service — use the single endpoint cdn.aliyuncs.com for all operations.

API Overview (168 APIs in 11 Domains)

DomainAPIsKey OperationsReference
Domain Management31addCdnDomain, describeUserDomains, deleteCdnDomainreferences/domain.md
Domain Configuration20batchSetCdnDomainConfig, setCdnDomainStagingConfigreferences/domain-config.md
SSL Certificate9setCdnDomainSSLCertificate, describeCdnCertificateListreferences/certificate.md
Cache Refresh & Prefetch7refreshObjectCaches, pushObjectCache, describeRefreshTasksreferences/cache-refresh.md
Monitoring & Statistics44describeDomainRealTimeQpsData, describeDomainBpsDatareferences/monitoring.md
Log Management15describeCdnDomainLogs, createRealTimeLogDeliveryreferences/log.md
Usage & Billing15describeDomainUsageData, describeCdnUserBillHistoryreferences/usage.md
IP & Network Tools10describeIpInfo, setCdnFullDomainsBlockIPreferences/ip-tool.md
Function Compute Trigger5addFCTrigger, updateFCTrigger, describeFCTriggerreferences/fc-trigger.md
Deliver & Report Tasks8createCdnDeliverTask, describeCdnReportreferences/deliver-task.md
Tag & Resource4tagResources, untagResources, listTagResourcesreferences/tag-resource.md

Core Patterns

RPC-Style (Global Service)

CDN APIs do not require regionId. Parameters are flat fields in a Request object:

import * as models from '@alicloud/cdn20180510/dist/models';

const { body } = await client.describeUserDomains(new models.DescribeUserDomainsRequest({
  pageSize: 50,
  pageNumber: 1,
}));

Domain Configuration via JSON Functions

Use batchSetCdnDomainConfig with a JSON functions array to configure domain features:

await client.batchSetCdnDomainConfig(new models.BatchSetCdnDomainConfigRequest({
  domainNames: 'cdn.example.com',
  functions: JSON.stringify([
    {
      functionName: 'filetype_based_ttl_set',
      functionArgs: [
        { argName: 'ttl', argValue: '2592000' },
        { argName: 'file_type', argValue: 'jpg,png,gif,css,js' },
        { argName: 'weight', argValue: '1' },
      ],
    },
  ]),
}));

Page-Based Pagination

let pageNumber = 1;
let all: any[] = [];
while (true) {
  const { body } = await client.describeUserDomains(new models.DescribeUserDomainsRequest({
    pageSize: 50, pageNumber,
  }));
  all.push(...(body.domains?.pageData || []));
  if (all.length >= (body.totalCount || 0)) break;
  pageNumber++;
}

Time Range for Monitoring

Most monitoring APIs accept ISO 8601 time ranges:

const { body } = await client.describeDomainRealTimeQpsData(
  new models.DescribeDomainRealTimeQpsDataRequest({
    domainName: 'cdn.example.com',
    startTime: '2026-02-15T00:00:00Z',
    endTime: '2026-02-16T00:00:00Z',
  })
);

Error Handling

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

Common Workflows

1. Add and Configure CDN Domain

addCdnDomain → verifyDomainOwner → setCdnDomainSSLCertificate → batchSetCdnDomainConfig

2. SSL Certificate Management

describeCdnCertificateList → setCdnDomainSSLCertificate → describeCdnDomainCertificateInfo

3. Cache Refresh & Prefetch

refreshObjectCaches (URL/Dir) → pushObjectCache → describeRefreshTasks → describeRefreshQuota

4. Real-Time Monitoring

describeDomainRealTimeQpsData → describeDomainRealTimeBpsData → describeDomainRealTimeHttpCodeData

5. Traffic Analysis

describeDomainTopUrlVisit → describeDomainTopClientIpVisit → describeDomainISPData → describeDomainRegionData

6. Log Management

describeCdnDomainLogs → createRealTimeLogDelivery → describeRealtimeDeliveryAcc

7. Usage & Billing

describeCdnUserBillType → describeDomainUsageData → createUsageDetailDataExportTask

8. IP Verification & Blocking

describeIpInfo → setCdnFullDomainsBlockIP → describeCdnFullDomainsBlockIPHistory

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

API Reference Quick Index

Load the corresponding reference file for parameter details:

  • Domain CRUD/batch/verification/ownership: references/domain.md
  • Function configs/staging/gray deployment: references/domain-config.md
  • SSL/TLS certificate binding: references/certificate.md
  • URL/directory refresh and prefetch: references/cache-refresh.md
  • Real-time QPS/BPS/hit rate/HTTP codes/traffic: references/monitoring.md
  • Access logs/real-time log delivery: references/log.md
  • Usage data/billing/quota/export: references/usage.md
  • IP check/VIP query/IP blocking: references/ip-tool.md
  • Edge function triggers: references/fc-trigger.md
  • Scheduled delivery/report tasks: references/deliver-task.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:

  • Domain listing, adding, and deletion
  • Domain configuration (HTTPS force, cache TTL)
  • SSL certificate binding
  • Cache refresh (URL/directory) and prefetch
  • Real-time QPS and bandwidth monitoring
  • Top URL analysis
  • Log download
  • IP verification
  • Usage data queries
  • Resource tagging

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

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/skillshub652026年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/skillshub652026年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/skillshub652026年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/skillshub652026年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/skillshub652026年6月24日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

ComeOnOliver/skillshub652026年6月24日 更新

ComeOnOliver のスキルをすべて見る

このスキルの問題を報告する