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
@@ -267,7 +267,9 @@ module Aws::EC2
267
267
  :retry
268
268
  end
269
269
  end
270
- Aws::Waiters::Waiter.new(options).wait({})
270
+ Aws::Plugins::UserAgent.feature('resource') do
271
+ Aws::Waiters::Waiter.new(options).wait({})
272
+ end
271
273
  end
272
274
 
273
275
  # @!group Actions
@@ -296,7 +298,9 @@ module Aws::EC2
296
298
  route_table_id: @route_table_id,
297
299
  destination_cidr_block: @destination_cidr_block
298
300
  )
299
- resp = @client.delete_route(options)
301
+ resp = Aws::Plugins::UserAgent.feature('resource') do
302
+ @client.delete_route(options)
303
+ end
300
304
  resp.data
301
305
  end
302
306
 
@@ -363,7 +367,9 @@ module Aws::EC2
363
367
  route_table_id: @route_table_id,
364
368
  destination_cidr_block: @destination_cidr_block
365
369
  )
366
- resp = @client.replace_route(options)
370
+ resp = Aws::Plugins::UserAgent.feature('resource') do
371
+ @client.replace_route(options)
372
+ end
367
373
  resp.data
368
374
  end
369
375
 
@@ -73,7 +73,9 @@ module Aws::EC2
73
73
  #
74
74
  # @return [self]
75
75
  def load
76
- resp = @client.describe_route_tables(route_table_ids: [@id])
76
+ resp = Aws::Plugins::UserAgent.feature('resource') do
77
+ @client.describe_route_tables(route_table_ids: [@id])
78
+ end
77
79
  @data = resp.route_tables[0]
78
80
  self
79
81
  end
@@ -188,7 +190,9 @@ module Aws::EC2
188
190
  :retry
189
191
  end
190
192
  end
191
- Aws::Waiters::Waiter.new(options).wait({})
193
+ Aws::Plugins::UserAgent.feature('resource') do
194
+ Aws::Waiters::Waiter.new(options).wait({})
195
+ end
192
196
  end
193
197
 
194
198
  # @!group Actions
@@ -213,7 +217,9 @@ module Aws::EC2
213
217
  # @return [RouteTableAssociation]
214
218
  def associate_with_subnet(options = {})
215
219
  options = options.merge(route_table_id: @id)
