@crvouga/ mockingbird-service-ec2 (英语)
本地模拟器。 真正的API合同. 部分 嘲笑鸟。 。 。 .
亚马逊弹性计算云的运输脚手架. EME; Node 22+或 Bun 1.2+.
使用量
import { DescribeInstancesCommand, EC2Client } from "@aws-sdk/client-ec2"
import { createServer } from "@crvouga/mockingbird-service-ec2/server"
// Test setup: the EC2 client your application already uses, pointed at the emulator.
const server = await createServer()
const ec2 = new EC2Client({
endpoint: server.url,
region: "us-east-1",
credentials: { accessKeyId: "fixture", secretAccessKey: "fixture" },
})
// No EC2 operation is implemented yet, so every command rejects.
const failure = await ec2.send(new DescribeInstancesCommand({})).catch((error: Error) => error.name)
// "UnknownOperationException"
await server.close()
国家住在SQLite收藏 并参与共享运行时间命名空间隔离, 重置,时间表,时钟,日记,度量衡和故障控制. 不需要 AWS 账户 .
计划未执行,AWS操作: RunInstances, (中文(简体) ), DescribeInstances, (中文(简体) ), StartInstances, (中文(简体) ), StopInstances, (中文(简体) ), RebootInstances, (中文(简体) ), TerminateInstances, (中文(简体) ), CreateVpc, (中文(简体) ), DescribeVpcs, (中文(简体) ), DeleteVpc, (中文(简体) ), CreateSubnet, (中文(简体) ), DescribeSubnets, (中文(简体) ), DeleteSubnet, (中文(简体) ), CreateSecurityGroup, (中文(简体) ), DescribeSecurityGroups, (中文(简体) ), DeleteSecurityGroup, (中文(简体) ), AuthorizeSecurityGroupIngress, (中文(简体) ), RevokeSecurityGroupIngress, (中文(简体) ), CreateTags, (中文(简体) ), DeleteTags, (中文(简体) ), DescribeTags, (中文(简体) ), CreateKeyPair, (中文(简体) ), DescribeKeyPairs, (中文(简体) ), DeleteKeyPair, (中文(简体) ), CreateVolume, (中文(简体) ), DescribeVolumes, (中文(简体) ), DeleteVolume, (中文(简体) ), AttachVolume, (中文(简体) ), DetachVolume, (中文(简体) ), CreateSnapshot, (中文(简体) ), DescribeSnapshots, (中文(简体) ), DeleteSnapshot, (中文(简体) ), CreateInternetGateway, (中文(简体) ), DescribeInternetGateways, (中文(简体) ), AttachInternetGateway, (中文(简体) ), DetachInternetGateway, (中文(简体) ), DeleteInternetGateway, (中文(简体) ), CreateRouteTable, (中文(简体) ), DescribeRouteTables, (中文(简体) ), DeleteRouteTable, (中文(简体) ), CreateRoute, (中文(简体) ), AssociateRouteTable。 。 。 .
本列表以外的操作明显失败 。 这个软件包模拟了API状态,而不是AWS基础设施, 生产配额、计费、IAM执行或供应商控制台。 特定服务的疏漏和 甲骨文证据记录于 aWS 覆盖分类账。 。 。 .
运行 bun run parity 启用本地端盘 http://127.0.0.1:4566; 不可用预告失败运行 .
没有记录此整合的本地Stack 运行 。 等同指令是一个有边框的只读 SDK 信封探测器,而不是完全供应商等同的证据.
执行情况
没有执行供应商业务。 请求明显失败 UnknownOperationException; 运输测试覆盖了这个边界和错误的输入. 这个包还不是可用的供应商替换。 不主张本地Stack或现场AWS对等.
安装
bun add @crvouga/mockingbird-service-ec2
API 密码
-
Ec2API(options?): 低级 AWS 运输实例fetch财务报告和审定财务报表reset。 。 。 . -
createRuntime(options?):在进程中获取 API 和共享状态控制 . -
createServer(options?)从/server条目: HTTP 收听器url, (中文(简体) ),runtime,以及close()。 。 。 . -
document, (中文(简体) ),operationIds,以及supportedOperationIds:生成运输合同元数据.