export_image_tasks
Creates, updates, deletes, gets or lists an export_image_tasks resource.
Overview
| Name | export_image_tasks |
| Type | Resource |
| Id | aws.appstream.export_image_tasks |
Fields
The following fields are returned by SELECT queries:
- get_export_image_task
| Name | Datatype | Description |
|---|---|---|
ami_description | string | The description that will be applied to the exported EC2 AMI. |
ami_id | string | The 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_name | string | The name of the EC2 AMI that will be created by this export task. (pattern: <code>^[a-zA-Z0-9().-/_]{3,128}$</code>) |
created_date | string (date-time) | The date and time when the export image task was created. |
error_details | array | Details about any errors that occurred during the export process. This field is only populated when the task fails. |
image_arn | string | The 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>) |
state | string | The current state of the export image task, such as PENDING, RUNNING, COMPLETED, or FAILED. (EXPORTING, COMPLETED, FAILED, TIMED_OUT) |
tag_specifications | object | The tags that will be applied to the exported EC2 AMI. |
task_id | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_export_image_task | select | region | Retrieves information about an export image task, including its current state, progress, and any error details. | |
create_export_image_task | insert | region, ImageName, AmiName, IamRoleArn | 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. | |
list_export_image_tasks | exec | region | Lists 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_export_image_task
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
- create_export_image_task
- Manifest
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
;
# Description fields are for documentation purposes
- name: export_image_tasks
props:
- name: region
value: "{{ region }}"
description: Required parameter for the export_image_tasks resource.
- name: ImageName
value: "{{ ImageName }}"
description: |
The name of the WorkSpaces Applications image to export. The image must be in an available state and owned by your account.
- name: AmiName
value: "{{ AmiName }}"
description: |
The name for the exported EC2 AMI. This is a required field that must be unique within your account and region.
- name: IamRoleArn
value: "{{ IamRoleArn }}"
description: |
The ARN of the IAM role that allows WorkSpaces Applications to create the AMI. The role must have permissions to copy images, describe images, and create tags, with a trust relationship allowing appstream.amazonaws.com to assume the role.
- name: TagSpecifications
value: "{{ TagSpecifications }}"
description: |
The tags to apply to the exported AMI. These tags help you organize and manage your EC2 AMIs.
- name: AmiDescription
value: "{{ AmiDescription }}"
description: |
An optional description for the exported AMI. This description will be applied to the resulting EC2 AMI.
Lifecycle Methods
- list_export_image_tasks
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 }}"
}'
;