Difference between revisions of "Aws ec2 describe-images"

From wikieduonline
Jump to navigation Jump to search
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 +
<code>aws ec2 describe-images</code> <ref>https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html</ref>: [[aws ec2 describe-images output|output]] Describes the specified images ([[AMIs]], [[AKIs]], and [[ARIs]]) available to you or all of the images available to you.
 +
 +
== Examples ==
 
* <code>[[aws ec2]] describe-images</code> ([https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html awscli])
 
* <code>[[aws ec2]] describe-images</code> ([https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html awscli])
 +
* <code>[[aws ec2 describe-images --owners self]]</code>
 +
* <code>[[aws ec2 describe-images --owners amazon]]</code>
 +
* <code>[[aws ec2 describe-images --owners ubuntu]]</code>
 +
* <code>[[aws ec2 describe-images --owners 099720109477]]</code> ([[Canonical]])
 
* <code>[[aws ec2 describe-images --owners self amazon]]</code>
 
* <code>[[aws ec2 describe-images --owners self amazon]]</code>
 +
* <code>[[aws ec2 describe-images --image-ids]] ami-2234234234234</code>
 +
 +
aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-*23.04*amd64*" --query "sort_by(Images, &CreationDate)[-1].[Name, ImageId]" --owners 099720109477
 +
 +
 +
aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-[[lunar]]*" --query "sort_by(Images, &CreationDate)[-1].[Name, ImageId]" --owners 099720109477
 +
 +
[[aws ec2 describe-images --filters]] "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-[[bionic]]*" --query "sort_by(Images, &CreationDate)[-1].[Name, ImageId]" --owners 099720109477
 +
 +
aws ec2 describe-images | grep [[ImageId]]  | wc -l
 +
62215
 +
 +
 +
aws ec2 describe-images | grep "[[Amazon Linux 2023 AMI]]" | wc -l
 +
20
 +
 +
 +
aws ec2 describe-images \
 +
    --image-id ami-5256b825 \
 +
    --query "Images[*].Description[]" \
 +
    --output text \
 +
    --region eu-west-1
  
 
== Related terms ==
 
== Related terms ==
 
* [[Amazon AMI]]
 
* [[Amazon AMI]]
 
* <code>[[aws ec2 describe-instance-types]]</code>
 
* <code>[[aws ec2 describe-instance-types]]</code>
 +
* [[Terraform data source: aws_ami]]
  
 
== See also ==
 
== See also ==

Latest revision as of 09:07, 25 September 2023

aws ec2 describe-images [1]: output Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the images available to you.

Examples[edit]

aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-*23.04*amd64*" --query "sort_by(Images, &CreationDate)[-1].[Name, ImageId]" --owners 099720109477


aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-lunar*" --query "sort_by(Images, &CreationDate)[-1].[Name, ImageId]" --owners 099720109477
aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-bionic*" --query "sort_by(Images, &CreationDate)[-1].[Name, ImageId]" --owners 099720109477
aws ec2 describe-images | grep ImageId  | wc -l
62215


aws ec2 describe-images | grep "Amazon Linux 2023 AMI" | wc -l
20


aws ec2 describe-images \
    --image-id ami-5256b825 \
    --query "Images[*].Description[]" \
    --output text \
    --region eu-west-1

Related terms[edit]

See also[edit]

  • https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-images.html
  • Advertising: