ec2_ami
Create or destroy an image (AMI) in EC2
Collection: amazon.aws
Full Name: amazon.aws.ec2_ami
Synopsis
Create or destroy an image (AMI) in EC2
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| region | str | |||
| access_key | str | |||
| secret_key | str | |||
| session_token | str | |||
| profile | str | |||
| endpoint_url | str | |||
| validate_certs | bool | true | ||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| debug_botocore_endpoint_logs | bool | |||
| filters | dict | |||
| tags | dict | |||
| rules | raw | |||
| rules_egress | raw | |||
| launch_template | raw | |||
| mixed_instances_policy | raw | |||
| load_balancers | raw | |||
| target_group_arns | raw | |||
| vpc_zone_identifier | raw | |||
| suspend_processes | raw | |||
| metrics_list | raw | |||
| notification_types | raw | |||
| replace_instances | raw | |||
| detach_instances | raw | |||
| network | raw | |||
| network_interfaces | raw | |||
| network_interfaces_ids | raw | |||
| volumes | raw | |||
| metadata_options | raw | |||
| placement | raw | |||
| security_groups | raw | |||
| security_group | raw | |||
| cpu_options | raw | |||
| image | raw | |||
| block_device_mappings | raw | |||
| versions_to_delete | raw | |||
| event_pattern | raw | |||
| targets | raw | |||
| metric_transformation | raw | |||
| name | str | |||
| state | str | |||
| min_size | str | |||
| max_size | str | |||
| desired_capacity | str | |||
| availability_zones | str | |||
| notification_topic | str | |||
| group_name | str | |||
| instance_ids | str | |||
| backup_plan_name | str | |||
| backup_selection_name | str | |||
| iam_role_arn | str | |||
| resource | str | |||
| backup_vault_name | str | |||
| encryption_key_arn | str | |||
| restore_job_id | str | |||
| stack_name | str | |||
| template_body | str | |||
| template | str | |||
| s3_bucket_name | str | |||
| metric | str | |||
| namespace | str | |||
| statistic | str | |||
| comparison | str | |||
| threshold | str | |||
| evaluation_periods | str | |||
| period | str | |||
| alarm_name | str | |||
| log_group_name | str | |||
| retention | str | |||
| filter_name | str | |||
| filter_pattern | str | |||
| image_id | str | |||
| instance_id | str | |||
| snapshot_id | str | |||
| description | str | |||
| host_id | str | |||
| availability_zone | str | |||
| instance_type | str | |||
| quantity | str | |||
| host_ids | str | |||
| public_ip | str | |||
| allocation_id | str | |||
| eni_id | str | |||
| subnet_id | str | |||
| task_name | str | |||
| import_task_id | str | |||
| import_task_ids | str | |||
| count | str | |||
| template_name | str | |||
| template_id | str | |||
| user_data | str | |||
| metadata_token_ttl_seconds | str | |||
| strategy | str | |||
| group_id | str | |||
| key_name | str |
Example
yaml
- name: Register an image
amazon.aws.ec2_ami:
name: app