describe_images¶
Operation¶
describe_images
async
¶
describe_images(request: DescribeImagesInput | DescribeImagesInputDict, /, *, plugins: list[Plugin] | None = None) -> DescribeImagesOutput
describe_images(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[DescribeImagesInputDict]) -> DescribeImagesOutput
Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the images available to you.
The images available to you include public images, private images that you own, and private images owned by other Amazon Web Services accounts for which you have explicit launch permissions.
Recently deregistered images appear in the returned results for a short interval and then return empty results. After all instances that reference a deregistered AMI are terminated, specifying the ID of the image will eventually return an error indicating that the AMI ID cannot be found.
When Allowed AMIs is set to enabled, only allowed images are returned
in the results, with the imageAllowed field set to true for each
image. In audit-mode, the imageAllowed field is set to true for
images that meet the account's Allowed AMIs criteria, and false for
images that don't meet the criteria. For more information, see Allowed
AMIs.
The Amazon EC2 API follows an eventual consistency model. This means that the result of an API command you run that creates or modifies resources might not be immediately available to all subsequent commands you run. For guidance on how to manage eventual consistency, see Eventual consistency in the Amazon EC2 API in the Amazon EC2 Developer Guide.
Warning
We strongly recommend using only paginated requests. Unpaginated requests are susceptible to throttling and timeouts.
Note: The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
DescribeImagesOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
DescribeImagesInput
dataclass
¶
Bases: _SerdeShape
Dataclass for DescribeImagesInput structure.
Attributes¶
dry_run
class-attribute
instance-attribute
¶
dry_run: bool | None = ...
Checks whether you have the required permissions for the action, without
actually making the request, and provides an error response. If you have
the required permissions, the error response is DryRunOperation.
Otherwise, it is UnauthorizedOperation.
executable_users
class-attribute
instance-attribute
¶
Scopes the images by users with explicit launch permissions. Specify an
Amazon Web Services account ID, self (the sender of the request), or
all (public AMIs).
-
If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account's organization or organizational unit (OU) are not returned.
-
If you specify
selfor your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned. -
If you specify
all, all public AMIs are returned.
filters
class-attribute
instance-attribute
¶
The filters.
-
architecture- The image architecture (i386|x86_64|arm64|x86_64_mac|arm64_mac). -
block-device-mapping.delete-on-termination- A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination. -
block-device-mapping.device-name- The device name specified in the block device mapping (for example,/dev/sdhorxvdh). -
block-device-mapping.snapshot-id- The ID of the snapshot used for the Amazon EBS volume. -
block-device-mapping.volume-size- The volume size of the Amazon EBS volume, in GiB. -
block-device-mapping.volume-type- The volume type of the Amazon EBS volume (io1|io2|gp2|gp3|sc1|st1|standard). -
block-device-mapping.encrypted- A Boolean that indicates whether the Amazon EBS volume is encrypted. -
boot-mode-- The boot mode of the image (legacy-bios|uefi|uefi-preferred). -
creation-date- The time when the image was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), for example,
2021-09-29T11:04:43.305Z. You can use a wildcard (*), for example,2021-09-29T*, which matches an entire day. -
description- The description of the image (provided during image creation). -
ena-support- A Boolean that indicates whether enhanced networking with ENA is enabled. -
free-tier-eligible- A Boolean that indicates whether this image can be used under the Amazon Web Services Free Tier (true|false). -
hypervisor- The hypervisor type (ovm|xen). -
image-allowed- A Boolean that indicates whether the image meets the criteria specified for Allowed AMIs. -
image-id- The ID of the image. -
image-watermark.source-image-creation-time- The creation date of the source AMI, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM). You can use a wildcard (*), for example,2021-09-29T*, which matches an entire day. -
image-watermark.source-image-id- The ID of the AMI to which the watermark was originally attached. -
image-watermark.source-image-region- The Region where the watermark was originally attached. -
image-watermark.watermark-creation-time- The date and time the watermark was attached to the AMI, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM). You can use a wildcard (*), for example,2021-09-29T*, which matches an entire day. -
image-watermark.watermark-key- The watermark identifier, inaccountId:watermarkNameformat (for example,123456789012:approvedAmi). -
image-type- The image type (machine|kernel|ramdisk). -
instance-type-specification.supported-instance-type-- The instance types that are compatible with the AMI, as specified by the AMI owner. Values can be individual instance types (for example,t3.micro) or wildcard patterns that match multiple instance types (for example,t3.*). -
instance-type-specification.unsupported-instance-type-- The instance types that are not compatible with the AMI, as specified by the AMI owner. Values can be individual instance types (for example,t3.micro) or wildcard patterns that match multiple instance types (for example,t3.*). -
is-public- A Boolean that indicates whether the image is public. -
kernel-id- The kernel ID. -
manifest-location- The location of the image manifest. -
name- The name of the AMI (provided during image creation). -
owner-alias- The owner alias (amazon|aws-backup-vault|aws-marketplace). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter. -
owner-id- The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter. -
platform- The platform. The only supported value iswindows. -
product-code- The product code. -
product-code.type- The type of the product code (marketplace). -
public-ssm-parameter-name- The name of a public Systems Manager parameter associated with the AMI. The parameter must be in a trusted Amazon Web Services namespace underaws/service/. Returns all AMIs that have ever been associated with the parameter, including previous versions. -
ramdisk-id- The RAM disk ID. -
root-device-name- The device name of the root device volume (for example,/dev/sda1). -
root-device-type- The type of the root device volume (ebs|instance-store). -
scan-result.critical-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for a
criticalseverity finding on the AMI. -
scan-result.finding-scan-date- The date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), of the most recent Amazon Inspector scan of the AMI.
-
scan-result.high-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for a
highseverity finding on the AMI. -
scan-result.highest-finding-severity-label- The highest severity among the AMI's Amazon Inspector findings, whether or not a fix is available. The valid values are the following Amazon Inspector severity levels: -
informational- CVSS score of 0. -
low- CVSS score of 0.1 to 3.9. -
medium- CVSS score of 4.0 to 6.9. -
high- CVSS score of 7.0 to 8.9. -
critical- CVSS score of 9.0 to 10.0. -
scan-result.informational-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for an
informationalseverity finding on the AMI. -
scan-result.low-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for a
lowseverity finding on the AMI. -
scan-result.medium-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for a
mediumseverity finding on the AMI. -
source-image-id- The ID of the source AMI from which the AMI was created. -
source-image-region- The Region of the source AMI. -
source-instance-id- The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This filter is applicable only if the AMI was created using CreateImage. -
state- The state of the image (available|pending|failed). -
state-reason-code- The reason code for the state change. -
state-reason-message- The message for the state change. -
sriov-net-support- A value ofsimpleindicates that enhanced networking with the Intel 82599 VF interface is enabled. -
tag:``<key>- The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the keyOwnerand the valueTeamA, specifytag:Ownerfor the filter name andTeamAfor the filter value. -
tag-key- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. -
virtualization-type- The virtualization type (paravirtual|hvm).
image_ids
class-attribute
instance-attribute
¶
The image IDs.
Default: Describes all images available to you.
include_deprecated
class-attribute
instance-attribute
¶
include_deprecated: bool | None = ...
Specifies whether to include deprecated AMIs.
Default: No deprecated AMIs are included in the response.
Note
If you are the AMI owner, all deprecated AMIs appear in the response regardless of what you specify for this parameter.
include_disabled
class-attribute
instance-attribute
¶
include_disabled: bool | None = ...
Specifies whether to include disabled AMIs.
Default: No disabled AMIs are included in the response.
max_results
class-attribute
instance-attribute
¶
max_results: int | None = ...
The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
owners
class-attribute
instance-attribute
¶
Scopes the results to images with the specified owners. You can specify
a combination of Amazon Web Services account IDs, self, amazon,
aws-backup-vault, and aws-marketplace. If you omit this parameter,
the results include all images for which you have launch permissions,
regardless of ownership.
Dictionaries¶
DescribeImagesInputDict
¶
Bases: TypedDict
Dictionary form of DescribeImagesInput.
Attributes¶
dry_run
instance-attribute
¶
dry_run: bool | None
Checks whether you have the required permissions for the action, without
actually making the request, and provides an error response. If you have
the required permissions, the error response is DryRunOperation.
Otherwise, it is UnauthorizedOperation.
executable_users
instance-attribute
¶
Scopes the images by users with explicit launch permissions. Specify an
Amazon Web Services account ID, self (the sender of the request), or
all (public AMIs).
-
If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account's organization or organizational unit (OU) are not returned.
-
If you specify
selfor your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned. -
If you specify
all, all public AMIs are returned.
filters
instance-attribute
¶
filters: Sequence[Filter | FilterDict] | None
The filters.
-
architecture- The image architecture (i386|x86_64|arm64|x86_64_mac|arm64_mac). -
block-device-mapping.delete-on-termination- A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination. -
block-device-mapping.device-name- The device name specified in the block device mapping (for example,/dev/sdhorxvdh). -
block-device-mapping.snapshot-id- The ID of the snapshot used for the Amazon EBS volume. -
block-device-mapping.volume-size- The volume size of the Amazon EBS volume, in GiB. -
block-device-mapping.volume-type- The volume type of the Amazon EBS volume (io1|io2|gp2|gp3|sc1|st1|standard). -
block-device-mapping.encrypted- A Boolean that indicates whether the Amazon EBS volume is encrypted. -
boot-mode-- The boot mode of the image (legacy-bios|uefi|uefi-preferred). -
creation-date- The time when the image was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), for example,
2021-09-29T11:04:43.305Z. You can use a wildcard (*), for example,2021-09-29T*, which matches an entire day. -
description- The description of the image (provided during image creation). -
ena-support- A Boolean that indicates whether enhanced networking with ENA is enabled. -
free-tier-eligible- A Boolean that indicates whether this image can be used under the Amazon Web Services Free Tier (true|false). -
hypervisor- The hypervisor type (ovm|xen). -
image-allowed- A Boolean that indicates whether the image meets the criteria specified for Allowed AMIs. -
image-id- The ID of the image. -
image-watermark.source-image-creation-time- The creation date of the source AMI, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM). You can use a wildcard (*), for example,2021-09-29T*, which matches an entire day. -
image-watermark.source-image-id- The ID of the AMI to which the watermark was originally attached. -
image-watermark.source-image-region- The Region where the watermark was originally attached. -
image-watermark.watermark-creation-time- The date and time the watermark was attached to the AMI, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDTHH:MM:SS.ssssss+HH:MM). You can use a wildcard (*), for example,2021-09-29T*, which matches an entire day. -
image-watermark.watermark-key- The watermark identifier, inaccountId:watermarkNameformat (for example,123456789012:approvedAmi). -
image-type- The image type (machine|kernel|ramdisk). -
instance-type-specification.supported-instance-type-- The instance types that are compatible with the AMI, as specified by the AMI owner. Values can be individual instance types (for example,t3.micro) or wildcard patterns that match multiple instance types (for example,t3.*). -
instance-type-specification.unsupported-instance-type-- The instance types that are not compatible with the AMI, as specified by the AMI owner. Values can be individual instance types (for example,t3.micro) or wildcard patterns that match multiple instance types (for example,t3.*). -
is-public- A Boolean that indicates whether the image is public. -
kernel-id- The kernel ID. -
manifest-location- The location of the image manifest. -
name- The name of the AMI (provided during image creation). -
owner-alias- The owner alias (amazon|aws-backup-vault|aws-marketplace). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter. -
owner-id- The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter. -
platform- The platform. The only supported value iswindows. -
product-code- The product code. -
product-code.type- The type of the product code (marketplace). -
public-ssm-parameter-name- The name of a public Systems Manager parameter associated with the AMI. The parameter must be in a trusted Amazon Web Services namespace underaws/service/. Returns all AMIs that have ever been associated with the parameter, including previous versions. -
ramdisk-id- The RAM disk ID. -
root-device-name- The device name of the root device volume (for example,/dev/sda1). -
root-device-type- The type of the root device volume (ebs|instance-store). -
scan-result.critical-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for a
criticalseverity finding on the AMI. -
scan-result.finding-scan-date- The date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), of the most recent Amazon Inspector scan of the AMI.
-
scan-result.high-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for a
highseverity finding on the AMI. -
scan-result.highest-finding-severity-label- The highest severity among the AMI's Amazon Inspector findings, whether or not a fix is available. The valid values are the following Amazon Inspector severity levels: -
informational- CVSS score of 0. -
low- CVSS score of 0.1 to 3.9. -
medium- CVSS score of 4.0 to 6.9. -
high- CVSS score of 7.0 to 8.9. -
critical- CVSS score of 9.0 to 10.0. -
scan-result.informational-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for an
informationalseverity finding on the AMI. -
scan-result.low-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for a
lowseverity finding on the AMI. -
scan-result.medium-fix-available-since- The earliest date and time, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThhss.sssZ), at which Amazon Inspector reported a fix as available for a
mediumseverity finding on the AMI. -
source-image-id- The ID of the source AMI from which the AMI was created. -
source-image-region- The Region of the source AMI. -
source-instance-id- The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This filter is applicable only if the AMI was created using CreateImage. -
state- The state of the image (available|pending|failed). -
state-reason-code- The reason code for the state change. -
state-reason-message- The message for the state change. -
sriov-net-support- A value ofsimpleindicates that enhanced networking with the Intel 82599 VF interface is enabled. -
tag:``<key>- The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the keyOwnerand the valueTeamA, specifytag:Ownerfor the filter name andTeamAfor the filter value. -
tag-key- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. -
virtualization-type- The virtualization type (paravirtual|hvm).
image_ids
instance-attribute
¶
The image IDs.
Default: Describes all images available to you.
include_deprecated
instance-attribute
¶
include_deprecated: bool | None
Specifies whether to include deprecated AMIs.
Default: No deprecated AMIs are included in the response.
Note
If you are the AMI owner, all deprecated AMIs appear in the response regardless of what you specify for this parameter.
include_disabled
instance-attribute
¶
include_disabled: bool | None
Specifies whether to include disabled AMIs.
Default: No disabled AMIs are included in the response.
max_results
instance-attribute
¶
max_results: int | None
The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.
next_token
instance-attribute
¶
next_token: str | None
The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
owners
instance-attribute
¶
Scopes the results to images with the specified owners. You can specify
a combination of Amazon Web Services account IDs, self, amazon,
aws-backup-vault, and aws-marketplace. If you omit this parameter,
the results include all images for which you have launch permissions,
regardless of ownership.
Output¶
DescribeImagesOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for DescribeImagesOutput structure.
Attributes¶
images
class-attribute
instance-attribute
¶
Information about the images.
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
The token to include in another request to get the next page of items.
This value is null when there are no more items to return.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.