Skip to main content

export_image_tasks

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

Overview

Nameexport_image_tasks
TypeResource
Idaws.appstream.export_image_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ami_descriptionstringThe description that will be applied to the exported EC2 AMI.
ami_idstringThe ID of the EC2 AMI that was created by this export task. This field is only populated when the task completes successfully. (pattern: <code>^ami-[a-z0-9]{8,17}$</code>)
ami_namestringThe name of the EC2 AMI that will be created by this export task. (pattern: <code>^[a-zA-Z0-9().-/_]{3,128}$</code>)
created_datestring (date-time)The date and time when the export image task was created.
error_detailsarrayDetails about any errors that occurred during the export process. This field is only populated when the task fails.
image_arnstringThe ARN of the WorkSpaces Applications image being exported. (pattern: <code>^arn:aws(?:-cn|-iso-b|-iso|-us-gov)?:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.\-]{0,1023}$</code>)
statestringThe current state of the export image task, such as PENDING, RUNNING, COMPLETED, or FAILED. (EXPORTING, COMPLETED, FAILED, TIMED_OUT)
tag_specificationsobjectThe tags that will be applied to the exported EC2 AMI.
task_idstringThe unique identifier for the export image task. Use this ID to track the task's progress and retrieve its details. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_export_image_taskselectregionRetrieves information about an export image task, including its current state, progress, and any error details.
create_export_image_taskinsertregion, ImageName, AmiName, IamRoleArnCreates a task to export a WorkSpaces Applications image to an EC2 AMI. This allows you to use your customized WorkSpaces Applications images with other AWS services or for backup purposes.
list_export_image_tasksexecregionLists export image tasks, with optional filtering and pagination. Use this operation to monitor the status of multiple export operations.

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)

SELECT examples

Retrieves information about an export image task, including its current state, progress, and any error details.

SELECT
ami_description,
ami_id,
ami_name,
created_date,
error_details,
image_arn,
state,
tag_specifications,
task_id
FROM aws.appstream.export_image_tasks
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a task to export a WorkSpaces Applications image to an EC2 AMI. This allows you to use your customized WorkSpaces Applications images with other AWS services or for backup purposes.

INSERT INTO aws.appstream.export_image_tasks (
ImageName,
AmiName,
IamRoleArn,
TagSpecifications,
AmiDescription,
region
)
SELECT
'{{ ImageName }}' /* required */,
'{{ AmiName }}' /* required */,
'{{ IamRoleArn }}' /* required */,
'{{ TagSpecifications }}',
'{{ AmiDescription }}',
'{{ region }}'
RETURNING
export_image_task
;

Lifecycle Methods

Lists export image tasks, with optional filtering and pagination. Use this operation to monitor the status of multiple export operations.

EXEC aws.appstream.export_image_tasks.list_export_image_tasks
@region='{{ region }}' --required
@@json=
'{
"Filters": "{{ Filters }}",
"MaxResults": {{ MaxResults }},
"NextToken": "{{ NextToken }}"
}'
;