Class: AwsFlowLog

Inherits:
Object
  • Object
show all
Includes:
AwsSingularResourceMixin
Defined in:
lib/resources/aws/aws_flow_log.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

#flow_log_idObject (readonly)

Returns the value of attribute flow_log_id.



44
45
46
# File 'lib/resources/aws/aws_flow_log.rb', line 44

def flow_log_id
  @flow_log_id
end

#log_group_nameObject (readonly)

Returns the value of attribute log_group_name.



44
45
46
# File 'lib/resources/aws/aws_flow_log.rb', line 44

def log_group_name
  @log_group_name
end

#resource_idObject (readonly)

Returns the value of attribute resource_id.



44
45
46
# File 'lib/resources/aws/aws_flow_log.rb', line 44

def resource_id
  @resource_id
end

Instance Method Details

#attached_to_eni?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/resources/aws/aws_flow_log.rb', line 32

def attached_to_eni?
  resource_type.eql?("eni") ? true : false
end

#attached_to_subnet?Boolean

Returns:

  • (Boolean)


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

def attached_to_subnet?
  resource_type.eql?("subnet") ? true : false
end

#attached_to_vpc?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/resources/aws/aws_flow_log.rb', line 40

def attached_to_vpc?
  resource_type.eql?("vpc") ? true : false
end

#resource_typeObject



21
22
23
24
25
26
27
28
29
30
# File 'lib/resources/aws/aws_flow_log.rb', line 21

def resource_type
  case @resource_id
  when /^eni/
    @resource_type = "eni"
  when /^subnet/
    @resource_type = "subnet"
  when /^vpc/
    @resource_type = "vpc"
  end
end

#to_sObject



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

def to_s
  "AWS Flow Log #{id}"
end