Class: Dogapi::V1::AzureIntegrationService
- Inherits:
-
APIService
- Object
- APIService
- Dogapi::V1::AzureIntegrationService
- Defined in:
- lib/dogapi/v1/azure_integration.rb
Overview
AzureIntegrationService for user interaction with Azure configs.
Constant Summary collapse
- API_VERSION =
'v1'
Instance Attribute Summary
Attributes inherited from APIService
Instance Method Summary collapse
-
#azure_integration_create(config) ⇒ Object
Create an Azure integration :config => Hash: integration config.
-
#azure_integration_delete(config) ⇒ Object
Delete an Azure integration :config => Hash: integration config.
-
#azure_integration_list ⇒ Object
Retrieve Azure integration information.
-
#azure_integration_update(config) ⇒ Object
Update a configured Azure account.
-
#azure_integration_update_host_filters(config) ⇒ Object
Update an Azure integrations host filters :config => Hash: integration config.
Methods inherited from APIService
#connect, #handle_redirect, #handle_response, #initialize, #prepare_params, #prepare_request, #request, #should_set_api_and_app_keys_in_params?, #suppress_error_if_silent
Constructor Details
This class inherits a constructor from Dogapi::APIService
Instance Method Details
#azure_integration_create(config) ⇒ Object
Create an Azure integration :config => Hash: integration config. config =
:tenant_name => '<TENANT_NAME>',
:host_filters => 'new:filter',
:client_id => '<CLIENT_ID>',
:client_secret => '<CLIENT_SECRET>'
dog = Dogapi::Client.new(api_key, app_key)
puts dog.azure_integration_create(config)
44 45 46 |
# File 'lib/dogapi/v1/azure_integration.rb', line 44 def azure_integration_create(config) request(Net::HTTP::Post, "/api/#{API_VERSION}/integration/azure", nil, config, true) end |
#azure_integration_delete(config) ⇒ Object
Delete an Azure integration :config => Hash: integration config. config =
:tenant_name => '<TENANT_NAME>',
:client_id => '<CLIENT_ID>'
dog = Dogapi::Client.new(api_key, app_key)
puts dog.azure_integration_delete(config)
28 29 30 |
# File 'lib/dogapi/v1/azure_integration.rb', line 28 def azure_integration_delete(config) request(Net::HTTP::Delete, "/api/#{API_VERSION}/integration/azure", nil, config, true) end |
#azure_integration_list ⇒ Object
Retrieve Azure integration information
14 15 16 |
# File 'lib/dogapi/v1/azure_integration.rb', line 14 def azure_integration_list request(Net::HTTP::Get, "/api/#{API_VERSION}/integration/azure", nil, nil, false) end |
#azure_integration_update(config) ⇒ Object
Update a configured Azure account. :config => Hash: integration config. config =
:tenant_name => '<TENANT_NAME>',
:new_tenant_name => '<NEW_TENANT_NAME>',
:host_filters => '<KEY>:<VALUE>,<KEY>:<VALUE>',
:client_id => '<CLIENT_ID>',
:new_client_id => '<NEW_CLIENT_ID>'
dog = Dogapi::Client.new(api_key, app_key)
puts dog.azure_integration_update(config)
76 77 78 |
# File 'lib/dogapi/v1/azure_integration.rb', line 76 def azure_integration_update(config) request(Net::HTTP::Put, "/api/#{API_VERSION}/integration/azure", nil, config, true) end |
#azure_integration_update_host_filters(config) ⇒ Object
Update an Azure integrations host filters :config => Hash: integration config. config =
:tenant_name => '<TENANT_NAME>',
:host_filters => 'new:filter',
:client_id => '<CLIENT_ID>'
dog = Dogapi::Client.new(api_key, app_key)
puts dog.azure_integration_update_host_filters(config)
59 60 61 |
# File 'lib/dogapi/v1/azure_integration.rb', line 59 def azure_integration_update_host_filters(config) request(Net::HTTP::Post, "/api/#{API_VERSION}/integration/azure/host_filters", nil, config, true) end |