aws-sdk-ec2 1.285.0 → 1.417.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +663 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-ec2/classic_address.rb +33 -36
- data/lib/aws-sdk-ec2/client.rb +13859 -2170
- data/lib/aws-sdk-ec2/client_api.rb +4203 -86
- data/lib/aws-sdk-ec2/customizations/instance.rb +3 -1
- data/lib/aws-sdk-ec2/customizations/resource.rb +3 -1
- data/lib/aws-sdk-ec2/dhcp_options.rb +19 -7
- data/lib/aws-sdk-ec2/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-ec2/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-ec2/endpoints.rb +8444 -0
- data/lib/aws-sdk-ec2/image.rb +96 -22
- data/lib/aws-sdk-ec2/instance.rb +232 -95
- data/lib/aws-sdk-ec2/internet_gateway.rb +21 -7
- data/lib/aws-sdk-ec2/key_pair.rb +13 -4
- data/lib/aws-sdk-ec2/key_pair_info.rb +32 -4
- data/lib/aws-sdk-ec2/nat_gateway.rb +22 -12
- data/lib/aws-sdk-ec2/network_acl.rb +28 -10
- data/lib/aws-sdk-ec2/network_interface.rb +76 -17
- data/lib/aws-sdk-ec2/network_interface_association.rb +11 -5
- data/lib/aws-sdk-ec2/placement_group.rb +198 -33
- data/lib/aws-sdk-ec2/plugins/copy_encrypted_snapshot.rb +17 -12
- data/lib/aws-sdk-ec2/plugins/endpoints.rb +1272 -0
- data/lib/aws-sdk-ec2/plugins/region_validation.rb +1 -1
- data/lib/aws-sdk-ec2/resource.rb +793 -282
- data/lib/aws-sdk-ec2/route.rb +9 -3
- data/lib/aws-sdk-ec2/route_table.rb +21 -7
- data/lib/aws-sdk-ec2/route_table_association.rb +9 -3
- data/lib/aws-sdk-ec2/security_group.rb +74 -57
- data/lib/aws-sdk-ec2/snapshot.rb +38 -12
- data/lib/aws-sdk-ec2/subnet.rb +394 -137
- data/lib/aws-sdk-ec2/tag.rb +12 -4
- data/lib/aws-sdk-ec2/types.rb +15645 -13412
- data/lib/aws-sdk-ec2/volume.rb +65 -34
- data/lib/aws-sdk-ec2/vpc.rb +368 -123
- data/lib/aws-sdk-ec2/vpc_address.rb +29 -34
- data/lib/aws-sdk-ec2/vpc_peering_connection.rb +18 -6
- data/lib/aws-sdk-ec2/waiters.rb +184 -0
- data/lib/aws-sdk-ec2.rb +6 -2
- metadata +8 -4
data/lib/aws-sdk-ec2/image.rb
CHANGED
@@ -88,8 +88,8 @@ module Aws::EC2
|
|
88
88
|
end
|
89
89
|
|
90
90
|
# The platform details associated with the billing code of the AMI. For
|
91
|
-
# more information, see [
|
92
|
-
#
|
91
|
+
# more information, see [Understand AMI billing information][1] in the
|
92
|
+
# *Amazon EC2 User Guide*.
|
93
93
|
#
|
94
94
|
#
|
95
95
|
#
|
@@ -157,7 +157,8 @@ module Aws::EC2
|
|
157
157
|
data[:ena_support]
|
158
158
|
end
|
159
159
|
|
160
|
-
# The hypervisor type of the image.
|
160
|
+
# The hypervisor type of the image. Only `xen` is supported. `ovm` is
|
161
|
+
# not supported.
|
161
162
|
# @return [String]
|
162
163
|
def hypervisor
|
163
164
|
data[:hypervisor]
|
@@ -215,7 +216,7 @@ module Aws::EC2
|
|
215
216
|
end
|
216
217
|
|
217
218
|
# The boot mode of the image. For more information, see [Boot modes][1]
|
218
|
-
# in the *Amazon
|
219
|
+
# in the *Amazon EC2 User Guide*.
|
219
220
|
#
|
220
221
|
#
|
221
222
|
#
|
@@ -225,14 +226,53 @@ module Aws::EC2
|
|
225
226
|
data[:boot_mode]
|
226
227
|
end
|
227
228
|
|
229
|
+
# If the image is configured for NitroTPM support, the value is `v2.0`.
|
230
|
+
# For more information, see [NitroTPM][1] in the *Amazon EC2 User
|
231
|
+
# Guide*.
|
232
|
+
#
|
233
|
+
#
|
234
|
+
#
|
235
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html
|
236
|
+
# @return [String]
|
237
|
+
def tpm_support
|
238
|
+
data[:tpm_support]
|
239
|
+
end
|
240
|
+
|
228
241
|
# The date and time to deprecate the AMI, in UTC, in the following
|
229
|
-
# format: *YYYY*-*MM*-*DD*T*HH
|
230
|
-
#
|
242
|
+
# format: *YYYY*-*MM*-*DD*T*HH*:*MM*:*SS*Z. If you specified a value for
|
243
|
+
# seconds, Amazon EC2 rounds the seconds to the nearest minute.
|
231
244
|
# @return [String]
|
232
245
|
def deprecation_time
|
233
246
|
data[:deprecation_time]
|
234
247
|
end
|
235
248
|
|
249
|
+
# If `v2.0`, it indicates that IMDSv2 is specified in the AMI. Instances
|
250
|
+
# launched from this AMI will have `HttpTokens` automatically set to
|
251
|
+
# `required` so that, by default, the instance requires that IMDSv2 is
|
252
|
+
# used when requesting instance metadata. In addition,
|
253
|
+
# `HttpPutResponseHopLimit` is set to `2`. For more information, see
|
254
|
+
# [Configure the AMI][1] in the *Amazon EC2 User Guide*.
|
255
|
+
#
|
256
|
+
#
|
257
|
+
#
|
258
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration
|
259
|
+
# @return [String]
|
260
|
+
def imds_support
|
261
|
+
data[:imds_support]
|
262
|
+
end
|
263
|
+
|
264
|
+
# The ID of the instance that the AMI was created from if the AMI was
|
265
|
+
# created using [CreateImage][1]. This field only appears if the AMI was
|
266
|
+
# created using CreateImage.
|
267
|
+
#
|
268
|
+
#
|
269
|
+
#
|
270
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html
|
271
|
+
# @return [String]
|
272
|
+
def source_instance_id
|
273
|
+
data[:source_instance_id]
|
274
|
+
end
|
275
|
+
|
236
276
|
# @!endgroup
|
237
277
|
|
238
278
|
# @return [Client]
|
@@ -247,7 +287,9 @@ module Aws::EC2
|
|
247
287
|
#
|
248
288
|
# @return [self]
|
249
289
|
def load
|
250
|
-
resp =
|
290
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
291
|
+
@client.describe_images(image_ids: [@id])
|
292
|
+
end
|
251
293
|
@data = resp.images[0]
|
252
294
|
self
|
253
295
|
end
|
@@ -292,7 +334,9 @@ module Aws::EC2
|
|
292
334
|
options, params = separate_params_and_options(options)
|
293
335
|
waiter = Waiters::ImageExists.new(options)
|
294
336
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
295
|
-
resp =
|
337
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
338
|
+
waiter.wait(params.merge(image_ids: [@id]))
|
339
|
+
end
|
296
340
|
Image.new({
|
297
341
|
id: @id,
|
298
342
|
data: resp.data.images[0],
|
@@ -394,7 +438,9 @@ module Aws::EC2
|
|
394
438
|
:retry
|
395
439
|
end
|
396
440
|
end
|
397
|
-
Aws::
|
441
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
442
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
443
|
+
end
|
398
444
|
end
|
399
445
|
|
400
446
|
# @!group Actions
|
@@ -424,7 +470,9 @@ module Aws::EC2
|
|
424
470
|
def create_tags(options = {})
|
425
471
|
batch = []
|
426
472
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
427
|
-
resp =
|
473
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
474
|
+
@client.create_tags(options)
|
475
|
+
end
|
428
476
|
options[:tags].each do |t|
|
429
477
|
batch << Tag.new(
|
430
478
|
resource_id: @id,
|
@@ -469,7 +517,9 @@ module Aws::EC2
|
|
469
517
|
def delete_tags(options = {})
|
470
518
|
batch = []
|
471
519
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
472
|
-
resp =
|
520
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
521
|
+
@client.delete_tags(options)
|
522
|
+
end
|
473
523
|
options[:tags].each do |t|
|
474
524
|
batch << Tag.new(
|
475
525
|
resource_id: @id,
|
@@ -495,24 +545,26 @@ module Aws::EC2
|
|
495
545
|
# @return [EmptyStructure]
|
496
546
|
def deregister(options = {})
|
497
547
|
options = options.merge(image_id: @id)
|
498
|
-
resp =
|
548
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
549
|
+
@client.deregister_image(options)
|
550
|
+
end
|
499
551
|
resp.data
|
500
552
|
end
|
501
553
|
|
502
554
|
# @example Request syntax with placeholder values
|
503
555
|
#
|
504
556
|
# image.describe_attribute({
|
505
|
-
# attribute: "description", # required, accepts description, kernel, ramdisk, launchPermission, productCodes, blockDeviceMapping, sriovNetSupport, bootMode
|
557
|
+
# attribute: "description", # required, accepts description, kernel, ramdisk, launchPermission, productCodes, blockDeviceMapping, sriovNetSupport, bootMode, tpmSupport, uefiData, lastLaunchedTime, imdsSupport
|
506
558
|
# dry_run: false,
|
507
559
|
# })
|
508
560
|
# @param [Hash] options ({})
|
509
561
|
# @option options [required, String] :attribute
|
510
562
|
# The AMI attribute.
|
511
563
|
#
|
512
|
-
# **Note
|
513
|
-
#
|
514
|
-
#
|
515
|
-
#
|
564
|
+
# **Note**: The `blockDeviceMapping` attribute is deprecated. Using this
|
565
|
+
# attribute returns the `Client.AuthFailure` error. To get information
|
566
|
+
# about the block device mappings for an AMI, use the DescribeImages
|
567
|
+
# action.
|
516
568
|
# @option options [Boolean] :dry_run
|
517
569
|
# Checks whether you have the required permissions for the action,
|
518
570
|
# without actually making the request, and provides an error response.
|
@@ -521,7 +573,9 @@ module Aws::EC2
|
|
521
573
|
# @return [Types::ImageAttribute]
|
522
574
|
def describe_attribute(options = {})
|
523
575
|
options = options.merge(image_id: @id)
|
524
|
-
resp =
|
576
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
577
|
+
@client.describe_image_attribute(options)
|
578
|
+
end
|
525
579
|
resp.data
|
526
580
|
end
|
527
581
|
|
@@ -556,12 +610,13 @@ module Aws::EC2
|
|
556
610
|
# dry_run: false,
|
557
611
|
# organization_arns: ["String"],
|
558
612
|
# organizational_unit_arns: ["String"],
|
613
|
+
# imds_support: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
559
614
|
# })
|
560
615
|
# @param [Hash] options ({})
|
561
616
|
# @option options [String] :attribute
|
562
617
|
# The name of the attribute to modify.
|
563
618
|
#
|
564
|
-
# Valid values: `description` \| `launchPermission`
|
619
|
+
# Valid values: `description` \| `imdsSupport` \| `launchPermission`
|
565
620
|
# @option options [Types::AttributeValue] :description
|
566
621
|
# A new description for the AMI.
|
567
622
|
# @option options [Types::LaunchPermissionModifications] :launch_permission
|
@@ -579,7 +634,7 @@ module Aws::EC2
|
|
579
634
|
# when the `Attribute` parameter is `launchPermission`.
|
580
635
|
# @option options [String] :value
|
581
636
|
# The value of the attribute being modified. This parameter can be used
|
582
|
-
# only when the `Attribute` parameter is `description`.
|
637
|
+
# only when the `Attribute` parameter is `description` or `imdsSupport`.
|
583
638
|
# @option options [Boolean] :dry_run
|
584
639
|
# Checks whether you have the required permissions for the action,
|
585
640
|
# without actually making the request, and provides an error response.
|
@@ -592,10 +647,27 @@ module Aws::EC2
|
|
592
647
|
# The Amazon Resource Name (ARN) of an organizational unit (OU). This
|
593
648
|
# parameter can be used only when the `Attribute` parameter is
|
594
649
|
# `launchPermission`.
|
650
|
+
# @option options [Types::AttributeValue] :imds_support
|
651
|
+
# Set to `v2.0` to indicate that IMDSv2 is specified in the AMI.
|
652
|
+
# Instances launched from this AMI will have `HttpTokens` automatically
|
653
|
+
# set to `required` so that, by default, the instance requires that
|
654
|
+
# IMDSv2 is used when requesting instance metadata. In addition,
|
655
|
+
# `HttpPutResponseHopLimit` is set to `2`. For more information, see
|
656
|
+
# [Configure the AMI][1] in the *Amazon EC2 User Guide*.
|
657
|
+
#
|
658
|
+
# Do not use this parameter unless your AMI software supports IMDSv2.
|
659
|
+
# After you set the value to `v2.0`, you can't undo it. The only way to
|
660
|
+
# “reset” your AMI is to create a new AMI from the underlying snapshot.
|
661
|
+
#
|
662
|
+
#
|
663
|
+
#
|
664
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration
|
595
665
|
# @return [EmptyStructure]
|
596
666
|
def modify_attribute(options = {})
|
597
667
|
options = options.merge(image_id: @id)
|
598
|
-
resp =
|
668
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
669
|
+
@client.modify_image_attribute(options)
|
670
|
+
end
|
599
671
|
resp.data
|
600
672
|
end
|
601
673
|
|
@@ -617,7 +689,9 @@ module Aws::EC2
|
|
617
689
|
# @return [EmptyStructure]
|
618
690
|
def reset_attribute(options = {})
|
619
691
|
options = options.merge(image_id: @id)
|
620
|
-
resp =
|
692
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
693
|
+
@client.reset_image_attribute(options)
|
694
|
+
end
|
621
695
|
resp.data
|
622
696
|
end
|
623
697
|
|