Class: Wavefront::CloudIntegration
- Defined in:
- lib/wavefront-sdk/cloudintegration.rb
Overview
View and manage Cloud Integrations. These are identified by a UUID.
Instance Attribute Summary
Attributes inherited from Base
#api_base, #conn, #debug, #logger, #net, #noop, #opts, #update_keys, #verbose
Instance Method Summary collapse
-
#create(body) ⇒ Wavefront::Response
POST /api/v2/cloudintegration Create a cloud integration.
-
#delete(id) ⇒ Wavefront::Response
DELETE /api/v2/cloudintegration/id Delete a specific cloud integration.
-
#describe(id) ⇒ Wavefront::Response
GET /api/v2/cloudintegration/id Get a specific cloud integration.
-
#list(offset = 0, limit = 100) ⇒ Wavefront::Response
GET /api/v2/cloudintegration Get all cloud integrations for a customer.
-
#undelete(id) ⇒ Wavefront::Response
POST /api/v2/cloudintegration/id/undelete Undelete a specific cloud integration.
-
#update(id, body) ⇒ Object
PUT /api/v2/cloudintegration/id Update a specific cloud integration.
Methods inherited from Base
#api_delete, #api_get, #api_post, #api_put, #hash_for_update, #initialize, #log, #mk_conn, #respond, #time_to_ms
Methods included from Mixins
Methods included from Validators
#wf_alert_id?, #wf_alert_severity?, #wf_cloudintegration_id?, #wf_dashboard_id?, #wf_epoch?, #wf_event_id?, #wf_granularity?, #wf_link_id?, #wf_link_template?, #wf_maintenance_window_id?, #wf_message_id?, #wf_metric_name?, #wf_ms_ts?, #wf_name?, #wf_point?, #wf_point_tags?, #wf_proxy_id?, #wf_savedsearch_entity?, #wf_savedsearch_id?, #wf_source_id?, #wf_string?, #wf_tag?, #wf_ts?, #wf_user_id?, #wf_value?, #wf_version?, #wf_webhook_id?
Constructor Details
This class inherits a constructor from Wavefront::Base
Instance Method Details
#create(body) ⇒ Wavefront::Response
POST /api/v2/cloudintegration Create a cloud integration. Refer to the Swagger API docs for valid keys.
28 29 30 31 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 28 def create(body) raise ArgumentError unless body.is_a?(Hash) api_post('', body, 'application/json') end |
#delete(id) ⇒ Wavefront::Response
DELETE /api/v2/cloudintegration/id Delete a specific cloud integration
Deleting an active integration moves it to ‘trash’, from where it can be restored with an #undelete operation. Deleting an integration in ‘trash’ removes it for ever.
43 44 45 46 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 43 def delete(id) wf_cloudintegration_id?(id) api_delete(id) end |
#describe(id) ⇒ Wavefront::Response
GET /api/v2/cloudintegration/id Get a specific cloud integration
54 55 56 57 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 54 def describe(id) wf_cloudintegration_id?(id) api_get(id) end |
#list(offset = 0, limit = 100) ⇒ Wavefront::Response
GET /api/v2/cloudintegration Get all cloud integrations for a customer
17 18 19 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 17 def list(offset = 0, limit = 100) api_get('', { offset: offset, limit: limit }) end |
#undelete(id) ⇒ Wavefront::Response
POST /api/v2/cloudintegration/id/undelete Undelete a specific cloud integration
77 78 79 80 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 77 def undelete(id) wf_cloudintegration_id?(id) api_post([id, 'undelete'].uri_concat) end |
#update(id, body) ⇒ Object
PUT /api/v2/cloudintegration/id Update a specific cloud integration
65 66 67 68 69 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 65 def update(id, body) wf_cloudintegration_id?(id) raise ArgumentError unless body.is_a?(Hash) api_put(id, body) end |