Module: Idcf::Dns::ClientExtensions::Zone
- Included in:
- Idcf::Dns::Client
- Defined in:
- lib/idcf/dns/client_extensions/zone.rb
Overview
SDK APIs for zone resource
Instance Method Summary collapse
-
#create_zone(attributes, headers = {}) ⇒ Response
Create a new zone.
-
#delete_zone(uuid, headers = {}) ⇒ Response
Delete a zone.
-
#get_token(uuid, headers = {}) ⇒ Response
Get a verify token.
-
#get_zone(uuid, headers = {}) ⇒ Response
Get a zone.
-
#list_zones(headers = {}) ⇒ Response
Get list of existing zones.
-
#update_zone(uuid, attributes, headers = {}) ⇒ Response
Update a zone.
-
#verify_zone(uuid, headers = {}) ⇒ Response
Verify a zone.
-
#zone(uuid, headers = {}) ⇒ Resources::Zone
Get a zone object.
-
#zones(headers = {}) ⇒ Array<Resources::Zone>
Get an array of existing zone objects.
Instance Method Details
#create_zone(attributes, headers = {}) ⇒ Response
Create a new zone.
74 75 76 77 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 74 def create_zone(attributes, headers = {}) Validators::Zone.validate_attributes!(attributes, :create) post!("zones", attributes, headers) end |
#delete_zone(uuid, headers = {}) ⇒ Response
Delete a zone.
91 92 93 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 91 def delete_zone(uuid, headers = {}) delete!("zones/#{uuid}", {}, headers) end |
#get_token(uuid, headers = {}) ⇒ Response
Get a verify token.
280 281 282 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 280 def get_token(uuid, headers = {}) get!("zones/#{uuid}/token", {}, headers) end |
#get_zone(uuid, headers = {}) ⇒ Response
Get a zone.
160 161 162 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 160 def get_zone(uuid, headers = {}) get!("zones/#{uuid}", {}, headers) end |
#list_zones(headers = {}) ⇒ Response
Get list of existing zones
180 181 182 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 180 def list_zones(headers = {}) get!("zones", {}, headers) end |
#update_zone(uuid, attributes, headers = {}) ⇒ Response
Update a zone.
256 257 258 259 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 256 def update_zone(uuid, attributes, headers = {}) Validators::Zone.validate_attributes!(attributes, :update) put!("zones/#{uuid}", attributes, headers) end |
#verify_zone(uuid, headers = {}) ⇒ Response
Verify a zone.
297 298 299 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 297 def verify_zone(uuid, headers = {}) post!("zones/#{uuid}/verify", {}, headers) end |
#zone(uuid, headers = {}) ⇒ Resources::Zone
Get a zone object.
306 307 308 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 306 def zone(uuid, headers = {}) Resources::Zone.new(self, get_zone(uuid, headers).body) end |
#zones(headers = {}) ⇒ Array<Resources::Zone>
Get an array of existing zone objects.
314 315 316 317 318 |
# File 'lib/idcf/dns/client_extensions/zone.rb', line 314 def zones(headers = {}) list_zones(headers).resources.map do |zone| Resources::Zone.new(self, zone) end end |