Skip to content

Commit a398cde

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5d914f6 of spec repo
1 parent 2d87463 commit a398cde

File tree

14 files changed

+721
-2
lines changed

14 files changed

+721
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51083,6 +51083,49 @@ components:
5108351083
$ref: '#/components/schemas/ServiceDefinitionData'
5108451084
type: array
5108551085
type: object
51086+
ServiceList:
51087+
properties:
51088+
data:
51089+
$ref: '#/components/schemas/ServiceListData'
51090+
type: object
51091+
ServiceListData:
51092+
properties:
51093+
attributes:
51094+
$ref: '#/components/schemas/ServiceListDataAttributes'
51095+
id:
51096+
type: string
51097+
type:
51098+
$ref: '#/components/schemas/ServiceListDataType'
51099+
required:
51100+
- type
51101+
type: object
51102+
ServiceListDataAttributes:
51103+
properties:
51104+
metadata:
51105+
items:
51106+
$ref: '#/components/schemas/ServiceListDataAttributesMetadataItems'
51107+
type: array
51108+
services:
51109+
items:
51110+
type: string
51111+
type: array
51112+
type: object
51113+
ServiceListDataAttributesMetadataItems:
51114+
properties:
51115+
isTraced:
51116+
type: boolean
51117+
isUsm:
51118+
type: boolean
51119+
type: object
51120+
ServiceListDataType:
51121+
default: services_list
51122+
description: Services list resource type.
51123+
enum:
51124+
- services_list
51125+
example: services_list
51126+
type: string
51127+
x-enum-varnames:
51128+
- SERVICES_LIST
5108651129
ServiceNowBasicAuth:
5108751130
description: The definition of the `ServiceNowBasicAuth` object.
5108851131
properties:
@@ -61276,6 +61319,26 @@ paths:
6127661319
permissions:
6127761320
- apm_retention_filter_write
6127861321
- apm_pipelines_write
61322+
/api/v2/apm/services:
61323+
get:
61324+
operationId: GetServiceList
61325+
responses:
61326+
'200':
61327+
content:
61328+
application/json:
61329+
schema:
61330+
$ref: '#/components/schemas/ServiceList'
61331+
description: OK
61332+
'429':
61333+
$ref: '#/components/responses/TooManyRequestsResponse'
61334+
security:
61335+
- apiKeyAuth: []
61336+
appKeyAuth: []
61337+
- AuthZ:
61338+
- apm_read
61339+
summary: Get service list
61340+
tags:
61341+
- APM
6127961342
/api/v2/app-builder/apps:
6128061343
delete:
6128161344
description: Delete multiple apps in a single request from a list of app IDs.
@@ -69009,6 +69072,9 @@ paths:
6900969072
operator: OR
6901069073
permissions:
6901169074
- incident_read
69075+
x-unstable: '**Note**: This endpoint is in Preview.
69076+
69077+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6901269078
post:
6901369079
description: Create an impact for an incident.
6901469080
operationId: CreateIncidentImpact
@@ -69052,6 +69118,9 @@ paths:
6905269118
operator: OR
6905369119
permissions:
6905469120
- incident_write
69121+
x-unstable: '**Note**: This endpoint is in Preview.
69122+
69123+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6905569124
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
6905669125
delete:
6905769126
description: Delete an incident impact.
@@ -69082,6 +69151,9 @@ paths:
6908269151
operator: OR
6908369152
permissions:
6908469153
- incident_write
69154+
x-unstable: '**Note**: This endpoint is in Preview.
69155+
69156+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6908569157
/api/v2/incidents/{incident_id}/relationships/integrations:
6908669158
get:
6908769159
description: Get all integration metadata for an incident.
@@ -88017,6 +88089,9 @@ servers:
8801788089
tags:
8801888090
- description: Configure your API endpoints through the Datadog API.
8801988091
name: API Management
88092+
- description: Observe, troubleshoot, and improve cloud-scale applications with all
88093+
telemetry in context
88094+
name: APM
8802088095
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
8802188096
for your organization. You need an API and application key with Admin rights to
8802288097
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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,14 +806,16 @@ Feature: Incidents
806806

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

