aws-sdk-ec2 1.379.0 → 1.381.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -68,7 +68,9 @@ module Aws::EC2
68
68
  #
69
69
  # @return [self]
70
70
  def load
71
- resp = @client.describe_internet_gateways(internet_gateway_ids: [@id])
71
+ resp = Aws::Plugins::UserAgent.feature('resource') do
72
+ @client.describe_internet_gateways(internet_gateway_ids: [@id])
73
+ end
72
74
  @data = resp.internet_gateways[0]
73
75
  self
74
76
  end
@@ -183,7 +185,9 @@ module Aws::EC2
183
185
  :retry
184
186
  end
185
187
  end
186
- Aws::Waiters::Waiter.new(options).wait({})
188
+ Aws::Plugins::UserAgent.feature('resource') do
189
+ Aws::Waiters::Waiter.new(options).wait({})
190
+ end
187
191
  end
188
192
 
189
193
  # @!group Actions
@@ -205,7 +209,9 @@ module Aws::EC2
205
209
  # @return [EmptyStructure]
206
210
  def attach_to_vpc(options = {})
207
211
  options = options.merge(internet_gateway_id: @id)
208
- resp = @client.attach_internet_gateway(options)
212
+ resp = Aws::Plugins::UserAgent.feature('resource') do
213
+ @client.attach_internet_gateway(options)
214
+ end
209
215
  resp.data
210
216
  end
211
217
 
@@ -234,7 +240,9 @@ module Aws::EC2
234
240
  def create_tags(options = {})
235
241
  batch = []
236
242
  options = Aws::Util.deep_merge(options, resources: [@id])
237
- resp = @client.create_tags(options)
243
+ resp = Aws::Plugins::UserAgent.feature('resource') do
244
+ @client.create_tags(options)
245
+ end
238
246
  options[:tags].each do |t|
