class Conjur::PolicyLoadResult

The result of loading a policy. When a policy is loaded, two types of data are always provided:

Public Class Methods

new(data) click to toggle source
# File lib/conjur/policy_load_result.rb, line 28
def initialize data
  @data = data
end

Public Instance Methods

created_roles() click to toggle source

API keys for roles which were created when loading the policy.

@return [Hash] Hash keys are the role ids, and hash values are the API keys.

# File lib/conjur/policy_load_result.rb, line 50
def created_roles
  @data['created_roles']
end
to_h() click to toggle source

@api private

# File lib/conjur/policy_load_result.rb, line 33
def to_h
  @data
end
to_json(options = {}) click to toggle source

@api private

# File lib/conjur/policy_load_result.rb, line 38
def to_json options = {}
  @data.to_json(options)
end
to_s() click to toggle source

@api private

# File lib/conjur/policy_load_result.rb, line 43
def to_s
  @data.to_s
end
version() click to toggle source

The new version of the policy. When a policy is updated, a new version is appended to that policy. The YAML of previous versions of the policy can be obtained by fetching the policy resource using {API#resource}.

# File lib/conjur/policy_load_result.rb, line 57
def version
  @data['version']
end