Skip to content

Commit ff2e6f5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 4095999 of spec repo (#4426)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a693534 commit ff2e6f5

16 files changed

Lines changed: 608 additions & 4 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29999,6 +29999,25 @@ components:
2999929999
data:
3000030000
$ref: "#/components/schemas/ListDeploymentRuleResponseData"
3000130001
type: object
30002+
DeploymentGatesEvaluationConfiguration:
30003+
description: |-
30004+
Inline rule definitions for a deployment gate evaluation. When provided, rules are evaluated
30005+
directly from this configuration instead of using the preconfigured gate rules.
30006+
At least one rule is required.
30007+
properties:
30008+
dry_run:
30009+
description: Gate-level dry run. When enabled, the rules are evaluated normally but the gate always returns `pass`. The real result is visible in the Datadog UI.
30010+
example: false
30011+
type: boolean
30012+
rules:
30013+
description: The list of rules to evaluate. At least one rule is required.
30014+
items:
30015+
$ref: "#/components/schemas/DeploymentGatesEvaluationRule"
30016+
minItems: 1
30017+
type: array
30018+
required:
30019+
- rules
30020+
type: object
3000230021
DeploymentGatesEvaluationRequest:
3000330022
description: Request body for triggering a deployment gate evaluation.
3000430023
properties:
@@ -30008,8 +30027,13 @@ components:
3000830027
- data
3000930028
type: object
3001030029
DeploymentGatesEvaluationRequestAttributes:
30011-
description: Attributes for a deployment gate evaluation request.
30030+
description: |-
30031+
Attributes for a deployment gate evaluation request.
30032+
When `configuration` is provided, rules are evaluated inline from that configuration.
30033+
When omitted, rules are resolved from the preconfigured gate for the given service and environment.
3001230034
properties:
30035+
configuration:
30036+
$ref: "#/components/schemas/DeploymentGatesEvaluationConfiguration"
3001330037
env:
3001430038
description: The environment of the deployment.
3001530039
example: "staging"
@@ -30179,6 +30203,60 @@ components:
3017930203
type: string
3018030204
x-enum-varnames:
3018130205
- DEPLOYMENT_GATES_EVALUATION_RESULT_RESPONSE
30206+
DeploymentGatesEvaluationRule:
30207+
description: A rule to evaluate as part of a deployment gate evaluation.
30208+
discriminator:
30209+
mapping:
30210+
faulty_deployment_detection: "#/components/schemas/DeploymentGatesFDDRule"
30211+
monitor: "#/components/schemas/DeploymentGatesMonitorRule"
30212+
propertyName: type
30213+
oneOf:
30214+
- $ref: "#/components/schemas/DeploymentGatesMonitorRule"
30215+
- $ref: "#/components/schemas/DeploymentGatesFDDRule"
30216+
DeploymentGatesFDDRule:
30217+
description: A faulty deployment detection rule to evaluate as part of a deployment gate evaluation.
30218+
properties:
30219+
dry_run:
30220+
description: Rule-level dry run. When enabled, the rule is evaluated normally but it always returns `pass`. The real result is visible in the Datadog UI.
30221+
example: false
30222+
type: boolean
30223+
name:
30224+
description: Human-readable name for this rule.
30225+
example: "apm faulty deployment"
30226+
type: string
30227+
options:
30228+
$ref: "#/components/schemas/DeploymentGatesFDDRuleOptions"
30229+
type:
30230+
$ref: "#/components/schemas/DeploymentGatesFDDRuleType"
30231+
required:
30232+
- type
30233+
- name
30234+
type: object
30235+
DeploymentGatesFDDRuleOptions:
30236+
description: Options for a `faulty_deployment_detection` rule.
30237+
properties:
30238+
duration:
30239+
description: Evaluation window in seconds. Maximum 7200 (2 hours).
30240+
example: 900
30241+
format: int64
30242+
maximum: 7200
30243+
type: integer
30244+
excluded_resources:
30245+
description: APM resource names to exclude from analysis.
30246+
example:
30247+
- "GET /healthcheck"
30248+
items:
30249+
type: string
30250+
type: array
30251+
type: object
30252+
DeploymentGatesFDDRuleType:
30253+
description: The type identifier for a faulty deployment detection rule.
30254+
enum:
30255+
- faulty_deployment_detection
30256+
example: faulty_deployment_detection
30257+
type: string
30258+
x-enum-varnames:
30259+
- FAULTY_DEPLOYMENT_DETECTION
3018230260
DeploymentGatesListResponse:
3018330261
description: Response containing a paginated list of deployment gates.
3018430262
properties:
@@ -30213,6 +30291,49 @@ components:
3021330291
minimum: 1
3021430292
type: integer
3021530293
type: object
30294+
DeploymentGatesMonitorRule:
30295+
description: A monitor rule to evaluate as part of a deployment gate evaluation.
30296+
properties:
30297+
dry_run:
30298+
description: Rule-level dry run. When enabled, the rule is evaluated normally but always returns `pass`. The real result is visible in the Datadog UI.
30299+
example: false
30300+
type: boolean
30301+
name:
30302+
description: Human-readable name for this rule.
30303+
example: "error rate monitors"
30304+
type: string
30305+
options:
30306+
$ref: "#/components/schemas/DeploymentGatesMonitorRuleOptions"
30307+
type:
30308+
$ref: "#/components/schemas/DeploymentGatesMonitorRuleType"
30309+
required:
30310+
- type
30311+
- name
30312+
type: object
30313+
DeploymentGatesMonitorRuleOptions:
30314+
description: Options for a `monitor` rule.
30315+
properties:
30316+
duration:
30317+
description: Evaluation window in seconds. Maximum 7200 (2 hours).
30318+
example: 300
30319+
format: int64
30320+
maximum: 7200
30321+
type: integer
30322+
query:
30323+
description: Monitor search query.
30324+
example: "service:transaction-backend env:production"
30325+
type: string
30326+
required:
30327+
- query
30328+
type: object
30329+
DeploymentGatesMonitorRuleType:
30330+
description: The type identifier for a monitor rule.
30331+
enum:
30332+
- monitor
30333+
example: monitor
30334+
type: string
30335+
x-enum-varnames:
30336+
- MONITOR
3021630337
DeploymentGatesRuleResponse:
3021730338
description: The result of a single rule evaluation.
3021830339
properties:
@@ -127285,12 +127406,17 @@ paths:
127285127406
Triggers an asynchronous deployment gate evaluation for the given service and environment.
127286127407
Returns an evaluation ID that can be used to poll for the result via the
127287127408
`GET /api/v2/deployments/gates/evaluation/{id}` endpoint.
127409+
127410+
When the `configuration` attribute is provided, rules are evaluated inline from that configuration
127411+
and no pre-configured gate is required. When `configuration` is omitted, rules are resolved from the
127412+
gate pre-configured for the given service and environment through the Datadog UI, API, or Terraform.
127288127413
operationId: TriggerDeploymentGatesEvaluation
127289127414
requestBody:
127290127415
content:
127291127416
application/json:
127292127417
examples:
127293127418
default:
127419+
summary: Evaluate a preconfigured gate
127294127420
value:
127295127421
data:
127296127422
attributes:
@@ -127300,6 +127426,31 @@ paths:
127300127426
service: transaction-backend
127301127427
version: v1.2.3
127302127428
type: deployment_gates_evaluation_request
127429+
with-configuration:
127430+
summary: Evaluate with inline rule configuration
127431+
value:
127432+
data:
127433+
attributes:
127434+
configuration:
127435+
dry_run: false
127436+
rules:
127437+
- dry_run: false
127438+
name: error rate monitors
127439+
options:
127440+
duration: 300
127441+
query: "service:transaction-backend env:production"
127442+
type: monitor
127443+
- dry_run: false
127444+
name: apm faulty deployment
127445+
options:
127446+
duration: 900
127447+
excluded_resources:
127448+
- "GET /healthcheck"
127449+
type: faulty_deployment_detection
127450+
env: production
127451+
service: transaction-backend
127452+
version: 1.2.3
127453+
type: deployment_gates_evaluation_request
127303127454
schema:
127304127455
$ref: "#/components/schemas/DeploymentGatesEvaluationRequest"
127305127456
required: true

examples/v2/deployment-gates/TriggerDeploymentGatesEvaluation.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ const params: v2.DeploymentGatesApiTriggerDeploymentGatesEvaluationRequest = {
1212
body: {
1313
data: {
1414
attributes: {
15+
configuration: {
16+
dryRun: false,
17+
rules: [
18+
{
19+
dryRun: false,
20+
name: "error rate monitors",
21+
options: {
22+
duration: 300,
23+
query: "service:transaction-backend env:production",
24+
},
25+
type: "monitor",
26+
},
27+
],
28+
},
1529
env: "staging",
1630
identifier: "pre-deploy",
1731
primaryTag: "region:us-east-1",

features/v2/deployment_gates.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,23 +286,23 @@ Feature: Deployment Gates
286286
Scenario: Trigger a deployment gate evaluation returns "Accepted" response
287287
Given operation "TriggerDeploymentGatesEvaluation" enabled
288288
And new "TriggerDeploymentGatesEvaluation" request
289-
And body with value {"data": {"attributes": {"env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}}
289+
And body with value {"data": {"attributes": {"configuration": {"dry_run": false, "rules": [{"dry_run": false, "name": "error rate monitors", "options": {"duration": 300, "query": "service:transaction-backend env:production"}, "type": "monitor"}]}, "env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}}
290290
When the request is sent
291291
Then the response status is 202 Accepted
292292

293293
@generated @skip @team:DataDog/ci-app-backend
294294
Scenario: Trigger a deployment gate evaluation returns "Bad request." response
295295
Given operation "TriggerDeploymentGatesEvaluation" enabled
296296
And new "TriggerDeploymentGatesEvaluation" request
297-
And body with value {"data": {"attributes": {"env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}}
297+
And body with value {"data": {"attributes": {"configuration": {"dry_run": false, "rules": [{"dry_run": false, "name": "error rate monitors", "options": {"duration": 300, "query": "service:transaction-backend env:production"}, "type": "monitor"}]}, "env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}}
298298
When the request is sent
299299
Then the response status is 400 Bad request.
300300

301301
@generated @skip @team:DataDog/ci-app-backend
302302
Scenario: Trigger a deployment gate evaluation returns "Deployment gate not found." response
303303
Given operation "TriggerDeploymentGatesEvaluation" enabled
304304
And new "TriggerDeploymentGatesEvaluation" request
305-
And body with value {"data": {"attributes": {"env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}}
305+
And body with value {"data": {"attributes": {"configuration": {"dry_run": false, "rules": [{"dry_run": false, "name": "error rate monitors", "options": {"duration": 300, "query": "service:transaction-backend env:production"}, "type": "monitor"}]}, "env": "staging", "identifier": "pre-deploy", "primary_tag": "region:us-east-1", "service": "transaction-backend", "version": "v1.2.3"}, "type": "deployment_gates_evaluation_request"}}
306306
When the request is sent
307307
Then the response status is 404 Deployment gate not found.
308308

packages/datadog-api-client-v2/apis/DeploymentGatesApi.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,6 +2363,10 @@ export class DeploymentGatesApi {
23632363
* Triggers an asynchronous deployment gate evaluation for the given service and environment.
23642364
* Returns an evaluation ID that can be used to poll for the result via the
23652365
* `GET /api/v2/deployments/gates/evaluation/{id}` endpoint.
2366+
*
2367+
* When the `configuration` attribute is provided, rules are evaluated inline from that configuration
2368+
* and no pre-configured gate is required. When `configuration` is omitted, rules are resolved from the
2369+
* gate pre-configured for the given service and environment through the Datadog UI, API, or Terraform.
23662370
* @param param The request object
23672371
*/
23682372
public triggerDeploymentGatesEvaluation(

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3389,6 +3389,7 @@ export { DeploymentGateResponseDataAttributes } from "./models/DeploymentGateRes
33893389
export { DeploymentGateResponseDataAttributesCreatedBy } from "./models/DeploymentGateResponseDataAttributesCreatedBy";
33903390
export { DeploymentGateResponseDataAttributesUpdatedBy } from "./models/DeploymentGateResponseDataAttributesUpdatedBy";
33913391
export { DeploymentGateRulesResponse } from "./models/DeploymentGateRulesResponse";
3392+
export { DeploymentGatesEvaluationConfiguration } from "./models/DeploymentGatesEvaluationConfiguration";
33923393
export { DeploymentGatesEvaluationRequest } from "./models/DeploymentGatesEvaluationRequest";
33933394
export { DeploymentGatesEvaluationRequestAttributes } from "./models/DeploymentGatesEvaluationRequestAttributes";
33943395
export { DeploymentGatesEvaluationRequestData } from "./models/DeploymentGatesEvaluationRequestData";
@@ -3402,9 +3403,16 @@ export { DeploymentGatesEvaluationResultResponseAttributes } from "./models/Depl
34023403
export { DeploymentGatesEvaluationResultResponseAttributesGateStatus } from "./models/DeploymentGatesEvaluationResultResponseAttributesGateStatus";
34033404
export { DeploymentGatesEvaluationResultResponseData } from "./models/DeploymentGatesEvaluationResultResponseData";
34043405
export { DeploymentGatesEvaluationResultResponseDataType } from "./models/DeploymentGatesEvaluationResultResponseDataType";
3406+
export { DeploymentGatesEvaluationRule } from "./models/DeploymentGatesEvaluationRule";
3407+
export { DeploymentGatesFDDRule } from "./models/DeploymentGatesFDDRule";
3408+
export { DeploymentGatesFDDRuleOptions } from "./models/DeploymentGatesFDDRuleOptions";
3409+
export { DeploymentGatesFDDRuleType } from "./models/DeploymentGatesFDDRuleType";
34053410
export { DeploymentGatesListResponse } from "./models/DeploymentGatesListResponse";
34063411
export { DeploymentGatesListResponseMeta } from "./models/DeploymentGatesListResponseMeta";
34073412
export { DeploymentGatesListResponseMetaPage } from "./models/DeploymentGatesListResponseMetaPage";
3413+
export { DeploymentGatesMonitorRule } from "./models/DeploymentGatesMonitorRule";
3414+
export { DeploymentGatesMonitorRuleOptions } from "./models/DeploymentGatesMonitorRuleOptions";
3415+
export { DeploymentGatesMonitorRuleType } from "./models/DeploymentGatesMonitorRuleType";
34083416
export { DeploymentGatesRuleResponse } from "./models/DeploymentGatesRuleResponse";
34093417
export { DeploymentMetadata } from "./models/DeploymentMetadata";
34103418
export { DeploymentRelationship } from "./models/DeploymentRelationship";
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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 { DeploymentGatesEvaluationRule } from "./DeploymentGatesEvaluationRule";
7+
8+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
9+
10+
/**
11+
* Inline rule definitions for a deployment gate evaluation. When provided, rules are evaluated
12+
* directly from this configuration instead of using the preconfigured gate rules.
13+
* At least one rule is required.
14+
*/
15+
export class DeploymentGatesEvaluationConfiguration {
16+
/**
17+
* Gate-level dry run. When enabled, the rules are evaluated normally but the gate always returns `pass`. The real result is visible in the Datadog UI.
18+
*/
19+
"dryRun"?: boolean;
20+
/**
21+
* The list of rules to evaluate. At least one rule is required.
22+
*/
23+
"rules": Array<DeploymentGatesEvaluationRule>;
24+
25+
/**
26+
* A container for additional, undeclared properties.
27+
* This is a holder for any undeclared properties as specified with
28+
* the 'additionalProperties' keyword in the OAS document.
29+
*/
30+
"additionalProperties"?: { [key: string]: any };
31+
32+
/**
33+
* @ignore
34+
*/
35+
"_unparsed"?: boolean;
36+
37+
/**
38+
* @ignore
39+
*/
40+
static readonly attributeTypeMap: AttributeTypeMap = {
41+
dryRun: {
42+
baseName: "dry_run",
43+
type: "boolean",
44+
},
45+
rules: {
46+
baseName: "rules",
47+
type: "Array<DeploymentGatesEvaluationRule>",
48+
required: true,
49+
},
50+
additionalProperties: {
51+
baseName: "additionalProperties",
52+
type: "{ [key: string]: any; }",
53+
},
54+
};
55+
56+
/**
57+
* @ignore
58+
*/
59+
static getAttributeTypeMap(): AttributeTypeMap {
60+
return DeploymentGatesEvaluationConfiguration.attributeTypeMap;
61+
}
62+
63+
public constructor() {}
64+
}

packages/datadog-api-client-v2/models/DeploymentGatesEvaluationRequestAttributes.ts

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

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

910
/**
1011
* Attributes for a deployment gate evaluation request.
12+
* When `configuration` is provided, rules are evaluated inline from that configuration.
13+
* When omitted, rules are resolved from the preconfigured gate for the given service and environment.
1114
*/
1215
export class DeploymentGatesEvaluationRequestAttributes {
16+
/**
17+
* Inline rule definitions for a deployment gate evaluation. When provided, rules are evaluated
18+
* directly from this configuration instead of using the preconfigured gate rules.
19+
* At least one rule is required.
20+
*/
21+
"configuration"?: DeploymentGatesEvaluationConfiguration;
1322
/**
1423
* The environment of the deployment.
1524
*/
@@ -47,6 +56,10 @@ export class DeploymentGatesEvaluationRequestAttributes {
4756
* @ignore
4857
*/
4958
static readonly attributeTypeMap: AttributeTypeMap = {
59+
configuration: {
60+
baseName: "configuration",
61+
type: "DeploymentGatesEvaluationConfiguration",
62+
},
5063
env: {
5164
baseName: "env",
5265
type: "string",

packages/datadog-api-client-v2/models/DeploymentGatesEvaluationRequestData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1414
export class DeploymentGatesEvaluationRequestData {
1515
/**
1616
* Attributes for a deployment gate evaluation request.
17+
* When `configuration` is provided, rules are evaluated inline from that configuration.
18+
* When omitted, rules are resolved from the preconfigured gate for the given service and environment.
1719
*/
1820
"attributes": DeploymentGatesEvaluationRequestAttributes;
1921
/**

0 commit comments

Comments
 (0)