package-usage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAPI Reference
API 参考
Get the latest version of a package
获取包的最新版本
GET /api/registry/packages?name={package_name}&orgLogin={orgName}You must include the parameter with the user's organization name. The response contains a array. Each entry has a field (the latest version), plus , , , and .
orgLoginpackagesversionnamepublishersourcepackageStatusGET /api/registry/packages?name={package_name}&orgLogin={orgName}你必须传入携带用户组织名称的参数。响应包含一个数组,每个条目都有字段(即最新版本),以及、、和字段。
orgLoginpackagesversionnamepublishersourcepackageStatusGet stack usage for a package
获取包的堆栈使用情况
GET /api/orgs/{orgName}/packages/usage?packageName={package_name}Replace with the organization name from context or the environment variable.
{orgName}PULUMI_ORGResponse fields:
- : The queried package
packageName - : Array of
stacks{stackName, projectName, version, lastUpdate} - : Total count
totalStacks
GET /api/orgs/{orgName}/packages/usage?packageName={package_name}将替换为上下文里的组织名称或环境变量的值。
{orgName}PULUMI_ORG响应字段:
- :被查询的包
packageName - :由
stacks组成的数组{stackName, projectName, version, lastUpdate} - :总计数
totalStacks
Workflow: Find outdated stacks
工作流:查找过时堆栈
Use when the user wants to know which stacks are using an outdated version of a package.
- Get the latest version of the package
- Get stack usage for the package
- Compare each stack's against the latest to identify outdated stacks
version
当用户想要了解哪些堆栈正在使用过时版本的包时使用。
- 获取该包的最新版本
- 获取该包的堆栈使用情况
- 将每个堆栈的与最新版本对比,找出过时的堆栈
version
Workflow: Upgrade a package in a stack
工作流:升级堆栈中的包
Use when the user wants to upgrade a specific stack/project to the latest version of a package.
- Get the latest version of the package
- Clone the stack's project repository. If the repository cannot be cloned or the agent lacks filesystem/git access, surface the required change as a diff or instruction set for the user to apply manually.
- Detect the project language from the field in
runtime, then update the correct dependency file:Pulumi.yaml- →
nodejspackage.json - →
pythonorrequirements.txtpyproject.toml - →
gogo.mod - →
yamlPulumi.yaml
- Run to catch any breaking changes introduced by the version bump before merging.
pulumi preview - Open a pull request with the change
当用户想要将特定堆栈/项目升级到某个包的最新版本时使用。
- 获取该包的最新版本
- 克隆堆栈对应的项目仓库。如果无法克隆仓库,或者Agent没有文件系统/git访问权限,则将所需的变更以差异或指令集的形式呈现给用户手动应用。
- 从的
Pulumi.yaml字段检测项目语言,然后更新对应的依赖文件:runtime- →
nodejspackage.json - →
python或requirements.txtpyproject.toml - →
gogo.mod - →
yamlPulumi.yaml
- 运行命令,在合并前捕获版本升级引入的所有破坏性变更。
pulumi preview - 提交包含该变更的拉取请求