Sha256: bb39e8ccbed8221b80800d26d397120b1f57d0ea4420da05fed95172753145d9

Contents?: true

Size: 1.48 KB

Versions: 111

Compression:

Stored size: 1.48 KB

Contents

### exist

```ruby
describe iam_group('my-iam-group') do
  it { should exist }
end
```

### be_allowed_action

```ruby
describe iam_group('my-iam-group') do
  it { should be_allowed_action('ec2:DescribeInstances') }
  it { should be_allowed_action('s3:Put*').resource_arn('arn:aws:s3:::my-bucket-name/*') }
end
```

### have_iam_policy

```ruby
describe iam_group('my-iam-group') do
  it { should have_iam_policy('ReadOnlyAccess') }
end
```

### have_iam_user

```ruby
describe iam_group('my-iam-group') do
  it { should have_iam_user('my-iam-user') }
end
```

### have_inline_group

```ruby
describe iam_group('my-iam-group') do
  it { should have_inline_policy('InlineEC2FullAccess') }
  it do
    should have_inline_policy('InlineEC2FullAccess').policy_document(<<-'DOC')
{
  "Statement": [
    {
      "Action": "ec2:*",
      "Effect": "Allow",
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "elasticloadbalancing:*",
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "cloudwatch:*",
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": "autoscaling:*",
      "Resource": "*"
    }
  ]
}
DOC
  end
end
```

### advanced

`iam_group` can use `Aws::IAM::Group` resource (see http://docs.aws.amazon.com/sdkforruby/api/Aws/IAM/Group.html).

```ruby
describe iam_group('my-iam-group') do
  its('users.count) { should eq 5 }
end
```

or

```ruby
describe iam_group('my-iam-group') do
  its('resource.users.count') { should eq 5 }
end
```

Version data entries

111 entries across 111 versions & 2 rubygems

Version Path
awspec-0.87.1 doc/_resource_types/iam_group.md
awspec-0.87.0 doc/_resource_types/iam_group.md
awspec-0.86.0 doc/_resource_types/iam_group.md
cmonson_2ndwatch_awspec-0.85.4 doc/_resource_types/iam_group.md
awspec-0.85.3 doc/_resource_types/iam_group.md
cmonson_2ndwatch_awspec-0.85.3 doc/_resource_types/iam_group.md
awspec-0.85.2 doc/_resource_types/iam_group.md
awspec-0.85.1 doc/_resource_types/iam_group.md
awspec-0.85.0 doc/_resource_types/iam_group.md
awspec-0.84.1 doc/_resource_types/iam_group.md
awspec-0.84.0 doc/_resource_types/iam_group.md
awspec-0.83.0 doc/_resource_types/iam_group.md
awspec-0.82.3 doc/_resource_types/iam_group.md
awspec-0.82.2 doc/_resource_types/iam_group.md
awspec-0.82.1 doc/_resource_types/iam_group.md
awspec-0.82.0 doc/_resource_types/iam_group.md
awspec-0.81.1 doc/_resource_types/iam_group.md
awspec-0.81.0 doc/_resource_types/iam_group.md
awspec-0.80.1 doc/_resource_types/iam_group.md
awspec-0.80.0 doc/_resource_types/iam_group.md