Class: AwsIamPolicy
Defined Under Namespace
Classes: Backend
Instance Attribute Summary collapse
Instance Method Summary
collapse
#exists?, included
#catch_aws_errors, #check_resource_param_names, #initialize, #inspec_runner
Instance Attribute Details
#arn ⇒ Object
Returns the value of attribute arn.
13
14
15
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 13
def arn
@arn
end
|
#attachment_count ⇒ Object
Returns the value of attribute attachment_count.
13
14
15
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 13
def attachment_count
@attachment_count
end
|
#default_version_id ⇒ Object
Returns the value of attribute default_version_id.
13
14
15
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 13
def default_version_id
@default_version_id
end
|
Instance Method Details
#attached? ⇒ Boolean
19
20
21
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 19
def attached?
!attachment_count.zero?
end
|
#attached_groups ⇒ Object
29
30
31
32
33
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 29
def attached_groups
return @attached_groups if defined? @attached_groups
fetch_attached_entities
@attached_groups
end
|
#attached_roles ⇒ Object
35
36
37
38
39
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 35
def attached_roles
return @attached_roles if defined? @attached_roles
fetch_attached_entities
@attached_roles
end
|
#attached_to_group?(group_name) ⇒ Boolean
45
46
47
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 45
def attached_to_group?(group_name)
attached_groups.include?(group_name)
end
|
#attached_to_role?(role_name) ⇒ Boolean
49
50
51
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 49
def attached_to_role?(role_name)
attached_roles.include?(role_name)
end
|
#attached_to_user?(user_name) ⇒ Boolean
41
42
43
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 41
def attached_to_user?(user_name)
attached_users.include?(user_name)
end
|
#attached_users ⇒ Object
23
24
25
26
27
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 23
def attached_users
return @attached_users if defined? @attached_users
fetch_attached_entities
@attached_users
end
|
#to_s ⇒ Object
15
16
17
|
# File 'lib/resources/aws/aws_iam_policy.rb', line 15
def to_s
"Policy #{@policy_name}"
end
|