Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Sep 21, 2023
1 parent 5de41af commit d3cd375
Show file tree
Hide file tree
Showing 2 changed files with 267 additions and 257 deletions.
272 changes: 142 additions & 130 deletions plugins/modules/ec2_import_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
description:
- The client-specific data.
type: dict
suboptions:
contains:
comment:
description:
- A user-defined comment about the disk upload.
Expand Down Expand Up @@ -109,138 +109,150 @@

EXAMPLES = r"""
# Note: These examples do not set authentication details, see the AWS Guide for details.
- name: Check status of import image
amazon.aws.ec2_import_image_info:
filters:
- Name: "tag:Name"
Values: ["clone-vm-import-image"]
- Name: "task-state"
Values: ["completed", "active"]
- name: Import image
amazon.aws.ec2_import_image:
state: present
task_name: "clone-vm-import-image"
disk_containers:
- format: raw
user_bucket:
s3_bucket: "clone-vm-s3-bucket",
s3_key: "clone-vm-s3-bucket/ubuntu-vm-clone.raw"
- name: Cancel an import image task
amazon.aws.ec2_import_image:
state: absent
task_name: "clone-vm-import-image"
"""

RETURN = r"""
task_name:
description:
- The name of the EC2 image import task.
type: str
architecture:
description:
- The architecture of the virtual machine.
type: str
image_id:
description:
- The ID of the Amazon Machine Image (AMI) created by the import task.
type: str
import_task_id:
description:
- The task ID of the import image task.
type: str
progress:
description:
- The progress of the task.
type: str
snapshot_details:
description:
- Describes the snapshot created from the imported disk.
type: dict
suboptions:
description:
description:
- A description for the snapshot.
type: str
device_name:
description:
- The block device mapping for the snapshot.
type: str
disk_image_size:
description:
- The size of the disk in the snapshot, in GiB.
type: float
format:
description:
- The format of the disk image from which the snapshot is created.
type: str
progress:
description:
- The percentage of progress for the task.
type: str
snapshot_id:
description:
- The snapshot ID of the disk being imported.
type: str
status:
description:
- A brief status of the snapshot creation.
type: str
status_message:
description:
- A detailed status message for the snapshot creation.
type: str
url:
description:
- The URL used to access the disk image.
type: str
user_bucket:
description:
- The Amazon S3 bucket for the disk image.
type: dict
status:
description:
- A brief status of the task.
type: str
status_message:
description:
- A detailed status message of the import task.
type: str
license_specifications:
description:
- The ARNs of the license configurations.
type: dict
usage_operation:
description:
- The usage operation value.
type: dict
description:
description:
- A description string for the import image task.
type: str
encrypted:
description:
- Specifies whether the destination AMI of the imported image should be encrypted.
type: bool
hypervisor:
description:
- The target hypervisor platform.
default: str
wait:
description:
- Wait for operation to complete before returning.
default: false
type: bool
wait_timeout:
description:
- How many seconds to wait for an operation to complete before timing out.
default: 320
type: int
kms_key_id:
description:
- The identifier for the symmetric KMS key that was used to create the encrypted AMI.
type: str
license_type:
description:
- The license type to be used for the Amazon Machine Image (AMI) after importing.
type: str
platform:
description:
- The operating system of the virtual machine.
type: str
role_name:
description:
- The name of the role to use when not using the default role, 'vmimport'.
tags:
description:
- The tags to apply to the import image task during creation.
type: dict
import_image:
description: A dict containing information about an EC2 import task.
returned: always
type: complex
contains:
task_name:
description:
- The name of the EC2 image import task.
type: str
architecture:
description:
- The architecture of the virtual machine.
type: str
image_id:
description:
- The ID of the Amazon Machine Image (AMI) created by the import task.
type: str
import_task_id:
description:
- The task ID of the import image task.
type: str
progress:
description:
- The progress of the task.
type: str
snapshot_details:
description:
- Describes the snapshot created from the imported disk.
type: dict
suboptions:
description:
description:
- A description for the snapshot.
type: str
device_name:
description:
- The block device mapping for the snapshot.
type: str
disk_image_size:
description:
- The size of the disk in the snapshot, in GiB.
type: float
format:
description:
- The format of the disk image from which the snapshot is created.
type: str
progress:
description:
- The percentage of progress for the task.
type: str
snapshot_id:
description:
- The snapshot ID of the disk being imported.
type: str
status:
description:
- A brief status of the snapshot creation.
type: str
status_message:
description:
- A detailed status message for the snapshot creation.
type: str
url:
description:
- The URL used to access the disk image.
type: str
user_bucket:
description:
- The Amazon S3 bucket for the disk image.
type: dict
status:
description:
- A brief status of the task.
type: str
status_message:
description:
- A detailed status message of the import task.
type: str
license_specifications:
description:
- The ARNs of the license configurations.
type: dict
usage_operation:
description:
- The usage operation value.
type: dict
description:
description:
- A description string for the import image task.
type: str
encrypted:
description:
- Specifies whether the destination AMI of the imported image should be encrypted.
type: bool
hypervisor:
description:
- The target hypervisor platform.
default: str
wait:
description:
- Wait for operation to complete before returning.
default: false
type: bool
wait_timeout:
description:
- How many seconds to wait for an operation to complete before timing out.
default: 320
type: int
kms_key_id:
description:
- The identifier for the symmetric KMS key that was used to create the encrypted AMI.
type: str
license_type:
description:
- The license type to be used for the Amazon Machine Image (AMI) after importing.
type: str
platform:
description:
- The operating system of the virtual machine.
type: str
role_name:
description:
- The name of the role to use when not using the default role, 'vmimport'.
tags:
description:
- The tags to apply to the import image task during creation.
type: dict
"""

import copy
Expand Down
Loading

0 comments on commit d3cd375

Please sign in to comment.