awspec 1.20.0 → 1.21.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
  SHA256:
3
- metadata.gz: 50e4f2db388c2466cf1cc06da613acd875dd5e6cc586087f07372f0a1e7145b1
4
- data.tar.gz: 336ec6c6a6700edfbb1c66c0b164343a519eaf73d4fb2a6f8ff6a095e19b8640
3
+ metadata.gz: 411e9900b039017d4cb1ab067c512728105934125b959b89556c35a6c6f33e7b
4
+ data.tar.gz: df8150172eae082592be40c90e60b1eff367bb372346fc16e65b3ac71b3e9731
5
5
  SHA512:
6
- metadata.gz: c357e4f6650a48b03bd1eb3a454526a93dd2a885852de2fb5ee589a2eb468c87a2351512f802718f627587d85948b659b5894adaa12056d97ed1b8ca6419b99c
7
- data.tar.gz: c091e6ece098aa98600e43e4ae4cd6413516d4a59f20a17d2d5b6d596695037b202b6246dfc5321504c318e3623b5bd3babc3d1dd0c8ef4d9db26f68a528410b
6
+ metadata.gz: ddca46e882fe9e4ee4bae44cc14e624c7d8843615a5334c90ae3b5b83437b58419d27be4d97b4787161613ebd11abaa4e7d3b98585c8fad37df0b53ced71cdd7
7
+ data.tar.gz: 80d6f1ea03a390f20f4cb8ff67641aa654a77460dfcd53d5f782d9def3862e3d9186cc9cdd67c1cb312a674a3a81cacd84eb939c383e7ae2afa2de59d9f5a635
@@ -0,0 +1,7 @@
1
+ ### exist
2
+
3
+ ```ruby
4
+ describe cognito_identity_pool('my-cognito-identity-pool') do
5
+ it { should exist }
6
+ end
7
+ ```
@@ -0,0 +1,7 @@
1
+ ### exist
2
+
3
+ ```ruby
4
+ describe cognito_user_pool('my-cognito-user-pool') do
5
+ it { should exist }
6
+ end
7
+ ```
@@ -1,7 +1,7 @@
1
1
  ### exist
2
2
 
3
3
  ```ruby
4
- describe tgw('tgw-1234567890abcdefg') do
4
+ describe transit_gateway('tgw-1234567890abcdefg') do
5
5
  it { should exist }
6
6
  it { should have_tag('Name').value('my-tgw') }
7
7
  it { should have_attachment('tgw-attach-1234567890abcdefg') }
@@ -17,7 +17,7 @@ end
17
17
  ```
18
18
 
19
19
  ```ruby
20
- describe tgw('my-tgw') do
20
+ describe transit_gateway('my-tgw') do
21
21
  it { should exist }
22
22
  its(:transit_gateway_id) { should eq 'tgw-1234567890abcdefg' }
23
23
  end
@@ -19,6 +19,8 @@
19
19
  | [codebuild](#codebuild)
20
20
  | [codedeploy](#codedeploy)
21
21
  | [codedeploy_deployment_group](#codedeploy_deployment_group)
22
+ | [cognito_identity_pool](#cognito_identity_pool)
23
+ | [cognito_user_pool](#cognito_user_pool)
22
24
  | [customer_gateway](#customer_gateway)
23
25
  | [directconnect_virtual_interface](#directconnect_virtual_interface)
24
26
  | [dynamodb_table](#dynamodb_table)
@@ -741,6 +743,30 @@ end
741
743
  ```
742
744
 
743
745
  ### its(:application_name), its(:deployment_group_id), its(:deployment_group_name), its(:deployment_config_name), its(:on_premises_instance_tag_filters), its(:service_role_arn), its(:target_revision), its(:trigger_configurations), its(:alarm_configuration), its(:deployment_style), its(:load_balancer_info), its(:last_successful_deployment), its(:last_attempted_deployment), its(:ec2_tag_set), its(:on_premises_tag_set), its(:compute_platform), its(:ecs_services)
