aws-sdk-ec2 1.380.0 → 1.381.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-ec2/classic_address.rb +15 -5
- data/lib/aws-sdk-ec2/client.rb +6 -1
- data/lib/aws-sdk-ec2/customizations/instance.rb +3 -1
- data/lib/aws-sdk-ec2/customizations/resource.rb +3 -1
- data/lib/aws-sdk-ec2/dhcp_options.rb +18 -6
- data/lib/aws-sdk-ec2/image.rb +27 -9
- data/lib/aws-sdk-ec2/instance.rb +114 -38
- data/lib/aws-sdk-ec2/internet_gateway.rb +21 -7
- data/lib/aws-sdk-ec2/key_pair.rb +6 -2
- data/lib/aws-sdk-ec2/key_pair_info.rb +9 -3
- data/lib/aws-sdk-ec2/nat_gateway.rb +15 -5
- data/lib/aws-sdk-ec2/network_acl.rb +27 -9
- data/lib/aws-sdk-ec2/network_interface.rb +36 -12
- data/lib/aws-sdk-ec2/network_interface_association.rb +9 -3
- data/lib/aws-sdk-ec2/placement_group.rb +12 -4
- data/lib/aws-sdk-ec2/resource.rb +114 -38
- data/lib/aws-sdk-ec2/route.rb +9 -3
- data/lib/aws-sdk-ec2/route_table.rb +21 -7
- data/lib/aws-sdk-ec2/route_table_association.rb +9 -3
- data/lib/aws-sdk-ec2/security_group.rb +27 -9
- data/lib/aws-sdk-ec2/snapshot.rb +30 -10
- data/lib/aws-sdk-ec2/subnet.rb +30 -10
- data/lib/aws-sdk-ec2/tag.rb +12 -4
- data/lib/aws-sdk-ec2/volume.rb +39 -13
- data/lib/aws-sdk-ec2/vpc.rb +90 -30
- data/lib/aws-sdk-ec2/vpc_address.rb +12 -4
- data/lib/aws-sdk-ec2/vpc_peering_connection.rb +18 -6
- data/lib/aws-sdk-ec2.rb +1 -1
- metadata +4 -4
@@ -73,7 +73,9 @@ module Aws::EC2
|
|
73
73
|
#
|
74
74
|
# @return [self]
|
75
75
|
def load
|
76
|
-
resp =
|
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::
|
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 =
|
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
|
-
|
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 =
|
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 =
|
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 =
|
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::
|
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 =
|
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 =
|
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
|
@@ -91,7 +91,9 @@ module Aws::EC2
|
|
91
91
|
#
|
92
92
|
# @return [self]
|
93
93
|
def load
|
94
|
-
resp =
|
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::
|
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
|
@@ -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 =
|
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
|
|
@@ -433,7 +439,9 @@ module Aws::EC2
|
|
433
439
|
# @return [Types::AuthorizeSecurityGroupIngressResult]
|
434
440
|
def authorize_ingress(options = {})
|
435
441
|
options = options.merge(group_id: @id)
|
436
|
-
resp =
|
442
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
443
|
+
@client.authorize_security_group_ingress(options)
|
444
|
+
end
|
437
445
|
resp.data
|
438
446
|
end
|
439
447
|
|
@@ -462,7 +470,9 @@ module Aws::EC2
|
|
462
470
|
def create_tags(options = {})
|
463
471
|
batch = []
|
464
472
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
465
|
-
resp =
|
473
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
474
|
+
@client.create_tags(options)
|
475
|
+
end
|
466
476
|
options[:tags].each do |t|
|
467
477
|
batch << Tag.new(
|
468
478
|
resource_id: @id,
|
@@ -507,7 +517,9 @@ module Aws::EC2
|
|
507
517
|
def delete_tags(options = {})
|
508
518
|
batch = []
|
509
519
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
510
|
-
resp =
|
520
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
521
|
+
@client.delete_tags(options)
|
522
|
+
end
|
511
523
|
options[:tags].each do |t|
|
512
524
|
batch << Tag.new(
|
513
525
|
resource_id: @id,
|
@@ -539,7 +551,9 @@ module Aws::EC2
|
|
539
551
|
# @return [EmptyStructure]
|
540
552
|
def delete(options = {})
|
541
553
|
options = options.merge(group_id: @id)
|
542
|
-
resp =
|
554
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
555
|
+
@client.delete_security_group(options)
|
556
|
+
end
|
543
557
|
resp.data
|
544
558
|
end
|
545
559
|
|
@@ -620,7 +634,9 @@ module Aws::EC2
|
|
620
634
|
# @return [Types::RevokeSecurityGroupEgressResult]
|
621
635
|
def revoke_egress(options = {})
|
622
636
|
options = options.merge(group_id: @id)
|
623
|
-
resp =
|
637
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
638
|
+
@client.revoke_security_group_egress(options)
|
639
|
+
end
|
624
640
|
resp.data
|
625
641
|
end
|
626
642
|
|
@@ -726,7 +742,9 @@ module Aws::EC2
|
|
726
742
|
# @return [Types::RevokeSecurityGroupIngressResult]
|
727
743
|
def revoke_ingress(options = {})
|
728
744
|
options = options.merge(group_id: @id)
|
729
|
-
resp =
|
745
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
746
|
+
@client.revoke_security_group_ingress(options)
|
747
|
+
end
|
730
748
|
resp.data
|
731
749
|
end
|
732
750
|
|
data/lib/aws-sdk-ec2/snapshot.rb
CHANGED
@@ -172,7 +172,9 @@ module Aws::EC2
|
|
172
172
|
#
|
173
173
|
# @return [self]
|
174
174
|
def load
|
175
|
-
resp =
|
175
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
176
|
+
@client.describe_snapshots(snapshot_ids: [@id])
|
177
|
+
end
|
176
178
|
@data = resp.snapshots[0]
|
177
179
|
self
|
178
180
|
end
|
@@ -203,7 +205,9 @@ module Aws::EC2
|
|
203
205
|
options, params = separate_params_and_options(options)
|
204
206
|
waiter = Waiters::SnapshotCompleted.new(options)
|
205
207
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
206
|
-
resp =
|
208
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
209
|
+
waiter.wait(params.merge(snapshot_ids: [@id]))
|
210
|
+
end
|
207
211
|
Snapshot.new({
|
208
212
|
id: @id,
|
209
213
|
data: resp.data.snapshots[0],
|
@@ -305,7 +309,9 @@ module Aws::EC2
|
|
305
309
|
:retry
|
306
310
|
end
|
307
311
|
end
|
308
|
-
Aws::
|
312
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
313
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
314
|
+
end
|
309
315
|
end
|
310
316
|
|
311
317
|
# @!group Actions
|
@@ -426,7 +432,9 @@ module Aws::EC2
|
|
426
432
|
# @return [Types::CopySnapshotResult]
|
427
433
|
def copy(options = {})
|
428
434
|
options = options.merge(source_snapshot_id: @id)
|
429
|
-
resp =
|
435
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
436
|
+
@client.copy_snapshot(options)
|
437
|
+
end
|
430
438
|
resp.data
|
431
439
|
end
|
432
440
|
|
@@ -455,7 +463,9 @@ module Aws::EC2
|
|
455
463
|
def create_tags(options = {})
|
456
464
|
batch = []
|
457
465
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
458
|
-
resp =
|
466
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
467
|
+
@client.create_tags(options)
|
468
|
+
end
|
459
469
|
options[:tags].each do |t|
|
460
470
|
batch << Tag.new(
|
461
471
|
resource_id: @id,
|
@@ -500,7 +510,9 @@ module Aws::EC2
|
|
500
510
|
def delete_tags(options = {})
|
501
511
|
batch = []
|
502
512
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
503
|
-
resp =
|
513
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
514
|
+
@client.delete_tags(options)
|
515
|
+
end
|
504
516
|
options[:tags].each do |t|
|
505
517
|
batch << Tag.new(
|
506
518
|
resource_id: @id,
|
@@ -526,7 +538,9 @@ module Aws::EC2
|
|
526
538
|
# @return [EmptyStructure]
|
527
539
|
def delete(options = {})
|
528
540
|
options = options.merge(snapshot_id: @id)
|
529
|
-
resp =
|
541
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
542
|
+
@client.delete_snapshot(options)
|
543
|
+
end
|
530
544
|
resp.data
|
531
545
|
end
|
532
546
|
|
@@ -547,7 +561,9 @@ module Aws::EC2
|
|
547
561
|
# @return [Types::DescribeSnapshotAttributeResult]
|
548
562
|
def describe_attribute(options = {})
|
549
563
|
options = options.merge(snapshot_id: @id)
|
550
|
-
resp =
|
564
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
565
|
+
@client.describe_snapshot_attribute(options)
|
566
|
+
end
|
551
567
|
resp.data
|
552
568
|
end
|
553
569
|
|
@@ -594,7 +610,9 @@ module Aws::EC2
|
|
594
610
|
# @return [EmptyStructure]
|
595
611
|
def modify_attribute(options = {})
|
596
612
|
options = options.merge(snapshot_id: @id)
|
597
|
-
resp =
|
613
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
614
|
+
@client.modify_snapshot_attribute(options)
|
615
|
+
end
|
598
616
|
resp.data
|
599
617
|
end
|
600
618
|
|
@@ -616,7 +634,9 @@ module Aws::EC2
|
|
616
634
|
# @return [EmptyStructure]
|
617
635
|
def reset_attribute(options = {})
|
618
636
|
options = options.merge(snapshot_id: @id)
|
619
|
-
resp =
|
637
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
638
|
+
@client.reset_snapshot_attribute(options)
|
639
|
+
end
|
620
640
|
resp.data
|
621
641
|
end
|
622
642
|
|
data/lib/aws-sdk-ec2/subnet.rb
CHANGED
@@ -182,7 +182,9 @@ module Aws::EC2
|
|
182
182
|
#
|
183
183
|
# @return [self]
|
184
184
|
def load
|
185
|
-
resp =
|
185
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
186
|
+
@client.describe_subnets(subnet_ids: [@id])
|
187
|
+
end
|
186
188
|
@data = resp.subnets[0]
|
187
189
|
self
|
188
190
|
end
|
@@ -297,7 +299,9 @@ module Aws::EC2
|
|
297
299
|
:retry
|
298
300
|
end
|
299
301
|
end
|
300
|
-
Aws::
|
302
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
303
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
304
|
+
end
|
301
305
|
end
|
302
306
|
|
303
307
|
# @!group Actions
|
@@ -821,7 +825,9 @@ module Aws::EC2
|
|
821
825
|
def create_instances(options = {})
|
822
826
|
batch = []
|
823
827
|
options = options.merge(subnet_id: @id)
|
824
|
-
resp =
|
828
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
829
|
+
@client.run_instances(options)
|
830
|
+
end
|
825
831
|
resp.data.instances.each do |i|
|
826
832
|
batch << Instance.new(
|
827
833
|
id: i.instance_id,
|
@@ -970,7 +976,9 @@ module Aws::EC2
|
|
970
976
|
# @return [NetworkInterface]
|
971
977
|
def create_network_interface(options = {})
|
972
978
|
options = options.merge(subnet_id: @id)
|
973
|
-
resp =
|
979
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
980
|
+
@client.create_network_interface(options)
|
981
|
+
end
|
974
982
|
NetworkInterface.new(
|
975
983
|
id: resp.data.network_interface.network_interface_id,
|
976
984
|
data: resp.data.network_interface,
|
@@ -1003,7 +1011,9 @@ module Aws::EC2
|
|
1003
1011
|
def create_tags(options = {})
|
1004
1012
|
batch = []
|
1005
1013
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
1006
|
-
resp =
|
1014
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1015
|
+
@client.create_tags(options)
|
1016
|
+
end
|
1007
1017
|
options[:tags].each do |t|
|
1008
1018
|
batch << Tag.new(
|
1009
1019
|
resource_id: @id,
|
@@ -1048,7 +1058,9 @@ module Aws::EC2
|
|
1048
1058
|
def delete_tags(options = {})
|
1049
1059
|
batch = []
|
1050
1060
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
1051
|
-
resp =
|
1061
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1062
|
+
@client.delete_tags(options)
|
1063
|
+
end
|
1052
1064
|
options[:tags].each do |t|
|
1053
1065
|
batch << Tag.new(
|
1054
1066
|
resource_id: @id,
|
@@ -1074,7 +1086,9 @@ module Aws::EC2
|
|
1074
1086
|
# @return [EmptyStructure]
|
1075
1087
|
def delete(options = {})
|
1076
1088
|
options = options.merge(subnet_id: @id)
|
1077
|
-
resp =
|
1089
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1090
|
+
@client.delete_subnet(options)
|
1091
|
+
end
|
1078
1092
|
resp.data
|
1079
1093
|
end
|
1080
1094
|
|
@@ -1389,7 +1403,9 @@ module Aws::EC2
|
|
1389
1403
|
name: "subnet-id",
|
1390
1404
|
values: [@id]
|
1391
1405
|
}])
|
1392
|
-
resp =
|
1406
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1407
|
+
@client.describe_instances(options)
|
1408
|
+
end
|
1393
1409
|
resp.each_page do |page|
|
1394
1410
|
batch = []
|
1395
1411
|
page.data.reservations.each do |r|
|
@@ -1455,7 +1471,9 @@ module Aws::EC2
|
|
1455
1471
|
name: "subnet-id",
|
1456
1472
|
values: [@id]
|
1457
1473
|
}])
|
1458
|
-
resp =
|
1474
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1475
|
+
@client.describe_nat_gateways(options)
|
1476
|
+
end
|
1459
1477
|
resp.each_page do |page|
|
1460
1478
|
batch = []
|
1461
1479
|
page.data.nat_gateways.each do |n|
|
@@ -1617,7 +1635,9 @@ module Aws::EC2
|
|
1617
1635
|
name: "subnet-id",
|
1618
1636
|
values: [@id]
|
1619
1637
|
}])
|
1620
|
-
resp =
|
1638
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
1639
|
+
@client.describe_network_interfaces(options)
|
1640
|
+
end
|
1621
1641
|
resp.each_page do |page|
|
1622
1642
|
batch = []
|
1623
1643
|
page.data.network_interfaces.each do |n|
|
data/lib/aws-sdk-ec2/tag.rb
CHANGED
@@ -70,7 +70,8 @@ module Aws::EC2
|
|
70
70
|
#
|
71
71
|
# @return [self]
|
72
72
|
def load
|
73
|
-
resp =
|
73
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
74
|
+
@client.describe_tags(filters: [
|
74
75
|
{
|
75
76
|
name: "key",
|
76
77
|
values: [@key]
|
@@ -80,6 +81,7 @@ module Aws::EC2
|
|
80
81
|
values: [@value]
|
81
82
|
}
|
82
83
|
])
|
84
|
+
end
|
83
85
|
@data = resp.tags[0]
|
84
86
|
self
|
85
87
|
end
|
@@ -194,7 +196,9 @@ module Aws::EC2
|
|
194
196
|
:retry
|
195
197
|
end
|
196
198
|
end
|
197
|
-
Aws::
|
199
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
200
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
201
|
+
end
|
198
202
|
end
|
199
203
|
|
200
204
|
# @!group Actions
|
@@ -237,7 +241,9 @@ module Aws::EC2
|
|
237
241
|
value: @value
|
238
242
|
}]
|
239
243
|
)
|
240
|
-
resp =
|
244
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
245
|
+
@client.delete_tags(options)
|
246
|
+
end
|
241
247
|
resp.data
|
242
248
|
end
|
243
249
|
|
@@ -315,7 +321,9 @@ module Aws::EC2
|
|
315
321
|
value: item.value
|
316
322
|
}
|
317
323
|
end
|
318
|
-
|
324
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
325
|
+
batch[0].client.delete_tags(params)
|
326
|
+
end
|
319
327
|
end
|
320
328
|
nil
|
321
329
|
end
|
data/lib/aws-sdk-ec2/volume.rb
CHANGED
@@ -144,7 +144,9 @@ module Aws::EC2
|
|
144
144
|
#
|
145
145
|
# @return [self]
|
146
146
|
def load
|
147
|
-
resp =
|
147
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
148
|
+
@client.describe_volumes(volume_ids: [@id])
|
149
|
+
end
|
148
150
|
@data = resp.volumes[0]
|
149
151
|
self
|
150
152
|
end
|
@@ -259,7 +261,9 @@ module Aws::EC2
|
|
259
261
|
:retry
|
260
262
|
end
|
261
263
|
end
|
262
|
-
Aws::
|
264
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
265
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
266
|
+
end
|
263
267
|
end
|
264
268
|
|
265
269
|
# @!group Actions
|
@@ -284,7 +288,9 @@ module Aws::EC2
|
|
284
288
|
# @return [Types::VolumeAttachment]
|
285
289
|
def attach_to_instance(options = {})
|
286
290
|
options = options.merge(volume_id: @id)
|
287
|
-
resp =
|
291
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
292
|
+
@client.attach_volume(options)
|
293
|
+
end
|
288
294
|
resp.data
|
289
295
|
end
|
290
296
|
|
@@ -340,7 +346,9 @@ module Aws::EC2
|
|
340
346
|
# @return [Snapshot]
|
341
347
|
def create_snapshot(options = {})
|
342
348
|
options = options.merge(volume_id: @id)
|
343
|
-
resp =
|
349
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
350
|
+
@client.create_snapshot(options)
|
351
|
+
end
|
344
352
|
Snapshot.new(
|
345
353
|
id: resp.data.snapshot_id,
|
346
354
|
data: resp.data,
|
@@ -373,7 +381,9 @@ module Aws::EC2
|
|
373
381
|
def create_tags(options = {})
|
374
382
|
batch = []
|
375
383
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
376
|
-
resp =
|
384
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
385
|
+
@client.create_tags(options)
|
386
|
+
end
|
377
387
|
options[:tags].each do |t|
|
378
388
|
batch << Tag.new(
|
379
389
|
resource_id: @id,
|
@@ -418,7 +428,9 @@ module Aws::EC2
|
|
418
428
|
def delete_tags(options = {})
|
419
429
|
batch = []
|
420
430
|
options = Aws::Util.deep_merge(options, resources: [@id])
|
421
|
-
resp =
|
431
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
432
|
+
@client.delete_tags(options)
|
433
|
+
end
|
422
434
|
options[:tags].each do |t|
|
423
435
|
batch << Tag.new(
|
424
436
|
resource_id: @id,
|
@@ -444,7 +456,9 @@ module Aws::EC2
|
|
444
456
|
# @return [EmptyStructure]
|
445
457
|
def delete(options = {})
|
446
458
|
options = options.merge(volume_id: @id)
|
447
|
-
resp =
|
459
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
460
|
+
@client.delete_volume(options)
|
461
|
+
end
|
448
462
|
resp.data
|
449
463
|
end
|
450
464
|
|
@@ -465,7 +479,9 @@ module Aws::EC2
|
|
465
479
|
# @return [Types::DescribeVolumeAttributeResult]
|
466
480
|
def describe_attribute(options = {})
|
467
481
|
options = options.merge(volume_id: @id)
|
468
|
-
resp =
|
482
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
483
|
+
@client.describe_volume_attribute(options)
|
484
|
+
end
|
469
485
|
resp.data
|
470
486
|
end
|
471
487
|
|
@@ -540,7 +556,9 @@ module Aws::EC2
|
|
540
556
|
# @return [Types::DescribeVolumeStatusResult]
|
541
557
|
def describe_status(options = {})
|
542
558
|
options = Aws::Util.deep_merge(options, volume_ids: [@id])
|
543
|
-
resp =
|
559
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
560
|
+
@client.describe_volume_status(options)
|
561
|
+
end
|
544
562
|
resp.data
|
545
563
|
end
|
546
564
|
|
@@ -575,7 +593,9 @@ module Aws::EC2
|
|
575
593
|
# @return [Types::VolumeAttachment]
|
576
594
|
def detach_from_instance(options = {})
|
577
595
|
options = options.merge(volume_id: @id)
|
578
|
-
resp =
|
596
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
597
|
+
@client.detach_volume(options)
|
598
|
+
end
|
579
599
|
resp.data
|
580
600
|
end
|
581
601
|
|
@@ -593,7 +613,9 @@ module Aws::EC2
|
|
593
613
|
# @return [EmptyStructure]
|
594
614
|
def enable_io(options = {})
|
595
615
|
options = options.merge(volume_id: @id)
|
596
|
-
resp =
|
616
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
617
|
+
@client.enable_volume_io(options)
|
618
|
+
end
|
597
619
|
resp.data
|
598
620
|
end
|
599
621
|
|
@@ -617,7 +639,9 @@ module Aws::EC2
|
|
617
639
|
# @return [EmptyStructure]
|
618
640
|
def modify_attribute(options = {})
|
619
641
|
options = options.merge(volume_id: @id)
|
620
|
-
resp =
|
642
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
643
|
+
@client.modify_volume_attribute(options)
|
644
|
+
end
|
621
645
|
resp.data
|
622
646
|
end
|
623
647
|
|
@@ -704,7 +728,9 @@ module Aws::EC2
|
|
704
728
|
name: "volume-id",
|
705
729
|
values: [@id]
|
706
730
|
}])
|
707
|
-
resp =
|
731
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
732
|
+
@client.describe_snapshots(options)
|
733
|
+
end
|
708
734
|
resp.each_page do |page|
|
709
735
|
batch = []
|
710
736
|
page.data.snapshots.each do |s|
|