aws-sdk-ec2 1.402.0 → 1.547.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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +735 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-ec2/classic_address.rb +32 -20
  5. data/lib/aws-sdk-ec2/client.rb +14212 -4429
  6. data/lib/aws-sdk-ec2/client_api.rb +4004 -515
  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 +16 -20
  14. data/lib/aws-sdk-ec2/endpoints.rb +2 -8314
  15. data/lib/aws-sdk-ec2/image.rb +207 -98
  16. data/lib/aws-sdk-ec2/instance.rb +514 -348
  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 +150 -78
  23. data/lib/aws-sdk-ec2/network_interface_association.rb +3 -3
  24. data/lib/aws-sdk-ec2/placement_group.rb +123 -42
  25. data/lib/aws-sdk-ec2/plugins/endpoints.rb +23 -1202
  26. data/lib/aws-sdk-ec2/resource.rb +1118 -864
  27. data/lib/aws-sdk-ec2/route.rb +50 -34
  28. data/lib/aws-sdk-ec2/route_table.rb +47 -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 +534 -406
  33. data/lib/aws-sdk-ec2/tag.rb +7 -4
  34. data/lib/aws-sdk-ec2/types.rb +18252 -4766
  35. data/lib/aws-sdk-ec2/volume.rb +160 -116
  36. data/lib/aws-sdk-ec2/vpc.rb +387 -262
  37. data/lib/aws-sdk-ec2/vpc_address.rb +37 -25
  38. data/lib/aws-sdk-ec2/vpc_peering_connection.rb +6 -6
  39. data/lib/aws-sdk-ec2/waiters.rb +146 -38
  40. data/lib/aws-sdk-ec2.rb +40 -36
  41. data/sig/classic_address.rbs +108 -0
  42. data/sig/client.rbs +14833 -0
  43. data/sig/dhcp_options.rbs +84 -0
  44. data/sig/errors.rbs +16 -0
  45. data/sig/image.rbs +232 -0
  46. data/sig/instance.rbs +576 -0
  47. data/sig/internet_gateway.rbs +91 -0
  48. data/sig/key_pair.rbs +54 -0
  49. data/sig/key_pair_info.rbs +63 -0
  50. data/sig/nat_gateway.rbs +107 -0
  51. data/sig/network_acl.rbs +144 -0
  52. data/sig/network_interface.rbs +249 -0
  53. data/sig/network_interface_association.rbs +62 -0
  54. data/sig/placement_group.rbs +78 -0
  55. data/sig/resource.rbs +1049 -0
  56. data/sig/route.rbs +120 -0
  57. data/sig/route_table.rbs +118 -0
  58. data/sig/route_table_association.rbs +69 -0
  59. data/sig/security_group.rbs +311 -0
  60. data/sig/snapshot.rbs +204 -0
  61. data/sig/subnet.rbs +442 -0
  62. data/sig/tag.rbs +63 -0
  63. data/sig/types.rbs +17078 -0
  64. data/sig/volume.rbs +213 -0
  65. data/sig/vpc.rbs +404 -0
  66. data/sig/vpc_address.rbs +104 -0
  67. data/sig/vpc_peering_connection.rbs +84 -0
  68. data/sig/waiters.rbs +700 -0
  69. metadata +45 -19
@@ -35,137 +35,6 @@ module Aws::EC2
35
35
  end
36
36
  alias :instance_id :id
37
37
 
38
- # The AMI launch index, which can be used to find this instance in the
39
- # launch group.
40
- # @return [Integer]
41
- def ami_launch_index
42
- data[:ami_launch_index]
43
- end
44
-
45
- # The ID of the AMI used to launch the instance.
46
- # @return [String]
47
- def image_id
48
- data[:image_id]
49
- end
50
-
51
- # The instance type.
52
- # @return [String]
53
- def instance_type
54
- data[:instance_type]
55
- end
56
-
57
- # The kernel associated with this instance, if applicable.
58
- # @return [String]
59
- def kernel_id
60
- data[:kernel_id]
61
- end
62
-
63
- # The name of the key pair, if this instance was launched with an
64
- # associated key pair.
65
- # @return [String]
66
- def key_name
67
- data[:key_name]
68
- end
69
-
70
- # The time the instance was launched.
71
- # @return [Time]
72
- def launch_time
73
- data[:launch_time]
74
- end
75
-
76
- # The monitoring for the instance.
77
- # @return [Types::Monitoring]
78
- def monitoring
79
- data[:monitoring]
80
- end
81
-
82
- # The location where the instance launched, if applicable.
83
- # @return [Types::Placement]
84
- def placement
85
- data[:placement]
86
- end
87
-
88
- # The value is `Windows` for Windows instances; otherwise blank.
89
- # @return [String]
90
- def platform
91
- data[:platform]
92
- end
93
-
94
- # \[IPv4 only\] The private DNS hostname name assigned to the instance.
95
- # This DNS hostname can only be used inside the Amazon EC2 network. This
96
- # name is not available until the instance enters the `running` state.
97
- #
98
- # The Amazon-provided DNS server resolves Amazon-provided private DNS
99
- # hostnames if you've enabled DNS resolution and DNS hostnames in your
100
- # VPC. If you are not using the Amazon-provided DNS server in your VPC,
101
- # your custom domain name servers must resolve the hostname as
102
- # appropriate.
103
- # @return [String]
104
- def private_dns_name
105
- data[:private_dns_name]
106
- end
107
-
108
- # The private IPv4 address assigned to the instance.
109
- # @return [String]
110
- def private_ip_address
111
- data[:private_ip_address]
112
- end
113
-
114
- # The product codes attached to this instance, if applicable.
115
- # @return [Array<Types::ProductCode>]
116
- def product_codes
117
- data[:product_codes]
118
- end
119
-
120
- # \[IPv4 only\] The public DNS name assigned to the instance. This name
121
- # is not available until the instance enters the `running` state. This
122
- # name is only available if you've enabled DNS hostnames for your VPC.
123
- # @return [String]
124
- def public_dns_name
125
- data[:public_dns_name]
126
- end
127
-
128
- # The public IPv4 address, or the Carrier IP address assigned to the
129
- # instance, if applicable.
130
- #
131
- # A Carrier IP address only applies to an instance launched in a subnet
132
- # associated with a Wavelength Zone.
133
- # @return [String]
134
- def public_ip_address
135
- data[:public_ip_address]
136
- end
137
-
138
- # The RAM disk associated with this instance, if applicable.
139
- # @return [String]
140
- def ramdisk_id
141
- data[:ramdisk_id]
142
- end
143
-
144
- # The current state of the instance.
145
- # @return [Types::InstanceState]
146
- def state
147
- data[:state]
148
- end
149
-
150
- # The reason for the most recent state transition. This might be an
151
- # empty string.
152
- # @return [String]
153
- def state_transition_reason
154
- data[:state_transition_reason]
155
- end
156
-
157
- # The ID of the subnet in which the instance is running.
158
- # @return [String]
159
- def subnet_id
160
- data[:subnet_id]
161
- end
162
-
163
- # The ID of the VPC in which the instance is running.
164
- # @return [String]
165
- def vpc_id
166
- data[:vpc_id]
167
- end
168
-
169
38
  # The architecture of the image.
170
39
  # @return [String]
171
40
  def architecture
@@ -220,13 +89,21 @@ module Aws::EC2
220
89
  data[:instance_lifecycle]
221
90
  end
222
91
 
223
- # The Elastic GPU associated with the instance.
92
+ # Deprecated.
93
+ #
94
+ # <note markdown="1"> Amazon Elastic Graphics reached end of life on January 8, 2024.
95
+ #
96
+ # </note>
224
97
  # @return [Array<Types::ElasticGpuAssociation>]
225
98
  def elastic_gpu_associations
226
99
  data[:elastic_gpu_associations]
227
100
  end
228
101
 
229
- # The elastic inference accelerator associated with the instance.
102
+ # Deprecated
103
+ #
104
+ # <note markdown="1"> Amazon Elastic Inference is no longer available.
105
+ #
106
+ # </note>
230
107
  # @return [Array<Types::ElasticInferenceAcceleratorAssociation>]
231
108
  def elastic_inference_accelerator_associations
232
109
  data[:elastic_inference_accelerator_associations]
@@ -300,6 +177,17 @@ module Aws::EC2
300
177
  data[:cpu_options]
301
178
  end
302
179
 
180
+ # The ID of the Capacity Block.
181
+ #
182
+ # <note markdown="1"> For P5 instances, a Capacity Block ID refers to a group of instances.
183
+ # For Trn2u instances, a capacity block ID refers to an EC2 UltraServer.
184
+ #
185
+ # </note>
186
+ # @return [String]
187
+ def capacity_block_id
188
+ data[:capacity_block_id]
189
+ end
190
+
303
191
  # The ID of the Capacity Reservation.
