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 CoreApi
Instance Method Summary collapse
-
#confirm_aws_external_id(external_id) ⇒ Wavefront::Response
GET /api/v2/cloudintegration/awsExternalId/id GETs (confirms) a valid external id that was created by Wavefront.
-
#create(body) ⇒ Wavefront::Response
POST /api/v2/cloudintegration Create a cloud integration.
-
#create_aws_external_id ⇒ Wavefront::Response
POST /api/v2/cloudintegration/awsExternalId Create an external id.
-
#delete(id) ⇒ Wavefront::Response
DELETE /api/v2/cloudintegration/id Delete a specific cloud integration.
-
#delete_aws_external_id(external_id) ⇒ Wavefront::Response
DELETE /api/v2/cloudintegration/awsExternalId/id Deletes an external id that was created by Wavefront.
-
#describe(id) ⇒ Wavefront::Response
GET /api/v2/cloudintegration/id Get a specific cloud integration.
-
#disable(id) ⇒ Wavefront::Response
POST /api/v2/cloudintegration/id/disable Disable a specific cloud integration.
-
#enable(id) ⇒ Wavefront::Response
POST /api/v2/cloudintegration/id/enable Enable 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.
- #update_keys ⇒ Object
Methods inherited from CoreApi
#api_base, #api_path, #hash_for_update, #initialize, #setup_api, #time_to_ms
Methods included from Mixins
#log, #parse_relative_time, #parse_time, #relative_time, #time_multiplier, #valid_relative_time?
Methods included from Validators
#uuid?, #wf_account_id?, #wf_alert_id?, #wf_alert_severity?, #wf_apitoken_id?, #wf_aws_external_id?, #wf_cloudintegration_id?, #wf_dashboard_id?, #wf_derivedmetric_id?, #wf_distribution?, #wf_distribution_count?, #wf_distribution_interval?, #wf_distribution_values?, #wf_epoch?, #wf_event_id?, #wf_granularity?, #wf_ingestionpolicy_id?, #wf_integration_id?, #wf_link_id?, #wf_link_template?, #wf_maintenance_window_id?, #wf_message_id?, #wf_metric_name?, #wf_metricspolicy_id?, #wf_monitoredapplication_id?, #wf_monitoredcluster_id?, #wf_ms_ts?, #wf_name?, #wf_notificant_id?, #wf_permission?, #wf_point?, #wf_point_tag?, #wf_point_tags?, #wf_proxy_id?, #wf_role_id?, #wf_sampling_value?, #wf_savedsearch_entity?, #wf_savedsearch_id?, #wf_serviceaccount_id?, #wf_source_id?, #wf_spansamplingpolicy_id?, #wf_string?, #wf_tag?, #wf_trace?, #wf_ts?, #wf_user_id?, #wf_usergroup_id?, #wf_value?, #wf_version?, #wf_webhook_id?
Constructor Details
This class inherits a constructor from Wavefront::CoreApi
Instance Method Details
#confirm_aws_external_id(external_id) ⇒ Wavefront::Response
GET /api/v2/cloudintegration/awsExternalId/id GETs (confirms) a valid external id that was created by Wavefront
129 130 131 132 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 129 def confirm_aws_external_id(external_id) wf_aws_external_id?(external_id) api.get(['awsExternalId', external_id].uri_concat) end |
#create(body) ⇒ Wavefront::Response
POST /api/v2/cloudintegration Create a cloud integration. Refer to the Swagger API docs for valid keys.
29 30 31 32 33 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 29 def create(body) raise ArgumentError unless body.is_a?(Hash) api.post('', body, 'application/json') end |
#create_aws_external_id ⇒ Wavefront::Response
POST /api/v2/cloudintegration/awsExternalId Create an external id
109 110 111 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 109 def create_aws_external_id api.post('awsExternalId', nil, '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.
45 46 47 48 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 45 def delete(id) wf_cloudintegration_id?(id) api.delete(id) end |
#delete_aws_external_id(external_id) ⇒ Wavefront::Response
DELETE /api/v2/cloudintegration/awsExternalId/id Deletes an external id that was created by Wavefront
119 120 121 122 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 119 def delete_aws_external_id(external_id) wf_aws_external_id?(external_id) api.delete(['awsExternalId', external_id].uri_concat) end |
#describe(id) ⇒ Wavefront::Response
GET /api/v2/cloudintegration/id Get a specific cloud integration
56 57 58 59 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 56 def describe(id) wf_cloudintegration_id?(id) api.get(id) end |
#disable(id) ⇒ Wavefront::Response
POST /api/v2/cloudintegration/id/disable Disable a specific cloud integration
79 80 81 82 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 79 def disable(id) wf_cloudintegration_id?(id) api.post([id, 'disable'].uri_concat) end |
#enable(id) ⇒ Wavefront::Response
POST /api/v2/cloudintegration/id/enable Enable a specific cloud integration
89 90 91 92 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 89 def enable(id) wf_cloudintegration_id?(id) api.post([id, 'enable'].uri_concat) end |
#list(offset = 0, limit = 100) ⇒ Wavefront::Response
GET /api/v2/cloudintegration Get all cloud integrations for a customer
18 19 20 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 18 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
100 101 102 103 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 100 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
67 68 69 70 71 72 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 67 def update(id, body) wf_cloudintegration_id?(id) raise ArgumentError unless body.is_a?(Hash) api.put(id, body) end |
#update_keys ⇒ Object
134 135 136 |
# File 'lib/wavefront-sdk/cloudintegration.rb', line 134 def update_keys %i[name] end |