aws-sdk-ec2 1.285.0 → 1.417.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +663 -1
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-ec2/classic_address.rb +33 -36
  5. data/lib/aws-sdk-ec2/client.rb +13859 -2170
  6. data/lib/aws-sdk-ec2/client_api.rb +4203 -86
  7. data/lib/aws-sdk-ec2/customizations/instance.rb +3 -1
  8. data/lib/aws-sdk-ec2/customizations/resource.rb +3 -1
  9. data/lib/aws-sdk-ec2/dhcp_options.rb +19 -7
  10. data/lib/aws-sdk-ec2/endpoint_parameters.rb +66 -0
  11. data/lib/aws-sdk-ec2/endpoint_provider.rb +57 -0
  12. data/lib/aws-sdk-ec2/endpoints.rb +8444 -0
  13. data/lib/aws-sdk-ec2/image.rb +96 -22
  14. data/lib/aws-sdk-ec2/instance.rb +232 -95
  15. data/lib/aws-sdk-ec2/internet_gateway.rb +21 -7
  16. data/lib/aws-sdk-ec2/key_pair.rb +13 -4
  17. data/lib/aws-sdk-ec2/key_pair_info.rb +32 -4
  18. data/lib/aws-sdk-ec2/nat_gateway.rb +22 -12
  19. data/lib/aws-sdk-ec2/network_acl.rb +28 -10
  20. data/lib/aws-sdk-ec2/network_interface.rb +76 -17
  21. data/lib/aws-sdk-ec2/network_interface_association.rb +11 -5
  22. data/lib/aws-sdk-ec2/placement_group.rb +198 -33
  23. data/lib/aws-sdk-ec2/plugins/copy_encrypted_snapshot.rb +17 -12
  24. data/lib/aws-sdk-ec2/plugins/endpoints.rb +1272 -0
  25. data/lib/aws-sdk-ec2/plugins/region_validation.rb +1 -1
  26. data/lib/aws-sdk-ec2/resource.rb +793 -282
  27. data/lib/aws-sdk-ec2/route.rb +9 -3
  28. data/lib/aws-sdk-ec2/route_table.rb +21 -7
  29. data/lib/aws-sdk-ec2/route_table_association.rb +9 -3
  30. data/lib/aws-sdk-ec2/security_group.rb +74 -57
  31. data/lib/aws-sdk-ec2/snapshot.rb +38 -12
  32. data/lib/aws-sdk-ec2/subnet.rb +394 -137
  33. data/lib/aws-sdk-ec2/tag.rb +12 -4
  34. data/lib/aws-sdk-ec2/types.rb +15645 -13412
  35. data/lib/aws-sdk-ec2/volume.rb +65 -34
  36. data/lib/aws-sdk-ec2/vpc.rb +368 -123
  37. data/lib/aws-sdk-ec2/vpc_address.rb +29 -34
  38. data/lib/aws-sdk-ec2/vpc_peering_connection.rb +18 -6
  39. data/lib/aws-sdk-ec2/waiters.rb +184 -0
  40. data/lib/aws-sdk-ec2.rb +6 -2
  41. metadata +8 -4
@@ -130,6 +130,12 @@ module Aws::EC2
130
130
  data[:throughput]
131
131
  end
132
132
 
133
+ # Reserved for future use.
134
+ # @return [String]
135
+ def sse_type
136
+ data[:sse_type]
137
+ end
138
+
133
139
  # @!endgroup
134
140
 
135
141
  # @return [Client]
@@ -144,7 +150,9 @@ module Aws::EC2
144
150
  #
145
151
  # @return [self]
146
152
  def load
147
- resp = @client.describe_volumes(volume_ids: [@id])
153
+ resp = Aws::Plugins::UserAgent.feature('resource') do
154
+ @client.describe_volumes(volume_ids: [@id])
155
+ end
148
156
  @data = resp.volumes[0]
149
157
  self
150
158
  end
@@ -259,7 +267,9 @@ module Aws::EC2
259
267
  :retry
260
268
  end
261
269
  end
262
- Aws::Waiters::Waiter.new(options).wait({})
270
+ Aws::Plugins::UserAgent.feature('resource') do
271
+ Aws::Waiters::Waiter.new(options).wait({})
272
+ end
263
273
  end
264
274
 
265
275
  # @!group Actions
@@ -284,7 +294,9 @@ module Aws::EC2
284
294
  # @return [Types::VolumeAttachment]
285
295
  def attach_to_instance(options = {})
286
296
  options = options.merge(volume_id: @id)
287
- resp = @client.attach_volume(options)
297
+ resp = Aws::Plugins::UserAgent.feature('resource') do
298
+ @client.attach_volume(options)
299
+ end
288
300
  resp.data
289
301
  end
290
302
 
@@ -295,7 +307,7 @@ module Aws::EC2
295
307
  # outpost_arn: "String",
296
308
  # tag_specifications: [
297
309
  # {
298
- # resource_type: "capacity-reservation", # accepts capacity-reservation, client-vpn-endpoint, customer-gateway, carrier-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, instance-event-window, internet-gateway, ipv4pool-ec2, ipv6pool-ec2, key-pair, launch-template, local-gateway, local-gateway-route-table, local-gateway-virtual-interface, local-gateway-virtual-interface-group, local-gateway-route-table-vpc-association, local-gateway-route-table-virtual-interface-group-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, placement-group, prefix-list, replace-root-volume-task, reserved-instances, route-table, security-group, security-group-rule, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-endpoint, vpc-endpoint-service, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log
310
+ # resource_type: "capacity-reservation", # accepts capacity-reservation, client-vpn-endpoint, customer-gateway, carrier-gateway, coip-pool, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, instance-event-window, internet-gateway, ipam, ipam-pool, ipam-scope, ipv4pool-ec2, ipv6pool-ec2, key-pair, launch-template, local-gateway, local-gateway-route-table, local-gateway-virtual-interface, local-gateway-virtual-interface-group, local-gateway-route-table-vpc-association, local-gateway-route-table-virtual-interface-group-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, network-insights-access-scope, network-insights-access-scope-analysis, placement-group, prefix-list, replace-root-volume-task, reserved-instances, route-table, security-group, security-group-rule, snapshot, spot-fleet-request, spot-instances-request, subnet, subnet-cidr-reservation, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-policy-table, transit-gateway-route-table, transit-gateway-route-table-announcement, volume, vpc, vpc-endpoint, vpc-endpoint-connection, vpc-endpoint-service, vpc-endpoint-service-permission, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log, capacity-reservation-fleet, traffic-mirror-filter-rule, vpc-endpoint-connection-device-type, verified-access-instance, verified-access-group, verified-access-endpoint, verified-access-policy, verified-access-trust-provider, vpn-connection-device-type, vpc-block-public-access-exclusion, ipam-resource-discovery, ipam-resource-discovery-association, instance-connect-endpoint
299
311
  # tags: [
300
312
  # {
301
313
  # key: "String",
@@ -340,7 +352,9 @@ module Aws::EC2
340
352
  # @return [Snapshot]
341
353
  def create_snapshot(options = {})
342
354
  options = options.merge(volume_id: @id)
