awspec 1.18.4 → 1.18.5
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.
- checksums.yaml +4 -4
- data/doc/resource_types.md +3 -3
- data/lib/awspec/helper/finder/alb.rb +4 -4
- data/lib/awspec/helper/finder/apigateway.rb +12 -6
- data/lib/awspec/type/alb.rb +3 -0
- data/lib/awspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 57797dd9f900c79068bf2839262679a2c86c62630463b8c365c1a6eb55a76ecf
|
|
4
|
+
data.tar.gz: ae19755daba79f58d3d77ff3fb8c4eee0b0906516cd5bf4a033f9928656b6b63
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8fec4698ec26a49d81f7ecb7a37323ed69e53ac96cedff1a33e98e75f10c824681ed6a248cd2a6e79de27924fc46dc097e8eb0f91106b526d9a1d71fa0a1c2b
|
|
7
|
+
data.tar.gz: 6ef0fa1247a1956b82f7a53be2478013269ab7e0e35005fa40f2d537d4763ee1caffbdb35848f9dd1c80b61e86f4f8e168dd865bbe1de98d4f4bdd2f677d9526
|
data/doc/resource_types.md
CHANGED
|
@@ -267,7 +267,7 @@ end
|
|
|
267
267
|
|
|
268
268
|
### have_tag
|
|
269
269
|
|
|
270
|
-
### its(:architecture), its(:creation_date), its(:image_id), its(:image_location), its(:image_type), its(:public), its(:kernel_id), its(:owner_id), its(:platform), its(:ramdisk_id), its(:state), its(:description), its(:ena_support), its(:hypervisor), its(:image_owner_alias), its(:name), its(:root_device_name), its(:root_device_type), its(:sriov_net_support), its(:state_reason), its(:virtualization_type)
|
|
270
|
+
### its(:architecture), its(:creation_date), its(:image_id), its(:image_location), its(:image_type), its(:public), its(:kernel_id), its(:owner_id), its(:platform), its(:platform_details), its(:usage_operation), its(:ramdisk_id), its(:state), its(:description), its(:ena_support), its(:hypervisor), its(:image_owner_alias), its(:name), its(:root_device_name), its(:root_device_type), its(:sriov_net_support), its(:state_reason), its(:virtualization_type)
|
|
271
271
|
### :unlock: Advanced use
|
|
272
272
|
|
|
273
273
|
`ami` can use `Aws::EC2::Image` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Image.html).
|
|
@@ -894,7 +894,7 @@ end
|
|
|
894
894
|
```
|
|
895
895
|
|
|
896
896
|
|
|
897
|
-
### its(:availability_zone), its(:create_time), its(:encrypted), its(:kms_key_id), its(:outpost_arn), its(:size), its(:snapshot_id), its(:state), its(:volume_id), its(:iops), its(:volume_type), its(:fast_restored)
|
|
897
|
+
### its(:availability_zone), its(:create_time), its(:encrypted), its(:kms_key_id), its(:outpost_arn), its(:size), its(:snapshot_id), its(:state), its(:volume_id), its(:iops), its(:volume_type), its(:fast_restored), its(:multi_attach_enabled)
|
|
898
898
|
### :unlock: Advanced use
|
|
899
899
|
|
|
900
900
|
`ebs` can use `Aws::EC2::Volume` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Volume.html).
|
|
@@ -1467,7 +1467,7 @@ end
|
|
|
1467
1467
|
```
|
|
1468
1468
|
|
|
1469
1469
|
|
|
1470
|
-
### its(:domain_id), its(:domain_name), its(:arn), its(:created), its(:deleted), its(:endpoint), its(:endpoints), its(:processing), its(:upgrade_processing), its(:elasticsearch_version), its(:access_policies), its(:snapshot_options), its(:vpc_options), its(:cognito_options), its(:encryption_at_rest_options), its(:node_to_node_encryption_options), its(:advanced_options), its(:log_publishing_options), its(:service_software_options), its(:domain_endpoint_options)
|
|
1470
|
+
### its(:domain_id), its(:domain_name), its(:arn), its(:created), its(:deleted), its(:endpoint), its(:endpoints), its(:processing), its(:upgrade_processing), its(:elasticsearch_version), its(:access_policies), its(:snapshot_options), its(:vpc_options), its(:cognito_options), its(:encryption_at_rest_options), its(:node_to_node_encryption_options), its(:advanced_options), its(:log_publishing_options), its(:service_software_options), its(:domain_endpoint_options), its(:advanced_security_options)
|
|
1471
1471
|
## <a name="elastictranscoder_pipeline">elastictranscoder_pipeline</a>
|
|
1472
1472
|
|
|
1473
1473
|
ElastictranscoderPipeline resource type.
|
|
@@ -6,7 +6,7 @@ module Awspec::Helper
|
|
|
6
6
|
res.load_balancers.select do |lb|
|
|
7
7
|
lb.type == 'application'
|
|
8
8
|
end.single_resource(id)
|
|
9
|
-
rescue
|
|
9
|
+
rescue Aws::ElasticLoadBalancingV2::Errors::LoadBalancerNotFound
|
|
10
10
|
return nil
|
|
11
11
|
end
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ module Awspec::Helper
|
|
|
20
20
|
def find_alb_listener(arn)
|
|
21
21
|
res = elbv2_client.describe_listeners({ listener_arns: [arn] })
|
|
22
22
|
res.listeners.single_resource(arn)
|
|
23
|
-
rescue
|
|
23
|
+
rescue StandardError
|
|
24
24
|
return nil
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -40,7 +40,7 @@ module Awspec::Helper
|
|
|
40
40
|
res.target_groups.select do |tg|
|
|
41
41
|
%w(HTTP HTTPS).include?(tg.protocol)
|
|
42
42
|
end.single_resource(id)
|
|
43
|
-
rescue
|
|
43
|
+
rescue StandardError
|
|
44
44
|
return nil
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -60,7 +60,7 @@ module Awspec::Helper
|
|
|
60
60
|
res.tag_descriptions.select do |resource|
|
|
61
61
|
resource.resource_arn == id
|
|
62
62
|
end.first.tags
|
|
63
|
-
rescue
|
|
63
|
+
rescue StandardError
|
|
64
64
|
return nil
|
|
65
65
|
end
|
|
66
66
|
end
|
|
@@ -2,17 +2,23 @@ module Awspec::Helper
|
|
|
2
2
|
module Finder
|
|
3
3
|
module Apigateway
|
|
4
4
|
def find_apigateway_by_id(id)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
apis = []
|
|
6
|
+
apigateway_client.get_rest_apis(limit: 500).each do |response|
|
|
7
|
+
apis += response.items
|
|
8
|
+
end
|
|
9
|
+
apis.each do |api|
|
|
10
|
+
return api if api.id == id
|
|
8
11
|
end
|
|
9
12
|
nil
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
def find_apigateway_by_name(name)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
apis = []
|
|
17
|
+
apigateway_client.get_rest_apis(limit: 500).each do |response|
|
|
18
|
+
apis += response.items
|
|
19
|
+
end
|
|
20
|
+
apis.each do |api|
|
|
21
|
+
return api if api.name == name
|
|
16
22
|
end
|
|
17
23
|
nil
|
|
18
24
|
end
|
data/lib/awspec/type/alb.rb
CHANGED
|
@@ -15,11 +15,13 @@ module Awspec::Type
|
|
|
15
15
|
|
|
16
16
|
STATES.each do |state|
|
|
17
17
|
define_method state + '?' do
|
|
18
|
+
check_existence
|
|
18
19
|
resource_via_client.state.code == state
|
|
19
20
|
end
|
|
20
21
|
end
|
|
21
22
|
|
|
22
23
|
def has_security_group?(sg_id)
|
|
24
|
+
check_existence
|
|
23
25
|
sgs = resource_via_client.security_groups
|
|
24
26
|
ret = sgs.find do |sg|
|
|
25
27
|
sg == sg_id
|
|
@@ -31,6 +33,7 @@ module Awspec::Type
|
|
|
31
33
|
end
|
|
32
34
|
|
|
33
35
|
def has_subnet?(subnet_id)
|
|
36
|
+
check_existence
|
|
34
37
|
azs = resource_via_client.availability_zones
|
|
35
38
|
ret = azs.find do |az|
|
|
36
39
|
az.subnet_id == subnet_id
|
data/lib/awspec/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: awspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.18.
|
|
4
|
+
version: 1.18.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- k1LoW
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-03-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk
|