Class: AwsSecurityGroup

Inherits:
Object
  • Object
show all
Includes:
AwsSingularResourceMixin
Defined in:
lib/resources/aws/aws_security_group.rb

Defined Under Namespace

Classes: Backend

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AwsSingularResourceMixin

#exists?, included

Methods included from AwsResourceMixin

#catch_aws_errors, #check_resource_param_names, #initialize, #inspec_runner

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



15
16
17
# File 'lib/resources/aws/aws_security_group.rb', line 15

def description
  @description
end

#group_idObject (readonly)

Returns the value of attribute group_id.



15
16
17
# File 'lib/resources/aws/aws_security_group.rb', line 15

def group_id
  @group_id
end

#group_nameObject (readonly)

Returns the value of attribute group_name.



15
16
17
# File 'lib/resources/aws/aws_security_group.rb', line 15

def group_name
  @group_name
end

#inbound_rulesObject (readonly)

Returns the value of attribute inbound_rules.



15
16
17
# File 'lib/resources/aws/aws_security_group.rb', line 15

def inbound_rules
  @inbound_rules
end

#inbound_rules_countObject (readonly)

Returns the value of attribute inbound_rules_count.



15
16
17
# File 'lib/resources/aws/aws_security_group.rb', line 15

def inbound_rules_count
  @inbound_rules_count
end

#outbound_rulesObject (readonly)

Returns the value of attribute outbound_rules.



15
16
17
# File 'lib/resources/aws/aws_security_group.rb', line 15

def outbound_rules
  @outbound_rules
end

#outbound_rules_countObject (readonly)

Returns the value of attribute outbound_rules_count.



15
16
17
# File 'lib/resources/aws/aws_security_group.rb', line 15

def outbound_rules_count
  @outbound_rules_count
end

#vpc_idObject (readonly)

Returns the value of attribute vpc_id.



15
16
17
# File 'lib/resources/aws/aws_security_group.rb', line 15

def vpc_id
  @vpc_id
end

Instance Method Details

#allow_in?(criteria = {}) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/resources/aws/aws_security_group.rb', line 21

def allow_in?(criteria = {})
  allow(inbound_rules, criteria.dup)
end

#allow_in_only?(criteria = {}) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/resources/aws/aws_security_group.rb', line 31

def allow_in_only?(criteria = {})
  allow_only(inbound_rules, criteria.dup)
end

#allow_out?(criteria = {}) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/resources/aws/aws_security_group.rb', line 26

def allow_out?(criteria = {})
  allow(outbound_rules, criteria.dup)
end

#allow_out_only?(criteria = {}) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/resources/aws/aws_security_group.rb', line 36

def allow_out_only?(criteria = {})
  allow_only(outbound_rules, criteria.dup)
end

#to_sObject



17
18
19
# File 'lib/resources/aws/aws_security_group.rb', line 17

def to_s
  "EC2 Security Group #{@group_id}"
end