Module: Idcf::Dns::ClientExtensions::Template
- Defined in:
- lib/idcf/dns/client_extensions/template.rb
Overview
SDK APIs for template resource
Instance Method Summary collapse
-
#create_template(attributes, headers = {}) ⇒ Response
Create a new template.
-
#delete_template(uuid, headers = {}) ⇒ Response
Delete a template.
-
#get_template(uuid, headers = {}) ⇒ Response
Get a template.
-
#list_templates(headers = {}) ⇒ Response
Get list of existing templates.
-
#update_template(uuid, attributes, headers = {}) ⇒ Reponse
Update a template.
Instance Method Details
#create_template(attributes, headers = {}) ⇒ Response
Create a new template.
14 15 16 17 |
# File 'lib/idcf/dns/client_extensions/template.rb', line 14 def create_template(attributes, headers = {}) Validators::Template.validate_attributes!(attributes, :create) post!("templates", attributes, headers) end |
#delete_template(uuid, headers = {}) ⇒ Response
Delete a template.
24 25 26 |
# File 'lib/idcf/dns/client_extensions/template.rb', line 24 def delete_template(uuid, headers = {}) delete!("templates/#{uuid}", {}, headers) end |
#get_template(uuid, headers = {}) ⇒ Response
Get a template.
33 34 35 |
# File 'lib/idcf/dns/client_extensions/template.rb', line 33 def get_template(uuid, headers = {}) get!("templates/#{uuid}", {}, headers) end |
#list_templates(headers = {}) ⇒ Response
Get list of existing templates.
41 42 43 |
# File 'lib/idcf/dns/client_extensions/template.rb', line 41 def list_templates(headers = {}) get!("templates", {}, headers) end |
#update_template(uuid, attributes, headers = {}) ⇒ Reponse
Update a template.
52 53 54 55 |
# File 'lib/idcf/dns/client_extensions/template.rb', line 52 def update_template(uuid, attributes, headers = {}) Validators::Template.validate_attributes!(attributes, :update) put!("templates/#{uuid}", attributes, headers) end |