304
192
  # @return [String]
305
193
  def capacity_reservation_id
@@ -429,6 +317,158 @@ module Aws::EC2
429
317
  data[:current_instance_boot_mode]
430
318
  end
431
319
 
320
+ # Contains settings for the network performance options for your
321
+ # instance.
322
+ # @return [Types::InstanceNetworkPerformanceOptions]
323
+ def network_performance_options
324
+ data[:network_performance_options]
325
+ end
326
+
327
+ # The service provider that manages the instance.
328
+ # @return [Types::OperatorResponse]
329
+ def operator
330
+ data[:operator]
331
+ end
332
+
333
+ # The ID of the AMI used to launch the instance.
334
+ # @return [String]
335
+ def image_id
336
+ data[:image_id]
337
+ end
338
+
339
+ # The current state of the instance.
340
+ # @return [Types::InstanceState]
341
+ def state
342
+ data[:state]
343
+ end
344
+
345
+ # \[IPv4 only\] The private DNS hostname name assigned to the instance.
346
+ # This DNS hostname can only be used inside the Amazon EC2 network. This
347
+ # name is not available until the instance enters the `running` state.
348
+ #
349
+ # The Amazon-provided DNS server resolves Amazon-provided private DNS
350
+ # hostnames if you've enabled DNS resolution and DNS hostnames in your
351
+ # VPC. If you are not using the Amazon-provided DNS server in your VPC,
352
+ # your custom domain name servers must resolve the hostname as
353
+ # appropriate.
354
+ # @return [String]
355
+ def private_dns_name
356
+ data[:private_dns_name]
357
+ end
358
+
359
+ # The public DNS name assigned to the instance. This name is not
360
+ # available until the instance enters the `running` state. This name is
361
+ # only available if you've enabled DNS hostnames for your VPC. The
362
+ # format of this name depends on the [public hostname type][1].
363
+ #
364
+ #
365
+ #
366
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hostname-types.html#public-hostnames
367
+ # @return [String]
368
+ def public_dns_name
369
+ data[:public_dns_name]
370
+ end
371
+
372
+ # The reason for the most recent state transition. This might be an
373
+ # empty string.
374
+ # @return [String]
375
+ def state_transition_reason
376
+ data[:state_transition_reason]
377
+ end
378
+
379
+ # The name of the key pair, if this instance was launched with an
380
+ # associated key pair.
381
+ # @return [String]
382
+ def key_name
383
+ data[:key_name]
384
+ end
385
+
386
+ # The AMI launch index, which can be used to find this instance in the
387
+ # launch group.
388
+ # @return [Integer]
389
+ def ami_launch_index
390
+ data[:ami_launch_index]
391
+ end
392
+
393
+ # The product codes attached to this instance, if applicable.
394
+ # @return [Array<Types::ProductCode>]
395
+ def product_codes
396
+ data[:product_codes]
397
+ end
398
+
399
+ # The instance type.
400
+ # @return [String]
401
+ def instance_type
402
+ data[:instance_type]
403
+ end
404
+
405
+ # The time that the instance was last launched. To determine the time
406
+ # that instance was first launched, see the attachment time for the
407
+ # primary network interface.
408
+ # @return [Time]
409
+ def launch_time
410
+ data[:launch_time]
411
+ end
412
+
413
+ # The location where the instance launched, if applicable.
414
+ # @return [Types::Placement]
415
+ def placement
416
+ data[:placement]
417
+ end
418
+
419
+ # The kernel associated with this instance, if applicable.
420
+ # @return [String]
421
+ def kernel_id
422
+ data[:kernel_id]
423
+ end
424
+
425
+ # The RAM disk associated with this instance, if applicable.
426
+ # @return [String]
427
+ def ramdisk_id
428
+ data[:ramdisk_id]
429
+ end
430
+
431
+ # The platform. This value is `windows` for Windows instances;
432
+ # otherwise, it is empty.
433
+ # @return [String]
434
+ def platform
435
+ data[:platform]
436
+ end
437
+
438
+ # The monitoring for the instance.
439
+ # @return [Types::Monitoring]
440
+ def monitoring
441
+ data[:monitoring]
442
+ end
443
+
444
+ # The ID of the subnet in which the instance is running.
445
+ # @return [String]
446
+ def subnet_id
447
+ data[:subnet_id]
448
+ end
449
+
450
+ # The ID of the VPC in which the instance is running.
451
+ # @return [String]
452
+ def vpc_id
453
+ data[:vpc_id]
454
+ end
455
+
456
+ # The private IPv4 address assigned to the instance.
457
+ # @return [String]
458
+ def private_ip_address
459
+ data[:private_ip_address]
460
+ end
461
+
462
+ # The public IPv4 address, or the Carrier IP address assigned to the
463
+ # instance, if applicable.
464
+ #
465
+ # A Carrier IP address only applies to an instance launched in a subnet
466
+ # associated with a Wavelength Zone.
467
+ # @return [String]
468
+ def public_ip_address
469
+ data[:public_ip_address]
470
+ end
471
+
432
472
  # @!endgroup
433
473
 
434
474
  # @return [Client]
@@ -443,7 +483,7 @@ module Aws::EC2
443
483
  #
444
484
  # @return [self]
445
485
  def load
446
- resp = Aws::Plugins::UserAgent.feature('resource') do
486
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
447
487
  @client.describe_instances(instance_ids: [@id])
448
488
  end
449
489
  @data = resp.reservations[0].instances[0]
@@ -490,7 +530,7 @@ module Aws::EC2
490
530
  options, params = separate_params_and_options(options)
491
531
  waiter = Waiters::InstanceExists.new(options)
492
532
  yield_waiter_and_warn(waiter, &block) if block_given?
493
- resp = Aws::Plugins::UserAgent.feature('resource') do
533
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
494
534
  waiter.wait(params.merge(instance_ids: [@id]))
495
535
  end
