aws-sdk 1.8.5 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/README.rdoc +8 -0
- data/lib/aws-sdk.rb +39 -35
- data/lib/aws/api_config/CloudFront-2012-07-01.yml +2398 -0
- data/lib/aws/api_config/DirectConnect-2012-10-25.yml +475 -0
- data/lib/aws/api_config/DynamoDB-2011-12-05.yml +8 -0
- data/lib/aws/api_config/DynamoDB-2012-08-10.yml +1516 -0
- data/lib/aws/api_config/OpsWorks-2013-02-18.yml +2 -2
- data/lib/aws/auto_scaling.rb +44 -44
- data/lib/aws/auto_scaling/activity.rb +1 -1
- data/lib/aws/auto_scaling/activity_collection.rb +14 -15
- data/lib/aws/auto_scaling/client.rb +277 -277
- data/lib/aws/auto_scaling/config.rb +1 -1
- data/lib/aws/auto_scaling/group.rb +35 -36
- data/lib/aws/auto_scaling/group_collection.rb +10 -10
- data/lib/aws/auto_scaling/group_options.rb +19 -19
- data/lib/aws/auto_scaling/instance.rb +27 -27
- data/lib/aws/auto_scaling/instance_collection.rb +10 -10
- data/lib/aws/auto_scaling/launch_configuration.rb +3 -3
- data/lib/aws/auto_scaling/launch_configuration_collection.rb +1 -1
- data/lib/aws/auto_scaling/notification_configuration.rb +2 -2
- data/lib/aws/auto_scaling/notification_configuration_collection.rb +37 -38
- data/lib/aws/auto_scaling/scaling_policy.rb +3 -3
- data/lib/aws/auto_scaling/scaling_policy_collection.rb +6 -6
- data/lib/aws/auto_scaling/scaling_policy_options.rb +8 -7
- data/lib/aws/auto_scaling/scheduled_action.rb +3 -3
- data/lib/aws/auto_scaling/scheduled_action_collection.rb +28 -28
- data/lib/aws/auto_scaling/tag_collection.rb +30 -28
- data/lib/aws/cloud_formation.rb +95 -94
- data/lib/aws/cloud_formation/client.rb +136 -133
- data/lib/aws/cloud_formation/config.rb +1 -1
- data/lib/aws/cloud_formation/stack.rb +37 -37
- data/lib/aws/cloud_formation/stack_collection.rb +28 -27
- data/lib/aws/cloud_formation/stack_event.rb +9 -11
- data/lib/aws/cloud_formation/stack_output.rb +1 -1
- data/lib/aws/cloud_formation/stack_resource.rb +6 -6
- data/lib/aws/cloud_formation/stack_resource_collection.rb +11 -12
- data/lib/aws/cloud_formation/stack_resource_summary_collection.rb +11 -11
- data/lib/aws/cloud_formation/stack_summary_collection.rb +39 -39
- data/lib/aws/cloud_front.rb +21 -21
- data/lib/aws/cloud_front/client.rb +853 -652
- data/lib/aws/cloud_front/request.rb +3 -0
- data/lib/aws/cloud_search.rb +22 -22
- data/lib/aws/cloud_search/client.rb +322 -315
- data/lib/aws/cloud_search/config.rb +1 -1
- data/lib/aws/cloud_watch.rb +39 -39
- data/lib/aws/cloud_watch/alarm.rb +55 -37
- data/lib/aws/cloud_watch/alarm_collection.rb +18 -18
- data/lib/aws/cloud_watch/alarm_history_item_collection.rb +2 -2
- data/lib/aws/cloud_watch/client.rb +360 -146
- data/lib/aws/cloud_watch/config.rb +1 -1
- data/lib/aws/cloud_watch/metric.rb +15 -15
- data/lib/aws/cloud_watch/metric_alarm_collection.rb +17 -17
- data/lib/aws/cloud_watch/metric_collection.rb +16 -16
- data/lib/aws/cloud_watch/metric_statistics.rb +11 -11
- data/lib/aws/core.rb +243 -225
- data/lib/aws/core/async_handle.rb +13 -13
- data/lib/aws/core/cacheable.rb +14 -15
- data/lib/aws/core/client.rb +40 -15
- data/lib/aws/core/collection.rb +42 -46
- data/lib/aws/core/collection/with_limit_and_next_token.rb +1 -1
- data/lib/aws/core/collection/with_next_token.rb +1 -1
- data/lib/aws/core/configuration.rb +97 -133
- data/lib/aws/core/credential_providers.rb +16 -16
- data/lib/aws/core/data.rb +23 -23
- data/lib/aws/core/http/connection_pool.rb +348 -0
- data/lib/aws/core/http/net_http_handler.rb +17 -26
- data/lib/aws/core/http/patch.rb +102 -0
- data/lib/aws/core/http/request.rb +13 -19
- data/lib/aws/core/http/response.rb +2 -2
- data/lib/aws/core/lazy_error_classes.rb +17 -17
- data/lib/aws/core/log_formatter.rb +70 -104
- data/lib/aws/core/options/json_serializer.rb +1 -1
- data/lib/aws/core/options/validator.rb +4 -4
- data/lib/aws/core/page_result.rb +8 -8
- data/lib/aws/core/policy.rb +49 -49
- data/lib/aws/core/region.rb +72 -0
- data/lib/aws/core/region_collection.rb +106 -0
- data/lib/aws/core/resource.rb +5 -5
- data/lib/aws/core/response.rb +20 -17
- data/lib/aws/core/rest_request_builder.rb +4 -4
- data/lib/aws/core/service_interface.rb +24 -2
- data/lib/aws/core/signature/version_3.rb +2 -2
- data/lib/aws/core/uri_escape.rb +1 -1
- data/lib/aws/core/xml/frame_stack.rb +1 -1
- data/lib/aws/core/xml/grammar.rb +3 -4
- data/lib/aws/core/xml/sax_handlers/libxml.rb +2 -2
- data/lib/aws/core/xml/sax_handlers/nokogiri.rb +3 -3
- data/lib/aws/core/xml/sax_handlers/rexml.rb +5 -5
- data/lib/aws/core/xml/stub.rb +9 -9
- data/lib/aws/data_pipeline.rb +21 -21
- data/lib/aws/data_pipeline/client.rb +189 -133
- data/lib/aws/data_pipeline/config.rb +1 -1
- data/lib/aws/direct_connect.rb +74 -0
- data/lib/aws/direct_connect/client.rb +253 -0
- data/lib/aws/direct_connect/config.rb +18 -0
- data/lib/aws/direct_connect/errors.rb +22 -0
- data/lib/aws/direct_connect/request.rb +27 -0
- data/lib/aws/dynamo_db.rb +71 -69
- data/lib/aws/dynamo_db/attribute_collection.rb +53 -58
- data/lib/aws/dynamo_db/batch_get.rb +23 -23
- data/lib/aws/dynamo_db/batch_write.rb +43 -43
- data/lib/aws/dynamo_db/binary.rb +9 -9
- data/lib/aws/dynamo_db/client.rb +494 -509
- data/lib/aws/dynamo_db/client_base.rb +91 -0
- data/lib/aws/dynamo_db/client_v2.rb +825 -0
- data/lib/aws/dynamo_db/config.rb +1 -1
- data/lib/aws/dynamo_db/item.rb +10 -10
- data/lib/aws/dynamo_db/item_collection.rb +75 -75
- data/lib/aws/dynamo_db/table.rb +85 -85
- data/lib/aws/dynamo_db/table_collection.rb +13 -13
- data/lib/aws/ec2.rb +132 -142
- data/lib/aws/ec2/attachment.rb +31 -36
- data/lib/aws/ec2/attachment_collection.rb +1 -1
- data/lib/aws/ec2/availability_zone.rb +4 -4
- data/lib/aws/ec2/client.rb +2272 -2125
- data/lib/aws/ec2/config.rb +1 -1
- data/lib/aws/ec2/customer_gateway.rb +6 -6
- data/lib/aws/ec2/customer_gateway_collection.rb +6 -6
- data/lib/aws/ec2/dhcp_options.rb +3 -3
- data/lib/aws/ec2/dhcp_options_collection.rb +10 -10
- data/lib/aws/ec2/elastic_ip.rb +15 -15
- data/lib/aws/ec2/elastic_ip_collection.rb +11 -15
- data/lib/aws/ec2/export_task.rb +4 -4
- data/lib/aws/ec2/export_task_collection.rb +11 -11
- data/lib/aws/ec2/filtered_collection.rb +6 -8
- data/lib/aws/ec2/image.rb +46 -40
- data/lib/aws/ec2/image_collection.rb +44 -52
- data/lib/aws/ec2/instance.rb +64 -62
- data/lib/aws/ec2/instance_collection.rb +47 -50
- data/lib/aws/ec2/internet_gateway.rb +6 -6
- data/lib/aws/ec2/internet_gateway/attachment.rb +13 -13
- data/lib/aws/ec2/internet_gateway_collection.rb +3 -3
- data/lib/aws/ec2/key_pair.rb +3 -3
- data/lib/aws/ec2/key_pair_collection.rb +12 -12
- data/lib/aws/ec2/network_acl.rb +39 -39
- data/lib/aws/ec2/network_acl/association.rb +2 -2
- data/lib/aws/ec2/network_acl/entry.rb +22 -22
- data/lib/aws/ec2/network_acl_collection.rb +2 -2
- data/lib/aws/ec2/network_interface.rb +13 -4
- data/lib/aws/ec2/network_interface/attachment.rb +3 -3
- data/lib/aws/ec2/network_interface_collection.rb +5 -5
- data/lib/aws/ec2/permission_collection.rb +1 -1
- data/lib/aws/ec2/region.rb +6 -6
- data/lib/aws/ec2/region_collection.rb +1 -1
- data/lib/aws/ec2/reserved_instances_collection.rb +2 -2
- data/lib/aws/ec2/reserved_instances_offering_collection.rb +2 -2
- data/lib/aws/ec2/resource_tag_collection.rb +5 -5
- data/lib/aws/ec2/route_table.rb +14 -14
- data/lib/aws/ec2/route_table/association.rb +22 -22
- data/lib/aws/ec2/route_table/route.rb +8 -8
- data/lib/aws/ec2/route_table_collection.rb +3 -3
- data/lib/aws/ec2/security_group.rb +39 -41
- data/lib/aws/ec2/security_group_collection.rb +19 -21
- data/lib/aws/ec2/snapshot.rb +3 -3
- data/lib/aws/ec2/snapshot_collection.rb +11 -12
- data/lib/aws/ec2/subnet.rb +2 -2
- data/lib/aws/ec2/subnet_collection.rb +17 -17
- data/lib/aws/ec2/tag_collection.rb +1 -1
- data/lib/aws/ec2/tagged_collection.rb +7 -7
- data/lib/aws/ec2/tagged_item.rb +10 -10
- data/lib/aws/ec2/volume.rb +16 -16
- data/lib/aws/ec2/volume_collection.rb +9 -12
- data/lib/aws/ec2/vpc.rb +6 -6
- data/lib/aws/ec2/vpc_collection.rb +10 -10
- data/lib/aws/ec2/vpn_connection.rb +4 -4
- data/lib/aws/ec2/vpn_connection/telemetry.rb +1 -1
- data/lib/aws/ec2/vpn_connection_collection.rb +6 -6
- data/lib/aws/ec2/vpn_gateway.rb +2 -2
- data/lib/aws/ec2/vpn_gateway_collection.rb +5 -5
- data/lib/aws/elastic_beanstalk.rb +12 -12
- data/lib/aws/elastic_beanstalk/client.rb +376 -368
- data/lib/aws/elastic_beanstalk/config.rb +1 -1
- data/lib/aws/elastic_transcoder.rb +5 -5
- data/lib/aws/elastic_transcoder/client.rb +283 -283
- data/lib/aws/elastic_transcoder/config.rb +1 -1
- data/lib/aws/elasticache.rb +12 -12
- data/lib/aws/elasticache/client.rb +484 -479
- data/lib/aws/elasticache/config.rb +1 -1
- data/lib/aws/elb.rb +23 -23
- data/lib/aws/elb/availability_zone_collection.rb +34 -34
- data/lib/aws/elb/backend_server_policy_collection.rb +24 -24
- data/lib/aws/elb/client.rb +153 -153
- data/lib/aws/elb/config.rb +1 -1
- data/lib/aws/elb/errors.rb +1 -1
- data/lib/aws/elb/instance_collection.rb +20 -25
- data/lib/aws/elb/listener.rb +3 -3
- data/lib/aws/elb/listener_collection.rb +8 -8
- data/lib/aws/elb/load_balancer.rb +15 -16
- data/lib/aws/elb/load_balancer_collection.rb +36 -24
- data/lib/aws/elb/load_balancer_policy.rb +1 -1
- data/lib/aws/elb/load_balancer_policy_collection.rb +5 -5
- data/lib/aws/emr.rb +28 -26
- data/lib/aws/emr/client.rb +165 -149
- data/lib/aws/emr/config.rb +1 -1
- data/lib/aws/emr/instance_group.rb +1 -1
- data/lib/aws/emr/instance_group_collection.rb +1 -1
- data/lib/aws/emr/job_flow.rb +27 -26
- data/lib/aws/emr/job_flow_collection.rb +34 -34
- data/lib/aws/errors.rb +7 -7
- data/lib/aws/glacier.rb +21 -21
- data/lib/aws/glacier/archive_collection.rb +2 -2
- data/lib/aws/glacier/client.rb +139 -140
- data/lib/aws/glacier/config.rb +1 -1
- data/lib/aws/glacier/vault.rb +2 -2
- data/lib/aws/glacier/vault_collection.rb +1 -1
- data/lib/aws/iam.rb +133 -144
- data/lib/aws/iam/access_key.rb +17 -17
- data/lib/aws/iam/access_key_collection.rb +22 -22
- data/lib/aws/iam/account_alias_collection.rb +2 -2
- data/lib/aws/iam/client.rb +429 -420
- data/lib/aws/iam/collection.rb +1 -1
- data/lib/aws/iam/config.rb +2 -2
- data/lib/aws/iam/group.rb +8 -8
- data/lib/aws/iam/group_collection.rb +16 -16
- data/lib/aws/iam/group_policy_collection.rb +6 -6
- data/lib/aws/iam/group_user_collection.rb +3 -3
- data/lib/aws/iam/mfa_device.rb +1 -1
- data/lib/aws/iam/mfa_device_collection.rb +9 -9
- data/lib/aws/iam/policy_collection.rb +4 -4
- data/lib/aws/iam/resource.rb +2 -2
- data/lib/aws/iam/server_certificate.rb +1 -1
- data/lib/aws/iam/server_certificate_collection.rb +15 -15
- data/lib/aws/iam/signing_certificate.rb +29 -29
- data/lib/aws/iam/signing_certificate_collection.rb +23 -23
- data/lib/aws/iam/user.rb +33 -38
- data/lib/aws/iam/user_collection.rb +27 -27
- data/lib/aws/iam/user_group_collection.rb +3 -3
- data/lib/aws/iam/user_policy_collection.rb +6 -6
- data/lib/aws/iam/virtual_mfa_device.rb +12 -12
- data/lib/aws/iam/virtual_mfa_device_collection.rb +4 -4
- data/lib/aws/import_export.rb +22 -21
- data/lib/aws/import_export/client.rb +47 -43
- data/lib/aws/ops_works.rb +5 -5
- data/lib/aws/ops_works/client.rb +484 -438
- data/lib/aws/ops_works/config.rb +1 -1
- data/lib/aws/rails.rb +34 -34
- data/lib/aws/rds.rb +18 -18
- data/lib/aws/rds/client.rb +1286 -1277
- data/lib/aws/rds/config.rb +1 -1
- data/lib/aws/rds/db_instance.rb +15 -4
- data/lib/aws/rds/db_snapshot.rb +1 -1
- data/lib/aws/record.rb +50 -24
- data/lib/aws/record/abstract_base.rb +52 -60
- data/lib/aws/record/attributes.rb +79 -79
- data/lib/aws/record/conversion.rb +1 -1
- data/lib/aws/record/dirty_tracking.rb +69 -67
- data/lib/aws/record/errors.rb +21 -21
- data/lib/aws/record/exceptions.rb +2 -2
- data/lib/aws/record/hash_model.rb +20 -21
- data/lib/aws/record/hash_model/attributes.rb +13 -15
- data/lib/aws/record/hash_model/finder_methods.rb +46 -46
- data/lib/aws/record/hash_model/scope.rb +31 -31
- data/lib/aws/record/model.rb +136 -136
- data/lib/aws/record/model/attributes.rb +57 -59
- data/lib/aws/record/model/finder_methods.rb +67 -67
- data/lib/aws/record/model/scope.rb +48 -49
- data/lib/aws/record/naming.rb +1 -1
- data/lib/aws/record/scope.rb +23 -19
- data/lib/aws/record/validations.rb +253 -271
- data/lib/aws/record/validator.rb +3 -3
- data/lib/aws/record/validators/acceptance.rb +1 -3
- data/lib/aws/record/validators/block.rb +1 -3
- data/lib/aws/record/validators/confirmation.rb +1 -3
- data/lib/aws/record/validators/count.rb +2 -4
- data/lib/aws/record/validators/exclusion.rb +2 -4
- data/lib/aws/record/validators/format.rb +2 -4
- data/lib/aws/record/validators/inclusion.rb +1 -3
- data/lib/aws/record/validators/length.rb +5 -7
- data/lib/aws/record/validators/method.rb +1 -3
- data/lib/aws/record/validators/numericality.rb +6 -8
- data/lib/aws/record/validators/presence.rb +1 -3
- data/lib/aws/redshift.rb +14 -14
- data/lib/aws/redshift/client.rb +596 -592
- data/lib/aws/redshift/config.rb +1 -1
- data/lib/aws/route_53.rb +30 -30
- data/lib/aws/route_53/change_batch.rb +7 -7
- data/lib/aws/route_53/client.rb +188 -152
- data/lib/aws/route_53/hosted_zone.rb +4 -4
- data/lib/aws/route_53/hosted_zone_collection.rb +7 -7
- data/lib/aws/route_53/resource_record_set.rb +10 -10
- data/lib/aws/route_53/resource_record_set_collection.rb +6 -6
- data/lib/aws/s3.rb +79 -79
- data/lib/aws/s3/access_control_list.rb +44 -36
- data/lib/aws/s3/acl_options.rb +51 -51
- data/lib/aws/s3/bucket.rb +146 -146
- data/lib/aws/s3/bucket_collection.rb +21 -21
- data/lib/aws/s3/bucket_lifecycle_configuration.rb +81 -82
- data/lib/aws/s3/bucket_tag_collection.rb +4 -2
- data/lib/aws/s3/cipher_io.rb +5 -4
- data/lib/aws/s3/client.rb +89 -84
- data/lib/aws/s3/client/xml.rb +1 -1
- data/lib/aws/s3/config.rb +7 -1
- data/lib/aws/s3/cors_rule.rb +2 -0
- data/lib/aws/s3/cors_rule_collection.rb +42 -40
- data/lib/aws/s3/data_options.rb +16 -11
- data/lib/aws/s3/encryption_utils.rb +2 -2
- data/lib/aws/s3/errors.rb +7 -7
- data/lib/aws/s3/multipart_upload.rb +30 -33
- data/lib/aws/s3/multipart_upload_collection.rb +8 -6
- data/lib/aws/s3/object_collection.rb +35 -35
- data/lib/aws/s3/object_metadata.rb +6 -6
- data/lib/aws/s3/object_version.rb +4 -4
- data/lib/aws/s3/object_version_collection.rb +15 -15
- data/lib/aws/s3/policy.rb +2 -2
- data/lib/aws/s3/prefixed_collection.rb +9 -5
- data/lib/aws/s3/presigned_post.rb +39 -37
- data/lib/aws/s3/request.rb +11 -11
- data/lib/aws/s3/s3_object.rb +210 -200
- data/lib/aws/s3/tree.rb +25 -27
- data/lib/aws/s3/tree/child_collection.rb +3 -3
- data/lib/aws/s3/tree/leaf_node.rb +2 -2
- data/lib/aws/s3/tree/parent.rb +1 -1
- data/lib/aws/s3/website_configuration.rb +13 -13
- data/lib/aws/simple_db.rb +83 -83
- data/lib/aws/simple_db/attribute.rb +9 -7
- data/lib/aws/simple_db/attribute_collection.rb +22 -13
- data/lib/aws/simple_db/client.rb +107 -107
- data/lib/aws/simple_db/config.rb +7 -1
- data/lib/aws/simple_db/consistent_read_option.rb +5 -5
- data/lib/aws/simple_db/domain.rb +4 -2
- data/lib/aws/simple_db/domain_collection.rb +4 -4
- data/lib/aws/simple_db/domain_metadata.rb +5 -5
- data/lib/aws/simple_db/errors.rb +9 -9
- data/lib/aws/simple_db/item.rb +5 -5
- data/lib/aws/simple_db/item_collection.rb +83 -81
- data/lib/aws/simple_db/item_data.rb +4 -4
- data/lib/aws/simple_db/put_attributes.rb +3 -3
- data/lib/aws/simple_email_service.rb +140 -140
- data/lib/aws/simple_email_service/client.rb +82 -76
- data/lib/aws/simple_email_service/config.rb +1 -2
- data/lib/aws/simple_email_service/email_address_collection.rb +3 -3
- data/lib/aws/simple_email_service/identity.rb +8 -8
- data/lib/aws/simple_email_service/quotas.rb +8 -6
- data/lib/aws/simple_workflow.rb +106 -106
- data/lib/aws/simple_workflow/activity_task.rb +15 -22
- data/lib/aws/simple_workflow/activity_task_collection.rb +15 -15
- data/lib/aws/simple_workflow/activity_type.rb +23 -23
- data/lib/aws/simple_workflow/activity_type_collection.rb +23 -23
- data/lib/aws/simple_workflow/client.rb +1004 -956
- data/lib/aws/simple_workflow/config.rb +1 -1
- data/lib/aws/simple_workflow/count.rb +5 -5
- data/lib/aws/simple_workflow/decision_task.rb +129 -129
- data/lib/aws/simple_workflow/decision_task_collection.rb +59 -59
- data/lib/aws/simple_workflow/domain.rb +11 -11
- data/lib/aws/simple_workflow/domain_collection.rb +26 -26
- data/lib/aws/simple_workflow/history_event.rb +32 -32
- data/lib/aws/simple_workflow/history_event_collection.rb +3 -3
- data/lib/aws/simple_workflow/option_formatters.rb +5 -5
- data/lib/aws/simple_workflow/request.rb +1 -1
- data/lib/aws/simple_workflow/resource.rb +1 -1
- data/lib/aws/simple_workflow/type.rb +8 -8
- data/lib/aws/simple_workflow/type_collection.rb +15 -15
- data/lib/aws/simple_workflow/workflow_execution.rb +70 -72
- data/lib/aws/simple_workflow/workflow_execution_collection.rb +130 -130
- data/lib/aws/simple_workflow/workflow_type.rb +27 -25
- data/lib/aws/simple_workflow/workflow_type_collection.rb +20 -20
- data/lib/aws/sns.rb +25 -25
- data/lib/aws/sns/client.rb +55 -55
- data/lib/aws/sns/config.rb +1 -1
- data/lib/aws/sns/policy.rb +1 -1
- data/lib/aws/sns/subscription.rb +7 -7
- data/lib/aws/sns/subscription_collection.rb +5 -5
- data/lib/aws/sns/topic.rb +49 -49
- data/lib/aws/sns/topic_collection.rb +2 -2
- data/lib/aws/sns/topic_subscription_collection.rb +5 -5
- data/lib/aws/sqs.rb +20 -20
- data/lib/aws/sqs/client.rb +78 -78
- data/lib/aws/sqs/config.rb +1 -1
- data/lib/aws/sqs/errors.rb +12 -12
- data/lib/aws/sqs/queue.rb +66 -67
- data/lib/aws/sqs/queue_collection.rb +16 -8
- data/lib/aws/sqs/received_message.rb +7 -6
- data/lib/aws/storage_gateway.rb +21 -21
- data/lib/aws/storage_gateway/client.rb +269 -202
- data/lib/aws/storage_gateway/config.rb +1 -1
- data/lib/aws/sts.rb +10 -8
- data/lib/aws/sts/client.rb +35 -35
- data/lib/aws/sts/session.rb +3 -3
- data/lib/aws/version.rb +1 -2
- metadata +23 -21
- data/lib/aws/core/autoloader.rb +0 -64
- data/lib/net/http/connection_pool.rb +0 -226
- data/lib/net/http/connection_pool/connection.rb +0 -189
- data/lib/net/http/connection_pool/session.rb +0 -126
data/lib/aws/ec2/config.rb
CHANGED
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
module AWS
|
|
15
15
|
class EC2
|
|
16
16
|
|
|
17
|
-
# @attr_reader [Symbol] state Returns the gateway state (e.g.
|
|
17
|
+
# @attr_reader [Symbol] state Returns the gateway state (e.g.
|
|
18
18
|
# :pending, :available, :deleting, :deleted)
|
|
19
19
|
#
|
|
20
|
-
# @attr_reader [String] type The type of VPN connection the customer
|
|
20
|
+
# @attr_reader [String] type The type of VPN connection the customer
|
|
21
21
|
# gateway supports (e.g. 'ipsec.1').
|
|
22
22
|
#
|
|
23
|
-
# @attr_reader [String] ip_address The Internet-routable IP address of
|
|
23
|
+
# @attr_reader [String] ip_address The Internet-routable IP address of
|
|
24
24
|
# the customer gateway's outside interface.
|
|
25
25
|
#
|
|
26
|
-
# @attr_reader [Integer] bgp_asn The customer gateway's Border Gateway
|
|
26
|
+
# @attr_reader [Integer] bgp_asn The customer gateway's Border Gateway
|
|
27
27
|
# Protocol (BGP) Autonomous System Number (ASN).
|
|
28
28
|
#
|
|
29
29
|
class CustomerGateway < Resource
|
|
@@ -40,7 +40,7 @@ module AWS
|
|
|
40
40
|
attr_reader :customer_gateway_id
|
|
41
41
|
|
|
42
42
|
alias_method :id, :customer_gateway_id
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
attribute :state, :to_sym => true
|
|
45
45
|
|
|
46
46
|
attribute :vpn_type, :static => true
|
|
@@ -54,7 +54,7 @@ module AWS
|
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
populates_from(:describe_customer_gateways) do |resp|
|
|
57
|
-
resp.customer_gateway_set.find do |gateway|
|
|
57
|
+
resp.customer_gateway_set.find do |gateway|
|
|
58
58
|
gateway.customer_gateway_id == customer_gateway_id
|
|
59
59
|
end
|
|
60
60
|
end
|
|
@@ -19,15 +19,15 @@ module AWS
|
|
|
19
19
|
include TaggedCollection
|
|
20
20
|
include Core::Collection::Simple
|
|
21
21
|
|
|
22
|
-
# @param [Integer] bgp_asn The customer gateway's Border Gateway
|
|
22
|
+
# @param [Integer] bgp_asn The customer gateway's Border Gateway
|
|
23
23
|
# Protocol (BGP) Autonomous System Number (ASN).
|
|
24
24
|
#
|
|
25
|
-
# @param [String] ip_address The Internet-routable IP address for the
|
|
25
|
+
# @param [String] ip_address The Internet-routable IP address for the
|
|
26
26
|
# customer gateway's outside interface. The address must be static.
|
|
27
27
|
#
|
|
28
28
|
# @param [Hash] options
|
|
29
|
-
#
|
|
30
|
-
# @option options [String] :vpn_type ('ipsec.1') The type of VPN
|
|
29
|
+
#
|
|
30
|
+
# @option options [String] :vpn_type ('ipsec.1') The type of VPN
|
|
31
31
|
# connection this customer gateway supports.
|
|
32
32
|
#
|
|
33
33
|
# @return [CustomerGateway]
|
|
@@ -41,7 +41,7 @@ module AWS
|
|
|
41
41
|
|
|
42
42
|
resp = client.create_customer_gateway(client_opts)
|
|
43
43
|
|
|
44
|
-
CustomerGateway.new_from(:create_customer_gateway,
|
|
44
|
+
CustomerGateway.new_from(:create_customer_gateway,
|
|
45
45
|
resp.customer_gateway,
|
|
46
46
|
resp.customer_gateway.customer_gateway_id,
|
|
47
47
|
:config => config)
|
|
@@ -60,7 +60,7 @@ module AWS
|
|
|
60
60
|
response = filtered_request(:describe_customer_gateways, options, &block)
|
|
61
61
|
response.customer_gateway_set.each do |g|
|
|
62
62
|
|
|
63
|
-
gateway = CustomerGateway.new_from(:describe_customer_gateways, g,
|
|
63
|
+
gateway = CustomerGateway.new_from(:describe_customer_gateways, g,
|
|
64
64
|
g.customer_gateway_id, :config => config)
|
|
65
65
|
|
|
66
66
|
yield(gateway)
|
data/lib/aws/ec2/dhcp_options.rb
CHANGED
|
@@ -32,13 +32,13 @@ module AWS
|
|
|
32
32
|
attribute :dhcp_configuration_set, :static => true
|
|
33
33
|
|
|
34
34
|
protected :dhcp_configuration_set
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
populates_from(:create_dhcp_options) do |resp|
|
|
37
37
|
resp.dhcp_options if resp.dhcp_options.dhcp_options_id == id
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
populates_from(:describe_dhcp_options) do |resp|
|
|
41
|
-
resp.dhcp_options_set.find do |dhcp_options|
|
|
41
|
+
resp.dhcp_options_set.find do |dhcp_options|
|
|
42
42
|
dhcp_options.dhcp_options_id == dhcp_options_id
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -78,7 +78,7 @@ module AWS
|
|
|
78
78
|
client.delete_dhcp_options(client_opts)
|
|
79
79
|
nil
|
|
80
80
|
end
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
# @return [VPCCollection] Returns a collection that represents
|
|
83
83
|
# all VPCs currently using this dhcp options.
|
|
84
84
|
def vpcs
|
|
@@ -25,20 +25,20 @@ module AWS
|
|
|
25
25
|
# choice (e.g., example.com).
|
|
26
26
|
#
|
|
27
27
|
# @option options [Array<String>] :domain_name_servers
|
|
28
|
-
# The IP addresses of domain name servers. You can specify up to
|
|
28
|
+
# The IP addresses of domain name servers. You can specify up to
|
|
29
29
|
# four addresses.
|
|
30
30
|
#
|
|
31
|
-
# @option options [Array<String>] :ntp_servers
|
|
32
|
-
# The IP addresses of Network Time Protocol (NTP) servers. You can
|
|
31
|
+
# @option options [Array<String>] :ntp_servers
|
|
32
|
+
# The IP addresses of Network Time Protocol (NTP) servers. You can
|
|
33
33
|
# specify up to four addresses.
|
|
34
34
|
#
|
|
35
|
-
# @option options [Array<String>] :netbios_name_servers
|
|
36
|
-
# The IP addresses of NetBIOS name servers. You can specify up to
|
|
35
|
+
# @option options [Array<String>] :netbios_name_servers
|
|
36
|
+
# The IP addresses of NetBIOS name servers. You can specify up to
|
|
37
37
|
# four addresses.
|
|
38
38
|
#
|
|
39
|
-
# @option options [String] :netbios_node_type Value indicating the
|
|
40
|
-
# NetBIOS node type (1, 2, 4, or 8). For more information about the
|
|
41
|
-
# values, go to RFC 2132. We recommend you only use 2 at this time
|
|
39
|
+
# @option options [String] :netbios_node_type Value indicating the
|
|
40
|
+
# NetBIOS node type (1, 2, 4, or 8). For more information about the
|
|
41
|
+
# values, go to RFC 2132. We recommend you only use 2 at this time
|
|
42
42
|
# (broadcast and multicast are currently not supported).
|
|
43
43
|
#
|
|
44
44
|
def create options = {}
|
|
@@ -55,7 +55,7 @@ module AWS
|
|
|
55
55
|
|
|
56
56
|
resp = client.create_dhcp_options(client_opts)
|
|
57
57
|
|
|
58
|
-
DHCPOptions.new_from(:create_dhcp_options,
|
|
58
|
+
DHCPOptions.new_from(:create_dhcp_options,
|
|
59
59
|
resp.dhcp_options,
|
|
60
60
|
resp.dhcp_options.dhcp_options_id,
|
|
61
61
|
:config => config)
|
|
@@ -74,7 +74,7 @@ module AWS
|
|
|
74
74
|
response = filtered_request(:describe_dhcp_options, options, &block)
|
|
75
75
|
response.dhcp_options_set.each do |opts|
|
|
76
76
|
|
|
77
|
-
options = DHCPOptions.new_from(:describe_dhcp_options, opts,
|
|
77
|
+
options = DHCPOptions.new_from(:describe_dhcp_options, opts,
|
|
78
78
|
opts.dhcp_options_id, :config => config)
|
|
79
79
|
|
|
80
80
|
yield(options)
|
data/lib/aws/ec2/elastic_ip.rb
CHANGED
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
module AWS
|
|
15
15
|
class EC2
|
|
16
16
|
|
|
17
|
-
# @attr_reader [String,nil] instance_id Returns the instance id if
|
|
17
|
+
# @attr_reader [String,nil] instance_id Returns the instance id if
|
|
18
18
|
# assigned to an EC2 instance, nil otherwise.
|
|
19
19
|
#
|
|
20
20
|
# @attr_reader [String,nil] allocation_id
|
|
21
|
-
# The ID representing the allocation of the address for use with Amazon
|
|
21
|
+
# The ID representing the allocation of the address for use with Amazon
|
|
22
22
|
# VPC.
|
|
23
23
|
#
|
|
24
|
-
# @attr_reader [String] domain Indicates whether this elastic ip address
|
|
24
|
+
# @attr_reader [String] domain Indicates whether this elastic ip address
|
|
25
25
|
# is for EC2 instances ('standard') or VPC instances ('vpc').
|
|
26
26
|
#
|
|
27
|
-
# @attr_reader [String,nil] association_id The ID of the association
|
|
27
|
+
# @attr_reader [String,nil] association_id The ID of the association
|
|
28
28
|
# between this elastic ip address and an EC2 VPC instance (VPC only).
|
|
29
29
|
#
|
|
30
|
-
# @attr_reader [String,nil] network_interface_id The ID of the network
|
|
30
|
+
# @attr_reader [String,nil] network_interface_id The ID of the network
|
|
31
31
|
# interface (VPC only).
|
|
32
32
|
#
|
|
33
|
-
# @attr_reader [String,nil] network_interface_owner_id
|
|
33
|
+
# @attr_reader [String,nil] network_interface_owner_id
|
|
34
34
|
# The ID of the AWS account that owns the network interface (VPC only).
|
|
35
35
|
#
|
|
36
36
|
class ElasticIp < Resource
|
|
@@ -47,7 +47,7 @@ module AWS
|
|
|
47
47
|
|
|
48
48
|
attribute :instance_id
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
# vpc related attributes
|
|
51
51
|
|
|
52
52
|
attribute :allocation_id, :static => true
|
|
53
53
|
|
|
@@ -85,7 +85,7 @@ module AWS
|
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
# @return [NetworkInterface,nil] Returns the network interface this
|
|
88
|
-
# elastic ip is associated with. Returns
|
|
88
|
+
# elastic ip is associated with. Returns `nil` if this is not
|
|
89
89
|
# associated with an elastic ip address.
|
|
90
90
|
def network_interface
|
|
91
91
|
if nid = network_interface_id
|
|
@@ -95,7 +95,7 @@ module AWS
|
|
|
95
95
|
|
|
96
96
|
# Releases the elastic IP address.
|
|
97
97
|
#
|
|
98
|
-
# (For non-VPC elastic ips) Releasing an IP address automatically
|
|
98
|
+
# (For non-VPC elastic ips) Releasing an IP address automatically
|
|
99
99
|
# disassociates it from any instance it's associated with.
|
|
100
100
|
#
|
|
101
101
|
# @return [nil]
|
|
@@ -110,19 +110,19 @@ module AWS
|
|
|
110
110
|
alias_method :release, :delete
|
|
111
111
|
|
|
112
112
|
# Associates this elastic IP address with an instance or a network
|
|
113
|
-
# interface. You may provide
|
|
113
|
+
# interface. You may provide `:instance` or `:network_interface`
|
|
114
114
|
# but not both options.
|
|
115
115
|
#
|
|
116
|
-
#
|
|
117
|
-
#
|
|
116
|
+
# # associate with an instance
|
|
117
|
+
# eip.associate :instance => 'i-12345678'
|
|
118
118
|
#
|
|
119
|
-
#
|
|
120
|
-
#
|
|
119
|
+
# # associate with a network interface
|
|
120
|
+
# eip.associate :network_interface => 'ni-12345678'
|
|
121
121
|
#
|
|
122
122
|
# @param [Hash] options
|
|
123
123
|
#
|
|
124
124
|
# @option options [String,Instance] :instance The id of an instance
|
|
125
|
-
# or an {Instance} object.
|
|
125
|
+
# or an {Instance} object.
|
|
126
126
|
#
|
|
127
127
|
# @option options [String,NetworkInterface] :network_interface The id
|
|
128
128
|
# of a network interface or a {NetworkInterface} object.
|
|
@@ -17,7 +17,7 @@ module AWS
|
|
|
17
17
|
|
|
18
18
|
# @param [Hash] options
|
|
19
19
|
#
|
|
20
|
-
# @option options [Boolean] :vpc (false) When true, the elastic ip
|
|
20
|
+
# @option options [Boolean] :vpc (false) When true, the elastic ip
|
|
21
21
|
# address will be allocated to your VPC.
|
|
22
22
|
#
|
|
23
23
|
# @return [ElasticIp]
|
|
@@ -44,31 +44,27 @@ module AWS
|
|
|
44
44
|
# Specify one or more criteria to filter elastic IP addresses by.
|
|
45
45
|
# A subsequent call to #each will limit the resutls returned
|
|
46
46
|
# by provided filters.
|
|
47
|
-
#
|
|
48
|
-
# * Chain multiple calls of #filter together to AND multiple conditions
|
|
49
|
-
# together.
|
|
50
47
|
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
48
|
+
# * Chain multiple calls of #filter together to AND multiple conditions
|
|
49
|
+
# together.
|
|
50
|
+
# * Supply multiple values to a singler #filter call to OR those
|
|
51
|
+
# value conditions together.
|
|
52
|
+
# * '*' matches one or more characters and '?' matches any one
|
|
53
|
+
# character.
|
|
53
54
|
#
|
|
54
|
-
#
|
|
55
|
-
# character.
|
|
55
|
+
# ### Valid Filters
|
|
56
56
|
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
# * domain - Whether the address is a EC2 address, or a VPC address.
|
|
57
|
+
# * domain - Whether the address is a EC2 address, or a VPC address.
|
|
60
58
|
# Valid values include 'standard' and 'vpc'
|
|
61
59
|
# * instance-id - Instance the address is associated with (if any).
|
|
62
60
|
# * public-ip - The Elastic IP address.
|
|
63
|
-
# * allocation-id - Allocation ID for the address. For VPC addresses
|
|
61
|
+
# * allocation-id - Allocation ID for the address. For VPC addresses
|
|
64
62
|
# only.
|
|
65
|
-
# * association-id - Association ID for the address. For VPC addresses
|
|
63
|
+
# * association-id - Association ID for the address. For VPC addresses
|
|
66
64
|
# only.
|
|
67
65
|
#
|
|
68
66
|
# @return [ElasticIpCollection] A new collection that represents
|
|
69
67
|
# a subset of the elastic IP addresses associated with this account.
|
|
70
|
-
|
|
71
|
-
# Yields once for each elastic IP address.
|
|
72
68
|
#
|
|
73
69
|
# @yield [elastic_ip]
|
|
74
70
|
# @yieldparam [ElasticIp] elastic_ip
|
data/lib/aws/ec2/export_task.rb
CHANGED
|
@@ -20,15 +20,15 @@ module AWS
|
|
|
20
20
|
# @attr_reader [Symbol] state State of the conversion task.
|
|
21
21
|
# Valid values :active, :cancelling, :cancelled and :completed.
|
|
22
22
|
#
|
|
23
|
-
# @attr_reader [String] status_message Status message related to the
|
|
23
|
+
# @attr_reader [String] status_message Status message related to the
|
|
24
24
|
# export task.
|
|
25
25
|
#
|
|
26
26
|
# @attr_reader [String] instance_id ID of instance being exported.
|
|
27
27
|
#
|
|
28
|
-
# @attr_reader [String] target_environment The target virtualization
|
|
28
|
+
# @attr_reader [String] target_environment The target virtualization
|
|
29
29
|
# environment.
|
|
30
30
|
#
|
|
31
|
-
# @attr_reader [String] disk_image_format The format for the exported
|
|
31
|
+
# @attr_reader [String] disk_image_format The format for the exported
|
|
32
32
|
# image.
|
|
33
33
|
#
|
|
34
34
|
# @attr_reader [String] container_format The container format used to
|
|
@@ -59,7 +59,7 @@ module AWS
|
|
|
59
59
|
|
|
60
60
|
attribute :status_message
|
|
61
61
|
|
|
62
|
-
attribute :instance_id,
|
|
62
|
+
attribute :instance_id,
|
|
63
63
|
:from => [:instance_export, :instance_id],
|
|
64
64
|
:static => true
|
|
65
65
|
|
|
@@ -14,26 +14,26 @@
|
|
|
14
14
|
module AWS
|
|
15
15
|
class EC2
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# # Getting Export Tasks
|
|
18
18
|
#
|
|
19
19
|
# Allows you to enumerate export tasks.
|
|
20
20
|
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
21
|
+
# ec2.export_tasks.each do |task|
|
|
22
|
+
# # yield ExportTask objects
|
|
23
|
+
# end
|
|
24
24
|
#
|
|
25
25
|
# You can also get an export task by id
|
|
26
26
|
#
|
|
27
|
-
#
|
|
27
|
+
# task = ec2.export_tasks['export-task-id']
|
|
28
28
|
#
|
|
29
|
-
#
|
|
29
|
+
# # Creating Export Tasks
|
|
30
30
|
#
|
|
31
31
|
# To create an export task you start with the {Instance}:
|
|
32
32
|
#
|
|
33
|
-
#
|
|
33
|
+
# task = ec2.instances['i-12345678'].export_to_s3('bucket-name')
|
|
34
34
|
#
|
|
35
35
|
# See {Instance#export_to_s3} for more options.
|
|
36
|
-
#
|
|
36
|
+
#
|
|
37
37
|
class ExportTaskCollection < Collection
|
|
38
38
|
|
|
39
39
|
include Core::Collection::Simple
|
|
@@ -50,11 +50,11 @@ module AWS
|
|
|
50
50
|
def _each_item options = {}, &block
|
|
51
51
|
resp = filtered_request(:describe_export_tasks, options, &block)
|
|
52
52
|
resp.data[:export_task_set].each do |details|
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
task = ExportTask.new_from(
|
|
55
|
-
:describe_export_tasks,
|
|
55
|
+
:describe_export_tasks,
|
|
56
56
|
details,
|
|
57
|
-
details[:export_task_id],
|
|
57
|
+
details[:export_task_id],
|
|
58
58
|
:config => config)
|
|
59
59
|
|
|
60
60
|
yield(task)
|
|
@@ -25,14 +25,12 @@ module AWS
|
|
|
25
25
|
# A subsequent call to #each will limit the results returned
|
|
26
26
|
# by provided filters.
|
|
27
27
|
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# * '*' matches one or more characters and '?' matches any one
|
|
35
|
-
# character.
|
|
28
|
+
# * Chain multiple calls of #filter together to AND multiple conditions
|
|
29
|
+
# together.
|
|
30
|
+
# * Supply multiple values to a singler #filter call to OR those
|
|
31
|
+
# value conditions together.
|
|
32
|
+
# * '*' matches one or more characters and '?' matches any one
|
|
33
|
+
# character.
|
|
36
34
|
#
|
|
37
35
|
def filter filter_name, *values
|
|
38
36
|
filters = @filters.dup
|
data/lib/aws/ec2/image.rb
CHANGED
|
@@ -24,24 +24,27 @@ module AWS
|
|
|
24
24
|
# @attr_reader [String] location The location of the AMI.
|
|
25
25
|
#
|
|
26
26
|
# @attr_reader [Symbol] state Current state of the AMI. If the
|
|
27
|
-
# state is
|
|
27
|
+
# state is `:available`, the image is successfully registered
|
|
28
28
|
# and available for launching. Valid values:
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
29
|
+
#
|
|
30
|
+
# * `:available`
|
|
31
|
+
# * `:pending`
|
|
32
|
+
# * `:failed`
|
|
32
33
|
#
|
|
33
34
|
# @attr_reader [String] owner_id The AWS account ID of the image owner.
|
|
34
35
|
#
|
|
35
36
|
# @attr_reader [String] owner_alias The AWS account alias (e.g.,
|
|
36
|
-
#
|
|
37
|
+
# `"amazon"`) or AWS account ID that owns the AMI.
|
|
38
|
+
#
|
|
39
|
+
# @attr_reader [Symbol] architecture The architecture of the
|
|
40
|
+
# image (e.g. `:i386`).
|
|
37
41
|
#
|
|
38
|
-
# @attr_reader [Symbol]
|
|
39
|
-
#
|
|
42
|
+
# @attr_reader [Symbol] type The type of image.
|
|
43
|
+
# Valid values are:
|
|
40
44
|
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
# * +:ramdisk+
|
|
45
|
+
# * `:machine`
|
|
46
|
+
# * `:kernel`
|
|
47
|
+
# * `:ramdisk`
|
|
45
48
|
#
|
|
46
49
|
# @attr_reader [String] kernel_id The kernel ID associated with
|
|
47
50
|
# the image, if any. Only applicable for machine images.
|
|
@@ -49,34 +52,36 @@ module AWS
|
|
|
49
52
|
# @attr_reader [String] ramdisk_id The RAM disk ID associated
|
|
50
53
|
# with the image, if any. Only applicable for machine images.
|
|
51
54
|
#
|
|
52
|
-
# @attr_reader [String] platform Value is
|
|
55
|
+
# @attr_reader [String] platform Value is `windows` for Windows
|
|
53
56
|
# AMIs; otherwise blank.
|
|
54
57
|
#
|
|
55
58
|
# @attr_reader [Object] state_reason The reason for the image's
|
|
56
59
|
# most recent state change. The return value is an object with
|
|
57
60
|
# the following methods:
|
|
58
61
|
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
# [message] A textual description of the state change.
|
|
62
|
+
# * `code` - Reason code for the state change.
|
|
63
|
+
# * `message` - A textual description of the state change.
|
|
62
64
|
#
|
|
63
65
|
# @attr_reader [Symbol] root_device_type The root device type
|
|
64
66
|
# used by the AMI. Possible values:
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
+
#
|
|
68
|
+
# * `:ebs`
|
|
69
|
+
# * `:instance_store`
|
|
67
70
|
#
|
|
68
71
|
# @attr_reader [String] root_device_name The root device name
|
|
69
|
-
# (e.g.,
|
|
72
|
+
# (e.g., `"/dev/sda1"`, or `"xvda"`).
|
|
70
73
|
#
|
|
71
74
|
# @attr_reader [Symbol] virtualization_type The type of
|
|
72
75
|
# virtualization of the AMI. Possible values:
|
|
73
|
-
# * +:paravirtual+
|
|
74
|
-
# * +:hvm+
|
|
75
76
|
#
|
|
76
|
-
#
|
|
77
|
+
# * `:paravirtual`
|
|
78
|
+
# * `:hvm`
|
|
79
|
+
#
|
|
80
|
+
# @attr_reader [Symbol] hypervisor The image's hypervisor type.
|
|
77
81
|
# Possible values are:
|
|
78
|
-
#
|
|
79
|
-
#
|
|
82
|
+
#
|
|
83
|
+
# * `:ovm`
|
|
84
|
+
# * `:xen`
|
|
80
85
|
#
|
|
81
86
|
# @attr_reader [Array<String>] product_codes Returns an array of
|
|
82
87
|
# product codes attached to this instance.
|
|
@@ -86,14 +91,16 @@ module AWS
|
|
|
86
91
|
include TaggedItem
|
|
87
92
|
include HasPermissions
|
|
88
93
|
|
|
89
|
-
# @
|
|
90
|
-
def initialize
|
|
91
|
-
@
|
|
94
|
+
# @param [String] image_id
|
|
95
|
+
def initialize image_id, options = {}
|
|
96
|
+
@image_id = image_id
|
|
92
97
|
super
|
|
93
98
|
end
|
|
94
99
|
|
|
95
100
|
# @return [String] The ID of the AMI.
|
|
96
|
-
attr_reader :
|
|
101
|
+
attr_reader :image_id
|
|
102
|
+
|
|
103
|
+
alias_method :id, :image_id
|
|
97
104
|
|
|
98
105
|
attribute :name, :static => true
|
|
99
106
|
|
|
@@ -146,17 +153,16 @@ module AWS
|
|
|
146
153
|
# @note This method will not return data for ephemeral volumes.
|
|
147
154
|
# @return [Hash] Returns a hash of block
|
|
148
155
|
# device mappings for the image. In each entry, the key is
|
|
149
|
-
# the device name (e.g.
|
|
156
|
+
# the device name (e.g. `"/dev/sda1"`) and the value is an
|
|
150
157
|
# hash with the following keys that return information
|
|
151
158
|
# about the block device:
|
|
152
159
|
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
160
|
+
# * `:snapshot_id` - The ID of the snapshot that will be used to
|
|
161
|
+
# create this device (may be `nil`).
|
|
162
|
+
# * `:volume_size` - The size of the volume, in GiBs.
|
|
163
|
+
# * `:delete_on_termination` - True if the Amazon EBS volume is
|
|
164
|
+
# deleted on instance termination.
|
|
155
165
|
#
|
|
156
|
-
# [:volume_size] The size of the volume, in GiBs.
|
|
157
|
-
#
|
|
158
|
-
# [:delete_on_termination] True if the Amazon EBS volume is
|
|
159
|
-
# deleted on instance termination.
|
|
160
166
|
# @see {#block_devices}
|
|
161
167
|
def block_device_mappings
|
|
162
168
|
(block_device_mapping || []).inject({}) do |h, mapping|
|
|
@@ -183,7 +189,7 @@ module AWS
|
|
|
183
189
|
|
|
184
190
|
alias_method :delete, :deregister
|
|
185
191
|
|
|
186
|
-
# Runs a single instance of this image.
|
|
192
|
+
# Runs a single instance of this image.
|
|
187
193
|
#
|
|
188
194
|
# @param [Hash] options
|
|
189
195
|
# @option (see InstanceCollection#create)
|
|
@@ -208,7 +214,7 @@ module AWS
|
|
|
208
214
|
run_instance(options.merge(:count => count))
|
|
209
215
|
end
|
|
210
216
|
|
|
211
|
-
# @return [Boolean] Returns
|
|
217
|
+
# @return [Boolean] Returns `true` if the AMI exists (is returned by
|
|
212
218
|
# the DescribeImages action).
|
|
213
219
|
def exists?
|
|
214
220
|
resp = client.describe_images(:filters => [
|
|
@@ -235,13 +241,13 @@ module AWS
|
|
|
235
241
|
|
|
236
242
|
# Adds one or more product codes:
|
|
237
243
|
#
|
|
238
|
-
#
|
|
244
|
+
# image.add_product_codes 'ABCXYZ', 'MNOPQR'
|
|
239
245
|
#
|
|
240
246
|
# You can also pass an array of product codes:
|
|
241
|
-
#
|
|
242
|
-
# image.add_product_codes ['ABCXYZ', 'MNOPQR']
|
|
243
247
|
#
|
|
244
|
-
#
|
|
248
|
+
# image.add_product_codes ['ABCXYZ', 'MNOPQR']
|
|
249
|
+
#
|
|
250
|
+
# @param [Array<String>] product_codes
|
|
245
251
|
#
|
|
246
252
|
# @return [nil]
|
|
247
253
|
#
|