Skip to content

Commit c34d26e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 795c134 of spec repo
1 parent 4ddef06 commit c34d26e

File tree

10 files changed

+214
-13
lines changed

10 files changed

+214
-13
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 82 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11481,6 +11481,60 @@ components:
1148111481
example: UTC
1148211482
type: string
1148311483
type: object
11484+
SLOCountCondition:
11485+
description: 'A metric SLI specification, composed of three parts: the good
11486+
events formula, the total events formula,
11487+
11488+
and the involved queries.'
11489+
example:
11490+
good_events_formula: query1 - query2
11491+
queries:
11492+
- data_source: metrics
11493+
name: query1
11494+
query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11495+
- data_source: metrics
11496+
name: query2
11497+
query: sum:trace.servlet.request.errors{*} by {env}.as_count()
11498+
total_events_formula: query1
11499+
properties:
11500+
good_events_formula:
11501+
$ref: '#/components/schemas/SLOFormula'
11502+
queries:
11503+
example:
11504+
- data_source: metrics
11505+
name: query1
11506+
query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11507+
items:
11508+
$ref: '#/components/schemas/SLODataSourceQueryDefinition'
11509+
minItems: 1
11510+
type: array
11511+
total_events_formula:
11512+
$ref: '#/components/schemas/SLOFormula'
11513+
required:
11514+
- good_events_formula
11515+
- total_events_formula
11516+
- queries
11517+
type: object
11518+
SLOCountSpec:
11519+
additionalProperties: false
11520+
description: A metric SLI specification.
11521+
example:
11522+
count:
11523+
good_events_formula: query1 - query2
11524+
queries:
11525+
- data_source: metrics
11526+
name: query1
11527+
query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11528+
- data_source: metrics
11529+
name: query2
11530+
query: sum:trace.servlet.request.errors{*} by {env}.as_count()
11531+
total_events_formula: query1
11532+
properties:
11533+
count:
11534+
$ref: '#/components/schemas/SLOCountCondition'
11535+
required:
11536+
- count
11537+
type: object
1148411538
SLOCreator:
1148511539
description: The creator of the SLO
1148611540
nullable: true
@@ -12328,8 +12382,16 @@ components:
1232812382
type: string
1232912383
query:
1233012384
$ref: '#/components/schemas/ServiceLevelObjectiveQuery'
12385+
description: 'The metric query of good / total events. This is not allowed
12386+
if the `sli_specification` field
12387+
12388+
is used in the same request.'
1233112389
sli_specification:
1233212390
$ref: '#/components/schemas/SLOSliSpec'
12391+
description: 'A generic SLI specification. This is currently used for time-slice
12392+
and metric SLOs only.
12393+
12394+
This is not allowed if the `query` field is used in the same request.'
1233312395
tags:
1233412396
description: 'A list of tags associated with this service level objective.
1233512397

@@ -12386,9 +12448,10 @@ components:
1238612448
type: object
1238712449
SLOSliSpec:
1238812450
description: A generic SLI specification. This is currently used for time-slice
12389-
SLOs only.
12451+
and metric SLOs only.
1239012452
oneOf:
1239112453
- $ref: '#/components/schemas/SLOTimeSliceSpec'
12454+
- $ref: '#/components/schemas/SLOCountSpec'
1239212455
SLOState:
1239312456
description: State of the SLO.
1239412457
enum:
@@ -13479,8 +13542,16 @@ components:
1347913542
type: string
1348013543
query:
1348113544
$ref: '#/components/schemas/ServiceLevelObjectiveQuery'
13545+
description: 'The metric query of good / total events. This is not allowed
13546+
if the `sli_specification` field
13547+
13548+
is used in the same request.'
1348213549
sli_specification:
1348313550
$ref: '#/components/schemas/SLOSliSpec'
13551+
description: 'A generic SLI specification. This is currently used for time-slice
13552+
and metric SLOs only.
13553+
13554+
This is not allowed if the `query` field is used in the same request.'
1348413555
tags:
1348513556
description: 'A list of tags associated with this service level objective.
1348613557

@@ -13540,8 +13611,8 @@ components:
1354013611
- type
1354113612
type: object
1354213613
ServiceLevelObjectiveQuery:
13543-
description: 'A metric-based SLO. **Required if type is `metric`**. Note that
13544-
Datadog only allows the sum by aggregator
13614+
description: 'A now deprecated metric SLO. Note that Datadog only allows the
13615+
sum by aggregator
1354513616

1354613617
to be used because this will sum up all request counts instead of averaging
1354713618
them, or taking the max or
@@ -13610,8 +13681,16 @@ components:
1361013681
type: string
1361113682
query:
1361213683
$ref: '#/components/schemas/ServiceLevelObjectiveQuery'
13684+
description: 'The metric query of good / total events. This is not allowed
13685+
if the `sli_specification` field
13686+
13687+
is used in the same request.'
1361313688
sli_specification:
1361413689
$ref: '#/components/schemas/SLOSliSpec'
13690+
description: 'A generic SLI specification. This is currently used for time-slice
13691+
and metric SLOs only.
13692+
13693+
This is not allowed if the `query` field is used in the same request.'
1361513694
tags:
1361613695
description: 'A list of tags associated with this service level objective.
1361713696

