通过 amazon ec2 .net 调整实例大小 api

Resizing instances through the amazon ec2 .net api

我正在尝试从 .net 程序中修改 ec2 实例的大小。

例如将实例从 1GB ram 设置为 2GB 等

amazon的文档好像没有什么明确的解释。 http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyReservedInstances.html

有没有简单的方法可以做到,例如:

Instance instance = Instance.GetById(xx);
instance.SetType( "small-1.1" );

您不能简单地编辑实例的 RAM 数量,因为它与实例类型绑定。但是您可以更改实例类型(在您停止它之后)。

看到这个API:http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html