From 417c02d8627088daa38c365b8c97c76a7a0c7d38 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Sat, 3 Oct 2026 12:28:11 +0000 Subject: [PATCH] Regenerate client from commit 3ff9804 of spec repo --- .generator/schemas/v1/openapi.yaml | 6 ++++ .../CreateGlobalVariable_2215516655.ts | 32 +++++++++++++++++++ features/v1/synthetics.feature | 10 ++++++ .../models/SyntheticsGlobalVariable.ts | 8 +++++ .../models/SyntheticsGlobalVariableRequest.ts | 8 +++++ 5 files changed, 64 insertions(+) create mode 100644 examples/v1/synthetics/CreateGlobalVariable_2215516655.ts diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index fade3e942021..7b2c342ceacd 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -19275,6 +19275,9 @@ components: description: Unique identifier of the global variable. readOnly: true type: string + is_email: + description: Whether this global variable is a persistent email variable with an email address generated by Datadog. + type: boolean is_fido: description: Determines if the global variable is a FIDO variable. type: boolean @@ -19377,6 +19380,9 @@ components: description: Unique identifier of the global variable. readOnly: true type: string + is_email: + description: Whether this global variable is a persistent email variable. Set this when creating the variable and omit `value`; Datadog generates an immutable email address. The variable cannot be converted to or from a persistent email variable. + type: boolean is_fido: description: Determines if the global variable is a FIDO variable. type: boolean diff --git a/examples/v1/synthetics/CreateGlobalVariable_2215516655.ts b/examples/v1/synthetics/CreateGlobalVariable_2215516655.ts new file mode 100644 index 000000000000..db39571f5b49 --- /dev/null +++ b/examples/v1/synthetics/CreateGlobalVariable_2215516655.ts @@ -0,0 +1,32 @@ +/** + * Create a persistent email global variable returns a generated address + */ + +import { client, v1 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration({ + authMethods: { + AuthZ: { + accessToken: process.env.DD_BEARER_TOKEN as string, + }, + }, +}); +const apiInstance = new v1.SyntheticsApi(configuration); + +const params: v1.SyntheticsApiCreateGlobalVariableRequest = { + body: { + name: "PERSISTENT_EMAIL_EXAMPLESYNTHETIC", + description: "Persistent email variable", + tags: [], + isEmail: true, + }, +}; + +apiInstance + .createGlobalVariable(params) + .then((data: v1.SyntheticsGlobalVariable) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/v1/synthetics.feature b/features/v1/synthetics.feature index be5b3dfd07ce..bf6051730c5b 100644 --- a/features/v1/synthetics.feature +++ b/features/v1/synthetics.feature @@ -179,6 +179,16 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @integration-only @team:DataDog/synthetics-orchestrating-managing + Scenario: Create a persistent email global variable returns a generated address + Given new "CreateGlobalVariable" request + And body with value {"name": "PERSISTENT_EMAIL_{{ unique_upper_alnum }}", "description": "Persistent email variable", "tags": [], "is_email": true} + When the request is sent + Then the response status is 200 OK + And the response "is_email" is equal to true + And the response "value.secure" is equal to false + And the response "value" has field "value" + @replay-only @team:DataDog/synthetics-orchestrating-managing Scenario: Create a private location returns "OK" response Given there is a valid "role" in the system diff --git a/packages/datadog-api-client-v1/models/SyntheticsGlobalVariable.ts b/packages/datadog-api-client-v1/models/SyntheticsGlobalVariable.ts index 5eece2108626..81f4cfa696b8 100644 --- a/packages/datadog-api-client-v1/models/SyntheticsGlobalVariable.ts +++ b/packages/datadog-api-client-v1/models/SyntheticsGlobalVariable.ts @@ -25,6 +25,10 @@ export class SyntheticsGlobalVariable { * Unique identifier of the global variable. */ "id"?: string; + /** + * Whether this global variable is a persistent email variable with an email address generated by Datadog. + */ + "isEmail"?: boolean; /** * Determines if the global variable is a FIDO variable. */ @@ -83,6 +87,10 @@ export class SyntheticsGlobalVariable { baseName: "id", type: "string", }, + isEmail: { + baseName: "is_email", + type: "boolean", + }, isFido: { baseName: "is_fido", type: "boolean", diff --git a/packages/datadog-api-client-v1/models/SyntheticsGlobalVariableRequest.ts b/packages/datadog-api-client-v1/models/SyntheticsGlobalVariableRequest.ts index 3420e202cd82..bd4fe7ea9cbc 100644 --- a/packages/datadog-api-client-v1/models/SyntheticsGlobalVariableRequest.ts +++ b/packages/datadog-api-client-v1/models/SyntheticsGlobalVariableRequest.ts @@ -25,6 +25,10 @@ export class SyntheticsGlobalVariableRequest { * Unique identifier of the global variable. */ "id"?: string; + /** + * Whether this global variable is a persistent email variable. Set this when creating the variable and omit `value`; Datadog generates an immutable email address. The variable cannot be converted to or from a persistent email variable. + */ + "isEmail"?: boolean; /** * Determines if the global variable is a FIDO variable. */ @@ -83,6 +87,10 @@ export class SyntheticsGlobalVariableRequest { baseName: "id", type: "string", }, + isEmail: { + baseName: "is_email", + type: "boolean", + }, isFido: { baseName: "is_fido", type: "boolean",