aws-sdk-ec2 1.431.0 → 1.522.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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +465 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-ec2/classic_address.rb +26 -16
  5. data/lib/aws-sdk-ec2/client.rb +10867 -4155
  6. data/lib/aws-sdk-ec2/client_api.rb +2924 -510
  7. data/lib/aws-sdk-ec2/customizations/instance.rb +18 -1
  8. data/lib/aws-sdk-ec2/customizations/resource.rb +46 -3
  9. data/lib/aws-sdk-ec2/customizations/tag.rb +13 -0
  10. data/lib/aws-sdk-ec2/customizations.rb +0 -22
  11. data/lib/aws-sdk-ec2/dhcp_options.rb +12 -12
  12. data/lib/aws-sdk-ec2/endpoint_parameters.rb +9 -6
  13. data/lib/aws-sdk-ec2/endpoint_provider.rb +14 -18
  14. data/lib/aws-sdk-ec2/endpoints.rb +2 -8608
  15. data/lib/aws-sdk-ec2/image.rb +166 -95
  16. data/lib/aws-sdk-ec2/instance.rb +425 -356
  17. data/lib/aws-sdk-ec2/internet_gateway.rb +7 -7
  18. data/lib/aws-sdk-ec2/key_pair.rb +14 -14
  19. data/lib/aws-sdk-ec2/key_pair_info.rb +30 -30
  20. data/lib/aws-sdk-ec2/nat_gateway.rb +7 -8
  21. data/lib/aws-sdk-ec2/network_acl.rb +70 -70
  22. data/lib/aws-sdk-ec2/network_interface.rb +94 -78
  23. data/lib/aws-sdk-ec2/network_interface_association.rb +3 -3
  24. data/lib/aws-sdk-ec2/placement_group.rb +37 -19
  25. data/lib/aws-sdk-ec2/plugins/endpoints.rb +20 -1242
  26. data/lib/aws-sdk-ec2/resource.rb +944 -811
  27. data/lib/aws-sdk-ec2/route.rb +34 -34
  28. data/lib/aws-sdk-ec2/route_table.rb +44 -44
  29. data/lib/aws-sdk-ec2/route_table_association.rb +3 -3
  30. data/lib/aws-sdk-ec2/security_group.rb +212 -201
  31. data/lib/aws-sdk-ec2/snapshot.rb +169 -105
  32. data/lib/aws-sdk-ec2/subnet.rb +391 -359
  33. data/lib/aws-sdk-ec2/tag.rb +7 -4
  34. data/lib/aws-sdk-ec2/types.rb +13807 -4774
  35. data/lib/aws-sdk-ec2/volume.rb +157 -119
  36. data/lib/aws-sdk-ec2/vpc.rb +278 -224
  37. data/lib/aws-sdk-ec2/vpc_address.rb +31 -21
  38. data/lib/aws-sdk-ec2/vpc_peering_connection.rb +6 -6
  39. data/lib/aws-sdk-ec2.rb +40 -36
  40. data/sig/classic_address.rbs +105 -0
  41. data/sig/client.rbs +14622 -0
  42. data/sig/dhcp_options.rbs +84 -0
  43. data/sig/errors.rbs +16 -0
  44. data/sig/image.rbs +228 -0
  45. data/sig/instance.rbs +564 -0
  46. data/sig/internet_gateway.rbs +91 -0
  47. data/sig/key_pair.rbs +54 -0
  48. data/sig/key_pair_info.rbs +63 -0
  49. data/sig/nat_gateway.rbs +107 -0
  50. data/sig/network_acl.rbs +144 -0
  51. data/sig/network_interface.rbs +239 -0
  52. data/sig/network_interface_association.rbs +62 -0
  53. data/sig/placement_group.rbs +78 -0
  54. data/sig/resource.rbs +1042 -0
  55. data/sig/route.rbs +113 -0
  56. data/sig/route_table.rbs +117 -0
  57. data/sig/route_table_association.rbs +69 -0
  58. data/sig/security_group.rbs +311 -0
  59. data/sig/snapshot.rbs +204 -0
  60. data/sig/subnet.rbs +436 -0
  61. data/sig/tag.rbs +63 -0
  62. data/sig/types.rbs +16812 -0
  63. data/sig/volume.rbs +210 -0
  64. data/sig/vpc.rbs +404 -0
  65. data/sig/vpc_address.rbs +101 -0
  66. data/sig/vpc_peering_connection.rbs +84 -0
  67. data/sig/waiters.rbs +664 -0
  68. metadata +44 -18
@@ -35,58 +35,6 @@ module Aws::EC2
35
35
  end
36
36
  alias :image_id :id
37
37
 
38
- # The architecture of the image.
39
- # @return [String]
40
- def architecture
41
- data[:architecture]
42
- end
43
-
44
- # The date and time the image was created.
45
- # @return [String]
46
- def creation_date
47
- data[:creation_date]
48
- end
49
-
50
- # The location of the AMI.
51
- # @return [String]
52
- def image_location
53
- data[:image_location]
54
- end
55
-
56
- # The type of image.
57
- # @return [String]
58
- def image_type
59
- data[:image_type]
60
- end
61
-
62
- # Indicates whether the image has public launch permissions. The value
63
- # is `true` if this image has public launch permissions or `false` if it
64
- # has only implicit and explicit launch permissions.
65
- # @return [Boolean]
66
- def public
67
- data[:public]
68
- end
69
-
70
- # The kernel associated with the image, if any. Only applicable for
71
- # machine images.
72
- # @return [String]
73
- def kernel_id
74
- data[:kernel_id]
75
- end
76
-
77
- # The ID of the Amazon Web Services account that owns the image.
78
- # @return [String]
79
- def owner_id
80
- data[:owner_id]
81
- end
82
-
83
- # This value is set to `windows` for Windows AMIs; otherwise, it is
84
- # blank.
85
- # @return [String]
86
- def platform
87
- data[:platform]
88
- end
89
-
90
38
  # The platform details associated with the billing code of the AMI. For
91
39
  # more information, see [Understand AMI billing information][1] in the
92
40
  # *Amazon EC2 User Guide*.
@@ -119,26 +67,6 @@ module Aws::EC2
119
67
  data[:usage_operation]
120
68
  end
121
69
 
122
- # Any product codes associated with the AMI.
123
- # @return [Array<Types::ProductCode>]
124
- def product_codes
125
- data[:product_codes]
126
- end
127
-
128
- # The RAM disk associated with the image, if any. Only applicable for
129
- # machine images.
130
- # @return [String]
131
- def ramdisk_id
132
- data[:ramdisk_id]
133
- end
134
-
135
- # The current state of the AMI. If the state is `available`, the image
136
- # is successfully registered and can be used to launch an instance.
137
- # @return [String]
138
- def state
139
- data[:state]
140
- end
141
-
142
70
  # Any block device mapping entries.
143
71
  # @return [Array<Types::BlockDeviceMapping>]
144
72
  def block_device_mappings
@@ -164,8 +92,7 @@ module Aws::EC2
164
92
  data[:hypervisor]
165
93
  end
166
94
 
167
- # The Amazon Web Services account alias (for example, `amazon`, `self`)
168
- # or the Amazon Web Services account ID of the AMI owner.
95
+ # The owner alias (`amazon` \| `aws-backup-vault` \| `aws-marketplace`).
169
96
  # @return [String]
170
97
  def image_owner_alias
171
98
  data[:image_owner_alias]
@@ -273,6 +200,150 @@ module Aws::EC2
273
200
  data[:source_instance_id]
274
201
  end
275
202
 
