Class: Cerbos::Output::CheckResources::Result::Resource
- Inherits:
-
Object
- Object
- Cerbos::Output::CheckResources::Result::Resource
- Defined in:
- lib/cerbos/output/check_resources.rb
Overview
A resource that was checked.
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
The unique identifier of the resource.
-
#kind ⇒ String
readonly
The type of resource.
-
#policy_version ⇒ String
readonly
The policy version against which the check was performed.
-
#scope ⇒ String
readonly
The policy scope against which the check was performed.
Instance Attribute Details
#id ⇒ String (readonly)
The unique identifier of the resource.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/cerbos/output/check_resources.rb', line 156 CheckResources::Result::Resource = Output.new_class(:kind, :id, :policy_version, :scope) do # @!attribute [r] kind # The type of resource. # # @return [String] # @!attribute [r] id # The unique identifier of the resource. # # @return [String] # @!attribute [r] policy_version # The policy version against which the check was performed. # # @return [String] # @!attribute [r] scope # The policy scope against which the check was performed. # # @return [String] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies def self.from_protobuf(resource) new( kind: resource.kind, id: resource.id, policy_version: resource.policy_version, scope: resource.scope ) end end |
#kind ⇒ String (readonly)
The type of resource.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/cerbos/output/check_resources.rb', line 156 CheckResources::Result::Resource = Output.new_class(:kind, :id, :policy_version, :scope) do # @!attribute [r] kind # The type of resource. # # @return [String] # @!attribute [r] id # The unique identifier of the resource. # # @return [String] # @!attribute [r] policy_version # The policy version against which the check was performed. # # @return [String] # @!attribute [r] scope # The policy scope against which the check was performed. # # @return [String] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies def self.from_protobuf(resource) new( kind: resource.kind, id: resource.id, policy_version: resource.policy_version, scope: resource.scope ) end end |
#policy_version ⇒ String (readonly)
The policy version against which the check was performed.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/cerbos/output/check_resources.rb', line 156 CheckResources::Result::Resource = Output.new_class(:kind, :id, :policy_version, :scope) do # @!attribute [r] kind # The type of resource. # # @return [String] # @!attribute [r] id # The unique identifier of the resource. # # @return [String] # @!attribute [r] policy_version # The policy version against which the check was performed. # # @return [String] # @!attribute [r] scope # The policy scope against which the check was performed. # # @return [String] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies def self.from_protobuf(resource) new( kind: resource.kind, id: resource.id, policy_version: resource.policy_version, scope: resource.scope ) end end |
#scope ⇒ String (readonly)
The policy scope against which the check was performed.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/cerbos/output/check_resources.rb', line 156 CheckResources::Result::Resource = Output.new_class(:kind, :id, :policy_version, :scope) do # @!attribute [r] kind # The type of resource. # # @return [String] # @!attribute [r] id # The unique identifier of the resource. # # @return [String] # @!attribute [r] policy_version # The policy version against which the check was performed. # # @return [String] # @!attribute [r] scope # The policy scope against which the check was performed. # # @return [String] # # @see https://docs.cerbos.dev/cerbos/latest/policies/scoped_policies.html Scoped policies def self.from_protobuf(resource) new( kind: resource.kind, id: resource.id, policy_version: resource.policy_version, scope: resource.scope ) end end |