496
536
  Instance.new({
@@ -510,7 +550,7 @@ module Aws::EC2
510
550
  options, params = separate_params_and_options(options)
511
551
  waiter = Waiters::InstanceRunning.new(options)
512
552
  yield_waiter_and_warn(waiter, &block) if block_given?
513
- resp = Aws::Plugins::UserAgent.feature('resource') do
553
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
514
554
  waiter.wait(params.merge(instance_ids: [@id]))
515
555
  end
516
556
  Instance.new({
@@ -530,7 +570,7 @@ module Aws::EC2
530
570
  options, params = separate_params_and_options(options)
531
571
  waiter = Waiters::InstanceStopped.new(options)
532
572
  yield_waiter_and_warn(waiter, &block) if block_given?
533
- resp = Aws::Plugins::UserAgent.feature('resource') do
573
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
534
574
  waiter.wait(params.merge(instance_ids: [@id]))
535
575
  end
536
576
  Instance.new({
@@ -550,7 +590,7 @@ module Aws::EC2
550
590
  options, params = separate_params_and_options(options)
551
591
  waiter = Waiters::InstanceTerminated.new(options)
552
592
  yield_waiter_and_warn(waiter, &block) if block_given?
553
- resp = Aws::Plugins::UserAgent.feature('resource') do
593
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
554
594
  waiter.wait(params.merge(instance_ids: [@id]))
555
595
  end
556
596
  Instance.new({
@@ -654,7 +694,7 @@ module Aws::EC2
654
694
  :retry
655
695
  end
656
696
  end
657
- Aws::Plugins::UserAgent.feature('resource') do
697
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
658
698
  Aws::Waiters::Waiter.new(options).wait({})
659
699
  end
660
700
  end
@@ -665,8 +705,8 @@ module Aws::EC2
665
705
  #
666
706
  # instance.attach_classic_link_vpc({
667
707
  # dry_run: false,
668
- # groups: ["SecurityGroupId"], # required
669
708
  # vpc_id: "VpcId", # required
709
+ # groups: ["SecurityGroupId"], # required
670
710
  # })
671
711
  # @param [Hash] options ({})
672
712
  # @option options [Boolean] :dry_run
@@ -674,15 +714,15 @@ module Aws::EC2
674
714
  # without actually making the request, and provides an error response.
675
715
  # If you have the required permissions, the error response is
676
716
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
717
+ # @option options [required, String] :vpc_id
718
+ # The ID of the ClassicLink-enabled VPC.
677
719
  # @option options [required, Array<String>] :groups
678
720
  # The IDs of the security groups. You cannot specify security groups
679
721
  # from a different VPC.
680
- # @option options [required, String] :vpc_id
681
- # The ID of the ClassicLink-enabled VPC.
682
722
  # @return [Types::AttachClassicLinkVpcResult]
683
723
  def attach_classic_link_vpc(options = {})
684
724
  options = options.merge(instance_id: @id)
685
- resp = Aws::Plugins::UserAgent.feature('resource') do
725
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
686
726
  @client.attach_classic_link_vpc(options)
687
727
  end
688
728
  resp.data
@@ -709,7 +749,7 @@ module Aws::EC2
709
749
  # @return [Types::VolumeAttachment]
710
750
  def attach_volume(options = {})
711
751
  options = options.merge(instance_id: @id)
712
- resp = Aws::Plugins::UserAgent.feature('resource') do
752
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
713
753
  @client.attach_volume(options)
714
754
  end
715
755
  resp.data
@@ -718,23 +758,23 @@ module Aws::EC2
718
758
  # @example Request syntax with placeholder values
719
759
  #
720
760
  # instance.console_output({
721
- # dry_run: false,
722
761
  # latest: false,
762
+ # dry_run: false,
723
763
  # })
724
764
  # @param [Hash] options ({})
725
- # @option options [Boolean] :dry_run
726
- # Checks whether you have the required permissions for the action,
727
- # without actually making the request, and provides an error response.
728
- # If you have the required permissions, the error response is
729
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
730
765
  # @option options [Boolean] :latest
731
766
  # When enabled, retrieves the latest console output for the instance.
732
767
  #
733
768
  # Default: disabled (`false`)
769
+ # @option options [Boolean] :dry_run
770
+ # Checks whether you have the required permissions for the operation,
771
+ # without actually making the request, and provides an error response.
772
+ # If you have the required permissions, the error response is
773
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
734
774
  # @return [Types::GetConsoleOutputResult]
735
775
  def console_output(options = {})
736
776
  options = options.merge(instance_id: @id)
737
- resp = Aws::Plugins::UserAgent.feature('resource') do
777
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
738
778
  @client.get_console_output(options)
739
779
  end
740
780
  resp.data
@@ -743,10 +783,24 @@ module Aws::EC2
743
783
  # @example Request syntax with placeholder values
744
784
  #
745
785
  # image = instance.create_image({
786
+ # tag_specifications: [
787
+ # {
788
+ # resource_type: "capacity-reservation", # accepts capacity-reservation, client-vpn-endpoint, customer-gateway, carrier-gateway, coip-pool, declarative-policies-report, 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, outpost-lag, placement-group, prefix-list, replace-root-volume-task, reserved-instances, route-table, security-group, security-group-rule, service-link-virtual-interface, 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, route-server, route-server-endpoint, route-server-peer, ipam-resource-discovery, ipam-resource-discovery-association, instance-connect-endpoint, verified-access-endpoint-target, ipam-external-resource-verification-token, capacity-block, mac-modification-task
789
+ # tags: [
790
+ # {
791
+ # key: "String",
792
+ # value: "String",
793
+ # },
794
+ # ],
795
+ # },
796
+ # ],
797
+ # snapshot_location: "regional", # accepts regional, local
798
+ # dry_run: false,
799
+ # name: "String", # required
800
+ # description: "String",
801
+ # no_reboot: false,
746
802
  # block_device_mappings: [
747
803
  # {
748
- # device_name: "String",
749
- # virtual_name: "String",
750
804
  # ebs: {
751
805
  # delete_on_termination: false,
752
806
  # iops: 1,
@@ -756,34 +810,52 @@ module Aws::EC2
756
810
  # kms_key_id: "String",
757
811
  # throughput: 1,
758
812
  # outpost_arn: "String",
813
+ # availability_zone: "String",
759
814
  # encrypted: false,
815
+ # volume_initialization_rate: 1,
816
+ # availability_zone_id: "String",
760
817
  # },
761
818
  # no_device: "String",
762
- # },
763
- # ],
764
- # description: "String",
765
- # dry_run: false,
766
- # name: "String", # required
767
- # no_reboot: false,
768
- # tag_specifications: [
769
- # {
770
- # 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
771
- # tags: [
772
- # {
773
- # key: "String",
774
- # value: "String",
775
- # },
776
- # ],
819
+ # device_name: "String",
820
+ # virtual_name: "String",
777
821
  # },
778
822
  # ],
779
823
  # })
780
824
  # @param [Hash] options ({})
781
- # @option options [Array<Types::BlockDeviceMapping>] :block_device_mappings
782
- # The block device mappings. This parameter cannot be used to modify the
783
- # encryption status of existing volumes or snapshots. To create an AMI
784
- # with encrypted snapshots, use the CopyImage action.
785
- # @option options [String] :description
786
- # A description for the new image.
825
+ # @option options [Array<Types::TagSpecification>] :tag_specifications
826
+ # The tags to apply to the AMI and snapshots on creation. You can tag
827
+ # the AMI, the snapshots, or both.
828
+ #
829
+ # * To tag the AMI, the value for `ResourceType` must be `image`.
830
+ #
831
+ # * To tag the snapshots that are created of the root volume and of
832
+ # other Amazon EBS volumes that are attached to the instance, the
833
+ # value for `ResourceType` must be `snapshot`. The same tag is applied
834
+ # to all of the snapshots that are created.
835
+ #
836
+ # If you specify other values for `ResourceType`, the request fails.
837
+ #
838
+ # To tag an AMI or snapshot after it has been created, see
839
+ # [CreateTags][1].
840
+ #
841
+ #
842
+ #
843
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html
844
+ # @option options [String] :snapshot_location
845
+ # <note markdown="1"> Only supported for instances in Local Zones. If the source instance is
846
+ # not in a Local Zone, omit this parameter.
847
+ #
848
+ # </note>
849
+ #
850
+ # The Amazon S3 location where the snapshots will be stored.
851
+ #
852
+ # * To create local snapshots in the same Local Zone as the source
853
+ # instance, specify `local`.
854
+ #
855
+ # * To create regional snapshots in the parent Region of the Local Zone,
856
+ # specify `regional` or omit this parameter.
857
+ #
858
+ # Default: `regional`
787
859
  # @option options [Boolean] :dry_run
788
860
  # Checks whether you have the required permissions for the action,
789
861
  # without actually making the request, and provides an error response.
@@ -795,6 +867,8 @@ module Aws::EC2
795
867
  # Constraints: 3-128 alphanumeric characters, parentheses (()), square
796
868
  # brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-),
797
869
  # single quotes ('), at-signs (@), or underscores(\_)
870
+ # @option options [String] :description
871
+ # A description for the new image.
798
872
  # @option options [Boolean] :no_reboot
799
873
  # Indicates whether or not the instance should be automatically rebooted
800
874
  # before creating the image. Specify one of the following values:
@@ -810,29 +884,27 @@ module Aws::EC2
810
884
  # volumes before the snapshots are created.
811
885
  #
812
886
  # Default: `false`
813
- # @option options [Array<Types::TagSpecification>] :tag_specifications
814
- # The tags to apply to the AMI and snapshots on creation. You can tag
815
- # the AMI, the snapshots, or both.
816
- #
817
- # * To tag the AMI, the value for `ResourceType` must be `image`.
818
- #
819
- # * To tag the snapshots that are created of the root volume and of
820
- # other Amazon EBS volumes that are attached to the instance, the
821
- # value for `ResourceType` must be `snapshot`. The same tag is applied
822
- # to all of the snapshots that are created.
823
- #
824
- # If you specify other values for `ResourceType`, the request fails.
887
+ # @option options [Array<Types::BlockDeviceMapping>] :block_device_mappings
888
+ # The block device mappings.
825
889
  #
826
- # To tag an AMI or snapshot after it has been created, see
827
- # [CreateTags][1].
890
+ # When using the CreateImage action:
828
891
  #
892
+ # * You can't change the volume size using the VolumeSize parameter. If
893
+ # you want a different volume size, you must first change the volume
894
+ # size of the source instance.
829
895
  #
896
+ # * You can't modify the encryption status of existing volumes or
897
+ # snapshots. To create an AMI with volumes or snapshots that have a
898
+ # different encryption status (for example, where the source volume
899
+ # and snapshots are unencrypted, and you want to create an AMI with
900
+ # encrypted volumes or snapshots), use the CopyImage action.
830
901
  #
831
- # [1]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html
902
+ # * The only option that can be changed for existing mappings or
903
+ # snapshots is `DeleteOnTermination`.
832
904
  # @return [Image]
833
905
  def create_image(options = {})
834
906
  options = options.merge(instance_id: @id)
835
- resp = Aws::Plugins::UserAgent.feature('resource') do
907
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
836
908
  @client.create_image(options)
837
909
  end
838
910
  Image.new(
@@ -866,7 +938,7 @@ module Aws::EC2
866
938
  def create_tags(options = {})
867
939
  batch = []
868
940
  options = Aws::Util.deep_merge(options, resources: [@id])
869
- resp = Aws::Plugins::UserAgent.feature('resource') do
941
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
870
942
  @client.create_tags(options)
871
943
  end
872
944
  options[:tags].each do |t|
@@ -913,7 +985,7 @@ module Aws::EC2
913
985
  def delete_tags(options = {})
914
986
  batch = []
915
987
  options = Aws::Util.deep_merge(options, resources: [@id])
916
- resp = Aws::Plugins::UserAgent.feature('resource') do
988
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
917
989
  @client.delete_tags(options)
918
990
  end
919
991
  options[:tags].each do |t|
@@ -930,23 +1002,23 @@ module Aws::EC2
930
1002
  # @example Request syntax with placeholder values
931
1003
  #
932
1004
  # instance.describe_attribute({
933
- # attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions, disableApiStop
934
1005
  # dry_run: false,
1006
+ # attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions, disableApiStop
935
1007
  # })
936
1008
  # @param [Hash] options ({})
937
- # @option options [required, String] :attribute
938
- # The instance attribute.
939
- #
940
- # Note: The `enaSupport` attribute is not supported at this time.
941
1009
  # @option options [Boolean] :dry_run
942
- # Checks whether you have the required permissions for the action,
1010
+ # Checks whether you have the required permissions for the operation,
943
1011
  # without actually making the request, and provides an error response.
944
1012
  # If you have the required permissions, the error response is
945
1013
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1014
+ # @option options [required, String] :attribute
1015
+ # The instance attribute.
1016
+ #
1017
+ # Note that the `enaSupport` attribute is not supported.
946
1018
  # @return [Types::InstanceAttribute]
947
1019
  def describe_attribute(options = {})
948
1020
  options = options.merge(instance_id: @id)
949
- resp = Aws::Plugins::UserAgent.feature('resource') do
1021
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
950
1022
  @client.describe_instance_attribute(options)
951
1023
  end
952
1024
  resp.data
@@ -969,7 +1041,7 @@ module Aws::EC2
969
1041
  # @return [Types::DetachClassicLinkVpcResult]
970
1042
  def detach_classic_link_vpc(options = {})
971
1043
  options = options.merge(instance_id: @id)
972
- resp = Aws::Plugins::UserAgent.feature('resource') do
1044
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
973
1045
  @client.detach_classic_link_vpc(options)
974
1046
  end
975
1047
  resp.data
@@ -1005,7 +1077,7 @@ module Aws::EC2
1005
1077
  # @return [Types::VolumeAttachment]
1006
1078
  def detach_volume(options = {})
1007
1079
  options = options.merge(instance_id: @id)
1008
- resp = Aws::Plugins::UserAgent.feature('resource') do
1080
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1009
1081
  @client.detach_volume(options)
1010
1082
  end
1011
1083
  resp.data
@@ -1017,39 +1089,39 @@ module Aws::EC2
1017
1089
  # source_dest_check: {
1018
1090
  # value: false,
1019
1091
  # },
1092
+ # disable_api_stop: {
1093
+ # value: false,
1094
+ # },
1095
+ # dry_run: false,
1020
1096
  # attribute: "instanceType", # accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions, disableApiStop
1097
+ # value: "String",
1021
1098
  # block_device_mappings: [
1022
1099
  # {
1023
1100
  # device_name: "String",
1024
1101
  # ebs: {
1025
- # delete_on_termination: false,
1026
1102
  # volume_id: "VolumeId",
1103
+ # delete_on_termination: false,
1027
1104
  # },
1028
- # no_device: "String",
1029
1105
  # virtual_name: "String",
1106
+ # no_device: "String",
1030
1107
  # },
1031
1108
  # ],
1032
1109
  # disable_api_termination: {
1033
1110
  # value: false,
1034
1111
  # },
1035
- # dry_run: false,
1036
- # ebs_optimized: {
1037
- # value: false,
1038
- # },
1039
- # ena_support: {
1040
- # value: false,
1041
- # },
1042
- # groups: ["SecurityGroupId"],
1043
- # instance_initiated_shutdown_behavior: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
1044
1112
  # instance_type: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
1045
1113
  # kernel: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
1046
1114
  # ramdisk: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
1047
- # sriov_net_support: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
1048
1115
  # user_data: {
1049
1116
  # value: "data",
1050
1117
  # },
1051
- # value: "String",
1052
- # disable_api_stop: {
1118
+ # instance_initiated_shutdown_behavior: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
1119
+ # groups: ["SecurityGroupId"],
1120
+ # ebs_optimized: {
1121
+ # value: false,
1122
+ # },
1123
+ # sriov_net_support: "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
1124
+ # ena_support: {
1053
1125
  # value: false,
1054
1126
  # },
1055
1127
  # })
@@ -1061,20 +1133,48 @@ module Aws::EC2
1061
1133
  # enabled; otherwise, they are disabled. The default value is `true`.
1062
1134
  # You must disable source/destination checks if the instance runs
1063
1135
  # services such as network address translation, routing, or firewalls.
1136
+ # @option options [Types::AttributeBooleanValue] :disable_api_stop
1137
+ # Indicates whether an instance is enabled for stop protection. For more
1138
+ # information, see [Enable stop protection for your instance][1].
1139
+ #
1140
+ #
1141
+ #
1142
+ #
1143
+ #
1144
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html
1145
+ # @option options [Boolean] :dry_run
1146
+ # Checks whether you have the required permissions for the operation,
1147
+ # without actually making the request, and provides an error response.
1148
+ # If you have the required permissions, the error response is
1149
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1064
1150
  # @option options [String] :attribute
1065
1151
  # The name of the attribute to modify.
1066
1152
  #
1153
+ # <note markdown="1"> When changing the instance type: If the original instance type is
1154
+ # configured for configurable bandwidth, and the desired instance type
1155
+ # doesn't support configurable bandwidth, first set the existing
1156
+ # bandwidth configuration to `default` using the
1157
+ # ModifyInstanceNetworkPerformanceOptions operation.
1158
+ #
1159
+ # </note>
1160
+ #
1067
1161
  # You can modify the following attributes only: `disableApiTermination`
1068
1162
  # \| `instanceType` \| `kernel` \| `ramdisk` \|
1069
1163
  # `instanceInitiatedShutdownBehavior` \| `blockDeviceMapping` \|
1070
1164
  # `userData` \| `sourceDestCheck` \| `groupSet` \| `ebsOptimized` \|
1071
1165
  # `sriovNetSupport` \| `enaSupport` \| `nvmeSupport` \| `disableApiStop`
1072
1166
  # \| `enclaveOptions`
1167
+ # @option options [String] :value
1168
+ # A new value for the attribute. Use only with the `kernel`, `ramdisk`,
1169
+ # `userData`, `disableApiTermination`, or
1170
+ # `instanceInitiatedShutdownBehavior` attribute.
1073
1171
  # @option options [Array<Types::InstanceBlockDeviceMappingSpecification>] :block_device_mappings
1074
1172
  # Modifies the `DeleteOnTermination` attribute for volumes that are
1075
1173
  # currently attached. The volume must be owned by the caller. If no
1076
1174
  # value is specified for `DeleteOnTermination`, the default is `true`
1077
- # and the volume is deleted when the instance is terminated.
1175
+ # and the volume is deleted when the instance is terminated. You can't
1176
+ # modify the `DeleteOnTermination` attribute for volumes that are
1177
+ # attached to Amazon Web Services-managed resources.
1078
1178
  #
1079
1179
  # To add instance store volumes to an Amazon EBS-backed instance, you
1080
1180
  # must add them when you launch the instance. For more information, see
@@ -1085,33 +1185,10 @@ module Aws::EC2
1085
1185
  #
1086
1186
  # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM
1087
1187
  # @option options [Types::AttributeBooleanValue] :disable_api_termination
1088
- # If the value is `true`, you can't terminate the instance using the
1089
- # Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use
1090
- # this parameter for Spot Instances.
1091
- # @option options [Boolean] :dry_run
1092
- # Checks whether you have the required permissions for the action,
1093
- # without actually making the request, and provides an error response.
1094
- # If you have the required permissions, the error response is
1095
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1096
- # @option options [Types::AttributeBooleanValue] :ebs_optimized
1097
- # Specifies whether the instance is optimized for Amazon EBS I/O. This
1098
- # optimization provides dedicated throughput to Amazon EBS and an
1099
- # optimized configuration stack to provide optimal EBS I/O performance.
1100
- # This optimization isn't available with all instance types. Additional
1101
- # usage charges apply when using an EBS Optimized instance.
1102
- # @option options [Types::AttributeBooleanValue] :ena_support
1103
- # Set to `true` to enable enhanced networking with ENA for the instance.
1104
- #
1105
- # This option is supported only for HVM instances. Specifying this
1106
- # option with a PV instance can make it unreachable.
1107
- # @option options [Array<String>] :groups
1108
- # Replaces the security groups of the instance with the specified
1109
- # security groups. You must specify the ID of at least one security
1110
- # group, even if it's just the default security group for the VPC.
1111
- # @option options [Types::AttributeValue] :instance_initiated_shutdown_behavior
1112
- # Specifies whether an instance stops or terminates when you initiate
1113
- # shutdown from the instance (using the operating system command for
1114
- # system shutdown).
1188
+ # Enable or disable termination protection for the instance. If the
1189
+ # value is `true`, you can't terminate the instance using the Amazon
1190
+ # EC2 console, command line interface, or API. You can't enable
1191
+ # termination protection for Spot Instances.
1115
1192
  # @option options [Types::AttributeValue] :instance_type
1116
1193
  # Changes the instance type to the specified value. For more
1117
1194
  # information, see [Instance types][1] in the *Amazon EC2 User Guide*.
@@ -1137,6 +1214,29 @@ module Aws::EC2
1137
1214
  #
1138
1215
  #
1139
1216
  # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html
1217
+ # @option options [Types::BlobAttributeValue] :user_data
1218
+ # Changes the instance's user data to the specified value. User data
1219
+ # must be base64-encoded. Depending on the tool or SDK that you're
1220
+ # using, the base64-encoding might be performed for you. For more
1221
+ # information, see [Work with instance user data][1].
1222
+ #
1223
+ #
1224
+ #
1225
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html
1226
+ # @option options [Types::AttributeValue] :instance_initiated_shutdown_behavior
1227
+ # Specifies whether an instance stops or terminates when you initiate
1228
+ # shutdown from the instance (using the operating system command for
1229
+ # system shutdown).
1230
+ # @option options [Array<String>] :groups
1231
+ # Replaces the security groups of the instance with the specified
1232
+ # security groups. You must specify the ID of at least one security
1233
+ # group, even if it's just the default security group for the VPC.
1234
+ # @option options [Types::AttributeBooleanValue] :ebs_optimized
1235
+ # Specifies whether the instance is optimized for Amazon EBS I/O. This
1236
+ # optimization provides dedicated throughput to Amazon EBS and an
1237
+ # optimized configuration stack to provide optimal EBS I/O performance.
1238
+ # This optimization isn't available with all instance types. Additional
1239
+ # usage charges apply when using an EBS Optimized instance.
1140
1240
  # @option options [Types::AttributeValue] :sriov_net_support
1141
1241
  # Set to `simple` to enable enhanced networking with the Intel 82599
1142
1242
  # Virtual Function interface for the instance.
@@ -1146,28 +1246,15 @@ module Aws::EC2
1146
1246
  #
1147
1247
  # This option is supported only for HVM instances. Specifying this
1148
1248
  # option with a PV instance can make it unreachable.
1149
- # @option options [Types::BlobAttributeValue] :user_data
1150
- # Changes the instance's user data to the specified value. If you are
1151
- # using an Amazon Web Services SDK or command line tool, base64-encoding
1152
- # is performed for you, and you can load the text from a file.
1153
- # Otherwise, you must provide base64-encoded text.
1154
- # @option options [String] :value
1155
- # A new value for the attribute. Use only with the `kernel`, `ramdisk`,
1156
- # `userData`, `disableApiTermination`, or
1157
- # `instanceInitiatedShutdownBehavior` attribute.
1158
- # @option options [Types::AttributeBooleanValue] :disable_api_stop
1159
- # Indicates whether an instance is enabled for stop protection. For more
1160
- # information, see [Stop Protection][1].
1161
- #
1162
- #
1163
- #
1164
- #
1249
+ # @option options [Types::AttributeBooleanValue] :ena_support
1250
+ # Set to `true` to enable enhanced networking with ENA for the instance.
1165
1251
  #
1166
- # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection
1252
+ # This option is supported only for HVM instances. Specifying this
1253
+ # option with a PV instance can make it unreachable.
1167
1254
  # @return [EmptyStructure]
1168
1255
  def modify_attribute(options = {})
1169
1256
  options = options.merge(instance_id: @id)
1170
- resp = Aws::Plugins::UserAgent.feature('resource') do
1257
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1171
1258
  @client.modify_instance_attribute(options)
1172
1259
  end
1173
1260
  resp.data
@@ -1180,14 +1267,14 @@ module Aws::EC2
1180
1267
  # })
1181
1268
  # @param [Hash] options ({})
1182
1269
  # @option options [Boolean] :dry_run
1183
- # Checks whether you have the required permissions for the action,
1270
+ # Checks whether you have the required permissions for the operation,
1184
1271
  # without actually making the request, and provides an error response.
1185
1272
  # If you have the required permissions, the error response is
1186
1273
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1187
1274
  # @return [Types::MonitorInstancesResult]
1188
1275
  def monitor(options = {})
1189
1276
  options = Aws::Util.deep_merge(options, instance_ids: [@id])
1190
- resp = Aws::Plugins::UserAgent.feature('resource') do
1277
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1191
1278
  @client.monitor_instances(options)
1192
1279
  end
1193
1280
  resp.data
@@ -1200,14 +1287,14 @@ module Aws::EC2
1200
1287
  # })
1201
1288
  # @param [Hash] options ({})
1202
1289
  # @option options [Boolean] :dry_run
1203
- # Checks whether you have the required permissions for the action,
1290
+ # Checks whether you have the required permissions for the operation,
1204
1291
  # without actually making the request, and provides an error response.
1205
1292
  # If you have the required permissions, the error response is
1206
1293
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1207
1294
  # @return [Types::GetPasswordDataResult]
1208
1295
  def password_data(options = {})
1209
1296
  options = options.merge(instance_id: @id)
1210
- resp = Aws::Plugins::UserAgent.feature('resource') do
1297
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1211
1298
  @client.get_password_data(options)
1212
1299
  end
1213
1300
  resp.data
@@ -1220,14 +1307,14 @@ module Aws::EC2
1220
1307
  # })
1221
1308
  # @param [Hash] options ({})
1222
1309
  # @option options [Boolean] :dry_run
1223
- # Checks whether you have the required permissions for the action,
1310
+ # Checks whether you have the required permissions for the operation,
1224
1311
  # without actually making the request, and provides an error response.
1225
1312
  # If you have the required permissions, the error response is
1226
1313
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1227
1314
  # @return [EmptyStructure]
1228
1315
  def reboot(options = {})
1229
1316
  options = Aws::Util.deep_merge(options, instance_ids: [@id])
1230
- resp = Aws::Plugins::UserAgent.feature('resource') do
1317
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1231
1318
  @client.reboot_instances(options)
1232
1319
  end
1233
1320
  resp.data
@@ -1236,21 +1323,23 @@ module Aws::EC2
1236
1323
  # @example Request syntax with placeholder values
1237
1324
  #
1238
1325
  # instance.report_status({
1239
- # description: "String",
1240
1326
  # dry_run: false,
1327
+ # status: "ok", # required, accepts ok, impaired
1328
+ # start_time: Time.now,
1241
1329
  # end_time: Time.now,
1242
1330
  # reason_codes: ["instance-stuck-in-state"], # required, accepts instance-stuck-in-state, unresponsive, not-accepting-credentials, password-not-available, performance-network, performance-instance-store, performance-ebs-volume, performance-other, other
1243
- # start_time: Time.now,
1244
- # status: "ok", # required, accepts ok, impaired
1331
+ # description: "ReportInstanceStatusRequestDescription",
1245
1332
  # })
1246
1333
  # @param [Hash] options ({})
1247
- # @option options [String] :description
1248
- # Descriptive text about the health state of your instance.
1249
1334
  # @option options [Boolean] :dry_run
1250
- # Checks whether you have the required permissions for the action,
1335
+ # Checks whether you have the required permissions for the operation,
1251
1336
  # without actually making the request, and provides an error response.
1252
1337
  # If you have the required permissions, the error response is
1253
1338
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1339
+ # @option options [required, String] :status
1340
+ # The status of all instances listed.
1341
+ # @option options [Time,DateTime,Date,Integer,String] :start_time
1342
+ # The time at which the reported instance health state began.
1254
1343
  # @option options [Time,DateTime,Date,Integer,String] :end_time
1255
1344
  # The time at which the reported instance health state ended.
1256
1345
  # @option options [required, Array<String>] :reason_codes
@@ -1280,14 +1369,12 @@ module Aws::EC2
1280
1369
  # problems.
1281
1370
  #
1282
1371
  # * `other`: \[explain using the description parameter\]
1283
- # @option options [Time,DateTime,Date,Integer,String] :start_time
1284
- # The time at which the reported instance health state began.
1285
- # @option options [required, String] :status
1286
- # The status of all instances listed.
1372
+ # @option options [String] :description
1373
+ # Descriptive text about the health state of your instance.
1287
1374
  # @return [EmptyStructure]
1288
1375
  def report_status(options = {})
1289
1376
  options = Aws::Util.deep_merge(options, instances: [@id])
1290
- resp = Aws::Plugins::UserAgent.feature('resource') do
1377
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1291
1378
  @client.report_instance_status(options)
1292
1379
  end
1293
1380
  resp.data
@@ -1296,24 +1383,24 @@ module Aws::EC2
1296
1383
  # @example Request syntax with placeholder values
1297
1384
  #
1298
1385
  # instance.reset_attribute({
1299
- # attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions, disableApiStop
1300
1386
  # dry_run: false,
1387
+ # attribute: "instanceType", # required, accepts instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport, enaSupport, enclaveOptions, disableApiStop
1301
1388
  # })
1302
1389
  # @param [Hash] options ({})
1390
+ # @option options [Boolean] :dry_run
1391
+ # Checks whether you have the required permissions for the operation,
1392
+ # without actually making the request, and provides an error response.
1393
+ # If you have the required permissions, the error response is
1394
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1303
1395
  # @option options [required, String] :attribute
1304
1396
  # The attribute to reset.
1305
1397
  #
1306
1398
  # You can only reset the following attributes: `kernel` \| `ramdisk` \|
1307
1399
  # `sourceDestCheck`.
1308
- # @option options [Boolean] :dry_run
1309
- # Checks whether you have the required permissions for the action,
1310
- # without actually making the request, and provides an error response.
1311
- # If you have the required permissions, the error response is
1312
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1313
1400
  # @return [EmptyStructure]
1314
1401
  def reset_attribute(options = {})
1315
1402
  options = options.merge(instance_id: @id)
1316
- resp = Aws::Plugins::UserAgent.feature('resource') do
1403
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1317
1404
  @client.reset_instance_attribute(options)
1318
1405
  end
1319
1406
  resp.data
@@ -1326,7 +1413,7 @@ module Aws::EC2
1326
1413
  # })
1327
1414
  # @param [Hash] options ({})
1328
1415
  # @option options [Boolean] :dry_run
1329
- # Checks whether you have the required permissions for the action,
1416
+ # Checks whether you have the required permissions for the operation,
1330
1417
  # without actually making the request, and provides an error response.
1331
1418
  # If you have the required permissions, the error response is
1332
1419
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@@ -1336,7 +1423,7 @@ module Aws::EC2
1336
1423
  instance_id: @id,
1337
1424
  attribute: "kernel"
1338
1425
  )
1339
- resp = Aws::Plugins::UserAgent.feature('resource') do
1426
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1340
1427
  @client.reset_instance_attribute(options)
1341
1428
  end
1342
1429
  resp.data
@@ -1349,7 +1436,7 @@ module Aws::EC2
1349
1436
  # })
1350
1437
  # @param [Hash] options ({})
1351
1438
  # @option options [Boolean] :dry_run
1352
- # Checks whether you have the required permissions for the action,
1439
+ # Checks whether you have the required permissions for the operation,
1353
1440
  # without actually making the request, and provides an error response.
1354
1441
  # If you have the required permissions, the error response is
1355
1442
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@@ -1359,7 +1446,7 @@ module Aws::EC2
1359
1446
  instance_id: @id,
1360
1447
  attribute: "ramdisk"
1361
1448
  )
1362
- resp = Aws::Plugins::UserAgent.feature('resource') do
1449
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1363
1450
  @client.reset_instance_attribute(options)
1364
1451
  end
1365
1452
  resp.data
@@ -1372,7 +1459,7 @@ module Aws::EC2
1372
1459
  # })
1373
1460
  # @param [Hash] options ({})
1374
1461
  # @option options [Boolean] :dry_run
1375
- # Checks whether you have the required permissions for the action,
1462
+ # Checks whether you have the required permissions for the operation,
1376
1463
  # without actually making the request, and provides an error response.
1377
1464
  # If you have the required permissions, the error response is
1378
1465
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@@ -1382,7 +1469,7 @@ module Aws::EC2
1382
1469
  instance_id: @id,
1383
1470
  attribute: "sourceDestCheck"
1384
1471
  )
1385
- resp = Aws::Plugins::UserAgent.feature('resource') do
1472
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1386
1473
  @client.reset_instance_attribute(options)
1387
1474
  end
1388
1475
  resp.data
@@ -1398,14 +1485,14 @@ module Aws::EC2
1398
1485
  # @option options [String] :additional_info
1399
1486
  # Reserved.
1400
1487
  # @option options [Boolean] :dry_run
1401
- # Checks whether you have the required permissions for the action,
1488
+ # Checks whether you have the required permissions for the operation,
1402
1489
  # without actually making the request, and provides an error response.
1403
1490
  # If you have the required permissions, the error response is
1404
1491
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1405
1492
  # @return [Types::StartInstancesResult]
1406
1493
  def start(options = {})
1407
1494
  options = Aws::Util.deep_merge(options, instance_ids: [@id])
1408
- resp = Aws::Plugins::UserAgent.feature('resource') do
1495
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1409
1496
  @client.start_instances(options)
1410
1497
  end
1411
1498
  resp.data
@@ -1415,6 +1502,7 @@ module Aws::EC2
1415
1502
  #
1416
1503
  # instance.stop({
1417
1504
  # hibernate: false,
1505
+ # skip_os_shutdown: false,
1418
1506
  # dry_run: false,
1419
1507
  # force: false,
1420
1508
  # })
@@ -1422,7 +1510,7 @@ module Aws::EC2
1422
1510
  # @option options [Boolean] :hibernate
1423
1511
  # Hibernates the instance if the instance was enabled for hibernation at
1424
1512
  # launch. If the instance cannot hibernate successfully, a normal
1425
- # shutdown occurs. For more information, see [Hibernate your
1513
+ # shutdown occurs. For more information, see [Hibernate your Amazon EC2
1426
1514
  # instance][1] in the *Amazon EC2 User Guide*.
1427
1515
  #
1428
1516
  # Default: `false`
@@ -1430,22 +1518,41 @@ module Aws::EC2
1430
1518
  #
1431
1519
  #
1432
1520
  # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html
1521
+ # @option options [Boolean] :skip_os_shutdown
1522
+ # Specifies whether to bypass the graceful OS shutdown process when the
1523
+ # instance is stopped.
1524
+ #
1525
+ # Bypassing the graceful OS shutdown might result in data loss or
1526
+ # corruption (for example, memory contents not flushed to disk or loss
1527
+ # of in-flight IOs) or skipped shutdown scripts.
1528
+ #
1529
+ # Default: `false`
1433
1530
  # @option options [Boolean] :dry_run
1434
- # Checks whether you have the required permissions for the action,
1531
+ # Checks whether you have the required permissions for the operation,
1435
1532
  # without actually making the request, and provides an error response.
1436
1533
  # If you have the required permissions, the error response is
1437
1534
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1438
1535
  # @option options [Boolean] :force
1439
- # Forces the instances to stop. The instances do not have an opportunity
1440
- # to flush file system caches or file system metadata. If you use this
1441
- # option, you must perform file system check and repair procedures. This
1442
- # option is not recommended for Windows instances.
1536
+ # Forces the instance to stop. The instance will first attempt a
1537
+ # graceful shutdown, which includes flushing file system caches and
1538
+ # metadata. If the graceful shutdown fails to complete within the
1539
+ # timeout period, the instance shuts down forcibly without flushing the
1540
+ # file system caches and metadata.
1541
+ #
1542
+ # After using this option, you must perform file system check and repair
1543
+ # procedures. This option is not recommended for Windows instances. For
1544
+ # more information, see [Troubleshoot Amazon EC2 instance stop
1545
+ # issues][1] in the *Amazon EC2 User Guide*.
1443
1546
  #
1444
1547
  # Default: `false`
1548
+ #
1549
+ #
1550
+ #
1551
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html
1445
1552
  # @return [Types::StopInstancesResult]
1446
1553
  def stop(options = {})
1447
1554
  options = Aws::Util.deep_merge(options, instance_ids: [@id])
1448
- resp = Aws::Plugins::UserAgent.feature('resource') do
1555
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1449
1556
  @client.stop_instances(options)
1450
1557
  end
1451
1558
  resp.data
@@ -1454,18 +1561,31 @@ module Aws::EC2
1454
1561
  # @example Request syntax with placeholder values
1455
1562
  #
1456
1563
  # instance.terminate({
1564
+ # force: false,
1565
+ # skip_os_shutdown: false,
1457
1566
  # dry_run: false,
1458
1567
  # })
1459
1568
  # @param [Hash] options ({})
1569
+ # @option options [Boolean] :force
1570
+ # Forces the instances to terminate. The instance will first attempt a
1571
+ # graceful shutdown, which includes flushing file system caches and
1572
+ # metadata. If the graceful shutdown fails to complete within the
1573
+ # timeout period, the instance shuts down forcibly without flushing the
1574
+ # file system caches and metadata.
1575
+ # @option options [Boolean] :skip_os_shutdown
1576
+ # Specifies whether to bypass the graceful OS shutdown process when the
1577
+ # instance is terminated.
1578
+ #
1579
+ # Default: `false`
1460
1580
  # @option options [Boolean] :dry_run
1461
- # Checks whether you have the required permissions for the action,
1581
+ # Checks whether you have the required permissions for the operation,
1462
1582
  # without actually making the request, and provides an error response.
1463
1583
  # If you have the required permissions, the error response is
1464
1584
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1465
1585
  # @return [Types::TerminateInstancesResult]
1466
1586
  def terminate(options = {})
1467
1587
  options = Aws::Util.deep_merge(options, instance_ids: [@id])
1468
- resp = Aws::Plugins::UserAgent.feature('resource') do
1588
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1469
1589
  @client.terminate_instances(options)
1470
1590
  end
1471
1591
  resp.data
@@ -1478,14 +1598,14 @@ module Aws::EC2
1478
1598
  # })
1479
1599
  # @param [Hash] options ({})
1480
1600
  # @option options [Boolean] :dry_run
1481
- # Checks whether you have the required permissions for the action,
1601
+ # Checks whether you have the required permissions for the operation,
1482
1602
  # without actually making the request, and provides an error response.
1483
1603
  # If you have the required permissions, the error response is
1484
1604
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1485
1605
  # @return [Types::UnmonitorInstancesResult]
1486
1606
  def unmonitor(options = {})
1487
1607
  options = Aws::Util.deep_merge(options, instance_ids: [@id])
1488
- resp = Aws::Plugins::UserAgent.feature('resource') do
1608
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1489
1609
  @client.unmonitor_instances(options)
1490
1610
  end
1491
1611
  resp.data
@@ -1569,16 +1689,24 @@ module Aws::EC2
1569
1689
  # @example Request syntax with placeholder values
1570
1690
  #
1571
1691
  # volumes = instance.volumes({
1692
+ # volume_ids: ["VolumeId"],
1693
+ # dry_run: false,
1572
1694
  # filters: [
1573
1695
  # {
1574
1696
  # name: "String",
1575
1697
  # values: ["String"],
1576
1698
  # },
1577
1699
  # ],
1578
- # volume_ids: ["VolumeId"],
1579
- # dry_run: false,
1580
1700
  # })
1581
1701
  # @param [Hash] options ({})
1702
+ # @option options [Array<String>] :volume_ids
1703
+ # The volume IDs. If not specified, then all volumes are included in the
1704
+ # response.
1705
+ # @option options [Boolean] :dry_run
1706
+ # Checks whether you have the required permissions for the action,
1707
+ # without actually making the request, and provides an error response.
1708
+ # If you have the required permissions, the error response is
1709
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1582
1710
  # @option options [Array<Types::Filter>] :filters
1583
1711
  # The filters.
1584
1712
  #
@@ -1600,18 +1728,27 @@ module Aws::EC2
1600
1728
  # * `availability-zone` - The Availability Zone in which the volume was
1601
1729
  # created.
1602
1730
  #
1731
+ # * `availability-zone-id` - The ID of the Availability Zone in which
1732
+ # the volume was created.
1733
+ #
1603
1734
  # * `create-time` - The time stamp when the volume was created.
1604
1735
  #
1605
1736
  # * `encrypted` - Indicates whether the volume is encrypted (`true` \|
1606
1737
  # `false`)
1607
1738
  #
1608
- # * `multi-attach-enabled` - Indicates whether the volume is enabled for
1609
- # Multi-Attach (`true` \| `false`)
1610
- #
1611
1739
  # * `fast-restored` - Indicates whether the volume was created from a
1612
1740
  # snapshot that is enabled for fast snapshot restore (`true` \|
1613
1741
  # `false`).
1614
1742
  #
1743
+ # * `multi-attach-enabled` - Indicates whether the volume is enabled for
1744
+ # Multi-Attach (`true` \| `false`)
1745
+ #
1746
+ # * `operator.managed` - A Boolean that indicates whether this is a
1747
+ # managed volume.
1748
+ #
1749
+ # * `operator.principal` - The principal that manages the volume. Only
1750
+ # valid for managed volumes, where `managed` is `true`.
1751
+ #
1615
1752
  # * `size` - The size of the volume, in GiB.
1616
1753
  #
1617
1754
  # * `snapshot-id` - The snapshot from which the volume was created.
@@ -1633,13 +1770,6 @@ module Aws::EC2
1633
1770
  #
1634
1771
  # * `volume-type` - The Amazon EBS volume type (`gp2` \| `gp3` \| `io1`
1635
1772
  # \| `io2` \| `st1` \| `sc1`\| `standard`)
1636
- # @option options [Array<String>] :volume_ids
1637
- # The volume IDs.
1638
- # @option options [Boolean] :dry_run
1639
- # Checks whether you have the required permissions for the action,
1640
- # without actually making the request, and provides an error response.
1641
- # If you have the required permissions, the error response is
1642
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1643
1773
  # @return [Volume::Collection]
1644
1774
  def volumes(options = {})
1645
1775
  batches = Enumerator.new do |y|
@@ -1647,7 +1777,7 @@ module Aws::EC2
1647
1777
  name: "attachment.instance-id",
1648
1778
  values: [@id]
1649
1779
  }])
1650
- resp = Aws::Plugins::UserAgent.feature('resource') do
1780
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1651
1781
  @client.describe_volumes(options)
1652
1782
  end
1653
1783
  resp.each_page do |page|
@@ -1680,17 +1810,26 @@ module Aws::EC2
1680
1810
  # @example Request syntax with placeholder values
1681
1811
  #
1682
1812
  # vpc_addresses = instance.vpc_addresses({
1813
+ # public_ips: ["String"],
1814
+ # dry_run: false,
1683
1815
  # filters: [
1684
1816
  # {
1685
1817
  # name: "String",
1686
1818
  # values: ["String"],
1687
1819
  # },
1688
1820
  # ],
1689
- # public_ips: ["String"],
1690
1821
  # allocation_ids: ["AllocationId"],
1691
- # dry_run: false,
1692
1822
  # })
1693
1823
  # @param [Hash] options ({})
1824
+ # @option options [Array<String>] :public_ips
1825
+ # One or more Elastic IP addresses.
1826
+ #
1827
+ # Default: Describes all your Elastic IP addresses.
1828
+ # @option options [Boolean] :dry_run
1829
+ # Checks whether you have the required permissions for the action,
1830
+ # without actually making the request, and provides an error response.
1831
+ # If you have the required permissions, the error response is
1832
+ # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1694
1833
  # @option options [Array<Types::Filter>] :filters
1695
1834
  # One or more filters. Filter names and values are case-sensitive.
1696
1835
  #
@@ -1725,17 +1864,8 @@ module Aws::EC2
1725
1864
  # * `tag-key` - The key of a tag assigned to the resource. Use this
1726
1865
  # filter to find all resources assigned a tag with a specific key,
1727
1866
  # regardless of the tag value.
1728
- # @option options [Array<String>] :public_ips
1729
- # One or more Elastic IP addresses.
1730
- #
1731
- # Default: Describes all your Elastic IP addresses.
1732
1867
  # @option options [Array<String>] :allocation_ids
1733
1868
  # Information about the allocation IDs.
1734
- # @option options [Boolean] :dry_run
1735
- # Checks whether you have the required permissions for the action,
1736
- # without actually making the request, and provides an error response.
1737
- # If you have the required permissions, the error response is
1738
- # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1739
1869
  # @return [VpcAddress::Collection]
1740
1870
  def vpc_addresses(options = {})
1741
1871
  batches = Enumerator.new do |y|
@@ -1744,7 +1874,7 @@ module Aws::EC2
1744
1874
  name: "instance-id",
1745
1875
  values: [@id]
1746
1876
  }])
