Skip to main content

images_in_recycle_bins

Creates, updates, deletes, gets or lists an images_in_recycle_bins resource.

Overview

Nameimages_in_recycle_bins
TypeResource
Idaws.ec2.images_in_recycle_bins

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringThe description of the AMI.
image_idstringThe ID of the AMI.
namestringThe name of the AMI.
recycle_bin_enter_timestringThe date and time when the AMI entered the Recycle Bin.
recycle_bin_exit_timestringThe date and time when the AMI is to be permanently deleted from the Recycle Bin.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_images_in_recycle_binselectregionImageId, NextToken, MaxResults, DryRunLists one or more AMIs that are currently in the Recycle Bin. For more information, see Recycle Bin in the Amazon EC2 User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks 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.
ImageIdarrayThe IDs of the AMIs to list. Omit this parameter to list all of the AMIs that are in the Recycle Bin. You can specify up to 20 IDs in a single request.
MaxResultsintegerThe 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.
NextTokenstringThe token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

SELECT examples

Lists one or more AMIs that are currently in the Recycle Bin. For more information, see Recycle Bin in the Amazon EC2 User Guide.

SELECT
description,
image_id,
name,
recycle_bin_enter_time,
recycle_bin_exit_time
FROM aws.ec2.images_in_recycle_bins
WHERE region = '{{ region }}' -- required
AND ImageId = '{{ ImageId }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND DryRun = '{{ DryRun }}'
;