# @datadog/action-catalog 中文文档

规范地址：https://npmcn.com/package/%40datadog/action-catalog/

版本：0\.0\.8
npm 元数据更新时间：2026-11-06T19:14:53.627Z
中文译文更新时间：2026-11-11T13:18:13.606Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40datadog/action-catalog
原文对照：https://npmcn.com/package/%40datadog/action-catalog/?lang=original
项目主页：https://datadoghq.com/
源码仓库：https://datadoghq.com/

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：15 MB，1226 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- 首次发布：2026-03-09T18:06:54.599Z
- 最新版本发布：2026-11-06T19:14:53.490Z
- 近 30 天下载量：5879（2026-10-12 至 2026-11-10，npm 官方下载统计）
- 已发布版本数：7（近 12 个月 7 个）

## 中文简介

用于 Datadog 动作目录的 TypeScript 客户端库. 为执行50+集成的行动提供全面的打字功能.

## 安装

```sh
npm install @datadog/action-catalog
```

也可以使用：`pnpm add @datadog/action-catalog`、`yarn add @datadog/action-catalog`、`bun add @datadog/action-catalog`

## README

# @ datadog/ action- catalog

类型脚本客户端库 [数据犬动作目录](https://docs.datadoghq.com/actions/actions_catalog/)。为50+集成(包括AWS、Azure、GCP、GitHub、Slack、Jira、PagerDuty、Datadog API等)的执行行动提供完全的打入功能.

## 安装

```bash
npm install @datadog/action-catalog
# or
yarn add @datadog/action-catalog
```

## 设置

在调用任何动作功能之前, 您必须注册执行程序 。 这使得图书馆可以在任何运行时间环境中工作.

```typescript
import { setExecuteActionImplementation } from '@datadog/action-catalog/action-execution';

setExecuteActionImplementation(async (actionId, request) => {
    // Your implementation for executing actions against the Datadog API
    const response = await fetch(
        `https://api.datadoghq.com/api/v2/actions/${actionId}/execute`,
        {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
                'DD-API-KEY': process.env.DD_API_KEY,
                'DD-APPLICATION-KEY': process.env.DD_APP_KEY,
            },
            body: JSON.stringify(request),
        },
    );
    return response.json();
});
```

## 使用量

从集成特定切入点导入动作功能. 每项职能都用请求投入和响应产出来打字.

```typescript
import { listObjects } from '@datadog/action-catalog/aws/s3';
import { createMonitor } from '@datadog/action-catalog/dd/monitor';
import { deleteChat } from '@datadog/action-catalog/slack/chat';

// List S3 objects
const objects = await listObjects({
    inputs: {
        bucket: 'my-bucket',
        region: 'us-east-1',
    },
});

// Create a Datadog monitor
const monitor = await createMonitor({
    inputs: {
        name: 'High CPU Alert',
        monitorType: 'metric alert',
        message: 'CPU usage is above 90%',
    },
});

// Delete a Slack message
await deleteChat({
    inputs: {
        channel: 'C1234567890',
        ts: '1234567890.123456',
        teamId: 'T1234567890',
    },
});
```

## 支持的整合

每种集成方式作为单独的导入路径,在 `@datadog/action-catalog/<integration>/<module>`数字 :

| 一体化 | 导入路径 | 说明 |
| --- | --- | --- |
| **自动取款机** | `aws/s3`, (中文(简体) ), `aws/ec2`, (中文(简体) ), `aws/lambda`, (中文(简体) ), `aws/ecs`, (中文(简体) ), `aws/rds`,, , , , , , , , . | 40+ AWS 服务模块 |
| **阿苏雷** | `azure/vm`, (中文(简体) ), `azure/aks`, (中文(简体) ), `azure/functions`, (中文(简体) ), `azure/sql`,, , , , , , , , . | Azure 云服务 |
| **GCP 全球气候方案** | `gcp/compute`, (中文(简体) ), `gcp/container`, (中文(简体) ), `gcp/functions`, (中文(简体) ), `gcp/sql`,, , , , , , , , . | 谷歌云服务 |
| **数据犬** | `dd/monitor`, (中文(简体) ), `dd/dashboard`, (中文(简体) ), `dd/logs`, (中文(简体) ), `dd/incidents`,, , , , , , , , . | 数据犬平台 APIs |
| **GitHub 图像** | `github/repos`, (中文(简体) ), `github/pulls`, (中文(简体) ), `github/issues`, (中文(简体) ), `github/actions`,, , , , , , , , . | GitHub API 操作 |
| **吉特拉布语Name** | `gitlab/projects`, (中文(简体) ), `gitlab/pipelines`, (中文(简体) ), `gitlab/mergerequests`,, , , , , , , , . | GitLab API 操作 |
| **偷懒** | `slack/chat`, (中文(简体) ), `slack/conversations`, (中文(简体) ), `slack/reactions`,, , , , , , , , . | Slack API 操作 |
| **贾拉** | `jira/jira` | Jira 问题管理 |
| **寻呼功能** | `pagerduty/pagerduty`, (中文(简体) ), `pagerduty/integration` | 事件管理 |
| **行动** | `opsgenie/opsgenie` | 警报和事件管理 |
| **现在服务** | `servicenow/servicenow` | 信息技术服务管理 |
| **云雾花** | `cloudflare/cloudflare`, (中文(简体) ), `cloudflare/workers`,, , , , , , , , . | 云层服务 |
| **线性** | `linear/issues`, (中文(简体) ), `linear/projects`, (中文(简体) ), `linear/teams`,, , , , , , , , . | 项目管理 |
| **单击** | `clickup/tasks`, (中文(简体) ), `clickup/spaces`, (中文(简体) ), `clickup/goals`,, , , , , , , , . | 项目管理 |
| **奥克塔** | `okta/okta` | 身份管理 |
| **开放AI** | `openai/openai` | AI/ML APIs |
| **安东尼** | `anthropic/anthropic` | AI/ML APIs |
| **HTTP 密码** | `http/http` | 通用 HTTP 请求 |

参见《公约》现有整合的完整清单 [数据犬动作目录文档](https://docs.datadoghq.com/actions/actions_catalog/)。 。 。 .

## API 模式

每个动作功能都遵循相同的模式:

```typescript
function actionName(request: { inputs: ActionInputs }): Promise<ActionOutputs>;
```

-   **`inputs`** ——动作参数,每个动作全部打入.
-   **回返** ——承诺解决打入式行动响应.

## 许可证

麻省理工学院

## 常见问题

### @datadog/action-catalog 是什么？

用于 Datadog 动作目录的 TypeScript 客户端库\. 为执行50\+集成的行动提供全面的打字功能\.

### 如何安装 @datadog/action-catalog？

在项目目录运行 npm install @datadog/action-catalog，或使用 pnpm add / yarn add / bun add。

### @datadog/action-catalog 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @datadog/action-catalog 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @datadog/action-catalog 可以商用吗？

@datadog/action-catalog 使用 Apache-2\.0 许可。宽松许可：允许商业使用、修改和再分发，并附带明确的专利授权；分发时需保留许可与 NOTICE 文件，修改过的文件要注明改动。以上为概括，不构成法律意见，请以许可原文为准。

### @datadog/action-catalog 的下载量有多少？

根据 npm 官方下载统计，@datadog/action-catalog 在 2026/10/12 – 2026/11/10 这 30 天内被下载 5,879 次，日均约 196 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @datadog/action-catalog 还在维护吗？

最新版本 0\.0\.8 发布于 2026/11/07（4 天前）；至今共发布 7 个版本，其中过去 12 个月发布了 7 个；首次发布于 2026/03/10。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