1747
- resp = Aws::Plugins::UserAgent.feature('resource') do
1877
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1748
1878
  @client.describe_addresses(options)
1749
1879
  end
1750
1880
  resp.data.addresses.each do |a|
@@ -1839,7 +1969,7 @@ module Aws::EC2
1839
1969
  batch.each do |item|
1840
1970
  params[:resources] << item.id
1841
1971
  end
1842
- Aws::Plugins::UserAgent.feature('resource') do
1972
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1843
1973
  batch[0].client.create_tags(params)
1844
1974
  end
1845
1975
  end
@@ -1883,7 +2013,7 @@ module Aws::EC2
1883
2013
  batch.each do |item|
1884
2014
  params[:resources] << item.id
1885
2015
  end
1886
- Aws::Plugins::UserAgent.feature('resource') do
2016
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1887
2017
  batch[0].client.delete_tags(params)
1888
2018
  end
1889
2019
  end
@@ -1897,7 +2027,7 @@ module Aws::EC2
1897
2027
  # })
1898
2028
  # @param options ({})
1899
2029
  # @option options [Boolean] :dry_run
1900
- # Checks whether you have the required permissions for the action,
2030
+ # Checks whether you have the required permissions for the operation,
1901
2031
  # without actually making the request, and provides an error response.
