Class: Openlayer::Resources::Governance::RuleStats
- Inherits:
-
Object
- Object
- Openlayer::Resources::Governance::RuleStats
- Defined in:
- lib/openlayer/resources/governance/rule_stats.rb,
sig/openlayer/resources/governance/rule_stats.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ RuleStats
constructor
private
A new instance of RuleStats.
-
#retrieve(workspace_id, framework_id: nil, project_id: nil, request_options: {}) ⇒ Openlayer::Models::Governance::RuleStatRetrieveResponse
Get a compliance roll-up for a workspace: how many rules exist, and how many of their results are passing, failing, pending, or due for renewal.
Constructor Details
#initialize(client:) ⇒ RuleStats
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RuleStats.
41 42 43 |
# File 'lib/openlayer/resources/governance/rule_stats.rb', line 41 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(workspace_id, framework_id: nil, project_id: nil, request_options: {}) ⇒ Openlayer::Models::Governance::RuleStatRetrieveResponse
Get a compliance roll-up for a workspace: how many rules exist, and how many of their results are passing, failing, pending, or due for renewal.
Counts respect the filters you pass, so frameworkId gives you a single
framework's overall compliance and projectId gives you a single project's.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/openlayer/resources/governance/rule_stats.rb', line 26 def retrieve(workspace_id, params = {}) parsed, = Openlayer::Governance::RuleStatRetrieveParams.dump_request(params) query = Openlayer::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["workspaces/%1$s/rule-stats", workspace_id], query: query.transform_keys(framework_id: "frameworkId", project_id: "projectId"), model: Openlayer::Models::Governance::RuleStatRetrieveResponse, options: ) end |