Skip to content

Commit 71be53a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit de227e5 of spec repo
1 parent 5474a96 commit 71be53a

15 files changed

Lines changed: 1021 additions & 4 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29986,6 +29986,25 @@ components:
2998629986
data:
2998729987
$ref: "#/components/schemas/ListDeploymentRuleResponseData"
2998829988
type: object
29989+
DeploymentGatesEvaluationConfiguration:
29990+
description: |-
29991+
Inline rule definitions for a deployment gate evaluation. When provided, rules are evaluated
29992+
directly from this configuration instead of using the preconfigured gate rules.
29993+
At least one rule is required.
29994+
properties:
29995+
dry_run:
29996+
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.
29997+
example: false
29998+
type: boolean
29999+
rules:
30000+
description: The list of rules to evaluate. At least one rule is required.
30001+
items:
30002+
$ref: "#/components/schemas/DeploymentGatesEvaluationRule"
30003+
minItems: 1
30004+
type: array
30005+
required:
30006+
- rules
30007+
type: object
2998930008
DeploymentGatesEvaluationRequest:
2999030009
description: Request body for triggering a deployment gate evaluation.
2999130010
properties:
@@ -29995,8 +30014,13 @@ components:
2999530014
- data
2999630015
type: object
2999730016
DeploymentGatesEvaluationRequestAttributes:
29998-
description: Attributes for a deployment gate evaluation request.
30017+
description: |-
30018+
Attributes for a deployment gate evaluation request.
30019+
When `configuration` is provided, rules are evaluated inline from that configuration.
30020+
When omitted, rules are resolved from the preconfigured gate for the given service and environment.
2999930021
properties:
30022+
configuration:
30023+
$ref: "#/components/schemas/DeploymentGatesEvaluationConfiguration"
3000030024
env:
3000130025
description: The environment of the deployment.
3000230026
example: "staging"
@@ -30166,6 +30190,60 @@ components:
3016630190
type: string
3016730191
x-enum-varnames:
3016830192
- DEPLOYMENT_GATES_EVALUATION_RESULT_RESPONSE
30193+
DeploymentGatesEvaluationRule:
30194+
description: A rule to evaluate as part of a deployment gate evaluation.
30195+
discriminator:
30196+
mapping:
30197+
faulty_deployment_detection: "#/components/schemas/DeploymentGatesFDDRule"
30198+
monitor: "#/components/schemas/DeploymentGatesMonitorRule"
30199+
propertyName: type
30200+
oneOf:
30201+
- $ref: "#/components/schemas/DeploymentGatesMonitorRule"
30202+
- $ref: "#/components/schemas/DeploymentGatesFDDRule"
30203+
DeploymentGatesFDDRule:
30204+
description: A faulty deployment detection rule to evaluate as part of a deployment gate evaluation.
30205+
properties:
30206+
dry_run:
30207+
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.
30208+
example: false
30209+
type: boolean
30210+
name:
30211+
description: Human-readable name for this rule.
30212+
example: "apm faulty deployment"
30213+
type: string
30214+
options:
30215+
$ref: "#/components/schemas/DeploymentGatesFDDRuleOptions"
30216+
type:
30217+
$ref: "#/components/schemas/DeploymentGatesFDDRuleType"
30218+
required:
30219+
- type
30220+
- name
30221+
type: object
30222+
DeploymentGatesFDDRuleOptions:
30223+
description: Options for a `faulty_deployment_detection` rule.
30224+
properties:
30225+
duration:
30226+
description: Evaluation window in seconds. Maximum 7200 (2 hours).
30227+
example: 900
30228+
format: int64
30229+
maximum: 7200
30230+
type: integer
30231+
excluded_resources:
30232+
description: APM resource names to exclude from analysis.
30233+
example:
30234+
- "GET /healthcheck"
30235+
items:
30236+
type: string
30237+
type: array
30238+
type: object
30239+
DeploymentGatesFDDRuleType:
30240+
description: The type identifier for a faulty deployment detection rule.
30241+
enum:
30242+
- faulty_deployment_detection
30243+
example: faulty_deployment_detection
30244+
type: string
30245+
x-enum-varnames:
30246+
- FAULTY_DEPLOYMENT_DETECTION
3016930247
DeploymentGatesListResponse:
3017030248
description: Response containing a paginated list of deployment gates.
3017130249
properties:
@@ -30200,6 +30278,49 @@ components:
3020030278
minimum: 1
3020130279
type: integer
3020230280
type: object
30281+
DeploymentGatesMonitorRule:
30282+
description: A monitor rule to evaluate as part of a deployment gate evaluation.
30283+
properties:
30284+
dry_run:
30285+
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.
30286+
example: false
30287+
type: boolean
30288+
name:
30289+
description: Human-readable name for this rule.
30290+
example: "error rate monitors"
30291+
type: string
30292+
options:
30293+
$ref: "#/components/schemas/DeploymentGatesMonitorRuleOptions"
30294+
type:
30295+
$ref: "#/components/schemas/DeploymentGatesMonitorRuleType"
30296+
required:
30297+
- type
30298+
- name
30299+
type: object
30300+
DeploymentGatesMonitorRuleOptions:
30301+
description: Options for a `monitor` rule.
30302+
properties:
30303+
duration:
30304+
description: Evaluation window in seconds. Maximum 7200 (2 hours).
30305+
example: 300
30306+
format: int64
30307+
maximum: 7200
30308+
type: integer
30309+
query:
30310+
description: Monitor search query.
30311+
example: "service:transaction-backend env:production"
30312+
type: string
30313+
required:
30314+
- query
30315+
type: object
30316+
DeploymentGatesMonitorRuleType:
30317+
description: The type identifier for a monitor rule.
30318+
enum:
30319+
- monitor
30320+
example: monitor
30321+
type: string
30322+
x-enum-varnames:
30323+
- MONITOR
3020330324
DeploymentGatesRuleResponse:
3020430325
description: The result of a single rule evaluation.
3020530326
properties:
@@ -124667,12 +124788,17 @@ paths:
124667124788
Triggers an asynchronous deployment gate evaluation for the given service and environment.
124668124789
Returns an evaluation ID that can be used to poll for the result via the
124669124790
`GET /api/v2/deployments/gates/evaluation/{id}` endpoint.
124791+
124792+
When the `configuration` attribute is provided, rules are evaluated inline from that configuration
124793+
and no pre-configured gate is required. When `configuration` is omitted, rules are resolved from the
124794+
gate pre-configured for the given service and environment through the Datadog UI, API, or Terraform.
124670124795
operationId: TriggerDeploymentGatesEvaluation
124671124796
requestBody:
124672124797
content:
124673124798
application/json:
124674124799
examples:
124675124800
default:
124801+
summary: Evaluate a preconfigured gate
124676124802
value:
124677124803
data:
124678124804
attributes:
@@ -124682,6 +124808,31 @@ paths:
124682124808
service: transaction-backend
124683124809
version: v1.2.3
124684124810
type: deployment_gates_evaluation_request
124811+
with-configuration:
124812+
summary: Evaluate with inline rule configuration
124813+
value:
124814+
data:
124815+
attributes:
124816+
configuration:
124817+
dry_run: false
124818+
rules:
124819+
- dry_run: false
124820+
name: error rate monitors
124821+
options:
124822+
duration: 300
124823+
query: "service:transaction-backend env:production"
124824+
type: monitor
124825+
- dry_run: false
124826+
name: apm faulty deployment
124827+
options:
124828+
duration: 900
124829+
excluded_resources:
124830+
- "GET /healthcheck"
124831+
type: faulty_deployment_detection
124832+
env: production
124833+
service: transaction-backend
124834+
version: 1.2.3
124835+
type: deployment_gates_evaluation_request
124685124836
schema:
124686124837
$ref: "#/components/schemas/DeploymentGatesEvaluationRequest"
124687124838
required: true

