Class: HaloMspApi::Resources::Slas

Inherits:
Base
  • Object
show all
Defined in:
lib/halo_msp_api/resources/slas.rb

Overview

Resource class for SLAs

Instance Attribute Summary

Attributes inherited from Base

#client_instance

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from HaloMspApi::Resources::Base

Instance Method Details

#create_policy(data) ⇒ Object

POST /SLAPolicy - Create SLA policy



44
45
46
# File 'lib/halo_msp_api/resources/slas.rb', line 44

def create_policy(data)
  create_resource('SLAPolicy', data)
end

#create_sla(data) ⇒ Object

POST /SLA - Create a new SLA



18
19
20
# File 'lib/halo_msp_api/resources/slas.rb', line 18

def create_sla(data)
  create_resource('SLA', data)
end

#create_target(data) ⇒ Object

POST /SLATarget - Create SLA target



70
71
72
# File 'lib/halo_msp_api/resources/slas.rb', line 70

def create_target(data)
  create_resource('SLATarget', data)
end

#delete_policy(id) ⇒ Object

DELETE /SLAPolicy/id - Delete SLA policy



54
55
56
# File 'lib/halo_msp_api/resources/slas.rb', line 54

def delete_policy(id)
  delete_resource('SLAPolicy', id)
end

#delete_sla(id) ⇒ Object

DELETE /SLA/id - Delete an SLA



28
29
30
# File 'lib/halo_msp_api/resources/slas.rb', line 28

def delete_sla(id)
  delete_resource('SLA', id)
end

#delete_target(id) ⇒ Object

DELETE /SLATarget/id - Delete SLA target



80
81
82
# File 'lib/halo_msp_api/resources/slas.rb', line 80

def delete_target(id)
  delete_resource('SLATarget', id)
end

#policies(params = {}) ⇒ Object

SLA Policy methods GET /SLAPolicy - List SLA policies



34
35
36
# File 'lib/halo_msp_api/resources/slas.rb', line 34

def policies(params = {})
  list_resource('SLAPolicy', params)
end

#policy(id, params = {}) ⇒ Object

GET /SLAPolicy/id - Get specific SLA policy



39
40
41
# File 'lib/halo_msp_api/resources/slas.rb', line 39

def policy(id, params = {})
  get_resource('SLAPolicy', id, params)
end

#sla(id, params = {}) ⇒ Object

GET /SLA/id - Get a specific SLA



13
14
15
# File 'lib/halo_msp_api/resources/slas.rb', line 13

def sla(id, params = {})
  get_resource('SLA', id, params)
end

#slas(params = {}) ⇒ Object

GET /SLA - List of SLAs



8
9
10
# File 'lib/halo_msp_api/resources/slas.rb', line 8

def slas(params = {})
  list_resource('SLA', params)
end

#target(id, params = {}) ⇒ Object

GET /SLATarget/id - Get specific SLA target



65
66
67
# File 'lib/halo_msp_api/resources/slas.rb', line 65

def target(id, params = {})
  get_resource('SLATarget', id, params)
end

#targets(params = {}) ⇒ Object

SLA Target methods GET /SLATarget - List SLA targets



60
61
62
# File 'lib/halo_msp_api/resources/slas.rb', line 60

def targets(params = {})
  list_resource('SLATarget', params)
end

#update_policy(id, data) ⇒ Object

PUT /SLAPolicy/id - Update SLA policy



49
50
51
# File 'lib/halo_msp_api/resources/slas.rb', line 49

def update_policy(id, data)
  update_resource('SLAPolicy', id, data)
end

#update_sla(id, data) ⇒ Object

PUT /SLA/id - Update an SLA



23
24
25
# File 'lib/halo_msp_api/resources/slas.rb', line 23

def update_sla(id, data)
  update_resource('SLA', id, data)
end

#update_target(id, data) ⇒ Object

PUT /SLATarget/id - Update SLA target



75
76
77
# File 'lib/halo_msp_api/resources/slas.rb', line 75

def update_target(id, data)
  update_resource('SLATarget', id, data)
end