239
247
  batch << Tag.new(
240
248
  resource_id: @id,
@@ -279,7 +287,9 @@ module Aws::EC2
279
287
  def delete_tags(options = {})
280
288
  batch = []
281
289
  options = Aws::Util.deep_merge(options, resources: [@id])
282
- resp = @client.delete_tags(options)
290
+ resp = Aws::Plugins::UserAgent.feature('resource') do
291
+ @client.delete_tags(options)
292
+ end
283
293
  options[:tags].each do |t|
284
294
  batch << Tag.new(
285
295
  resource_id: @id,
@@ -305,7 +315,9 @@ module Aws::EC2
305
315
  # @return [EmptyStructure]
306
316
  def delete(options = {})
307
317
  options = options.merge(internet_gateway_id: @id)
308
- resp = @client.delete_internet_gateway(options)
318
+ resp = Aws::Plugins::UserAgent.feature('resource') do
319
+ @client.delete_internet_gateway(options)
320
+ end
309
321
  resp.data
310
322
  end
311
323
 
@@ -326,7 +338,9 @@ module Aws::EC2
326
338
  # @return [EmptyStructure]
327
339
  def detach_from_vpc(options = {})
328
340
  options = options.merge(internet_gateway_id: @id)
329
- resp = @client.detach_internet_gateway(options)
341
+ resp = Aws::Plugins::UserAgent.feature('resource') do
342
+ @client.detach_internet_gateway(options)
343
+ end
330
344
  resp.data
331
345
  end
332
346
 
@@ -188,7 +188,9 @@ module Aws::EC2
188
188
  :retry
189
189
  end
190
190
  end
191
- Aws::Waiters::Waiter.new(options).wait({})
191
+ Aws::Plugins::UserAgent.feature('resource') do
192
+ Aws::Waiters::Waiter.new(options).wait({})
193
+ end
192
194
  end
193
195
 
194
196
  # @!group Actions
@@ -210,7 +212,9 @@ module Aws::EC2
210
212
  # @return [EmptyStructure]
211
213
  def delete(options = {})
212
214
  options = options.merge(key_name: @name)
213
- resp = @client.delete_key_pair(options)
215
+ resp = Aws::Plugins::UserAgent.feature('resource') do
216
+ @client.delete_key_pair(options)
217
+ end
214
218
  resp.data
215
219
  end
216
220
 
@@ -116,7 +116,9 @@ module Aws::EC2
116
116
  #
117
117
  # @return [self]
118
118
  def load
119
- resp = @client.describe_key_pairs(key_names: [@name])
119
+ resp = Aws::Plugins::UserAgent.feature('resource') do
120
+ @client.describe_key_pairs(key_names: [@name])
121
+ end
120
122
  @data = resp.key_pairs[0]
121
123
  self
122
124
  end
@@ -231,7 +233,9 @@ module Aws::EC2
231
233
  :retry
232
234
  end
233
235
  end
234
- Aws::Waiters::Waiter.new(options).wait({})
236
+ Aws::Plugins::UserAgent.feature('resource') do
237
+ Aws::Waiters::Waiter.new(options).wait({})
238
+ end
235
239
  end
236
240
 
237
241
  # @!group Actions
@@ -253,7 +257,9 @@ module Aws::EC2
253
257
  # @return [EmptyStructure]
254
258
  def delete(options = {})
255
259
  options = options.merge(key_name: @name)
256
- resp = @client.delete_key_pair(options)
260
+ resp = Aws::Plugins::UserAgent.feature('resource') do
261
+ @client.delete_key_pair(options)
262
+ end
257
263
  resp.data
258
264
  end
259
265
 
@@ -163,7 +163,9 @@ module Aws::EC2
163
163
  #
164
164
  # @return [self]
165
165
  def load
166
- resp = @client.describe_nat_gateways(nat_gateway_ids: [@id])
166
+ resp = Aws::Plugins::UserAgent.feature('resource') do
167
+ @client.describe_nat_gateways(nat_gateway_ids: [@id])
168
+ end
167
169
  @data = resp.nat_gateways[0]
168
170
  self
169
171
  end
@@ -278,7 +280,9 @@ module Aws::EC2
278
280
  :retry
279
281
  end
280
282
  end
281
- Aws::Waiters::Waiter.new(options).wait({})
283
+ Aws::Plugins::UserAgent.feature('resource') do
284
+ Aws::Waiters::Waiter.new(options).wait({})
285
+ end
282
286
  end
283
287
 
284
288
  # @!group Actions
@@ -308,7 +312,9 @@ module Aws::EC2
308
312
  def create_tags(options = {})
309
313
  batch = []
310
314
  options = Aws::Util.deep_merge(options, resources: [@id])
311
- resp = @client.create_tags(options)
315
+ resp = Aws::Plugins::UserAgent.feature('resource') do
316
+ @client.create_tags(options)
317
+ end
312
318
  options[:tags].each do |t|
313
319
  batch << Tag.new(
314
320
  resource_id: @id,
@@ -353,7 +359,9 @@ module Aws::EC2
353
359
  def delete_tags(options = {})
354
360
  batch = []
355
361
  options = Aws::Util.deep_merge(options, resources: [@id])
356
- resp = @client.delete_tags(options)
362
+ resp = Aws::Plugins::UserAgent.feature('resource') do
363
+ @client.delete_tags(options)
364
+ end
357
365
  options[:tags].each do |t|
358
366
  batch << Tag.new(
359
367
  resource_id: @id,
@@ -379,7 +387,9 @@ module Aws::EC2
379
387
  # @return [Types::DeleteNatGatewayResult]
380
388
  def delete(options = {})
381
389
  options = options.merge(nat_gateway_id: @id)
382
- resp = @client.delete_nat_gateway(options)
390
+ resp = Aws::Plugins::UserAgent.feature('resource') do
391
+ @client.delete_nat_gateway(options)
392
+ end
383
393
  resp.data
384
394
  end
385
395
 
@@ -85,7 +85,9 @@ module Aws::EC2
85
85
  #
86
86
  # @return [self]
87
87
  def load
88
- resp = @client.describe_network_acls(network_acl_ids: [@id])
88
+ resp = Aws::Plugins::UserAgent.feature('resource') do
89
+ @client.describe_network_acls(network_acl_ids: [@id])
90
+ end
89
91
  @data = resp.network_acls[0]
90
92
  self
91
93
  end
@@ -200,7 +202,9 @@ module Aws::EC2
200
202
  :retry
201
203
  end
202
204
  end
203
- Aws::Waiters::Waiter.new(options).wait({})
205
+ Aws::Plugins::UserAgent.feature('resource') do
206
+ Aws::Waiters::Waiter.new(options).wait({})
207
+ end
204
208
  end
205
209
 
206
210
  # @!group Actions
@@ -268,7 +272,9 @@ module Aws::EC2
268
272
  # @return [EmptyStructure]
269
273
  def create_entry(options = {})
270
274
  options = options.merge(network_acl_id: @id)
271
- resp = @client.create_network_acl_entry(options)
275
+ resp = Aws::Plugins::UserAgent.feature('resource') do
276
+ @client.create_network_acl_entry(options)
277
+ end
272
278
  resp.data
273
279
  end
274
280
 
@@ -297,7 +303,9 @@ module Aws::EC2
297
303
  def create_tags(options = {})
298
304
  batch = []
299
305
  options = Aws::Util.deep_merge(options, resources: [@id])
300
- resp = @client.create_tags(options)
306
+ resp = Aws::Plugins::UserAgent.feature('resource') do
307
+ @client.create_tags(options)
308
+ end
301
309
  options[:tags].each do |t|
302
310
  batch << Tag.new(
303
311
  resource_id: @id,
@@ -342,7 +350,9 @@ module Aws::EC2
342
350
  def delete_tags(options = {})
343
351
  batch = []
344
352
  options = Aws::Util.deep_merge(options, resources: [@id])
345
- resp = @client.delete_tags(options)
353
+ resp = Aws::Plugins::UserAgent.feature('resource') do
354
+ @client.delete_tags(options)
355
+ end
346
356
  options[:tags].each do |t|
347
357
  batch << Tag.new(
348
358
  resource_id: @id,
@@ -368,7 +378,9 @@ module Aws::EC2
368
378
  # @return [EmptyStructure]
369
379
  def delete(options = {})
370
380
  options = options.merge(network_acl_id: @id)
371
- resp = @client.delete_network_acl(options)
381
+ resp = Aws::Plugins::UserAgent.feature('resource') do
382
+ @client.delete_network_acl(options)
383
+ end
372
384
  resp.data
373
385
  end
374
386
 
@@ -392,7 +404,9 @@ module Aws::EC2
392
404
  # @return [EmptyStructure]
393
405
  def delete_entry(options = {})
394
406
  options = options.merge(network_acl_id: @id)
395
- resp = @client.delete_network_acl_entry(options)
407
+ resp = Aws::Plugins::UserAgent.feature('resource') do
408
+ @client.delete_network_acl_entry(options)
409
+ end
396
410
  resp.data
397
411
  end
398
412
 
@@ -414,7 +428,9 @@ module Aws::EC2
414
428
  # @return [Types::ReplaceNetworkAclAssociationResult]
415
429
  def replace_association(options = {})
416
430
  options = options.merge(network_acl_id: @id)
417
- resp = @client.replace_network_acl_association(options)
431
+ resp = Aws::Plugins::UserAgent.feature('resource') do
432
+ @client.replace_network_acl_association(options)
433
+ end
418
434
  resp.data
419
435
  end
420
436
 
@@ -476,7 +492,9 @@ module Aws::EC2
476
492
  # @return [EmptyStructure]
477
493
  def replace_entry(options = {})
478
494
  options = options.merge(network_acl_id: @id)
479
- resp = @client.replace_network_acl_entry(options)
495
+ resp = Aws::Plugins::UserAgent.feature('resource') do
496
+ @client.replace_network_acl_entry(options)
497
+ end
480
498
  resp.data
481
499
  end
482
500
 
@@ -202,7 +202,9 @@ module Aws::EC2
202
202
  #
203
203
  # @return [self]
204
204
  def load
205
- resp = @client.describe_network_interfaces(network_interface_ids: [@id])
205
+ resp = Aws::Plugins::UserAgent.feature('resource') do
206
+ @client.describe_network_interfaces(network_interface_ids: [@id])
207
+ end
206
208
  @data = resp.network_interfaces[0]
207
209
  self
208
210
  end
@@ -317,7 +319,9 @@ module Aws::EC2
317
319
  :retry
318
320
  end
319
321
  end
320
- Aws::Waiters::Waiter.new(options).wait({})
322
+ Aws::Plugins::UserAgent.feature('resource') do
323
+ Aws::Waiters::Waiter.new(options).wait({})
324
+ end
321
325
  end
322
326
 
323
327
  # @!group Actions
@@ -357,7 +361,9 @@ module Aws::EC2
357
361
  # @return [Types::AssignPrivateIpAddressesResult]
358
362
  def assign_private_ip_addresses(options = {})
359
363
  options = options.merge(network_interface_id: @id)
360
- resp = @client.assign_private_ip_addresses(options)
364
+ resp = Aws::Plugins::UserAgent.feature('resource') do
365
+ @client.assign_private_ip_addresses(options)
366
+ end
361
367
  resp.data
362
368
  end
363
369
 
@@ -395,7 +401,9 @@ module Aws::EC2
395
401
  # @return [Types::AttachNetworkInterfaceResult]
396
402
  def attach(options = {})
397
403
  options = options.merge(network_interface_id: @id)
398
- resp = @client.attach_network_interface(options)
404
+ resp = Aws::Plugins::UserAgent.feature('resource') do
405
+ @client.attach_network_interface(options)
406
+ end
399
407
  resp.data
400
408
  end
401
409
 
@@ -424,7 +432,9 @@ module Aws::EC2
424
432
  def create_tags(options = {})
425
433
  batch = []
426
434
  options = Aws::Util.deep_merge(options, resources: [@id])
427
- resp = @client.create_tags(options)
435
+ resp = Aws::Plugins::UserAgent.feature('resource') do
436
+ @client.create_tags(options)
437
+ end
428
438
  options[:tags].each do |t|
429
439
  batch << Tag.new(
430
440
  resource_id: @id,
@@ -469,7 +479,9 @@ module Aws::EC2
469
479
  def delete_tags(options = {})
470
480
  batch = []
471
481
  options = Aws::Util.deep_merge(options, resources: [@id])
472
- resp = @client.delete_tags(options)
482
+ resp = Aws::Plugins::UserAgent.feature('resource') do
483
+ @client.delete_tags(options)
484
+ end
473
485
  options[:tags].each do |t|
474
486
  batch << Tag.new(
475
487
  resource_id: @id,
@@ -495,7 +507,9 @@ module Aws::EC2
495
507
  # @return [EmptyStructure]
496
508
  def delete(options = {})
497
509
  options = options.merge(network_interface_id: @id)
498
- resp = @client.delete_network_interface(options)
510
+ resp = Aws::Plugins::UserAgent.feature('resource') do
511
+ @client.delete_network_interface(options)
512
+ end
499
513
  resp.data
500
514
  end
501
515
 
@@ -516,7 +530,9 @@ module Aws::EC2
516
530
  # @return [Types::DescribeNetworkInterfaceAttributeResult]
517
531
  def describe_attribute(options = {})
518
532
  options = options.merge(network_interface_id: @id)
519
- resp = @client.describe_network_interface_attribute(options)
533
+ resp = Aws::Plugins::UserAgent.feature('resource') do
534
+ @client.describe_network_interface_attribute(options)
535
+ end
520
536
  resp.data
521
537
  end
522
538
 
@@ -557,7 +573,9 @@ module Aws::EC2
557
573
  # @return [EmptyStructure]
558
574
  def detach(options = {})
559
575
  options = options.merge(attachment_id: data[:attachment][:attachment_id])
560
- resp = @client.detach_network_interface(options)
576
+ resp = Aws::Plugins::UserAgent.feature('resource') do
577
+ @client.detach_network_interface(options)
578
+ end
561
579
  resp.data
562
580
  end
563
581
 
@@ -611,7 +629,9 @@ module Aws::EC2
611
629
  # @return [EmptyStructure]
612
630
  def modify_attribute(options = {})
613
631
  options = options.merge(network_interface_id: @id)
614
- resp = @client.modify_network_interface_attribute(options)
632
+ resp = Aws::Plugins::UserAgent.feature('resource') do
633
+ @client.modify_network_interface_attribute(options)
634
+ end
615
635
  resp.data
616
636
  end
617
637
 
@@ -632,7 +652,9 @@ module Aws::EC2
632
652
  # @return [EmptyStructure]
633
653
  def reset_attribute(options = {})
634
654
  options = options.merge(network_interface_id: @id)
635
- resp = @client.reset_network_interface_attribute(options)
655
+ resp = Aws::Plugins::UserAgent.feature('resource') do
656
+ @client.reset_network_interface_attribute(options)
657
+ end
636
658
  resp.data
637
659
  end
638
660
 
@@ -652,7 +674,9 @@ module Aws::EC2
652
674
  # @return [EmptyStructure]
653
675
  def unassign_private_ip_addresses(options = {})
654
676
  options = options.merge(network_interface_id: @id)
655
- resp = @client.unassign_private_ip_addresses(options)
677
+ resp = Aws::Plugins::UserAgent.feature('resource') do
678
+ @client.unassign_private_ip_addresses(options)
679
+ end
656
680
  resp.data
657
681
  end
658
682
 
@@ -79,10 +79,12 @@ module Aws::EC2
79
79
  #
80
80
  # @return [self]
81
81
  def load
82
- resp = @client.describe_network_interfaces(filters: [{
82
+ resp = Aws::Plugins::UserAgent.feature('resource') do
83
+ @client.describe_network_interfaces(filters: [{
83
84
  name: "association.association-id",
84
85
  values: [@id]
85
86
  }])
87
+ end
86
88
  @data = resp.network_interfaces[0].association
87
89
  self
88
90
  end
@@ -197,7 +199,9 @@ module Aws::EC2
197
199
  :retry
198
200
  end
199
201
  end
200
- Aws::Waiters::Waiter.new(options).wait({})
202
+ Aws::Plugins::UserAgent.feature('resource') do
203
+ Aws::Waiters::Waiter.new(options).wait({})
204
+ end
201
205
  end
202
206
 
203
207
  # @!group Actions
@@ -219,7 +223,9 @@ module Aws::EC2
219
223
  # @return [EmptyStructure]
220
224
  def delete(options = {})
221
225
  options = options.merge(association_id: @id)
222
- resp = @client.disassociate_address(options)
226
+ resp = Aws::Plugins::UserAgent.feature('resource') do
227
+ @client.disassociate_address(options)
228
+ end
223
229
  resp.data
224
230
  end
225
231
 
@@ -93,7 +93,9 @@ module Aws::EC2
93
93
  #
94
94
  # @return [self]
95
95
  def load
96
- resp = @client.describe_placement_groups(group_names: [@name])
96
+ resp = Aws::Plugins::UserAgent.feature('resource') do
97
+ @client.describe_placement_groups(group_names: [@name])
98
+ end
97
99
  @data = resp.placement_groups[0]
98
100
  self
99
101
  end
@@ -208,7 +210,9 @@ module Aws::EC2
208
210
  :retry
209
211
  end
210
212
  end
211
- Aws::Waiters::Waiter.new(options).wait({})
213
+ Aws::Plugins::UserAgent.feature('resource') do
214
+ Aws::Waiters::Waiter.new(options).wait({})
215
+ end
212
216
  end
213
217
 
214
218
  # @!group Actions
@@ -227,7 +231,9 @@ module Aws::EC2
227
231
  # @return [EmptyStructure]
228
232
  def delete(options = {})
229
233
  options = options.merge(group_name: @name)
230
- resp = @client.delete_placement_group(options)
234
+ resp = Aws::Plugins::UserAgent.feature('resource') do
235
+ @client.delete_placement_group(options)
236
+ end
231
237
  resp.data
232
238
  end
233
239
 
@@ -542,7 +548,9 @@ module Aws::EC2
542
548
  name: "placement-group-name",
543
549
  values: [@name]
544
550
  }])
545
- resp = @client.describe_instances(options)
551
+ resp = Aws::Plugins::UserAgent.feature('resource') do
552
+ @client.describe_instances(options)
553
+ end
546
554
  resp.each_page do |page|
547
555
  batch = []
548
556
  page.data.reservations.each do |r|