Sha256: 158b0ff5d44ce5da61b50645e4919b11015852b6aef5ab253f6ef1fa20d845a0

Contents?: true

Size: 1.33 KB

Versions: 85

Compression:

Stored size: 1.33 KB

Contents

### exist

```ruby
describe nlb_listener('arn:aws:elasticloadbalancing:ap-northeast-1:1234567890:listener/app/my-nlb/1aa1bb1cc1ddee11/f2f7dc8efc522ab2') do
  it { should exist }
  its(:port) { should eq 80 }
  its(:protocol) { should eq 'HTTP' }
end
```

### have_rule

```ruby
describe nlb_listener('arn:aws:elasticloadbalancing:ap-northeast-1:1234567890:listener/app/my-nlb/1aa1bb1cc1ddee11/f2f7dc8efc522ab2') do
  it { should have_rule('arn:aws:elasticloadbalancing:ap-northeast-1:1234567890:listener-rule/app/my-nlb/1aa1bb1cc1ddee11/f2f7dc8efc522ab2/9683b2d02a6cabee') }
  it do
    should have_rule.priority('10')
      .conditions(field: 'path-pattern', values: ['/img/*'])
      .actions(target_group_arn: 'arn:aws:elasticloadbalancing:ap-northeast-1:1234567890:123456789012:targetgroup/73e2d6bc24d8a067/73e2d6bc24d8a067', type: 'forward')
  end
  it do
    should have_rule.priority('10')
      .if(field: 'path-pattern', values: ['/img/*'])
      .then(target_group_arn: 'arn:aws:elasticloadbalancing:ap-northeast-1:1234567890:123456789012:targetgroup/73e2d6bc24d8a067/73e2d6bc24d8a067', type: 'forward')
  end
  it { should have_rule.conditions([{ field: 'path-pattern', values: ['/admin/*'] }, { field: 'host-header', values: ['admin.example.com'] }]) }
  it { should have_rule.actions(target_group_name: 'my-nlb-target-group', type: 'forward') }
end
```

Version data entries

85 entries across 85 versions & 3 rubygems

Version Path
awspec-1.23.0 doc/_resource_types/nlb_listener.md
awspec-1.22.1 doc/_resource_types/nlb_listener.md
awspec-1.22.0 doc/_resource_types/nlb_listener.md
awspec-1.21.1 doc/_resource_types/nlb_listener.md
awspec-1.21.0 doc/_resource_types/nlb_listener.md
awspec-1.20.0 doc/_resource_types/nlb_listener.md
awspec-1.19.2 doc/_resource_types/nlb_listener.md
awspec-1.19.1 doc/_resource_types/nlb_listener.md
awspec-1.19.0 doc/_resource_types/nlb_listener.md
cthiesfork-awspec-1.2.4 doc/_resource_types/nlb_listener.md
awspec-api_gateway_extended-1.2.4 doc/_resource_types/nlb_listener.md
awspec-api_gateway_extended-1.2.3 doc/_resource_types/nlb_listener.md
awspec-1.18.6 doc/_resource_types/nlb_listener.md
cthiesfork-awspec-1.2.2 doc/_resource_types/nlb_listener.md
cthiesfork-awspec-1.2.1 doc/_resource_types/nlb_listener.md
awspec-1.18.5 doc/_resource_types/nlb_listener.md
cthiesfork-awspec-1.2.0 doc/_resource_types/nlb_listener.md
cthiesfork-awspec-1.1.0 doc/_resource_types/nlb_listener.md
cthiesfork-awspec-1.0.0 doc/_resource_types/nlb_listener.md
awspec-1.18.4 doc/_resource_types/nlb_listener.md