746
+ ## <a name="cognito_identity_pool">cognito_identity_pool</a>
747
+
748
+ CognitoIdentityPool resource type.
749
+
750
+ ### exist
751
+
752
+ ```ruby
753
+ describe cognito_identity_pool('my-cognito-identity-pool') do
754
+ it { should exist }
755
+ end
756
+ ```
757
+ ### its(:identity_pool_id), its(:identity_pool_name)
758
+ ## <a name="cognito_user_pool">cognito_user_pool</a>
759
+
760
+ CognitoUserPool resource type.
761
+
762
+ ### exist
763
+
764
+ ```ruby
765
+ describe cognito_user_pool('my-cognito-user-pool') do
766
+ it { should exist }
767
+ end
768
+ ```
769
+ ### its(:id), its(:name), its(:status), its(:last_modified_date), its(:creation_date)
744
770
  ## <a name="customer_gateway">customer_gateway</a>
745
771
 
746
772
  CustomerGateway resource type.
@@ -3489,7 +3515,7 @@ TransitGateway resource type.
3489
3515
  ### exist
3490
3516
 
3491
3517
  ```ruby
3492
- describe tgw('tgw-1234567890abcdefg') do
3518
+ describe transit_gateway('tgw-1234567890abcdefg') do
3493
3519
  it { should exist }
3494
3520
  it { should have_tag('Name').value('my-tgw') }
3495
3521
  it { should have_attachment('tgw-attach-1234567890abcdefg') }
@@ -3505,7 +3531,7 @@ end
3505
3531
  ```
3506
3532
 