343
- resp = @client.create_snapshot(options)
355
+ resp = Aws::Plugins::UserAgent.feature('resource') do
356
+ @client.create_snapshot(options)
357
+ end
344
358
  Snapshot.new(
345
359
  id: resp.data.snapshot_id,
346
360
  data: resp.data,
@@ -373,7 +387,9 @@ module Aws::EC2
373
387
  def create_tags(options = {})
374
388
  batch = []
375
389
  options = Aws::Util.deep_merge(options, resources: [@id])
376
- resp = @client.create_tags(options)
390
+ resp = Aws::Plugins::UserAgent.feature('resource') do
391
+ @client.create_tags(options)
392
+ end
377
393
  options[:tags].each do |t|
378
394
  batch << Tag.new(
379
395
  resource_id: @id,
@@ -418,7 +434,9 @@ module Aws::EC2
418
434
  def delete_tags(options = {})
419
435
  batch = []
420
436
  options = Aws::Util.deep_merge(options, resources: [@id])
421
- resp = @client.delete_tags(options)
437
+ resp = Aws::Plugins::UserAgent.feature('resource') do
438
+ @client.delete_tags(options)
439
+ end
422
440
  options[:tags].each do |t|
423
441
  batch << Tag.new(
424
442
  resource_id: @id,
@@ -444,7 +462,9 @@ module Aws::EC2
444
462
  # @return [EmptyStructure]
445
463
  def delete(options = {})
446
464
  options = options.merge(volume_id: @id)
447
- resp = @client.delete_volume(options)
465
+ resp = Aws::Plugins::UserAgent.feature('resource') do
466
+ @client.delete_volume(options)
467
+ end
448
468
  resp.data
449
469
  end
450
470
 
@@ -465,7 +485,9 @@ module Aws::EC2
465
485
  # @return [Types::DescribeVolumeAttributeResult]
466
486
  def describe_attribute(options = {})
467
487
  options = options.merge(volume_id: @id)
468
- resp = @client.describe_volume_attribute(options)
488
+ resp = Aws::Plugins::UserAgent.feature('resource') do
489
+ @client.describe_volume_attribute(options)
490
+ end
469
491
  resp.data
470
492
  end
471
493
 
@@ -499,8 +521,8 @@ module Aws::EC2
499
521
  #
500
522
  # * `event.event-id` - The event ID.
501
523
  #
502
- # * `event.event-type` - The event type (for `io-enabled`\: `passed` \|
503
- # `failed`; for `io-performance`\: `io-performance:degraded` \|
524
+ # * `event.event-type` - The event type (for `io-enabled`: `passed` \|
525
+ # `failed`; for `io-performance`: `io-performance:degraded` \|
504
526
  # `io-performance:severely-degraded` \| `io-performance:stalled`).
505
527
  #
506
528
  # * `event.not-after` - The latest end time for the event.
@@ -511,28 +533,27 @@ module Aws::EC2
511
533
  # (`io-enabled` \| `io-performance`).
512
534
  #
513
535
  # * `volume-status.details-status` - The status of
514
- # `volume-status.details-name` (for `io-enabled`\: `passed` \|
515
- # `failed`; for `io-performance`\: `normal` \| `degraded` \|
536
+ # `volume-status.details-name` (for `io-enabled`: `passed` \|
537
+ # `failed`; for `io-performance`: `normal` \| `degraded` \|
516
538
  # `severely-degraded` \| `stalled`).
517
539
  #
518
540
  # * `volume-status.status` - The status of the volume (`ok` \|
519
541
  # `impaired` \| `warning` \| `insufficient-data`).
520
542
  # @option options [Integer] :max_results
521
- # The maximum number of volume results returned by
522
- # `DescribeVolumeStatus` in paginated output. When this parameter is
523
- # used, the request only returns `MaxResults` results in a single page
524
- # along with a `NextToken` response element. The remaining results of
525
- # the initial request can be seen by sending another request with the
526
- # returned `NextToken` value. This value can be between 5 and 1,000; if
527
- # `MaxResults` is given a value larger than 1,000, only 1,000 results
528
- # are returned. If this parameter is not used, then
529
- # `DescribeVolumeStatus` returns all results. You cannot specify this
530
- # parameter and the volume IDs parameter in the same request.
543
+ # The maximum number of items to return for this request. To get the
544
+ # next page of items, make another request with the token returned in
545
+ # the output. This value can be between 5 and 1,000; if the value is
546
+ # larger than 1,000, only 1,000 results are returned. If this parameter
547
+ # is not used, then all items are returned. You cannot specify this
548
+ # parameter and the volume IDs parameter in the same request. For more
549
+ # information, see [Pagination][1].
550
+ #
551
+ #
552
+ #
553
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination
531
554
  # @option options [String] :next_token
532
- # The `NextToken` value to include in a future `DescribeVolumeStatus`
533
- # request. When the results of the request exceed `MaxResults`, this
534
- # value can be used to retrieve the next page of results. This value is
535
- # `null` when there are no more results to return.
555
+ # The token returned from a previous paginated request. Pagination
556
+ # continues from the end of the items returned by the previous request.
536
557
  # @option options [Boolean] :dry_run
537
558
  # Checks whether you have the required permissions for the action,
538
559
  # without actually making the request, and provides an error response.
@@ -541,7 +562,9 @@ module Aws::EC2
541
562
  # @return [Types::DescribeVolumeStatusResult]
542
563
  def describe_status(options = {})
543
564
  options = Aws::Util.deep_merge(options, volume_ids: [@id])
544
- resp = @client.describe_volume_status(options)
565
+ resp = Aws::Plugins::UserAgent.feature('resource') do
566
+ @client.describe_volume_status(options)
567
+ end
545
568
  resp.data
546
569
  end
547
570
 
@@ -550,7 +573,7 @@ module Aws::EC2
550
573
  # volume.detach_from_instance({
551
574
  # device: "String",
552
575
  # force: false,
553
- # instance_id: "InstanceId",
576
+ # instance_id: "InstanceIdForResolver",
554
577
  # dry_run: false,
555
578
  # })
556
579
  # @param [Hash] options ({})
@@ -576,7 +599,9 @@ module Aws::EC2
576
599
  # @return [Types::VolumeAttachment]
577
600
  def detach_from_instance(options = {})
578
601
  options = options.merge(volume_id: @id)
579
- resp = @client.detach_volume(options)
602
+ resp = Aws::Plugins::UserAgent.feature('resource') do
603
+ @client.detach_volume(options)
604
+ end
580
605
  resp.data
581
606
  end
582
607
 
@@ -594,7 +619,9 @@ module Aws::EC2
594
619
  # @return [EmptyStructure]
595
620
  def enable_io(options = {})
596
621
  options = options.merge(volume_id: @id)
597
- resp = @client.enable_volume_io(options)
622
+ resp = Aws::Plugins::UserAgent.feature('resource') do
623
+ @client.enable_volume_io(options)
624
+ end
598
625
  resp.data
599
626
  end
600
627
 
@@ -618,7 +645,9 @@ module Aws::EC2
618
645
  # @return [EmptyStructure]
619
646
  def modify_attribute(options = {})
620
647
  options = options.merge(volume_id: @id)
621
- resp = @client.modify_volume_attribute(options)
648
+ resp = Aws::Plugins::UserAgent.feature('resource') do
649
+ @client.modify_volume_attribute(options)
650
+ end
622
651
  resp.data
623
652
  end
624
653
 
@@ -668,7 +697,7 @@ module Aws::EC2
668
697
  # * `storage-tier` - The storage tier of the snapshot (`archive` \|
669
698
  # `standard`).
670
699
  #
671
- # * `tag`\:&lt;key&gt; - The key/value combination of a tag assigned to
700
+ # * `tag`:&lt;key&gt; - The key/value combination of a tag assigned to
672
701
  # the resource. Use the tag key in the filter name and the tag value
673
702
  # as the filter value. For example, to find all resources that have a
674
703
  # tag with the key `Owner` and the value `TeamA`, specify `tag:Owner`
@@ -705,7 +734,9 @@ module Aws::EC2
705
734
  name: "volume-id",
706
735
  values: [@id]
707
736
  }])
708
- resp = @client.describe_snapshots(options)
737
+ resp = Aws::Plugins::UserAgent.feature('resource') do
738
+ @client.describe_snapshots(options)
739
+ end
709
740
  resp.each_page do |page|
710
741
  batch = []
711
742
  page.data.snapshots.each do |s|