File tree 4 files changed +40
-0
lines changed
4 files changed +40
-0
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/python
2
+
3
+ import boto3
4
+
5
+ ec2 = boto3 .resource ('ec2' )
6
+ volume_iterator = ec2 .volumes .all ()
7
+
8
+
9
+ available_volumes = []
10
+
11
+ for eachvolume in volume_iterator :
12
+ if eachvolume .state == "available" :
13
+ available_volumes .append (eachvolume .id )
14
+
15
+
16
+ print ("| Available Volumes |" )
17
+ print ('-' * 19 )
18
+
19
+ for vol in available_volumes :
20
+ print (vol )
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/python
2
+
3
+ import boto3
4
+
5
+ ec2 = boto3 .resource ('ec2' )
6
+ volume_iterator = ec2 .volumes .all ()
7
+
8
+
9
+ available_volumes = []
10
+
11
+ for eachvolume in volume_iterator :
12
+ if eachvolume .state == "available" :
13
+ available_volumes .append (eachvolume .id )
14
+
15
+
16
+ print ("| Available Volumes |" )
17
+ print ('-' * 19 )
18
+
19
+ for vol in available_volumes :
20
+ print (vol )
You can’t perform that action at this time.
0 commit comments