packages/datadog-api-client-v1/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,8 @@ export { SLOCorrectionType } from "./models/SLOCorrectionType";
844844
export { SLOCorrectionUpdateData } from "./models/SLOCorrectionUpdateData";
845845
export { SLOCorrectionUpdateRequest } from "./models/SLOCorrectionUpdateRequest";
846846
export { SLOCorrectionUpdateRequestAttributes } from "./models/SLOCorrectionUpdateRequestAttributes";
847+
export { SLOCountCondition } from "./models/SLOCountCondition";
848+
export { SLOCountSpec } from "./models/SLOCountSpec";
847849
export { SLOCreator } from "./models/SLOCreator";
848850
export { SLODataSourceQueryDefinition } from "./models/SLODataSourceQueryDefinition";
849851
export { SLODeleteResponse } from "./models/SLODeleteResponse";

packages/datadog-api-client-v1/models/ObjectSerializer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ import { SLOCorrectionResponseAttributesModifier } from "./SLOCorrectionResponse
322322
import { SLOCorrectionUpdateData } from "./SLOCorrectionUpdateData";
323323
import { SLOCorrectionUpdateRequest } from "./SLOCorrectionUpdateRequest";
324324
import { SLOCorrectionUpdateRequestAttributes } from "./SLOCorrectionUpdateRequestAttributes";
325+
import { SLOCountCondition } from "./SLOCountCondition";
326+
import { SLOCountSpec } from "./SLOCountSpec";
325327
import { SLOCreator } from "./SLOCreator";
326328
import { SLODeleteResponse } from "./SLODeleteResponse";
327329
import { SLOFormula } from "./SLOFormula";
@@ -2072,6 +2074,8 @@ const typeMap: { [index: string]: any } = {
20722074
SLOCorrectionUpdateData: SLOCorrectionUpdateData,
20732075
SLOCorrectionUpdateRequest: SLOCorrectionUpdateRequest,
20742076
SLOCorrectionUpdateRequestAttributes: SLOCorrectionUpdateRequestAttributes,
2077+
SLOCountCondition: SLOCountCondition,
2078+
SLOCountSpec: SLOCountSpec,
20752079
SLOCreator: SLOCreator,
20762080
SLODeleteResponse: SLODeleteResponse,
20772081
SLOFormula: SLOFormula,
@@ -2510,7 +2514,7 @@ const oneOfMap: { [index: string]: string[] } = {
25102514
],
25112515
NumberFormatUnit: ["NumberFormatUnitCanonical", "NumberFormatUnitCustom"],
25122516
SLODataSourceQueryDefinition: ["FormulaAndFunctionMetricQueryDefinition"],
2513-
SLOSliSpec: ["SLOTimeSliceSpec"],
2517+
SLOSliSpec: ["SLOTimeSliceSpec", "SLOCountSpec"],
25142518
SharedDashboardInvitesData: [
25152519
"SharedDashboardInvitesDataObject",
25162520
"Array<SharedDashboardInvitesDataObject>",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
import { SLODataSourceQueryDefinition } from "./SLODataSourceQueryDefinition";
7+
import { SLOFormula } from "./SLOFormula";
8+
9+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
10+
11+
/**
12+
* A metric SLI specification, composed of three parts: the good events formula, the total events formula,
13+
* and the involved queries.
14+
*/
15+
export class SLOCountCondition {
16+
/**
17+
* A formula that specifies how to combine the results of multiple queries.
18+
*/
19+
"goodEventsFormula": SLOFormula;
20+
"queries": Array<SLODataSourceQueryDefinition>;
21+
/**
22+
* A formula that specifies how to combine the results of multiple queries.
23+
*/
24+
"totalEventsFormula": SLOFormula;
25+
26+
/**
27+
* A container for additional, undeclared properties.
28+
* This is a holder for any undeclared properties as specified with
29+
* the 'additionalProperties' keyword in the OAS document.
30+
*/
31+
"additionalProperties"?: { [key: string]: any };
32+
33+
/**
34+
* @ignore
35+
*/
36+
"_unparsed"?: boolean;
37+
38+
/**
39+
* @ignore
40+
*/
41+
static readonly attributeTypeMap: AttributeTypeMap = {
42+
goodEventsFormula: {
43+
baseName: "good_events_formula",
44+
type: "SLOFormula",
45+
required: true,
46+
},
47+
queries: {
48+
baseName: "queries",
49+
type: "Array<SLODataSourceQueryDefinition>",
50+
required: true,
51+
},
52+
totalEventsFormula: {
53+
baseName: "total_events_formula",
54+
type: "SLOFormula",
55+
required: true,
56+
},
57+
additionalProperties: {
58+
baseName: "additionalProperties",
59+
type: "{ [key: string]: any; }",
60+
},
61+
};
62+
63+
/**
64+
* @ignore
65+
*/
66+
static getAttributeTypeMap(): AttributeTypeMap {
67+
return SLOCountCondition.attributeTypeMap;
68+
}
69+
70+
public constructor() {}
71+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
import { SLOCountCondition } from "./SLOCountCondition";
7+
8+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
9+
10+
/**
11+
* A metric SLI specification.
12+
*/
13+
export class SLOCountSpec {
14+
/**
15+
* A metric SLI specification, composed of three parts: the good events formula, the total events formula,
16+
* and the involved queries.
17+
*/
18+
"count": SLOCountCondition;
19+
20+
/**
21+
* @ignore
22+
*/
23+
"_unparsed"?: boolean;
24+
25+
/**
26+
* @ignore
27+
*/
28+
static readonly attributeTypeMap: AttributeTypeMap = {
29+
count: {
30+
baseName: "count",
31+
type: "SLOCountCondition",
32+
required: true,
33+
},
34+
};
35+
36+
/**
37+
* @ignore
38+
*/
39+
static getAttributeTypeMap(): AttributeTypeMap {
40+
return SLOCountSpec.attributeTypeMap;
41+
}
42+
43+
public constructor() {}
44+
}

packages/datadog-api-client-v1/models/SLOResponseData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ export class SLOResponseData {
7777
*/
7878
"name"?: string;
7979
/**
80-
* A metric-based SLO. **Required if type is `metric`**. Note that Datadog only allows the sum by aggregator
80+
* A now deprecated metric SLO. Note that Datadog only allows the sum by aggregator
8181
* to be used because this will sum up all request counts instead of averaging them, or taking the max or
8282
* min of all of those requests.
8383
*/
8484
"query"?: ServiceLevelObjectiveQuery;
8585
/**
86-
* A generic SLI specification. This is currently used for time-slice SLOs only.
86+
* A generic SLI specification. This is currently used for time-slice and metric SLOs only.
8787
*/
8888
"sliSpecification"?: SLOSliSpec;
8989
/**

packages/datadog-api-client-v1/models/SLOSliSpec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { SLOCountSpec } from "./SLOCountSpec";
67
import { SLOTimeSliceSpec } from "./SLOTimeSliceSpec";
78

89
import { UnparsedObject } from "../../datadog-api-client-common/util";
910

1011
/**
11-
* A generic SLI specification. This is currently used for time-slice SLOs only.
12+
* A generic SLI specification. This is currently used for time-slice and metric SLOs only.
1213
*/
1314

14-
export type SLOSliSpec = SLOTimeSliceSpec | UnparsedObject;
15+
export type SLOSliSpec = SLOTimeSliceSpec | SLOCountSpec | UnparsedObject;

packages/datadog-api-client-v1/models/ServiceLevelObjective.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ export class ServiceLevelObjective {
7373
*/
7474
"name": string;
7575
/**
76-
* A metric-based SLO. **Required if type is `metric`**. Note that Datadog only allows the sum by aggregator
76+
* A now deprecated metric SLO. Note that Datadog only allows the sum by aggregator
7777
* to be used because this will sum up all request counts instead of averaging them, or taking the max or
7878
* min of all of those requests.
7979
*/
8080
"query"?: ServiceLevelObjectiveQuery;
8181
/**
82-
* A generic SLI specification. This is currently used for time-slice SLOs only.
82+
* A generic SLI specification. This is currently used for time-slice and metric SLOs only.
8383
*/
8484
"sliSpecification"?: SLOSliSpec;
8585
/**

packages/datadog-api-client-v1/models/ServiceLevelObjectiveQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
88

99
/**
10-
* A metric-based SLO. **Required if type is `metric`**. Note that Datadog only allows the sum by aggregator
10+
* A now deprecated metric SLO. Note that Datadog only allows the sum by aggregator
1111
* to be used because this will sum up all request counts instead of averaging them, or taking the max or
1212
* min of all of those requests.
1313
*/

packages/datadog-api-client-v1/models/ServiceLevelObjectiveRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ export class ServiceLevelObjectiveRequest {
4141
*/
4242
"name": string;
4343
/**
44-
* A metric-based SLO. **Required if type is `metric`**. Note that Datadog only allows the sum by aggregator
44+
* A now deprecated metric SLO. Note that Datadog only allows the sum by aggregator
4545
* to be used because this will sum up all request counts instead of averaging them, or taking the max or
4646
* min of all of those requests.
4747
*/
4848
"query"?: ServiceLevelObjectiveQuery;
4949
/**
50-
* A generic SLI specification. This is currently used for time-slice SLOs only.
50+
* A generic SLI specification. This is currently used for time-slice and metric SLOs only.
5151
*/
5252
"sliSpecification"?: SLOSliSpec;
5353
/**

0 commit comments

Comments
 (0)