Class: PDNS::CryptoKey

Inherits:
API
  • Object
show all
Defined in:
lib/pdns_api/cryptokey.rb

Overview

Cryptokey for a zone.

Instance Attribute Summary

Attributes inherited from API

#class, #url

Instance Method Summary collapse

Methods inherited from API

#create, #delete, #ensure_array, #get, #info

Constructor Details

#initialize(http, parent, id, info = {}) ⇒ CryptoKey

Creates a cryptokey object.

  • http: An HTTP object for interaction with the PowerDNS server.

  • parent: This object’s parent.

  • id: Identifier of the cryptokey.

  • info: Optional information about the cryptokey.



31
32
33
34
35
36
37
38
# File 'lib/pdns_api/cryptokey.rb', line 31

def initialize(http, parent, id, info = {})
  @class  = :cryptokeys
  @http   = http
  @parent = parent
  @id     = id
  @info   = info
  @url    = "#{parent.url}/#{@class}/#{id}"
end

Instance Method Details

#change(rrsets) ⇒ Object

Changes cryptokey information

rrset is used as changeset for the update.



44
45
46
# File 'lib/pdns_api/cryptokey.rb', line 44

def change(rrsets)
  @http.put(@url, rrsets)
end