Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2_import_image - new module #1723

Merged
2 changes: 2 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ action_groups:
- ec2_eni_info
- ec2_group
- ec2_group_info
- ec2_import_image
- ec2_import_image_info
- ec2_instance
- ec2_instance_info
- ec2_key
Expand Down
9 changes: 9 additions & 0 deletions plugins/module_utils/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,12 @@ def normalize_ec2_vpc_dhcp_config(option_config):
config_data[option] = [val["Value"] for val in config_item["Values"]]

return config_data


@AWSRetry.jittered_backoff(retries=10)
def helper_describe_import_image_tasks(client, module, **params):
try:
paginator = client.get_paginator("describe_import_image_tasks")
return paginator.paginate(**params).build_full_result()["ImportImageTasks"]
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
module.fail_json_aws(e, msg="Failed to describe the import image")
Loading
Loading