awsrm 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80463d38e7c8d0ddc1a841ac1bd7a2c22141c982
4
- data.tar.gz: b647296102bddfe1632d7c43896131ba5ffae5df
3
+ metadata.gz: fdb234bc497f55013b98bea559390ecef21d4386
4
+ data.tar.gz: c24052f35f10cc18dd15199b0594dbf1e90a9fce
5
5
  SHA512:
6
- metadata.gz: 13e85c9e722ac99e105f9ae2b975e29f9ce8c3efd92e3bf349f9f245ab54f7e65b386ff5afe57d01cf0e429860a6a3807d8f60c211bfd81bf03bae2ac9eead78
7
- data.tar.gz: 9f21061263c90ec4da917bdfaca23ff951e3c4f5c0c7cff00dc2e80ed45adfad862723450274b67db67ef1bf2689400a85e15d24918e31c60eb0c7c441632cf0
6
+ metadata.gz: 6f95786cc4e005744fcf2a09cb05d1f284a879da8e34763157fedf614002b5fbc95360cea64d8e56048080830926e53766c38d4e3694d0f5afa11526df55cb1a
7
+ data.tar.gz: 3dc6360f0d025ca8e86114e200242932918862531c692e89e2ef0943a97dd6c5b87d51472bf02e6aa604fa7a02ff279e947ce7972972355da24eacfbc2e98abe
data/doc/resources.md CHANGED
@@ -6,6 +6,7 @@
6
6
  | [AutoscalingGroup](#autoscaling_group)
7
7
  | [Ec2](#ec2)
8
8
  | [Elb](#elb)
9
+ | [NetworkAcl](#network_acl)
9
10
  | [RouteTable](#route_table)
10
11
  | [Subnet](#subnet)
11
12
  | [Vpc](#vpc)
@@ -89,6 +90,18 @@
89
90
  | vpc | [`#<Proc>`](https://github.com/k1LoW/awsrm/blob/master/lib/awsrm/resources/elb.rb) |
90
91
 
91
92
 
93
+ ## <a name="network_acl">Awsrm::NetworkAcl</a>
94
+
95
+ ### Filter
96
+
97
+ | key | replaced filter |
98
+ | - | - |
99
+ | id | `network-acl-id` |
100
+ | name | `tag:Name` |
101
+ | vpc_id | `vpc-id` |
102
+ | vpc | [`#<Proc>`](https://github.com/k1LoW/awsrm/blob/master/lib/awsrm/resources/network_acl.rb) |
103
+
104
+
92
105
  ## <a name="route_table">Awsrm::RouteTable</a>
93
106
 
94
107
  ### Filter
@@ -0,0 +1,27 @@
1
+ module Awsrm
2
+ class NetworkAcl < Awsrm::Resource
3
+ FILTER_MAP = {
4
+ id: 'network-acl-id',
5
+ name: 'tag:Name',
6
+ vpc_id: 'vpc-id',
7
+ vpc: ->(value) { { name: 'vpc-id', values: [Awsrm::Vpc.one(name: value).id] } }
8
+ }.freeze
9
+
10
+ class << self
11
+ def all(params)
12
+ res = ec2_client.describe_network_acls(
13
+ filters: filters(params)
14
+ )
15
+ res.network_acls.map do |route|
16
+ NetworkAclReader.new(route)
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ class NetworkAclReader < Awsrm::ResourceReader
23
+ def id
24
+ @resource.network_acl_id
25
+ end
26
+ end
27
+ end
data/lib/awsrm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Awsrm
2
- VERSION = '0.5.2'.freeze
2
+ VERSION = '0.6.0'.freeze
3
3
  end
data/lib/awsrm.rb CHANGED
@@ -9,6 +9,7 @@ require 'awsrm/resources/ec2'
9
9
  require 'awsrm/resources/elb'
10
10
  require 'awsrm/resources/route_table'
11
11
  require 'awsrm/resources/subnet'
12
+ require 'awsrm/resources/network_acl'
12
13
  require 'awsrm/resources/vpc'
13
14
  require 'awsrm/resources/vpn_connection'
14
15
  require 'awsrm/version'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awsrm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-22 00:00:00.000000000 Z
11
+ date: 2018-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -186,6 +186,7 @@ files:
186
186
  - lib/awsrm/resources/autoscaling_group.rb
187
187
  - lib/awsrm/resources/ec2.rb
188
188
  - lib/awsrm/resources/elb.rb
189
+ - lib/awsrm/resources/network_acl.rb
189
190
  - lib/awsrm/resources/route_table.rb
190
191
  - lib/awsrm/resources/subnet.rb
191
192
  - lib/awsrm/resources/vpc.rb
@@ -212,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
213
  version: '0'
213
214
  requirements: []
214
215
  rubyforge_project:
215
- rubygems_version: 2.6.14
216
+ rubygems_version: 2.5.2
216
217
  signing_key:
217
218
  specification_version: 4
218
219
  summary: Simple AWS Resource "READONLY" Mapper for awspec.