Skip to content

Commit 7507ebd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f0355b7 of spec repo
1 parent 3d9b63f commit 7507ebd

File tree

14 files changed

+689
-34
lines changed

14 files changed

+689
-34
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51339,6 +51339,49 @@ components:
5133951339
$ref: '#/components/schemas/ServiceDefinitionData'
5134051340
type: array
5134151341
type: object
51342+
ServiceList:
51343+
properties:
51344+
data:
51345+
$ref: '#/components/schemas/ServiceListData'
51346+
type: object
51347+
ServiceListData:
51348+
properties:
51349+
attributes:
51350+
$ref: '#/components/schemas/ServiceListDataAttributes'
51351+
id:
51352+
type: string
51353+
type:
51354+
$ref: '#/components/schemas/ServiceListDataType'
51355+
required:
51356+
- type
51357+
type: object
51358+
ServiceListDataAttributes:
51359+
properties:
51360+
metadata:
51361+
items:
51362+
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
51363+
type: array
51364+
services:
51365+
items:
51366+
type: string
51367+
type: array
51368+
type: object
51369+
ServiceListDataAttributesMetadataItems:
51370+
properties:
51371+
isTraced:
51372+
type: boolean
51373+
isUsm:
51374+
type: boolean
51375+
type: object
51376+
ServiceListDataType:
51377+
default: services_list
51378+
description: Services list resource type.
51379+
enum:
51380+
- services_list
51381+
example: services_list
51382+
type: string
51383+
x-enum-varnames:
51384+
- SERVICES_LIST
5134251385
ServiceNowBasicAuth:
5134351386
description: The definition of the `ServiceNowBasicAuth` object.
5134451387
properties:
@@ -61601,6 +61644,26 @@ paths:
6160161644
permissions:
6160261645
- apm_retention_filter_write
6160361646
- apm_pipelines_write
61647+
/api/v2/apm/services:
61648+
get:
61649+
operationId: GetServiceList
61650+
responses:
61651+
'200':
61652+
content:
61653+
application/json:
61654+
schema:
61655+
$ref: '#/components/schemas/ServiceList'
61656+
description: OK
61657+
'429':
61658+
$ref: '#/components/responses/TooManyRequestsResponse'
61659+
security:
61660+
- apiKeyAuth: []
61661+
appKeyAuth: []
61662+
- AuthZ:
61663+
- apm_read
61664+
summary: Get service list
61665+
tags:
61666+
- APM
6160461667
/api/v2/app-builder/apps:
6160561668
delete:
6160661669
description: Delete multiple apps in a single request from a list of app IDs.
@@ -69334,9 +69397,6 @@ paths:
6933469397
operator: OR
6933569398
permissions:
6933669399
- incident_read
69337-
x-unstable: '**Note**: This endpoint is in Preview.
69338-
69339-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6934069400
post:
6934169401
description: Create an impact for an incident.
6934269402
operationId: CreateIncidentImpact
@@ -69380,9 +69440,6 @@ paths:
6938069440
operator: OR
6938169441
permissions:
6938269442
- incident_write
69383-
x-unstable: '**Note**: This endpoint is in Preview.
69384-
69385-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6938669443
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
6938769444
delete:
6938869445
description: Delete an incident impact.
@@ -69413,9 +69470,6 @@ paths:
6941369470
operator: OR
6941469471
permissions:
6941569472
- incident_write
69416-
x-unstable: '**Note**: This endpoint is in Preview.
69417-
69418-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6941969473
/api/v2/incidents/{incident_id}/relationships/integrations:
6942069474
get:
6942169475
description: Get all integration metadata for an incident.
@@ -88586,6 +88640,9 @@ servers:
8858688640
tags:
8858788641
- description: Configure your API endpoints through the Datadog API.
8858888642
name: API Management
88643+
- description: Observe, troubleshoot, and improve cloud-scale applications with all
88644+
telemetry in context
88645+
name: APM
8858988646
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
8859088647
for your organization. You need an API and application key with Admin rights to
8859188648
interact with this endpoint. See [retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/#retention-filters)

examples/v2/apm/GetServiceList.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get service list returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::APMAPI.new
5+
p api_instance.get_service_list()

features/v2/apm.feature

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@endpoint(apm) @endpoint(apm-v2)
2+
Feature: APM
3+
Observe, troubleshoot, and improve cloud-scale applications with all
4+
telemetry in context
5+
6+
@generated @skip @team:DataDog/apm-aoe
7+
Scenario: Get service list returns "OK" response
8+
Given a valid "apiKeyAuth" key in the system
9+
And a valid "appKeyAuth" key in the system
10+
And an instance of "APM" API
11+
And new "GetServiceList" request
12+
When the request is sent
13+
Then the response status is 200 OK

features/v2/incidents.feature

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,16 +806,14 @@ Feature: Incidents
806806

807807
@generated @skip @team:DataDog/incident-app
808808
Scenario: List an incident's impacts returns "Bad Request" response
809-
Given operation "ListIncidentImpacts" enabled
810-
And new "ListIncidentImpacts" request
809+
Given new "ListIncidentImpacts" request
811810
And request contains "incident_id" parameter from "REPLACE.ME"
812811
When the request is sent
813812
Then the response status is 400 Bad Request
814813

815814
@generated @skip @team:DataDog/incident-app
816815
Scenario: List an incident's impacts returns "Not Found" response
817-
Given operation "ListIncidentImpacts" enabled
818-
And new "ListIncidentImpacts" request
816+
Given new "ListIncidentImpacts" request
819817
And request contains "incident_id" parameter from "REPLACE.ME"
820818
When the request is sent
821819
Then the response status is 404 Not Found

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,12 @@
516516
"type": "idempotent"
517517
}
518518
},
519+
"GetServiceList": {
520+
"tag": "APM",
521+
"undo": {
522+
"type": "safe"
523+
}
524+
},
519525
"DeleteApps": {
520526
"tag": "App Builder",
521527
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,12 @@ def initialize
249249
"v2.update_deployment_gate": false,
250250
"v2.update_deployment_rule": false,
251251
"v2.create_incident": false,
252-
"v2.create_incident_impact": false,
253252
"v2.create_incident_integration": false,
254253
"v2.create_incident_notification_rule": false,
255254
"v2.create_incident_notification_template": false,
256255
"v2.create_incident_todo": false,
257256
"v2.create_incident_type": false,
258257
"v2.delete_incident": false,
259-
"v2.delete_incident_impact": false,
260258
"v2.delete_incident_integration": false,
261259
"v2.delete_incident_notification_rule": false,
262260
"v2.delete_incident_notification_template": false,
@@ -269,7 +267,6 @@ def initialize
269267
"v2.get_incident_todo": false,
270268
"v2.get_incident_type": false,
271269
"v2.list_incident_attachments": false,
272-
"v2.list_incident_impacts": false,
273270
"v2.list_incident_integrations": false,
274271
"v2.list_incident_notification_rules": false,
275272
"v2.list_incident_notification_templates": false,

lib/datadog_api_client/inflector.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4163,6 +4163,11 @@ def overrides
41634163
"v2.service_definition_v2_slack" => "ServiceDefinitionV2Slack",
41644164
"v2.service_definition_v2_slack_type" => "ServiceDefinitionV2SlackType",
41654165
"v2.service_definition_v2_version" => "ServiceDefinitionV2Version",
4166+
"v2.service_list" => "ServiceList",
4167+
"v2.service_list_data" => "ServiceListData",
4168+
"v2.service_list_data_attributes" => "ServiceListDataAttributes",
4169+
"v2.service_list_data_attributes_metadata_items" => "ServiceListDataAttributesMetadataItems",
4170+
"v2.service_list_data_type" => "ServiceListDataType",
41664171
"v2.service_now_basic_auth" => "ServiceNowBasicAuth",
41674172
"v2.service_now_basic_auth_type" => "ServiceNowBasicAuthType",
41684173
"v2.service_now_basic_auth_update" => "ServiceNowBasicAuthUpdate",
@@ -4671,6 +4676,7 @@ def overrides
46714676
"v2.actions_datastores_api" => "ActionsDatastoresAPI",
46724677
"v2.agentless_scanning_api" => "AgentlessScanningAPI",
46734678
"v2.api_management_api" => "APIManagementAPI",
4679+
"v2.apm_api" => "APMAPI",
46744680
"v2.apm_retention_filters_api" => "APMRetentionFiltersAPI",
46754681
"v2.app_builder_api" => "AppBuilderAPI",
46764682
"v2.application_security_api" => "ApplicationSecurityAPI",
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'cgi'
17+
18+
module DatadogAPIClient::V2
19+
class APMAPI
20+
attr_accessor :api_client
21+
22+
def initialize(api_client = DatadogAPIClient::APIClient.default)
23+
@api_client = api_client
24+
end
25+
26+
# Get service list.
27+
#
28+
# @see #get_service_list_with_http_info
29+
def get_service_list(opts = {})
30+
data, _status_code, _headers = get_service_list_with_http_info(opts)
31+
data
32+
end
33+
34+
# Get service list.
35+
# @param opts [Hash] the optional parameters
36+
# @return [Array<(ServiceList, Integer, Hash)>] ServiceList data, response status code and response headers
37+
def get_service_list_with_http_info(opts = {})
38+
39+
if @api_client.config.debugging
40+
@api_client.config.logger.debug 'Calling API: APMAPI.get_service_list ...'
41+
end
42+
# resource path
43+
local_var_path = '/api/v2/apm/services'
44+
45+
# query parameters
46+
query_params = opts[:query_params] || {}
47+
48+
# header parameters
49+
header_params = opts[:header_params] || {}
50+
# HTTP header 'Accept' (if needed)
51+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
52+
53+
# form parameters
54+
form_params = opts[:form_params] || {}
55+
56+
# http body (model)
57+
post_body = opts[:debug_body]
58+
59+
# return_type
60+
return_type = opts[:debug_return_type] || 'ServiceList'
61+
62+
# auth_names
63+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
64+
65+
new_options = opts.merge(
66+
:operation => :get_service_list,
67+
:header_params => header_params,
68+
:query_params => query_params,
69+
:form_params => form_params,
70+
:body => post_body,
71+
:auth_names => auth_names,
72+
:return_type => return_type,
73+
:api_version => "V2"
74+
)
75+
76+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
77+
if @api_client.config.debugging
78+
@api_client.config.logger.debug "API called: APMAPI#get_service_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79+
end
80+
return data, status_code, headers
81+
end
82+
end
83+
end

lib/datadog_api_client/v2/api/incidents_api.rb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ def create_incident_impact(incident_id, body, opts = {})
114114
# @option opts [Array<IncidentImpactRelatedObject>] :include Specifies which related resources should be included in the response.
115115
# @return [Array<(IncidentImpactResponse, Integer, Hash)>] IncidentImpactResponse data, response status code and response headers
116116
def create_incident_impact_with_http_info(incident_id, body, opts = {})
117-
unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_impact".to_sym]
118-
if unstable_enabled
119-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_impact")
120-
else
121-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_impact"))
122-
end
123117

124118
if @api_client.config.debugging
125119
@api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_impact ...'
@@ -639,12 +633,6 @@ def delete_incident_impact(incident_id, impact_id, opts = {})
639633
# @param opts [Hash] the optional parameters
640634
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
641635
def delete_incident_impact_with_http_info(incident_id, impact_id, opts = {})
642-
unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_impact".to_sym]
643-
if unstable_enabled
644-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_impact")
645-
else
646-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_impact"))
647-
end
648636

649637
if @api_client.config.debugging
650638
@api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_impact ...'
@@ -1601,12 +1589,6 @@ def list_incident_impacts(incident_id, opts = {})
16011589
# @option opts [Array<IncidentImpactRelatedObject>] :include Specifies which related resources should be included in the response.
16021590
# @return [Array<(IncidentImpactsResponse, Integer, Hash)>] IncidentImpactsResponse data, response status code and response headers
16031591
def list_incident_impacts_with_http_info(incident_id, opts = {})
1604-
unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_impacts".to_sym]
1605-
if unstable_enabled
1606-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_impacts")
1607-
else
1608-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_impacts"))
1609-
end
16101592

16111593
if @api_client.config.debugging
16121594
@api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_impacts ...'

0 commit comments

Comments
 (0)