Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-09-28 14:17:20.177715",
"spec_repo_commit": "3f45eb23"
"regenerated": "2023-09-28 19:18:53.981901",
"spec_repo_commit": "4b2bab38"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-09-28 14:17:20.192280",
"spec_repo_commit": "3f45eb23"
"regenerated": "2023-09-28 19:18:53.999367",
"spec_repo_commit": "4b2bab38"
}
}
}
25 changes: 25 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17987,6 +17987,31 @@ paths:
summary: Delete a retention filter
tags:
- APM Retention Filters
get:
description: Get an APM retention filter.
operationId: GetApmRetentionFilter
parameters:
- $ref: '#/components/parameters/RetentionFilterIdParam'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RetentionFilterResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Get a given APM retention filter
tags:
- APM Retention Filters
put:
description: Update a retention filter from your organization.
operationId: UpdateApmRetentionFilter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-09-28T08:19:42.753Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-09-28T08:19:43.496Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions examples/v2/apm-retention-filters/GetApmRetentionFilter.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get a given APM retention filter returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::APMRetentionFiltersAPI.new

# there is a valid "retention_filter" in the system
RETENTION_FILTER_DATA_ID = ENV["RETENTION_FILTER_DATA_ID"]
p api_instance.get_apm_retention_filter(RETENTION_FILTER_DATA_ID)
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,9 @@
"v2.DeleteApmRetentionFilter" => {
"filter_id" => "String",
},
"v2.GetApmRetentionFilter" => {
"filter_id" => "String",
},
"v2.UpdateApmRetentionFilter" => {
"filter_id" => "String",
"body" => "RetentionFilterUpdateRequest",
Expand Down
15 changes: 15 additions & 0 deletions features/v2/apm_retention_filters.feature
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ Feature: APM Retention Filters
When the request is sent
Then the response status is 200 OK

@team:DataDog/apm-trace-intake
Scenario: Get a given APM retention filter returns "Not Found" response
Given new "GetApmRetentionFilter" request
And request contains "filter_id" parameter with value "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/apm-trace-intake
Scenario: Get a given APM retention filter returns "OK" response
Given there is a valid "retention_filter" in the system
And new "GetApmRetentionFilter" request
And request contains "filter_id" parameter from "retention_filter.data.id"
When the request is sent
Then the response status is 200 OK

@team:DataDog/apm-trace-intake
Scenario: List all APM retention filters returns "OK" response
Given there is a valid "retention_filter" in the system
Expand Down
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@
"type": "idempotent"
}
},
"GetApmRetentionFilter": {
"tag": "APM Retention Filters",
"undo": {
"type": "safe"
}
},
"UpdateApmRetentionFilter": {
"tag": "APM Retention Filters",
"undo": {
Expand Down
65 changes: 65 additions & 0 deletions lib/datadog_api_client/v2/api/apm_retention_filters_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,71 @@ def delete_apm_retention_filter_with_http_info(filter_id, opts = {})
return data, status_code, headers
end

# Get a given APM retention filter.
#
# @see #get_apm_retention_filter_with_http_info
def get_apm_retention_filter(filter_id, opts = {})
data, _status_code, _headers = get_apm_retention_filter_with_http_info(filter_id, opts)
data
end

# Get a given APM retention filter.
#
# Get an APM retention filter.
#
# @param filter_id [String] The ID of the retention filter.
# @param opts [Hash] the optional parameters
# @return [Array<(RetentionFilterResponse, Integer, Hash)>] RetentionFilterResponse data, response status code and response headers
def get_apm_retention_filter_with_http_info(filter_id, opts = {})

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: APMRetentionFiltersAPI.get_apm_retention_filter ...'
end
# verify the required parameter 'filter_id' is set
if @api_client.config.client_side_validation && filter_id.nil?
fail ArgumentError, "Missing the required parameter 'filter_id' when calling APMRetentionFiltersAPI.get_apm_retention_filter"
end
# resource path
local_var_path = '/api/v2/apm/config/retention-filters/{filter_id}'.sub('{filter_id}', CGI.escape(filter_id.to_s).gsub('%2F', '/'))

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'RetentionFilterResponse'

# auth_names
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]

new_options = opts.merge(
:operation => :get_apm_retention_filter,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type,
:api_version => "V2"
)

data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: APMRetentionFiltersAPI#get_apm_retention_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# List all APM retention filters.
#
# @see #list_apm_retention_filters_with_http_info
Expand Down