@datadog/action-catalog

中文文档
0.0.8发布于 2026/11/07Apache-2.0TypeScriptCommonJS零依赖近 30 天下载 5879

TypeScript client library for Datadog's Actions Catalog. Provides fully typed functions for executing actions across 50+ integrations.

原始使用文档
文档目录6 节
  1. Installation
  2. Setup
  3. Usage
  4. Supported Integrations
  5. API Pattern
  6. License

@datadog/action-catalog

TypeScript client library for Datadog's Actions Catalog. Provides fully typed functions for executing actions across 50+ integrations including AWS, Azure, GCP, GitHub, Slack, Jira, PagerDuty, Datadog APIs, and more.

Installation

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

Setup

Before calling any action functions, you must register an execution implementation. This allows the library to work in any runtime environment.

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();
});

Usage

Import action functions from integration-specific entry points. Each function is fully typed with request inputs and response outputs.

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',
    },
});

Supported Integrations

Each integration is available as a separate import path under @datadog/action-catalog/<integration>/<module>:

IntegrationImport PathDescription
AWSaws/s3, aws/ec2, aws/lambda, aws/ecs, aws/rds, ...40+ AWS service modules
Azureazure/vm, azure/aks, azure/functions, azure/sql, ...Azure cloud services
GCPgcp/compute, gcp/container, gcp/functions, gcp/sql, ...Google Cloud services
Datadogdd/monitor, dd/dashboard, dd/logs, dd/incidents, ...Datadog platform APIs
GitHubgithub/repos, github/pulls, github/issues, github/actions, ...GitHub API operations
GitLabgitlab/projects, gitlab/pipelines, gitlab/mergerequests, ...GitLab API operations
Slackslack/chat, slack/conversations, slack/reactions, ...Slack API operations
Jirajira/jiraJira issue management
PagerDutypagerduty/pagerduty, pagerduty/integrationIncident management
OpsGenieopsgenie/opsgenieAlert and incident management
ServiceNowservicenow/servicenowIT service management
Cloudflarecloudflare/cloudflare, cloudflare/workers, ...Cloudflare services
Linearlinear/issues, linear/projects, linear/teams, ...Project management
ClickUpclickup/tasks, clickup/spaces, clickup/goals, ...Project management
Oktaokta/oktaIdentity management
OpenAIopenai/openaiAI/ML APIs
Anthropicanthropic/anthropicAI/ML APIs
HTTPhttp/httpGeneric HTTP requests

See the full list of available integrations in the Datadog Actions Catalog documentation.

API Pattern

Every action function follows the same pattern:

function actionName(request: { inputs: ActionInputs }): Promise<ActionOutputs>;
  • inputs — The parameters for the action, fully typed per action.
  • Returns — A Promise resolving to the typed action response.

License

MIT

版本与发布记录

@datadog/action-catalog 共发布 7 个版本,首次发布于 2026/03/10;过去 12 个月发布了 7 个版本。

版本发布日期距今
0.0.8latest2026/11/074 天前
0.0.72026/08/043 个月前
0.0.52026/06/234 个月前
0.0.42026/06/025 个月前
0.0.32026/05/155 个月前
0.0.22026/04/226 个月前

关于 @datadog/action-catalog 的常见问题

@datadog/action-catalog 是什么?

TypeScript client library for Datadog's Actions Catalog. Provides fully typed functions for executing actions across 50+ integrations.

如何安装 @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 和提交记录判断。