1902
2032
  # If you have the required permissions, the error response is
1903
2033
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@@ -1909,7 +2039,7 @@ module Aws::EC2
1909
2039
  batch.each do |item|
1910
2040
  params[:instance_ids] << item.id
1911
2041
  end
1912
- Aws::Plugins::UserAgent.feature('resource') do
2042
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1913
2043
  batch[0].client.monitor_instances(params)
1914
2044
  end
1915
2045
  end
@@ -1923,7 +2053,7 @@ module Aws::EC2
1923
2053
  # })
1924
2054
  # @param options ({})
1925
2055
  # @option options [Boolean] :dry_run
1926
- # Checks whether you have the required permissions for the action,
2056
+ # Checks whether you have the required permissions for the operation,
1927
2057
  # without actually making the request, and provides an error response.
1928
2058
  # If you have the required permissions, the error response is
1929
2059
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@@ -1935,7 +2065,7 @@ module Aws::EC2
1935
2065
  batch.each do |item|
1936
2066
  params[:instance_ids] << item.id
1937
2067
  end
1938
- Aws::Plugins::UserAgent.feature('resource') do
2068
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1939
2069
  batch[0].client.reboot_instances(params)
1940
2070
  end
1941
2071
  end
@@ -1952,7 +2082,7 @@ module Aws::EC2
1952
2082
  # @option options [String] :additional_info
