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 e0d793c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
23 changes: 15 additions & 8 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,13 +109,20 @@

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"""
Expand Down
25 changes: 9 additions & 16 deletions plugins/modules/ec2_import_image_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- See U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImportImageTasks.html) for possible filters.
type: list
elements: dict
default: {}
default: []
extends_documentation_fragment:
- amazon.aws.common.modules
- amazon.aws.region.modules
Expand All @@ -34,20 +34,13 @@

EXAMPLES = r"""
# Note: These examples do not set authentication details, see the AWS Guide for details.
- 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: Cncel Import image
amazon.aws.ec2_import_image:
state: absent
task_name: "clone-vm-import-image"
- 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"]
"""

RETURN = r"""
Expand Down Expand Up @@ -75,7 +68,7 @@
description:
- Describes the snapshot created from the imported disk.
type: dict
suboptions:
contains:
description:
description:
- A description for the snapshot.
Expand Down

0 comments on commit e0d793c

Please sign in to comment.