examples/v2_deployment-gates_TriggerDeploymentGatesEvaluation.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
// Trigger a deployment gate evaluation returns "Accepted" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_deployment_gates::DeploymentGatesAPI;
4+
use datadog_api_client::datadogV2::model::DeploymentGatesEvaluationConfiguration;
45
use datadog_api_client::datadogV2::model::DeploymentGatesEvaluationRequest;
56
use datadog_api_client::datadogV2::model::DeploymentGatesEvaluationRequestAttributes;
67
use datadog_api_client::datadogV2::model::DeploymentGatesEvaluationRequestData;
78
use datadog_api_client::datadogV2::model::DeploymentGatesEvaluationRequestDataType;
9+
use datadog_api_client::datadogV2::model::DeploymentGatesEvaluationRule;
10+
use datadog_api_client::datadogV2::model::DeploymentGatesMonitorRule;
11+
use datadog_api_client::datadogV2::model::DeploymentGatesMonitorRuleOptions;
12+
use datadog_api_client::datadogV2::model::DeploymentGatesMonitorRuleType;
813

914
#[tokio::main]
1015
async fn main() {
@@ -13,6 +18,24 @@ async fn main() {
1318
"staging".to_string(),
1419
"transaction-backend".to_string(),
1520
)
21+
.configuration(
22+
DeploymentGatesEvaluationConfiguration::new(vec![
23+
DeploymentGatesEvaluationRule::DeploymentGatesMonitorRule(Box::new(
24+
DeploymentGatesMonitorRule::new(
25+
"error rate monitors".to_string(),
26+
DeploymentGatesMonitorRuleType::MONITOR,
27+
)
28+
.dry_run(false)
29+
.options(
30+
DeploymentGatesMonitorRuleOptions::new(
31+
"service:transaction-backend env:production".to_string(),
32+
)
33+
.duration(300),
34+
),
35+
)),
36+
])
37+
.dry_run(false),
38+
)
1639
.identifier("pre-deploy".to_string())
1740
.primary_tag("region:us-east-1".to_string())
1841
.version("v1.2.3".to_string()),

src/datadogV2/api/api_deployment_gates.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,10 @@ impl DeploymentGatesAPI {
13841384
/// Triggers an asynchronous deployment gate evaluation for the given service and environment.
13851385
/// Returns an evaluation ID that can be used to poll for the result via the
13861386
/// `GET /api/v2/deployments/gates/evaluation/{id}` endpoint.
1387+
///
1388+
/// When the `configuration` attribute is provided, rules are evaluated inline from that configuration
1389+
/// and no pre-configured gate is required. When `configuration` is omitted, rules are resolved from the
1390+
/// gate pre-configured for the given service and environment through the Datadog UI, API, or Terraform.
13871391
pub async fn trigger_deployment_gates_evaluation(
13881392
&self,
13891393
body: crate::datadogV2::model::DeploymentGatesEvaluationRequest,
@@ -1411,6 +1415,10 @@ impl DeploymentGatesAPI {
14111415
/// Triggers an asynchronous deployment gate evaluation for the given service and environment.
14121416
/// Returns an evaluation ID that can be used to poll for the result via the
14131417
/// `GET /api/v2/deployments/gates/evaluation/{id}` endpoint.
1418+
///
1419+
/// When the `configuration` attribute is provided, rules are evaluated inline from that configuration
1420+
/// and no pre-configured gate is required. When `configuration` is omitted, rules are resolved from the
1421+
/// gate pre-configured for the given service and environment through the Datadog UI, API, or Terraform.
14141422
pub async fn trigger_deployment_gates_evaluation_with_http_info(
14151423
&self,
14161424
body: crate::datadogV2::model::DeploymentGatesEvaluationRequest,

src/datadogV2/model/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3462,6 +3462,22 @@ pub mod model_deployment_gates_evaluation_request_data;
34623462
pub use self::model_deployment_gates_evaluation_request_data::DeploymentGatesEvaluationRequestData;
34633463
pub mod model_deployment_gates_evaluation_request_attributes;
34643464
pub use self::model_deployment_gates_evaluation_request_attributes::DeploymentGatesEvaluationRequestAttributes;
3465+
pub mod model_deployment_gates_evaluation_configuration;
3466+
pub use self::model_deployment_gates_evaluation_configuration::DeploymentGatesEvaluationConfiguration;
3467+
pub mod model_deployment_gates_monitor_rule;
3468+
pub use self::model_deployment_gates_monitor_rule::DeploymentGatesMonitorRule;
3469+
pub mod model_deployment_gates_monitor_rule_options;
3470+
pub use self::model_deployment_gates_monitor_rule_options::DeploymentGatesMonitorRuleOptions;
3471+
pub mod model_deployment_gates_monitor_rule_type;
3472+
pub use self::model_deployment_gates_monitor_rule_type::DeploymentGatesMonitorRuleType;
3473+
pub mod model_deployment_gates_fdd_rule;
3474+
pub use self::model_deployment_gates_fdd_rule::DeploymentGatesFDDRule;
3475+
pub mod model_deployment_gates_fdd_rule_options;
3476+
pub use self::model_deployment_gates_fdd_rule_options::DeploymentGatesFDDRuleOptions;
3477+
pub mod model_deployment_gates_fdd_rule_type;
3478+
pub use self::model_deployment_gates_fdd_rule_type::DeploymentGatesFDDRuleType;
3479+
pub mod model_deployment_gates_evaluation_rule;
3480+
pub use self::model_deployment_gates_evaluation_rule::DeploymentGatesEvaluationRule;
34653481
pub mod model_deployment_gates_evaluation_request_data_type;
34663482
pub use self::model_deployment_gates_evaluation_request_data_type::DeploymentGatesEvaluationRequestDataType;
34673483
pub mod model_deployment_gates_evaluation_response;

0 commit comments

Comments
 (0)