class Wavefront::CloudIntegration

View and manage Cloud Integrations. These are identified by a UUID.

Public Instance Methods

confirm_aws_external_id(external_id) click to toggle source

GET /api/v2/cloudintegration/awsExternalId/{id}GETs (confirms) a valid external id that was created by Wavefront @param id [String] AWS external ID @return [Wavefront::Response]

# File lib/wavefront-sdk/cloudintegration.rb, line 127
def confirm_aws_external_id(external_id)
  wf_aws_external_id?(external_id)
  api.get(['awsExternalId', external_id].uri_concat)
end
create(body) click to toggle source

POST /api/v2/cloudintegration Create a cloud integration. Refer to the Swagger API docs for valid keys.

@param body [Hash] description of integration @return [Wavefront::Response]

# 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() click to toggle source

POST /api/v2/cloudintegration/awsExternalIdCreate an external id @return [Wavefront::Response]

# File lib/wavefront-sdk/cloudintegration.rb, line 108
def create_aws_external_id
  api.post('awsExternalId', nil, 'application/json')
end
delete(id) click to toggle source

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.

@param id [String] ID of the integration @return [Wavefront::Response]

# 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) click to toggle source

DELETE /api/v2/cloudintegration/awsExternalId/{id}DELETEs an external id that was created by Wavefront @param id [String] AWS external ID @return [Wavefront::Response]

# File lib/wavefront-sdk/cloudintegration.rb, line 117
def delete_aws_external_id(external_id)
  wf_aws_external_id?(external_id)
  api.delete(['awsExternalId', external_id].uri_concat)
end
describe(id) click to toggle source

GET /api/v2/cloudintegration/id Get a specific cloud integration

@param id [String] ID of the integration @return [Wavefront::Response]

# File lib/wavefront-sdk/cloudintegration.rb, line 56
def describe(id)
  wf_cloudintegration_id?(id)
  api.get(id)
end
disable(id) click to toggle source

POST /api/v2/cloudintegration/{id}/disable Disable a specific cloud integration @param id [String] ID of the integration @return [Wavefront::Response]

# File lib/wavefront-sdk/cloudintegration.rb, line 79
def disable(id)
  wf_cloudintegration_id?(id)
  api.post([id, 'disable'].uri_concat)
end
enable(id) click to toggle source

POST /api/v2/cloudintegration/{id}/enable Enable a specific cloud integration @param id [String] ID of the integration @return [Wavefront::Response]

# 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) click to toggle source

GET /api/v2/cloudintegration Get all cloud integrations for a customer

@param offset [Int] integration at which the list begins @param limit [Int] the number of integration to return @return [Wavefront::Response]

# File lib/wavefront-sdk/cloudintegration.rb, line 18
def list(offset = 0, limit = 100)
  api.get('', offset: offset, limit: limit)
end
undelete(id) click to toggle source

POST /api/v2/cloudintegration/id/undelete Undelete a specific cloud integration

@param id [String] ID of the integration @return [Wavefront::Response]

# 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) click to toggle source

PUT /api/v2/cloudintegration/id Update a specific cloud integration

@param id [String] ID of the integration @param body [Wavefront::Response]

# 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() click to toggle source
# File lib/wavefront-sdk/cloudintegration.rb, line 132
def update_keys
  %i[name]
end