[英]How do I get my own AMIs with AWS Tools for Powershell?
I am trying out AWS Powershell tool. 我正在试用AWS Powershell工具。 What is the command to load AMI image I created in my environment?
加载我在环境中创建的AMI映像的命令是什么? Apparently get-ec2image command loads all the available image on the market, which is not what I want.
显然,get-ec2image命令加载了市场上所有可用的图像,这不是我想要的。
Get-EC2Image is what you need, you just need to set the -Owner
parameter to 'self', like so: GET-EC2Image是你需要什么,你只需要在设置
-Owner
参数为“自我”,像这样:
PS C:/> Get-EC2Image -owner self
Here's an example where you can select your own AMIs, filtered by AMI Name (the AMI name given during image creation, not the re-assignable tag "name" ): 在下面的示例中,您可以选择自己的AMI,并按AMI名称(图像创建期间给出的AMI名称,而不是可重新分配的标签“ name” )过滤:
PS C:/> Get-EC2Image -Owners self -Filters @{ Name='name'; Values='amiName' }
From the documentation: 从文档中:
In this context, [self] refers to the user who corresponds to the credentials with which the cmdlet is invoked.
在这种情况下,[self]是指与调用cmdlet的凭据相对应的用户。
More info available at the documentation for Get-EC2Image. Get-EC2Image 文档中提供了更多信息。
The detailed syntax of the Get-EC2Image is Get-EC2Image的详细语法为
Get-EC2Image-ImageId <String[]>-Owner <String[]>-ExecutableUser <String[]>-Filter <Filter[]>
So in your case it would workout to be, assuming 123456789 being your AWS Account Number. 因此,在您的情况下,假设123456789是您的AWS帐号,就可以尝试一下。
Get-EC2Image -Owner '123456789'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.