203
+ # Indicates whether deregistration protection is enabled for the AMI.
204
+ # @return [String]
205
+ def deregistration_protection
206
+ data[:deregistration_protection]
207
+ end
208
+
209
+ # The date and time, in [ISO 8601 date-time format][1], when the AMI was
210
+ # last used to launch an EC2 instance. When the AMI is used to launch an
211
+ # instance, there is a 24-hour delay before that usage is reported.
212
+ #
213
+ # <note markdown="1"> `lastLaunchedTime` data is available starting April 2017.
214
+ #
215
+ # </note>
216
+ #
217
+ #
218
+ #
219
+ # [1]: http://www.iso.org/iso/iso8601
220
+ # @return [String]
221
+ def last_launched_time
222
+ data[:last_launched_time]
223
+ end
224
+
225
+ # If `true`, the AMI satisfies the criteria for Allowed AMIs and can be
226
+ # discovered and used in the account. If `false` and Allowed AMIs is set
227
+ # to `enabled`, the AMI can't be discovered or used in the account. If
228
+ # `false` and Allowed AMIs is set to `audit-mode`, the AMI can be
229
+ # discovered and used in the account.
230
+ #
231
+ # For more information, see [Control the discovery and use of AMIs in
232
+ # Amazon EC2 with Allowed AMIs][1] in *Amazon EC2 User Guide*.
233
+ #
234
+ #
235
+ #
236
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-allowed-amis.html
237
+ # @return [Boolean]
238
+ def image_allowed
239
+ data[:image_allowed]
240
+ end
241
+
242
+ # The ID of the source AMI from which the AMI was created.
243
+ #
244
+ # The ID only appears if the AMI was created using CreateImage,
245
+ # CopyImage, or CreateRestoreImageTask. The ID does not appear if the
246
+ # AMI was created using any other API. For some older AMIs, the ID might
247
+ # not be available. For more information, see [Identify the source AMI
248
+ # used to create a new AMI][1] in the *Amazon EC2 User Guide*.
249
+ #
250
+ #
251
+ #
252
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify-source-ami-used-to-create-new-ami.html
253
+ # @return [String]
254
+ def source_image_id
255
+ data[:source_image_id]
256
+ end
257
+
258
+ # The Region of the source AMI.
259
+ #
260
+ # The Region only appears if the AMI was created using CreateImage,
261
+ # CopyImage, or CreateRestoreImageTask. The Region does not appear if
262
+ # the AMI was created using any other API. For some older AMIs, the
263
+ # Region might not be available. For more information, see [Identify the
264
+ # source AMI used to create a new AMI][1] in the *Amazon EC2 User
265
+ # Guide*.
266
+ #
267
+ #
268
+ #
269
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify-source-ami-used-to-create-new-ami.html
270
+ # @return [String]
271
+ def source_image_region
272
+ data[:source_image_region]
273
+ end
274
+
275
+ # The location of the AMI.
276
+ # @return [String]
277
+ def image_location
278
+ data[:image_location]
279
+ end
280
+
281
+ # The current state of the AMI. If the state is `available`, the image
282
+ # is successfully registered and can be used to launch an instance.
283
+ # @return [String]
284
+ def state
285
+ data[:state]
286
+ end
287
+
288
+ # The ID of the Amazon Web Services account that owns the image.
289
+ # @return [String]
290
+ def owner_id
291
+ data[:owner_id]
292
+ end
293
+
294
+ # The date and time the image was created.
295
+ # @return [String]
296
+ def creation_date
297
+ data[:creation_date]
298
+ end
299
+
300
+ # Indicates whether the image has public launch permissions. The value
301
+ # is `true` if this image has public launch permissions or `false` if it
302
+ # has only implicit and explicit launch permissions.
303
+ # @return [Boolean]
304
+ def public
305
+ data[:public]
306
+ end
307
+
308
+ # Any product codes associated with the AMI.
309
+ # @return [Array<Types::ProductCode>]
310
+ def product_codes
311
+ data[:product_codes]
312
+ end
313
+
314
+ # The architecture of the image.
315
+ # @return [String]
316
+ def architecture
317
+ data[:architecture]
318
+ end
319
+
320
+ # The type of image.
321
+ # @return [String]
322
+ def image_type
323
+ data[:image_type]
324
+ end
325
+
326
+ # The kernel associated with the image, if any. Only applicable for
327
+ # machine images.
328
+ # @return [String]
329
+ def kernel_id
330
+ data[:kernel_id]
331
+ end
332
+
333
+ # The RAM disk associated with the image, if any. Only applicable for
334
+ # machine images.
335
+ # @return [String]
336
+ def ramdisk_id
337
+ data[:ramdisk_id]
338
+ end
339
+
340
+ # This value is set to `windows` for Windows AMIs; otherwise, it is
341
+ # blank.
342
+ # @return [String]
343
+ def platform
344
+ data[:platform]
345
+ end
346
+
276
347
  # @!endgroup
277
348
 
278
349
  # @return [Client]
@@ -287,7 +358,7 @@ module Aws::EC2
287
358
  #
288
359
  # @return [self]
289
360
  def load
290
- resp = Aws::Plugins::UserAgent.feature('resource') do
361
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
291
362
  @client.describe_images(image_ids: [@id])
292
363
  end
293
364
  @data = resp.images[0]
@@ -334,7 +405,7 @@ module Aws::EC2
334
405
  options, params = separate_params_and_options(options)
335
406
  waiter = Waiters::ImageExists.new(options)
336
407
  yield_waiter_and_warn(waiter, &block) if block_given?
337
- resp = Aws::Plugins::UserAgent.feature('resource') do
408
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
338
409
  waiter.wait(params.merge(image_ids: [@id]))
339
410
  end
