Class: SDM::Role
- Inherits:
-
Object
- Object
- SDM::Role
- Defined in:
- lib/models/porcelain.rb
Overview
A Role has a list of access rules which determine which Resources the members of the Role have access to. An Account can be a member of multiple Roles via AccountAttachments.
Instance Attribute Summary collapse
-
#access_rules ⇒ Object
AccessRules is a list of access rules defining the resources this Role has access to.
-
#id ⇒ Object
Unique identifier of the Role.
-
#managed_by ⇒ Object
Managed By is a read only field for what service manages this role, e.g.
-
#name ⇒ Object
Unique human-readable name of the Role.
-
#tags ⇒ Object
Tags is a map of key, value pairs.
Instance Method Summary collapse
-
#initialize(access_rules: nil, id: nil, managed_by: nil, name: nil, tags: nil) ⇒ Role
constructor
A new instance of Role.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(access_rules: nil, id: nil, managed_by: nil, name: nil, tags: nil) ⇒ Role
14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 |
# File 'lib/models/porcelain.rb', line 14829 def initialize( access_rules: nil, id: nil, managed_by: nil, name: nil, tags: nil ) @access_rules = access_rules == nil ? SDM::_porcelain_zero_value_access_rules() : access_rules @id = id == nil ? "" : id @managed_by = managed_by == nil ? "" : managed_by @name = name == nil ? "" : name = == nil ? SDM::() : end |
Instance Attribute Details
#access_rules ⇒ Object
AccessRules is a list of access rules defining the resources this Role has access to.
14819 14820 14821 |
# File 'lib/models/porcelain.rb', line 14819 def access_rules @access_rules end |
#id ⇒ Object
Unique identifier of the Role.
14821 14822 14823 |
# File 'lib/models/porcelain.rb', line 14821 def id @id end |
#managed_by ⇒ Object
Managed By is a read only field for what service manages this role, e.g. StrongDM, Okta, Azure.
14823 14824 14825 |
# File 'lib/models/porcelain.rb', line 14823 def managed_by @managed_by end |
#name ⇒ Object
Unique human-readable name of the Role.
14825 14826 14827 |
# File 'lib/models/porcelain.rb', line 14825 def name @name end |
#tags ⇒ Object
Tags is a map of key, value pairs.
14827 14828 14829 |
# File 'lib/models/porcelain.rb', line 14827 def end |
Instance Method Details
#to_json(options = {}) ⇒ Object
14843 14844 14845 14846 14847 14848 14849 |
# File 'lib/models/porcelain.rb', line 14843 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |