Skip to content

Commit c668b8c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4f95357 of spec repo
1 parent fe5b19f commit c668b8c

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
@@ -29382,6 +29382,25 @@ components:
2938229382
data:
2938329383
$ref: "#/components/schemas/ListDeploymentRuleResponseData"
2938429384
type: object
29385+
DeploymentGatesEvaluationConfiguration:
29386+
description: |-
29387+
Inline rule definitions for a deployment gate evaluation. When provided, rules are evaluated
29388+
directly from this configuration instead of using the pre-configured gate rules.
29389+
At least one rule is required.
29390+
properties:
29391+
dry_run:
29392+
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.
29393+
example: false
29394+
type: boolean
29395+
rules:
29396+
description: The list of rules to evaluate. At least one rule is required.
29397+
items:
29398+
$ref: "#/components/schemas/DeploymentGatesEvaluationRule"
29399+
minItems: 1
29400+
type: array
29401+
required:
29402+
- rules
29403+
type: object
2938529404
DeploymentGatesEvaluationRequest:
2938629405
description: Request body for triggering a deployment gate evaluation.
2938729406
properties:
@@ -29391,8 +29410,13 @@ components:
2939129410
- data
2939229411
type: object
2939329412
DeploymentGatesEvaluationRequestAttributes:
29394-
description: Attributes for a deployment gate evaluation request.
29413+
description: |-
29414+
Attributes for a deployment gate evaluation request.
29415+
When `configuration` is provided, rules are evaluated inline from that configuration.
29416+
When omitted, rules are resolved from the pre-configured gate for the given service and environment.
2939529417
properties:
29418+
configuration:
29419+
$ref: "#/components/schemas/DeploymentGatesEvaluationConfiguration"
2939629420
env:
2939729421
description: The environment of the deployment.
2939829422
example: "staging"
@@ -29562,6 +29586,60 @@ components:
2956229586
type: string
2956329587
x-enum-varnames:
2956429588
- DEPLOYMENT_GATES_EVALUATION_RESULT_RESPONSE
29589+
DeploymentGatesEvaluationRule:
29590+
description: A rule to evaluate as part of a deployment gate evaluation.
29591+
discriminator:
29592+
mapping:
29593+
faulty_deployment_detection: "#/components/schemas/DeploymentGatesFDDRule"
29594+
monitor: "#/components/schemas/DeploymentGatesMonitorRule"
29595+
propertyName: type
29596+
oneOf:
29597+
- $ref: "#/components/schemas/DeploymentGatesMonitorRule"
29598+
- $ref: "#/components/schemas/DeploymentGatesFDDRule"
29599+
DeploymentGatesFDDRule:
29600+
description: A faulty deployment detection rule to evaluate as part of a deployment gate evaluation.
29601+
properties:
29602+
dry_run:
29603+
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.
29604+
example: false
29605+
type: boolean
29606+
name:
29607+
description: Human-readable name for this rule.
29608+
example: "apm faulty deployment"
29609+
type: string
29610+
options:
29611+
$ref: "#/components/schemas/DeploymentGatesFDDRuleOptions"
29612+
type:
29613+
$ref: "#/components/schemas/DeploymentGatesFDDRuleType"
29614+
required:
29615+
- type
29616+
- name
29617+
type: object
29618+
DeploymentGatesFDDRuleOptions:
29619+
description: Options for a `faulty_deployment_detection` rule.
29620+
properties:
29621+
duration:
29622+
description: Evaluation window in seconds. Maximum 7200 (2 hours).
29623+
example: 900
29624+
format: int64
29625+
maximum: 7200
29626+
type: integer
29627+
excluded_resources:
29628+
description: APM resource names to exclude from analysis.
29629+
example:
29630+
- "GET /healthcheck"
29631+
items:
29632+
type: string
29633+
type: array
29634+
type: object
29635+
DeploymentGatesFDDRuleType:
29636+
description: The type identifier for a faulty deployment detection rule.
29637+
enum:
29638+
- faulty_deployment_detection
29639+
example: faulty_deployment_detection
29640+
type: string
29641+
x-enum-varnames:
29642+
- FAULTY_DEPLOYMENT_DETECTION
2956529643
DeploymentGatesListResponse:
2956629644
description: Response containing a paginated list of deployment gates.
2956729645
properties:
@@ -29596,6 +29674,49 @@ components:
2959629674
minimum: 1
2959729675
type: integer
2959829676
type: object
29677+
DeploymentGatesMonitorRule:
29678+
description: A monitor rule to evaluate as part of a deployment gate evaluation.
29679+
properties:
29680+
dry_run:
29681+
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.
29682+
example: false
29683+
type: boolean
29684+
name:
29685+
description: Human-readable name for this rule.
29686+
example: "error rate monitors"
29687+
type: string
29688+
options:
29689+
$ref: "#/components/schemas/DeploymentGatesMonitorRuleOptions"
29690+
type:
29691+
$ref: "#/components/schemas/DeploymentGatesMonitorRuleType"
29692+
required:
29693+
- type
29694+
- name
29695+
type: object
29696+
DeploymentGatesMonitorRuleOptions:
29697+
description: Options for a `monitor` rule.
29698+
properties:
29699+
duration:
29700+
description: Evaluation window in seconds. Maximum 7200 (2 hours).
29701+
example: 300
29702+
format: int64
29703+
maximum: 7200
29704+
type: integer
29705+
query:
29706+
description: Monitor search query.
29707+
example: "service:transaction-backend env:production"
29708+
type: string
29709+
required:
29710+
- query
29711+
type: object
29712+
DeploymentGatesMonitorRuleType:
29713+
description: The type identifier for a monitor rule.
29714+
enum:
29715+
- monitor
29716+
example: monitor
29717+
type: string
29718+
x-enum-varnames:
29719+
- MONITOR
2959929720
DeploymentGatesRuleResponse:
2960029721
description: The result of a single rule evaluation.
2960129722
properties:
@@ -121740,12 +121861,17 @@ paths:
121740121861
Triggers an asynchronous deployment gate evaluation for the given service and environment.
121741121862
Returns an evaluation ID that can be used to poll for the result via the
121742121863
`GET /api/v2/deployments/gates/evaluation/{id}` endpoint.
121864+
121865+
When the `configuration` attribute is provided, rules are evaluated inline from that configuration
121866+
and no pre-configured gate is required. When `configuration` is omitted, rules are resolved from the
121867+
gate pre-configured for the given service and environment via the Datadog UI, API, or Terraform.
121743121868
operationId: TriggerDeploymentGatesEvaluation
121744121869
requestBody:
121745121870
content:
121746121871
application/json:
121747121872
examples:
121748121873
default:
121874+
summary: Evaluate a pre-configured gate
121749121875
value:
121750121876
data:
121751121877
attributes:
@@ -121755,6 +121881,31 @@ paths:
121755121881
service: transaction-backend
121756121882
version: v1.2.3
121757121883
type: deployment_gates_evaluation_request
121884+
with-configuration:
121885+
summary: Evaluate with inline rule configuration
121886+
value:
121887+
data:
121888+
attributes:
121889+
configuration:
121890+
dry_run: false
121891+
rules:
121892+
- dry_run: false
121893+
name: error rate monitors
121894+
options:
121895+
duration: 300
121896+
query: "service:transaction-backend env:production"
121897+
type: monitor
121898+
- dry_run: false
121899+
name: apm faulty deployment
121900+
options:
121901+
duration: 900
121902+
excluded_resources:
121903+
- "GET /healthcheck"
121904+
type: faulty_deployment_detection
121905+
env: production
121906+
service: transaction-backend
121907+
version: 1.2.3
121908+
type: deployment_gates_evaluation_request
121758121909
schema:
121759121910
$ref: "#/components/schemas/DeploymentGatesEvaluationRequest"
121760121911
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 via 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 via 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
@@ -3368,6 +3368,22 @@ pub mod model_deployment_gates_evaluation_request_data;
33683368
pub use self::model_deployment_gates_evaluation_request_data::DeploymentGatesEvaluationRequestData;
33693369
pub mod model_deployment_gates_evaluation_request_attributes;
33703370
pub use self::model_deployment_gates_evaluation_request_attributes::DeploymentGatesEvaluationRequestAttributes;
3371+
pub mod model_deployment_gates_evaluation_configuration;
3372+
pub use self::model_deployment_gates_evaluation_configuration::DeploymentGatesEvaluationConfiguration;
3373+
pub mod model_deployment_gates_monitor_rule;
3374+
pub use self::model_deployment_gates_monitor_rule::DeploymentGatesMonitorRule;
3375+
pub mod model_deployment_gates_monitor_rule_options;
3376+
pub use self::model_deployment_gates_monitor_rule_options::DeploymentGatesMonitorRuleOptions;
3377+
pub mod model_deployment_gates_monitor_rule_type;
3378+
pub use self::model_deployment_gates_monitor_rule_type::DeploymentGatesMonitorRuleType;
3379+
pub mod model_deployment_gates_fdd_rule;
3380+
pub use self::model_deployment_gates_fdd_rule::DeploymentGatesFDDRule;
3381+
pub mod model_deployment_gates_fdd_rule_options;
3382+
pub use self::model_deployment_gates_fdd_rule_options::DeploymentGatesFDDRuleOptions;
3383+
pub mod model_deployment_gates_fdd_rule_type;
3384+
pub use self::model_deployment_gates_fdd_rule_type::DeploymentGatesFDDRuleType;
3385+
pub mod model_deployment_gates_evaluation_rule;
3386+
pub use self::model_deployment_gates_evaluation_rule::DeploymentGatesEvaluationRule;
33713387
pub mod model_deployment_gates_evaluation_request_data_type;
33723388
pub use self::model_deployment_gates_evaluation_request_data_type::DeploymentGatesEvaluationRequestDataType;
33733389
pub mod model_deployment_gates_evaluation_response;

0 commit comments

Comments
 (0)