Class: Dogapi::V1::LogsPipelineService
Constant Summary
collapse
- API_VERSION =
'v1'
Instance Attribute Summary
Attributes inherited from APIService
#api_key, #application_key
Instance Method Summary
collapse
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
Instance Method Details
#create_logs_pipeline(name, filter, options = {}) ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/dogapi/v1/logs_pipeline.rb', line 10
def create_logs_pipeline(name, filter, options = {})
body = {
'name' => name,
'filter' => filter
}.merge options
request(Net::HTTP::Post, "/api/#{API_VERSION}/logs/config/pipelines", nil, body, true)
end
|
#delete_logs_pipeline(pipeline_id) ⇒ Object
36
37
38
|
# File 'lib/dogapi/v1/logs_pipeline.rb', line 36
def delete_logs_pipeline(pipeline_id)
request(Net::HTTP::Delete, "/api/#{API_VERSION}/logs/config/pipelines/#{pipeline_id}", nil, nil, false)
end
|
#get_all_logs_pipelines ⇒ Object
23
24
25
|
# File 'lib/dogapi/v1/logs_pipeline.rb', line 23
def get_all_logs_pipelines
request(Net::HTTP::Get, "/api/#{API_VERSION}/logs/config/pipelines", nil, nil, false)
end
|
#get_logs_pipeline(pipeline_id) ⇒ Object
19
20
21
|
# File 'lib/dogapi/v1/logs_pipeline.rb', line 19
def get_logs_pipeline(pipeline_id)
request(Net::HTTP::Get, "/api/#{API_VERSION}/logs/config/pipelines/#{pipeline_id}", nil, nil, false)
end
|
#update_logs_pipeline(pipeline_id, name, filter, options = {}) ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'lib/dogapi/v1/logs_pipeline.rb', line 27
def update_logs_pipeline(pipeline_id, name, filter, options = {})
body = {
'name' => name,
'filter' => filter
}.merge options
request(Net::HTTP::Put, "/api/#{API_VERSION}/logs/config/pipelines/#{pipeline_id}", nil, body, true)
end
|