@cloud-copilot/iam-data

中文文档
0.22.202611091发布于 2026/11/09MITTypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 10.8万

AWS IAM Data

原始使用文档
文档目录10 节
  1. Description
  2. Data Updates
  3. Usage
  4. API
  5. Services
  6. Categories
  7. Actions
  8. Resources
  9. Conditions Keys
  10. Version Info

AWS IAM Data

Description

Contains IAM data for AWS actions, resources, and conditions based on IAM policy documents. This is intended to be used in downstream projects to provide a reference for IAM policy documents.

Published in ESM and CommonJS.

Data Updates

Data is scanned daily and a new version is published if there are changes. The version number is updated to reflect the date of the last update and the function iamDataUpdatedAt() returns the date of the last data update. This process is managed outside this repo.

Usage

npm install @actsecurity/iam-data
import { iamServiceKeys, iamActionDetails, iamActionsForService, iamServiceName } from '@actsecurity/iam-data';

// Iterate through all actions in all services
const serviceKeys = await iamServiceKeys()
for(const serviceKey of serviceKeys) {
  const serviceName = await iamServiceName(serviceKey);
  console.log(`Getting Actions for ${serviceName}`);
  const actions = await iamActionsForService(serviceKey);
  for(const action of actions) {
    const actionDetails = await iamActionDetails(serviceKey, action);
    console.log(actionDetails);
  }
}

API

Services

  • iamServiceKeys() - Returns an array of all service keys such as 's3', 'ec2', etc.
  • iamServiceName(serviceKey: string) - Returns the service name for a given service key.
  • iamServiceExists(serviceKey: string) - Returns true if the service key exists.
  • servicesWithRcpSupport() - Returns an array of service keys for services that support RCPs.

Categories

  • serviceCategories() - Returns an array of all service category keys such as 'storage', 'compute', etc.
  • serviceCategoryExists(category: string) - Returns true if the service category exists.
  • iamServiceCategoryMap() - Returns a map of IAM service keys to category keys.
  • iamServicesForCategory(category: string) - Returns an array of IAM service keys assigned to a category.
  • categoryForIamService(service: string) - Returns the category key for an IAM service key.
  • getServiceCategory(category: string) - Returns category details including key, name, and services.

Actions

  • iamActionsForService(serviceKey: string) - Returns an array of all actions for a given service key.
  • iamActionDetails(serviceKey: string, actionKey: string) - Returns an object with the action details such as description, resourceTypes, and conditionKeys.
  • iamActionExists(serviceKey: string, actionKey: string) - Returns true if the action exists.

Resources

  • iamResourceTypesForService(serviceKey: string) - Returns an array of all resource types for a given service key.
  • iamResourceTypeDetails(serviceKey: string, resourceTypeKey: string) - Returns an object with the resource type details such as description, arnFormat, and conditionKeys.
  • iamResourceTypeExists(serviceKey: string, resourceTypeKey: string) - Returns true if the resource type exists.

Conditions Keys

  • iamConditionKeysForService(serviceKey: string) - Returns an array of all condition keys for a given service key.
  • iamConditionKeyDetails(serviceKey: string, conditionKey: string) - Returns an object with the condition key details such as description, conditionValueTypes, and conditionOperators.
  • iamConditionKeyExists(serviceKey: string, conditionKey: string) - Returns true if the condition key exists.

Version Info

The version is number is formatted as major.minor.updatedAt. The updatedAt is the date the data was last updated in the format YYYYMMDDX where X is a counter to enable publishing more than once per day if necessary. For example version 0.1.202408291 has data updated on August 29th, 2024.

The version can be accessed using the iamDataVersion() method.

There is also iamDataUpdatedAt() which returns the date the data was last updated.

版本与发布记录

@cloud-copilot/iam-data 共发布 478 个版本,首次发布于 2024/08/25;过去 12 个月发布了 213 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.22.202611091latest2026/11/09今天
0.22.2026110712026/11/072 天前
0.22.2026110612026/11/063 天前
0.22.2026110512026/11/054 天前
0.22.2026110412026/11/045 天前
0.22.2026110312026/11/036 天前

关于 @cloud-copilot/iam-data 的常见问题

@cloud-copilot/iam-data 是什么?

AWS IAM Data

如何安装 @cloud-copilot/iam-data?

在项目目录运行 npm install @cloud-copilot/iam-data,或使用 pnpm add / yarn add / bun add。

@cloud-copilot/iam-data 支持 TypeScript 吗?

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

@cloud-copilot/iam-data 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@cloud-copilot/iam-data 可以商用吗?

@cloud-copilot/iam-data 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cloud-copilot/iam-data 的下载量有多少?

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

@cloud-copilot/iam-data 还在维护吗?

最新版本 0.22.202611091 发布于 2026/11/09(今天);至今共发布 478 个版本,其中过去 12 个月发布了 213 个;首次发布于 2024/08/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。