1953
2083
  # Reserved.
1954
2084
  # @option options [Boolean] :dry_run
1955
- # Checks whether you have the required permissions for the action,
2085
+ # Checks whether you have the required permissions for the operation,
1956
2086
  # without actually making the request, and provides an error response.
1957
2087
  # If you have the required permissions, the error response is
1958
2088
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@@ -1964,7 +2094,7 @@ module Aws::EC2
1964
2094
  batch.each do |item|
1965
2095
  params[:instance_ids] << item.id
1966
2096
  end
1967
- Aws::Plugins::UserAgent.feature('resource') do
2097
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1968
2098
  batch[0].client.start_instances(params)
1969
2099
  end
1970
2100
  end
@@ -1975,6 +2105,7 @@ module Aws::EC2
1975
2105
  #
1976
2106
  # instance.batch_stop({
1977
2107
  # hibernate: false,
2108
+ # skip_os_shutdown: false,
1978
2109
  # dry_run: false,
1979
2110
  # force: false,
1980
2111
  # })
@@ -1982,7 +2113,7 @@ module Aws::EC2
1982
2113
  # @option options [Boolean] :hibernate
1983
2114
  # Hibernates the instance if the instance was enabled for hibernation at
1984
2115
  # launch. If the instance cannot hibernate successfully, a normal
1985
- # shutdown occurs. For more information, see [Hibernate your
2116
+ # shutdown occurs. For more information, see [Hibernate your Amazon EC2
1986
2117
  # instance][1] in the *Amazon EC2 User Guide*.
1987
2118
  #
1988
2119
  # Default: `false`
@@ -1990,18 +2121,37 @@ module Aws::EC2
1990
2121
  #
1991
2122
  #
1992
2123
  # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html
2124
+ # @option options [Boolean] :skip_os_shutdown
2125
+ # Specifies whether to bypass the graceful OS shutdown process when the
2126
+ # instance is stopped.
2127
+ #
2128
+ # Bypassing the graceful OS shutdown might result in data loss or
2129
+ # corruption (for example, memory contents not flushed to disk or loss
2130
+ # of in-flight IOs) or skipped shutdown scripts.
2131
+ #
2132
+ # Default: `false`
1993
2133
  # @option options [Boolean] :dry_run
1994
- # Checks whether you have the required permissions for the action,
2134
+ # Checks whether you have the required permissions for the operation,
1995
2135
  # without actually making the request, and provides an error response.
1996
2136
  # If you have the required permissions, the error response is
1997
2137
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
1998
2138
  # @option options [Boolean] :force
1999
- # Forces the instances to stop. The instances do not have an opportunity
2000
- # to flush file system caches or file system metadata. If you use this
2001
- # option, you must perform file system check and repair procedures. This
2002
- # option is not recommended for Windows instances.
2139
+ # Forces the instance to stop. The instance will first attempt a
2140
+ # graceful shutdown, which includes flushing file system caches and
2141
+ # metadata. If the graceful shutdown fails to complete within the
2142
+ # timeout period, the instance shuts down forcibly without flushing the
2143
+ # file system caches and metadata.
2144
+ #
2145
+ # After using this option, you must perform file system check and repair
2146
+ # procedures. This option is not recommended for Windows instances. For
2147
+ # more information, see [Troubleshoot Amazon EC2 instance stop
2148
+ # issues][1] in the *Amazon EC2 User Guide*.
2003
2149
  #
