awspec 1.18.4 → 1.18.5

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
  SHA256:
3
- metadata.gz: 8620c43be44ef78d4639f850333575db607268b9215a7d237437650430dc33d4
4
- data.tar.gz: 3b456a4446cefbfc87e0f3e5fb01e0fb622d1f3251ef671462c50362e395aff8
3
+ metadata.gz: 57797dd9f900c79068bf2839262679a2c86c62630463b8c365c1a6eb55a76ecf
4
+ data.tar.gz: ae19755daba79f58d3d77ff3fb8c4eee0b0906516cd5bf4a033f9928656b6b63
5
5
  SHA512:
6
- metadata.gz: 37dee8d4d020de491b58a5692fcbe0e57fcb20e06387a3ce87dbe7a49cd7402bf5f40331bdff30edc4a43f12b40a1f03d67ca7c6479adfe9829e007acc17c846
7
- data.tar.gz: c65aaa6acbdb108164cc56de46b5d0ff0f5fecf73f398b7f3c865c04037e3de18f9fe8d7c6497e63396dfef2fbd4071789bf964d4802f56ebce3a0241c3ff8e4
6
+ metadata.gz: d8fec4698ec26a49d81f7ecb7a37323ed69e53ac96cedff1a33e98e75f10c824681ed6a248cd2a6e79de27924fc46dc097e8eb0f91106b526d9a1d71fa0a1c2b
7
+ data.tar.gz: 6ef0fa1247a1956b82f7a53be2478013269ab7e0e35005fa40f2d537d4763ee1caffbdb35848f9dd1c80b61e86f4f8e168dd865bbe1de98d4f4bdd2f677d9526
@@ -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
- rest_apis = apigateway_client.get_rest_apis
6
- rest_apis.items.each do |item|
7
- return item if item.id == id
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
- rest_apis = apigateway_client.get_rest_apis
14
- rest_apis.items.each do |item|
15
- return item if item.name == name
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '1.18.4'
2
+ VERSION = '1.18.5'
3
3
  end
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
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-01-26 00:00:00.000000000 Z
11
+ date: 2020-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk