Class: Conjur::Policy::Executor::CreateResource

Inherits:
Create show all
Includes:
ActingAs, Annotate
Defined in:
lib/conjur/policy/executor/create.rb

Overview

Create a new Resource with a PUT request to the resource path.

Direct Known Subclasses

CreateWebservice

Instance Attribute Summary

Attributes inherited from Base

#actions, #statement

Instance Method Summary collapse

Methods included from Annotate

#annotate, #update_annotation_path

Methods included from ActingAs

#acting_as_parameters

Methods inherited from Create

#record

Methods inherited from Base

#action, #initialize, #resource_path, #role_path

Methods included from Logger

included

Constructor Details

This class inherits a constructor from Conjur::Policy::Executor::Base

Instance Method Details

#annotate_recordObject



96
97
98
# File 'lib/conjur/policy/executor/create.rb', line 96

def annotate_record
  statement.record
end

#executeObject



87
88
89
90
91
92
93
94
# File 'lib/conjur/policy/executor/create.rb', line 87

def execute
  action({
    'method' => 'put',
    'path' => resource_path(statement.record),
    'parameters' => acting_as_parameters
  })
  annotate
end