restore_image_tasks
Creates, updates, deletes, gets or lists a restore_image_tasks resource.
Overview
| Name | restore_image_tasks |
| Type | Resource |
| Id | aws.ec2.restore_image_tasks |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create_restore_image_task | insert | ObjectKey, region | Bucket, Name, TagSpecification, DryRun | Starts a task that restores an AMI from an Amazon S3 object that was previously created by using CreateStoreImageTask. To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using S3 in the Amazon EC2 User Guide. For more information, see Store and restore an AMI using S3 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.
| Name | Datatype | Description |
|---|---|---|
ObjectKey | string | The name of the stored AMI object in the bucket. |
region | string | AWS region (default: us-east-1) |
Bucket | string | The name of the Amazon S3 bucket that contains the stored AMI object. |
DryRun | boolean | 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. |
Name | string | The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI. |
TagSpecification | array | The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both. To tag the AMI, the value for ResourceType must be image. To tag the snapshots, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created. |
INSERT examples
- create_restore_image_task
- Manifest
Starts a task that restores an AMI from an Amazon S3 object that was previously created by using CreateStoreImageTask. To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using S3 in the Amazon EC2 User Guide. For more information, see Store and restore an AMI using S3 in the Amazon EC2 User Guide.
INSERT INTO aws.ec2.restore_image_tasks (
ObjectKey,
region,
Bucket,
Name,
TagSpecification,
DryRun
)
SELECT
'{{ ObjectKey }}',
'{{ region }}',
'{{ Bucket }}',
'{{ Name }}',
'{{ TagSpecification }}',
'{{ DryRun }}'
RETURNING
image_id
;
# Description fields are for documentation purposes
- name: restore_image_tasks
props:
- name: ObjectKey
value: "{{ ObjectKey }}"
description: Required parameter for the restore_image_tasks resource.
- name: region
value: "{{ region }}"
description: Required parameter for the restore_image_tasks resource.
- name: Bucket
value: "{{ Bucket }}"
description: The name of the Amazon S3 bucket that contains the stored AMI object.
description: The name of the Amazon S3 bucket that contains the stored AMI object.
- name: Name
value: "{{ Name }}"
description: The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.
description: The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both. To tag the AMI, the value for ResourceType must be image. To tag the snapshots, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created.
description: The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both. To tag the AMI, the value for ResourceType must be image. To tag the snapshots, the value for ResourceType must be snapshot. The same tag is applied to all of the snapshots that are created.
- name: DryRun
value: {{ DryRun }}
description: 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.
description: 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.