3507
3533
  ```ruby
3508
- describe tgw('my-tgw') do
3534
+ describe transit_gateway('my-tgw') do
3509
3535
  it { should exist }
3510
3536
  its(:transit_gateway_id) { should eq 'tgw-1234567890abcdefg' }
3511
3537
  end
@@ -0,0 +1,17 @@
1
+ module Awspec::Generator
2
+ module Doc
3
+ module Type
4
+ class CognitoIdentityPool < Base
5
+ def initialize
6
+ super
7
+ @type_name = 'CognitoIdentityPool'
8
+ @type = Awspec::Type::CognitoIdentityPool.new('my-cognito-identity-pool')
9
+ @ret = @type.resource_via_client
10
+ @matchers = []
11
+ @ignore_matchers = []
12
+ @describes = []
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ module Awspec::Generator
2
+ module Doc
3
+ module Type
4
+ class CognitoUserPool < Base
5
+ def initialize
6
+ super
7
+ @type_name = 'CognitoUserPool'
8
+ @type = Awspec::Type::CognitoUserPool.new('my-cognito-user-pool')
9
+ @ret = @type.resource_via_client
10
+ @matchers = []
11
+ @ignore_matchers = []
12
+ @describes = []
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -47,7 +47,9 @@ require 'awspec/helper/finder/redshift'
47
47
  require 'awspec/helper/finder/codedeploy'
48
48
  require 'awspec/helper/finder/mq'
49
49
  require 'awspec/helper/finder/secretsmanager'
50
+ require 'awspec/helper/finder/cognito_user_pool'
50
51
  require 'awspec/helper/finder/msk'
52
+ require 'awspec/helper/finder/cognito_identity_pool'
51
53
 
52
54
  require 'awspec/helper/finder/account_attributes'
53
55
 
@@ -104,7 +106,9 @@ module Awspec::Helper
104
106
  include Awspec::Helper::Finder::Codedeploy
105
107
  include Awspec::Helper::Finder::Mq
106
108
  include Awspec::Helper::Finder::Secretsmanager
109
+ include Awspec::Helper::Finder::CognitoUserPool
107
110
  include Awspec::Helper::Finder::Msk
111
+ include Awspec::Helper::Finder::CognitoIdentityPool
108
112
 
109
113
  CLIENTS = {
110
114
  ec2_client: Aws::EC2::Client,
@@ -150,7 +154,9 @@ module Awspec::Helper
150
154
  codedeploy_client: Aws::CodeDeploy::Client,
151
155
  mq_client: Aws::MQ::Client,
152
156
  secretsmanager_client: Aws::SecretsManager::Client,
153
- msk_client: Aws::Kafka::Client
157
+ msk_client: Aws::Kafka::Client,
158
+ cognito_identity_client: Aws::CognitoIdentity::Client,
159
+ cognito_identity_provider_client: Aws::CognitoIdentityProvider::Client
154
160
  }
155
161
 
156
162
  CLIENT_OPTIONS = {
@@ -0,0 +1,15 @@
1
+ module Awspec::Helper
2
+ module Finder
3
+ module CognitoIdentityPool
4
+ def find_identitypool_by_name(pool_name)
5
+ cognito_identity_client.list_identity_pools(max_results: 60).each do |response|
6
+ pools = response.identity_pools
7
+ pools.each do |pool|
8
+ return pool if pool.identity_pool_name == pool_name
9
+ end
10
+ end
11
+ nil
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Awspec::Helper
2
+ module Finder
3
+ module CognitoUserPool
4
+ def find_userpool_by_name(pool_name)
5
+ cognito_identity_provider_client.list_user_pools(max_results: 60).each do |response|
6
+ pools = response.user_pools
7
+ pools.each do |pool|
8
+ return pool if pool.name == pool_name
9
+ end
10
+ end
11
+ nil
12
+ end
13
+ end
14
+ end
15
+ end
@@ -20,7 +20,7 @@ module Awspec
20
20
  elastictranscoder_pipeline waf_web_acl wafregional_web_acl customer_gateway vpn_gateway vpn_connection
21
21
  internet_gateway acm cloudwatch_logs dynamodb_table eip sqs ssm_parameter cloudformation_stack
22
22
  codebuild sns_topic redshift redshift_cluster_parameter_group codedeploy codedeploy_deployment_group
23
- secretsmanager msk transit_gateway
23
+ secretsmanager msk transit_gateway cognito_identity_pool cognito_user_pool
24
24
  )
25
25
 
26
26
  ACCOUNT_ATTRIBUTES = %w(
@@ -0,0 +1,16 @@
1
+ Aws.config[:cognitoidentity] = {
2
+ stub_responses: {
3
+ list_identity_pools: {
4
+ identity_pools: [
5
+ {
6
+ identity_pool_id: 'us-east-1:adsfkjaekljnfg234',
7
+ identity_pool_name: 'my-cognito-identity-pool'
8
+ },
9
+ {
10
+ identity_pool_id: 'us-east-1:gfdksjg87sfna943knbj',
11
+ identity_pool_name: 'My_Identity_Pool'
12
+ }
13
+ ], next_token: 'akvjnkjndgoierhteuh7sfdnre9erglkwnroijsdfinewr=='
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,47 @@
1
+ Aws.config[:cognitoidentityprovider] = {
2
+ stub_responses: {
3
+ list_user_pools: {
4
+ user_pools: [
5
+ {
6
+ id: 'us-east-1_6adfkj4ju',
7
+ name: 'my-cognito-user-pool',
8
+ lambda_config: {
9
+ pre_sign_up: nil,
10
+ custom_message: nil,
11
+ post_confirmation: nil,
12
+ pre_authentication: nil,
13
+ post_authentication: nil,
14
+ define_auth_challenge: nil,
15
+ create_auth_challenge: nil,
16
+ verify_auth_challenge_response: nil,
17
+ pre_token_generation: nil,
18
+ user_migration: nil
19
+ },
20
+ status: nil,
21
+ last_modified_date: Time.new(2016, 5, 5, 5, 00, 00, '+00:00'),
22
+ creation_date: Time.new(2015, 1, 2, 10, 00, 00, '+00:00')
23
+ },
24
+ {
25
+ id: 'us-east-1_12345adsf',
26
+ name: 'test-pool',
27
+ lambda_config: {
28
+ pre_sign_up: nil,
29
+ custom_message: nil,
30
+ post_confirmation: nil,
31
+ pre_authentication: nil,
32
+ post_authentication: nil,
33
+ define_auth_challenge: nil,
34
+ create_auth_challenge: nil,
35
+ verify_auth_challenge_response: nil,
36
+ pre_token_generation: nil,
37
+ user_migration: nil
38
+ },
39
+ status: nil,
40
+ last_modified_date: Time.new(2019, 1, 2, 10, 00, 00, '+00:00'),
41
+ creation_date: Time.new(2018, 1, 2, 10, 00, 00, '+00:00')
42
+ }
43
+ ],
44
+ next_token: 'aoeijfasdnvakldsjfgoai'
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,11 @@
1
+ module Awspec::Type
2
+ class CognitoIdentityPool < ResourceBase
3
+ def resource_via_client
4
+ @resource_via_client ||= find_identitypool_by_name(@display_name)
5
+ end
6
+
7
+ def id
8
+ @id ||= resource_via_client.identity_pool_id if resource_via_client
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Awspec::Type
2
+ class CognitoUserPool < ResourceBase
3
+ def resource_via_client
4
+ @resource_via_client ||= find_userpool_by_name(@display_name)
5
+ end
6
+
7
+ def id
8
+ @id ||= resource_via_client.id if resource_via_client
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '1.20.0'
2
+ VERSION = '1.21.0'
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.20.0
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-28 00:00:00.000000000 Z
11
+ date: 2020-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -251,6 +251,8 @@ files:
251
251
  - doc/_resource_types/codebuild.md
252
252
  - doc/_resource_types/codedeploy.md
253
253
  - doc/_resource_types/codedeploy_deployment_group.md
254
+ - doc/_resource_types/cognito_identity_pool.md
255
+ - doc/_resource_types/cognito_user_pool.md
254
256
  - doc/_resource_types/customer_gateway.md
255
257
  - doc/_resource_types/directconnect_virtual_interface.md
256
258
  - doc/_resource_types/dynamodb_table.md
@@ -351,6 +353,8 @@ files:
351
353
  - lib/awspec/generator/doc/type/codebuild.rb
352
354
  - lib/awspec/generator/doc/type/codedeploy.rb
353
355
  - lib/awspec/generator/doc/type/codedeploy_deployment_group.rb
356
+ - lib/awspec/generator/doc/type/cognito_identity_pool.rb
357
+ - lib/awspec/generator/doc/type/cognito_user_pool.rb
354
358
  - lib/awspec/generator/doc/type/customer_gateway.rb
355
359
  - lib/awspec/generator/doc/type/directconnect_virtual_interface.rb
356
360
  - lib/awspec/generator/doc/type/dynamodb_table.rb
@@ -472,6 +476,8 @@ files:
472
476
  - lib/awspec/helper/finder/cloudwatch_logs.rb
473
477
  - lib/awspec/helper/finder/codebuild.rb
474
478
  - lib/awspec/helper/finder/codedeploy.rb
479
+ - lib/awspec/helper/finder/cognito_identity_pool.rb
480
+ - lib/awspec/helper/finder/cognito_user_pool.rb
475
481
  - lib/awspec/helper/finder/directconnect.rb
476
482
  - lib/awspec/helper/finder/dynamodb.rb
477
483
  - lib/awspec/helper/finder/ebs.rb
@@ -573,6 +579,8 @@ files:
573
579
  - lib/awspec/stub/codebuild.rb
574
580
  - lib/awspec/stub/codedeploy.rb
575
581
  - lib/awspec/stub/codedeploy_deployment_group.rb
582
+ - lib/awspec/stub/cognito_identity_pool.rb
583
+ - lib/awspec/stub/cognito_user_pool.rb
576
584
  - lib/awspec/stub/customer_gateway.rb
577
585
  - lib/awspec/stub/directconnect_virtual_interface.rb
578
586
  - lib/awspec/stub/duplicated_resource_type.rb
@@ -659,6 +667,8 @@ files:
659
667
  - lib/awspec/type/codebuild.rb
660
668
  - lib/awspec/type/codedeploy.rb
661
669
  - lib/awspec/type/codedeploy_deployment_group.rb
670
+ - lib/awspec/type/cognito_identity_pool.rb
671
+ - lib/awspec/type/cognito_user_pool.rb
662
672
  - lib/awspec/type/customer_gateway.rb
663
673
  - lib/awspec/type/directconnect_virtual_interface.rb
664
674
  - lib/awspec/type/dynamodb_table.rb
@@ -743,7 +753,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
743
753
  - !ruby/object:Gem::Version
744
754
  version: '0'
745
755
  requirements: []
746
- rubygems_version: 3.0.3
756
+ rubygems_version: 3.0.6
747
757
  signing_key:
748
758
  specification_version: 4
749
759
  summary: RSpec tests for your AWS resources.