2004
2150
  # Default: `false`
2151
+ #
2152
+ #
2153
+ #
2154
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html
2005
2155
  # @return [void]
2006
2156
  def batch_stop(options = {})
2007
2157
  batch_enum.each do |batch|
@@ -2010,7 +2160,7 @@ module Aws::EC2
2010
2160
  batch.each do |item|
2011
2161
  params[:instance_ids] << item.id
2012
2162
  end
2013
- Aws::Plugins::UserAgent.feature('resource') do
2163
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2014
2164
  batch[0].client.stop_instances(params)
2015
2165
  end
2016
2166
  end
@@ -2020,11 +2170,24 @@ module Aws::EC2
2020
2170
  # @example Request syntax with placeholder values
2021
2171
  #
2022
2172
  # instance.batch_terminate!({
2173
+ # force: false,
2174
+ # skip_os_shutdown: false,
2023
2175
  # dry_run: false,
2024
2176
  # })
2025
2177
  # @param options ({})
2178
+ # @option options [Boolean] :force
2179
+ # Forces the instances to terminate. The instance will first attempt a
2180
+ # graceful shutdown, which includes flushing file system caches and
2181
+ # metadata. If the graceful shutdown fails to complete within the
2182
+ # timeout period, the instance shuts down forcibly without flushing the
2183
+ # file system caches and metadata.
2184
+ # @option options [Boolean] :skip_os_shutdown
2185
+ # Specifies whether to bypass the graceful OS shutdown process when the
2186
+ # instance is terminated.
2187
+ #
2188
+ # Default: `false`
2026
2189
  # @option options [Boolean] :dry_run
2027
- # Checks whether you have the required permissions for the action,
2190
+ # Checks whether you have the required permissions for the operation,
2028
2191
  # without actually making the request, and provides an error response.
2029
2192
  # If you have the required permissions, the error response is
2030
2193
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@@ -2036,7 +2199,7 @@ module Aws::EC2
2036
2199
  batch.each do |item|
2037
2200
  params[:instance_ids] << item.id
2038
2201
  end
2039
- Aws::Plugins::UserAgent.feature('resource') do
2202
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2040
2203
  batch[0].client.terminate_instances(params)
2041
2204
  end
2042
2205
  end
@@ -2050,7 +2213,7 @@ module Aws::EC2
2050
2213
  # })
2051
2214
  # @param options ({})
2052
2215
  # @option options [Boolean] :dry_run
2053
- # Checks whether you have the required permissions for the action,
2216
+ # Checks whether you have the required permissions for the operation,
2054
2217
  # without actually making the request, and provides an error response.
2055
2218
  # If you have the required permissions, the error response is
2056
2219
  # `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
@@ -2062,7 +2225,7 @@ module Aws::EC2
2062
2225
  batch.each do |item|
2063
2226
  params[:instance_ids] << item.id
2064
2227
  end
2065
- Aws::Plugins::UserAgent.feature('resource') do
2228
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
2066
2229
  batch[0].client.unmonitor_instances(params)
2067
2230
  end
2068
2231
  end
@@ -2074,3 +2237,6 @@ module Aws::EC2
2074
2237
  end
2075
2238
  end
2076
2239
  end
2240
+
2241
+ # Load customizations if they exist
2242
+ require 'aws-sdk-ec2/customizations/instance'