340
411
  Image.new({
@@ -438,7 +509,7 @@ module Aws::EC2
438
509
  :retry
439
510
  end
440
511
  end
441
- Aws::Plugins::UserAgent.feature('resource') do
512
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
442
513
  Aws::Waiters::Waiter.new(options).wait({})
443
514
  end
444
515
  end
@@ -470,7 +541,7 @@ module Aws::EC2
470
541
  def create_tags(options = {})
471
542
  batch = []
472
543
  options = Aws::Util.deep_merge(options, resources: [@id])
473
- resp = Aws::Plugins::UserAgent.feature('resource') do
544
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
474
545
  @client.create_tags(options)
475
546
  end
476
547
  options[:tags].each do |t|
@@ -517,7 +588,7 @@ module Aws::EC2
517
588
  def delete_tags(options = {})
518
589
  batch = []
519
590
  options = Aws::Util.deep_merge(options, resources: [@id])
520
- resp = Aws::Plugins::UserAgent.feature('resource') do
591
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
521
592
  @client.delete_tags(options)
522
593
  end
523
594
  options[:tags].each do |t|
@@ -542,10 +613,10 @@ module Aws::EC2
542
613
  # without actually making the request, and provides an error response.
543
614
  # If you have the required permissions, the error response is
544
615
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
545
- # @return [EmptyStructure]
616
+ # @return [Types::DeregisterImageResult]
546
617
  def deregister(options = {})
547
618
  options = options.merge(image_id: @id)
548
- resp = Aws::Plugins::UserAgent.feature('resource') do
619
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
549
620
  @client.deregister_image(options)
550
621
  end
551
622
  resp.data
@@ -554,7 +625,7 @@ module Aws::EC2
554
625
  # @example Request syntax with placeholder values
555
626
  #
556
627
  # image.describe_attribute({
557
- # attribute: "description", # required, accepts description, kernel, ramdisk, launchPermission, productCodes, blockDeviceMapping, sriovNetSupport, bootMode, tpmSupport, uefiData, lastLaunchedTime, imdsSupport
628
+ # attribute: "description", # required, accepts description, kernel, ramdisk, launchPermission, productCodes, blockDeviceMapping, sriovNetSupport, bootMode, tpmSupport, uefiData, lastLaunchedTime, imdsSupport, deregistrationProtection
558
629
  # dry_run: false,
559
630
  # })
560
631
  # @param [Hash] options ({})
@@ -573,7 +644,7 @@ module Aws::EC2
573
644
  # @return [Types::ImageAttribute]
574
645
  def describe_attribute(options = {})
575
646
  options = options.merge(image_id: @id)
576
- resp = Aws::Plugins::UserAgent.feature('resource') do
647
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
577
648
  @client.describe_image_attribute(options)
578
649
  end
579
650
  resp.data
@@ -587,18 +658,18 @@ module Aws::EC2
587
658
  # launch_permission: {
588
659
  # add: [
589
660
  # {
590
- # group: "all", # accepts all
591
- # user_id: "String",
592
661
  # organization_arn: "String",
593
662
  # organizational_unit_arn: "String",
663
+ # user_id: "String",
664
+ # group: "all", # accepts all
594
665
  # },
595
666
  # ],
596
667
  # remove: [
597
668
  # {
598
- # group: "all", # accepts all
599
- # user_id: "String",
600
669
  # organization_arn: "String",
601
670
  # organizational_unit_arn: "String",
671
+ # user_id: "String",
672
+ # group: "all", # accepts all
602
673
  # },
603
674
  # ],
604
675
  # },
@@ -607,10 +678,10 @@ module Aws::EC2
607
678
  # user_groups: ["String"],
608
679
  # user_ids: ["String"],
609
680
  # value: "String",
610
- # dry_run: false,
611
681
  # organization_arns: ["String"],
612
682
  # organizational_unit_arns: ["String"],
613
683
  # imds_support: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
684
+ # dry_run: false,
614
685
  # })
615
686
  # @param [Hash] options ({})
616
687
  # @option options [String] :attribute
@@ -635,11 +706,6 @@ module Aws::EC2
635
706
  # @option options [String] :value
636
707
  # The value of the attribute being modified. This parameter can be used
637
708
  # only when the `Attribute` parameter is `description` or `imdsSupport`.
638
- # @option options [Boolean] :dry_run
639
- # Checks whether you have the required permissions for the action,
640
- # without actually making the request, and provides an error response.
641
- # If you have the required permissions, the error response is
642
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
643
709
  # @option options [Array<String>] :organization_arns
644
710
  # The Amazon Resource Name (ARN) of an organization. This parameter can
645
711
  # be used only when the `Attribute` parameter is `launchPermission`.
@@ -662,10 +728,15 @@ module Aws::EC2
662
728
  #
663
729
  #
664
730
  # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration
731
+ # @option options [Boolean] :dry_run
732
+ # Checks whether you have the required permissions for the action,
733
+ # without actually making the request, and provides an error response.
734
+ # If you have the required permissions, the error response is
735
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
665
736
  # @return [EmptyStructure]
666
737
  def modify_attribute(options = {})
667
738
  options = options.merge(image_id: @id)
668
- resp = Aws::Plugins::UserAgent.feature('resource') do
739
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
669
740
  @client.modify_image_attribute(options)
670
741
  end
671
742
  resp.data
@@ -689,7 +760,7 @@ module Aws::EC2
689
760
  # @return [EmptyStructure]
690
761
  def reset_attribute(options = {})
691
762
  options = options.merge(image_id: @id)
692
- resp = Aws::Plugins::UserAgent.feature('resource') do
763
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
693
764
  @client.reset_image_attribute(options)
694
765
  end
695
766
  resp.data