216
- resp = @client.associate_route_table(options)
220
+ resp = Aws::Plugins::UserAgent.feature('resource') do
221
+ @client.associate_route_table(options)
222
+ end
217
223
  RouteTableAssociation.new(
218
224
  id: resp.data.association_id,
219
225
  client: @client
@@ -287,7 +293,9 @@ module Aws::EC2
287
293
  # @return [Route]
288
294
  def create_route(options = {})
289
295
  options = options.merge(route_table_id: @id)
290
- @client.create_route(options)
296
+ Aws::Plugins::UserAgent.feature('resource') do
297
+ @client.create_route(options)
298
+ end
291
299
  Route.new(
292
300
  route_table_id: @id,
293
301
  destination_cidr_block: options[:destination_cidr_block],
@@ -320,7 +328,9 @@ module Aws::EC2
320
328
  def create_tags(options = {})
321
329
  batch = []
322
330
  options = Aws::Util.deep_merge(options, resources: [@id])
323
- resp = @client.create_tags(options)
331
+ resp = Aws::Plugins::UserAgent.feature('resource') do
332
+ @client.create_tags(options)
333
+ end
324
334
  options[:tags].each do |t|
325
335
  batch << Tag.new(
326
336
  resource_id: @id,
@@ -365,7 +375,9 @@ module Aws::EC2
365
375
  def delete_tags(options = {})
366
376
  batch = []
367
377
  options = Aws::Util.deep_merge(options, resources: [@id])
368
- resp = @client.delete_tags(options)
378
+ resp = Aws::Plugins::UserAgent.feature('resource') do
379
+ @client.delete_tags(options)
380
+ end
369
381
  options[:tags].each do |t|
370
382
  batch << Tag.new(
371
383
  resource_id: @id,
@@ -391,7 +403,9 @@ module Aws::EC2
391
403
  # @return [EmptyStructure]
392
404
  def delete(options = {})
393
405
  options = options.merge(route_table_id: @id)
394
- resp = @client.delete_route_table(options)
406
+ resp = Aws::Plugins::UserAgent.feature('resource') do
407
+ @client.delete_route_table(options)
408
+ end
395
409
  resp.data
396
410
  end
397
411
 
@@ -190,7 +190,9 @@ module Aws::EC2
190
190
  :retry
191
191
  end
192
192
  end
193
- Aws::Waiters::Waiter.new(options).wait({})
193
+ Aws::Plugins::UserAgent.feature('resource') do
194
+ Aws::Waiters::Waiter.new(options).wait({})
195
+ end
194
196
  end
195
197
 
196
198
  # @!group Actions
@@ -209,7 +211,9 @@ module Aws::EC2
209
211
  # @return [EmptyStructure]
210
212
  def delete(options = {})
211
213
  options = options.merge(association_id: @id)
212
- resp = @client.disassociate_route_table(options)
214
+ resp = Aws::Plugins::UserAgent.feature('resource') do
215
+ @client.disassociate_route_table(options)
216
+ end
213
217
  resp.data
214
218
  end
215
219
 
@@ -230,7 +234,9 @@ module Aws::EC2
230
234
  # @return [RouteTableAssociation]
231
235
  def replace_subnet(options = {})
232
236
  options = options.merge(association_id: @id)
233
- resp = @client.replace_route_table_association(options)
237
+ resp = Aws::Plugins::UserAgent.feature('resource') do
238
+ @client.replace_route_table_association(options)
239
+ end
234
240
  RouteTableAssociation.new(
235
241
  id: resp.data.new_association_id,
236
242
  client: @client
@@ -59,7 +59,7 @@ module Aws::EC2
59
59
  data[:owner_id]
60
60
  end
61
61
 
62
- # \[VPC only\] The outbound rules associated with the security group.
62
+ # The outbound rules associated with the security group.
63
63
  # @return [Array<Types::IpPermission>]
64
64
  def ip_permissions_egress
65
65
  data[:ip_permissions_egress]
@@ -71,7 +71,7 @@ module Aws::EC2
71
71
  data[:tags]
72
72
  end
73
73
 
74
- # \[VPC only\] The ID of the VPC for the security group.
74
+ # The ID of the VPC for the security group.
75
75
  # @return [String]
76
76
  def vpc_id
77
77
  data[:vpc_id]
@@ -91,7 +91,9 @@ module Aws::EC2
91
91
  #
92
92
  # @return [self]
93
93
  def load
94
- resp = @client.describe_security_groups(group_ids: [@id])
94
+ resp = Aws::Plugins::UserAgent.feature('resource') do
95
+ @client.describe_security_groups(group_ids: [@id])
96
+ end
95
97
  @data = resp.security_groups[0]
96
98
  self
97
99
  end
@@ -206,7 +208,9 @@ module Aws::EC2
206
208
  :retry
207
209
  end
208
210
  end
209
- Aws::Waiters::Waiter.new(options).wait({})
211
+ Aws::Plugins::UserAgent.feature('resource') do
212
+ Aws::Waiters::Waiter.new(options).wait({})
213
+ end
210
214
  end
211
215
 
212
216
  # @!group Actions
@@ -253,7 +257,7 @@ module Aws::EC2
253
257
  # ],
254
258
  # tag_specifications: [
255
259
  # {
256
- # 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
260
+ # 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
257
261
  # tags: [
258
262
  # {
259
263
  # key: "String",
@@ -298,7 +302,9 @@ module Aws::EC2
298
302
  # @return [Types::AuthorizeSecurityGroupEgressResult]
299
303
  def authorize_egress(options = {})
300
304
  options = options.merge(group_id: @id)
301
- resp = @client.authorize_security_group_egress(options)
305
+ resp = Aws::Plugins::UserAgent.feature('resource') do
306
+ @client.authorize_security_group_egress(options)
307
+ end
302
308
  resp.data
303
309
  end
304
310
 
@@ -351,7 +357,7 @@ module Aws::EC2
351
357
  # dry_run: false,
352
358
  # tag_specifications: [
353
359
  # {
354
- # 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
360
+ # 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
355
361
  # tags: [
356
362
  # {
357
363
  # key: "String",
@@ -370,25 +376,27 @@ module Aws::EC2
370
376
  # Alternatively, use a set of IP permissions to specify multiple rules
371
377
  # and a description for the rule.
372
378
  # @option options [Integer] :from_port
373
- # The start of port range for the TCP and UDP protocols, or an ICMP type
374
- # number. For the ICMP type number, use `-1` to specify all types. If
375
- # you specify all ICMP types, you must specify all codes.
379
+ # If the protocol is TCP or UDP, this is the start of the port range. If
380
+ # the protocol is ICMP, this is the type number. A value of -1 indicates
381
+ # all ICMP types. If you specify all ICMP types, you must specify all
382
+ # ICMP codes.
376
383
  #
377
384
  # Alternatively, use a set of IP permissions to specify multiple rules
378
385
  # and a description for the rule.
379
386
  # @option options [String] :group_name
380
- # \[EC2-Classic, default VPC\] The name of the security group. You must
381
- # specify either the security group ID or the security group name in the
382
- # request.
387
+ # \[Default VPC\] The name of the security group. You must specify
388
+ # either the security group ID or the security group name in the
389
+ # request. For security groups in a nondefault VPC, you must specify the
390
+ # security group ID.
383
391
  # @option options [Array<Types::IpPermission>] :ip_permissions
384
392
  # The sets of IP permissions.
385
393
  # @option options [String] :ip_protocol
386
394
  # The IP protocol name (`tcp`, `udp`, `icmp`) or number (see [Protocol
387
395
  # Numbers][1]). To specify `icmpv6`, use a set of IP permissions.
388
396
  #
389
- # \[VPC only\] Use `-1` to specify all protocols. If you specify `-1` or
390
- # a protocol other than `tcp`, `udp`, or `icmp`, traffic on all ports is
391
- # allowed, regardless of any ports you specify.
397
+ # Use `-1` to specify all protocols. If you specify `-1` or a protocol
398
+ # other than `tcp`, `udp`, or `icmp`, traffic on all ports is allowed,
399
+ # regardless of any ports you specify.
392
400
  #
393
401
  # Alternatively, use a set of IP permissions to specify multiple rules
394
402
  # and a description for the rule.
@@ -397,15 +405,15 @@ module Aws::EC2
397
405
  #
398
406
  # [1]: http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
399
407
  # @option options [String] :source_security_group_name
400
- # \[EC2-Classic, default VPC\] The name of the source security group.
401
- # You can't specify this parameter in combination with the following
402
- # parameters: the CIDR IP address range, the start of the port range,
403
- # the IP protocol, and the end of the port range. Creates rules that
404
- # grant full ICMP, UDP, and TCP access. To create a rule with a specific
405
- # IP protocol and port range, use a set of IP permissions instead. For
406
- # EC2-VPC, the source security group must be in the same VPC.
408
+ # \[Default VPC\] The name of the source security group. You can't
409
+ # specify this parameter in combination with the following parameters:
410
+ # the CIDR IP address range, the start of the port range, the IP
411
+ # protocol, and the end of the port range. Creates rules that grant full
412
+ # ICMP, UDP, and TCP access. To create a rule with a specific IP
413
+ # protocol and port range, use a set of IP permissions instead. The
414
+ # source security group must be in the same VPC.
407
415
  # @option options [String] :source_security_group_owner_id
408
- # \[nondefault VPC\] The Amazon Web Services account ID for the source
416
+ # \[Nondefault VPC\] The Amazon Web Services account ID for the source
409
417
  # security group, if the source security group is in a different
410
418
  # account. You can't specify this parameter in combination with the
411
419
  # following parameters: the CIDR IP address range, the IP protocol, the
@@ -414,9 +422,10 @@ module Aws::EC2
414
422
  # specific IP protocol and port range, use a set of IP permissions
415
423
  # instead.
416
424
  # @option options [Integer] :to_port
417
- # The end of port range for the TCP and UDP protocols, or an ICMP code
418
- # number. For the ICMP code number, use `-1` to specify all codes. If
419
- # you specify all ICMP types, you must specify all codes.
425
+ # If the protocol is TCP or UDP, this is the end of the port range. If
426
+ # the protocol is ICMP, this is the code. A value of -1 indicates all
427
+ # ICMP codes. If you specify all ICMP types, you must specify all ICMP
428
+ # codes.
420
429
  #
421
430
  # Alternatively, use a set of IP permissions to specify multiple rules
422
431
  # and a description for the rule.
@@ -430,7 +439,9 @@ module Aws::EC2
430
439
  # @return [Types::AuthorizeSecurityGroupIngressResult]
431
440
  def authorize_ingress(options = {})
432
441
  options = options.merge(group_id: @id)
433
- resp = @client.authorize_security_group_ingress(options)
442
+ resp = Aws::Plugins::UserAgent.feature('resource') do
443
+ @client.authorize_security_group_ingress(options)
444
+ end
434
445
  resp.data
435
446
  end
436
447
 
@@ -459,7 +470,9 @@ module Aws::EC2
459
470
  def create_tags(options = {})
460
471
  batch = []
461
472
  options = Aws::Util.deep_merge(options, resources: [@id])
462
- resp = @client.create_tags(options)
473
+ resp = Aws::Plugins::UserAgent.feature('resource') do
474
+ @client.create_tags(options)
475
+ end
463
476
  options[:tags].each do |t|
464
477
  batch << Tag.new(
465
478
  resource_id: @id,
@@ -504,7 +517,9 @@ module Aws::EC2
504
517
  def delete_tags(options = {})
505
518
  batch = []
506
519
  options = Aws::Util.deep_merge(options, resources: [@id])
507
- resp = @client.delete_tags(options)
520
+ resp = Aws::Plugins::UserAgent.feature('resource') do
521
+ @client.delete_tags(options)
522
+ end
508
523
  options[:tags].each do |t|
509
524
  batch << Tag.new(
510
525
  resource_id: @id,
@@ -524,8 +539,9 @@ module Aws::EC2
524
539
  # })
525
540
  # @param [Hash] options ({})
526
541
  # @option options [String] :group_name
527
- # \[EC2-Classic, default VPC\] The name of the security group. You can
528
- # specify either the security group name or the security group ID.
542
+ # \[Default VPC\] The name of the security group. You can specify either
543
+ # the security group name or the security group ID. For security groups
544
+ # in a nondefault VPC, you must specify the security group ID.
529
545
  # @option options [Boolean] :dry_run
530
546
  # Checks whether you have the required permissions for the action,
531
547
  # without actually making the request, and provides an error response.
@@ -534,7 +550,9 @@ module Aws::EC2
534
550
  # @return [EmptyStructure]
535
551
  def delete(options = {})
536
552
  options = options.merge(group_id: @id)
537
- resp = @client.delete_security_group(options)
553
+ resp = Aws::Plugins::UserAgent.feature('resource') do
554
+ @client.delete_security_group(options)
555
+ end
538
556
  resp.data
539
557
  end
540
558
 
@@ -615,7 +633,9 @@ module Aws::EC2
615
633
  # @return [Types::RevokeSecurityGroupEgressResult]
616
634
  def revoke_egress(options = {})
617
635
  options = options.merge(group_id: @id)
618
- resp = @client.revoke_security_group_egress(options)
636
+ resp = Aws::Plugins::UserAgent.feature('resource') do
637
+ @client.revoke_security_group_egress(options)
638
+ end
619
639
  resp.data
620
640
  end
621
641
 
@@ -673,12 +693,14 @@ module Aws::EC2
673
693
  # The CIDR IP address range. You can't specify this parameter when
674
694
  # specifying a source security group.
675
695
  # @option options [Integer] :from_port
676
- # The start of port range for the TCP and UDP protocols, or an ICMP type
677
- # number. For the ICMP type number, use `-1` to specify all ICMP types.
696
+ # If the protocol is TCP or UDP, this is the start of the port range. If
697
+ # the protocol is ICMP, this is the type number. A value of -1 indicates
698
+ # all ICMP types.
678
699
  # @option options [String] :group_name
679
- # \[EC2-Classic, default VPC\] The name of the security group. You must
680
- # specify either the security group ID or the security group name in the
681
- # request.
700
+ # \[Default VPC\] The name of the security group. You must specify
701
+ # either the security group ID or the security group name in the
702
+ # request. For security groups in a nondefault VPC, you must specify the
703
+ # security group ID.
682
704
  # @option options [Array<Types::IpPermission>] :ip_permissions
683
705
  # The sets of IP permissions. You can't specify a source security group
684
706
  # and a CIDR IP address range in the same set of permissions.
@@ -690,25 +712,18 @@ module Aws::EC2
690
712
  #
691
713
  # [1]: http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
692
714
  # @option options [String] :source_security_group_name
693
- # \[EC2-Classic, default VPC\] The name of the source security group.
694
- # You can't specify this parameter in combination with the following
695
- # parameters: the CIDR IP address range, the start of the port range,
696
- # the IP protocol, and the end of the port range. For EC2-VPC, the
697
- # source security group must be in the same VPC. To revoke a specific
698
- # rule for an IP protocol and port range, use a set of IP permissions
699
- # instead.
715
+ # \[Default VPC\] The name of the source security group. You can't
716
+ # specify this parameter in combination with the following parameters:
717
+ # the CIDR IP address range, the start of the port range, the IP
718
+ # protocol, and the end of the port range. The source security group
719
+ # must be in the same VPC. To revoke a specific rule for an IP protocol
720
+ # and port range, use a set of IP permissions instead.
700
721
  # @option options [String] :source_security_group_owner_id
701
- # \[EC2-Classic\] The Amazon Web Services account ID of the source
702
- # security group, if the source security group is in a different
703
- # account. You can't specify this parameter in combination with the
704
- # following parameters: the CIDR IP address range, the IP protocol, the
705
- # start of the port range, and the end of the port range. To revoke a
706
- # specific rule for an IP protocol and port range, use a set of IP
707
- # permissions instead.
722
+ # Not supported.
708
723
  # @option options [Integer] :to_port
709
- # The end of port range for the TCP and UDP protocols, or an ICMP code
710
- # number. For the ICMP code number, use `-1` to specify all ICMP codes
711
- # for the ICMP type.
724
+ # If the protocol is TCP or UDP, this is the end of the port range. If
725
+ # the protocol is ICMP, this is the code. A value of -1 indicates all
726
+ # ICMP codes.
712
727
  # @option options [Boolean] :dry_run
713
728
  # Checks whether you have the required permissions for the action,
714
729
  # without actually making the request, and provides an error response.
@@ -719,7 +734,9 @@ module Aws::EC2
719
734
  # @return [Types::RevokeSecurityGroupIngressResult]
720
735
  def revoke_ingress(options = {})
721
736
  options = options.merge(group_id: @id)
722
- resp = @client.revoke_security_group_ingress(options)
737
+ resp = Aws::Plugins::UserAgent.feature('resource') do
738
+ @client.revoke_security_group_ingress(options)
739
+ end
723
740
  resp.data
724
741
  end
725
742
 
@@ -158,6 +158,12 @@ module Aws::EC2
158
158
  data[:restore_expiry_time]
159
159
  end
160
160
 
161
+ # Reserved for future use.
162
+ # @return [String]
163
+ def sse_type
164
+ data[:sse_type]
165
+ end
166
+
161
167
  # @!endgroup
162
168
 
163
169
  # @return [Client]
@@ -172,7 +178,9 @@ module Aws::EC2
172
178
  #
173
179
  # @return [self]
174
180
  def load
175
- resp = @client.describe_snapshots(snapshot_ids: [@id])
181
+ resp = Aws::Plugins::UserAgent.feature('resource') do
182
+ @client.describe_snapshots(snapshot_ids: [@id])
183
+ end
176
184
  @data = resp.snapshots[0]
177
185
  self
178
186
  end
@@ -203,7 +211,9 @@ module Aws::EC2
203
211
  options, params = separate_params_and_options(options)
204
212
  waiter = Waiters::SnapshotCompleted.new(options)
205
213
  yield_waiter_and_warn(waiter, &block) if block_given?
206
- resp = waiter.wait(params.merge(snapshot_ids: [@id]))
214
+ resp = Aws::Plugins::UserAgent.feature('resource') do
215
+ waiter.wait(params.merge(snapshot_ids: [@id]))
216
+ end
207
217
  Snapshot.new({
208
218
  id: @id,
209
219
  data: resp.data.snapshots[0],
@@ -305,7 +315,9 @@ module Aws::EC2
305
315
  :retry
306
316
  end
307
317
  end
308
- Aws::Waiters::Waiter.new(options).wait({})
318
+ Aws::Plugins::UserAgent.feature('resource') do
319
+ Aws::Waiters::Waiter.new(options).wait({})
320
+ end
309
321
  end
310
322
 
311
323
  # @!group Actions
@@ -318,11 +330,11 @@ module Aws::EC2
318
330
  # destination_region: "String",
319
331
  # encrypted: false,
320
332
  # kms_key_id: "KmsKeyId",
321
- # presigned_url: "String",
333
+ # presigned_url: "CopySnapshotRequestPSU",
322
334
  # source_region: "String", # required
323
335
  # tag_specifications: [
324
336
  # {
325
- # 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
337
+ # 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
326
338
  # tags: [
327
339
  # {
328
340
  # key: "String",
@@ -426,7 +438,9 @@ module Aws::EC2
426
438
  # @return [Types::CopySnapshotResult]
427
439
  def copy(options = {})
428
440
  options = options.merge(source_snapshot_id: @id)
429
- resp = @client.copy_snapshot(options)
441
+ resp = Aws::Plugins::UserAgent.feature('resource') do
442
+ @client.copy_snapshot(options)
443
+ end
430
444
  resp.data
431
445
  end
432
446
 
@@ -455,7 +469,9 @@ module Aws::EC2
455
469
  def create_tags(options = {})
456
470
  batch = []
457
471
  options = Aws::Util.deep_merge(options, resources: [@id])
458
- resp = @client.create_tags(options)
472
+ resp = Aws::Plugins::UserAgent.feature('resource') do
473
+ @client.create_tags(options)
474
+ end
459
475
  options[:tags].each do |t|
460
476
  batch << Tag.new(
461
477
  resource_id: @id,
@@ -500,7 +516,9 @@ module Aws::EC2
500
516
  def delete_tags(options = {})
501
517
  batch = []
502
518
  options = Aws::Util.deep_merge(options, resources: [@id])
503
- resp = @client.delete_tags(options)
519
+ resp = Aws::Plugins::UserAgent.feature('resource') do
520
+ @client.delete_tags(options)
521
+ end
504
522
  options[:tags].each do |t|
505
523
  batch << Tag.new(
506
524
  resource_id: @id,
@@ -526,7 +544,9 @@ module Aws::EC2
526
544
  # @return [EmptyStructure]
527
545
  def delete(options = {})
528
546
  options = options.merge(snapshot_id: @id)
529
- resp = @client.delete_snapshot(options)
547
+ resp = Aws::Plugins::UserAgent.feature('resource') do
548
+ @client.delete_snapshot(options)
549
+ end
530
550
  resp.data
531
551
  end
532
552
 
@@ -547,7 +567,9 @@ module Aws::EC2
547
567
  # @return [Types::DescribeSnapshotAttributeResult]
548
568
  def describe_attribute(options = {})
549
569
  options = options.merge(snapshot_id: @id)
550
- resp = @client.describe_snapshot_attribute(options)
570
+ resp = Aws::Plugins::UserAgent.feature('resource') do
571
+ @client.describe_snapshot_attribute(options)
572
+ end
551
573
  resp.data
552
574
  end
553
575
 
@@ -594,7 +616,9 @@ module Aws::EC2
594
616
  # @return [EmptyStructure]
595
617
  def modify_attribute(options = {})
596
618
  options = options.merge(snapshot_id: @id)
597
- resp = @client.modify_snapshot_attribute(options)
619
+ resp = Aws::Plugins::UserAgent.feature('resource') do
620
+ @client.modify_snapshot_attribute(options)
621
+ end
598
622
  resp.data
599
623
  end
600
624
 
@@ -616,7 +640,9 @@ module Aws::EC2
616
640
  # @return [EmptyStructure]
617
641
  def reset_attribute(options = {})
618
642
  options = options.merge(snapshot_id: @id)
619
- resp = @client.reset_snapshot_attribute(options)
643
+ resp = Aws::Plugins::UserAgent.feature('resource') do
644
+ @client.reset_snapshot_attribute(options)
645
+ end
620
646
  resp.data
621
647
  end
622
648