814815
@generated @skip @team:DataDog/incident-app
815816
Scenario: List an incident's impacts returns "Not Found" response
816-
Given new "ListIncidentImpacts" request
817+
Given operation "ListIncidentImpacts" enabled
818+
And new "ListIncidentImpacts" request
817819
And request contains "incident_id" parameter from "REPLACE.ME"
818820
When the request is sent
819821
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,14 @@ 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,
252253
"v2.create_incident_integration": false,
253254
"v2.create_incident_notification_rule": false,
254255
"v2.create_incident_notification_template": false,
255256
"v2.create_incident_todo": false,
256257
"v2.create_incident_type": false,
257258
"v2.delete_incident": false,
259+
"v2.delete_incident_impact": false,
258260
"v2.delete_incident_integration": false,
259261
"v2.delete_incident_notification_rule": false,
260262
"v2.delete_incident_notification_template": false,
@@ -267,6 +269,7 @@ def initialize
267269
"v2.get_incident_todo": false,
268270
"v2.get_incident_type": false,
269271
"v2.list_incident_attachments": false,
272+
"v2.list_incident_impacts": false,
270273
"v2.list_incident_integrations": false,
271274
"v2.list_incident_notification_rules": false,
272275
"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
@@ -4143,6 +4143,11 @@ def overrides
41434143
"v2.service_definition_v2_slack" => "ServiceDefinitionV2Slack",
41444144
"v2.service_definition_v2_slack_type" => "ServiceDefinitionV2SlackType",
41454145
"v2.service_definition_v2_version" => "ServiceDefinitionV2Version",
4146+
"v2.service_list" => "ServiceList",
4147+
"v2.service_list_data" => "ServiceListData",
4148+
"v2.service_list_data_attributes" => "ServiceListDataAttributes",
4149+
"v2.service_list_data_attributes_metadata_items" => "ServiceListDataAttributesMetadataItems",
4150+
"v2.service_list_data_type" => "ServiceListDataType",
41464151
"v2.service_now_basic_auth" => "ServiceNowBasicAuth",
41474152
"v2.service_now_basic_auth_type" => "ServiceNowBasicAuthType",
41484153
"v2.service_now_basic_auth_update" => "ServiceNowBasicAuthUpdate",
@@ -4647,6 +4652,7 @@ def overrides
46474652
"v2.actions_datastores_api" => "ActionsDatastoresAPI",
46484653
"v2.agentless_scanning_api" => "AgentlessScanningAPI",
46494654
"v2.api_management_api" => "APIManagementAPI",
4655+
"v2.apm_api" => "APMAPI",
46504656
"v2.apm_retention_filters_api" => "APMRetentionFiltersAPI",
46514657
"v2.app_builder_api" => "AppBuilderAPI",
46524658
"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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ 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
117123

118124
if @api_client.config.debugging
119125
@api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_impact ...'
@@ -633,6 +639,12 @@ def delete_incident_impact(incident_id, impact_id, opts = {})
633639
# @param opts [Hash] the optional parameters
634640
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
635641
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
636648

637649
if @api_client.config.debugging
638650
@api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_impact ...'
@@ -1589,6 +1601,12 @@ def list_incident_impacts(incident_id, opts = {})
15891601
# @option opts [Array<IncidentImpactRelatedObject>] :include Specifies which related resources should be included in the response.
15901602
# @return [Array<(IncidentImpactsResponse, Integer, Hash)>] IncidentImpactsResponse data, response status code and response headers
15911603
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
15921610

15931611
if @api_client.config.debugging
15941612
@api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_impacts ...'

0 commit comments

Comments
 (0)