diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 6325ee4e37..833ccc1b07 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -100262,6 +100262,302 @@ components:
oneOf:
- $ref: "#/components/schemas/ActionConnectionLiteralValue"
- $ref: "#/components/schemas/ActionConnectionAWSSecretsManagerReference"
+ OpenAICodexDoraIntegrationDataflowRequest:
+ additionalProperties: false
+ description: >-
+ A daily per-engineer engagement signal that [AI Impact](https://docs.datadoghq.com/delivery_performance/ai_impact/) uses to attribute AI-assisted pull requests.
+ properties:
+ enabled:
+ description: >-
+ Whether Datadog collects this data. Defaults to `true`; set to `false` to stop collection.
+ example: true
+ type: boolean
+ type: object
+ OpenAICodexDoraIntegrationDataflowResponse:
+ description: >-
+ A daily per-engineer engagement signal that [AI Impact](https://docs.datadoghq.com/delivery_performance/ai_impact/) uses to attribute AI-assisted pull requests.
+ properties:
+ enabled:
+ description: Whether Datadog collects this data.
+ example: true
+ type: boolean
+ status:
+ $ref: "#/components/schemas/IntegrationAccountDataflowStatus"
+ type: object
+ OpenAICodexIntegrationAccountAuthenticationRequest:
+ description: Authentication for creating the OpenAI Codex integration account. Exactly one method is set.
+ oneOf:
+ - $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthRequest"
+ OpenAICodexIntegrationAccountAuthenticationResponse:
+ description: Authentication configured on the OpenAI Codex integration account.
+ oneOf:
+ - $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthResponse"
+ OpenAICodexIntegrationAccountAuthenticationUpdate:
+ description: Authentication for updating the OpenAI Codex integration account. Exactly one method is set.
+ oneOf:
+ - $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthUpdate"
+ OpenAICodexIntegrationAccountBearerTokenAuthRequest:
+ additionalProperties: false
+ description: >-
+ Bearer token authentication. Use a workspace-scoped OpenAI Admin key with the `codex.enterprise.analytics.read` scope.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthType"
+ token:
+ description: Secret token used to authenticate with OpenAI Codex.
+ example: your-token
+ type: string
+ writeOnly: true
+ required:
+ - auth_type
+ - token
+ type: object
+ OpenAICodexIntegrationAccountBearerTokenAuthResponse:
+ description: The bearer token authentication method configured on the account.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthType"
+ required:
+ - auth_type
+ type: object
+ OpenAICodexIntegrationAccountBearerTokenAuthType:
+ default: bearer_token
+ description: The authentication method type.
+ enum:
+ - bearer_token
+ example: bearer_token
+ type: string
+ x-enum-varnames:
+ - BEARER_TOKEN
+ OpenAICodexIntegrationAccountBearerTokenAuthUpdate:
+ additionalProperties: false
+ description: >-
+ Bearer token authentication. Use a workspace-scoped OpenAI Admin key with the `codex.enterprise.analytics.read` scope. Only the fields provided are changed; omit `token` to keep the stored one.
+ properties:
+ auth_type:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountBearerTokenAuthType"
+ token:
+ description: Secret token used to authenticate with OpenAI Codex.
+ example: your-token
+ type: string
+ writeOnly: true
+ required:
+ - auth_type
+ type: object
+ OpenAICodexIntegrationAccountCreateAttributes:
+ description: Writable attributes used to create an OpenAI Codex integration account.
+ properties:
+ authentication:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountAuthenticationRequest"
+ dataflows:
+ $ref: "#/components/schemas/OpenAICodexIntegrationDataflowsRequest"
+ name:
+ description: Human-readable name of the OpenAI Codex integration account.
+ example: openai-codex-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountSettingsRequest"
+ required:
+ - name
+ - authentication
+ - settings
+ type: object
+ OpenAICodexIntegrationAccountCreateData:
+ description: Data envelope for creating an OpenAI Codex integration account.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountCreateAttributes"
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - type
+ - attributes
+ type: object
+ OpenAICodexIntegrationAccountCreateRequest:
+ description: Request payload to create an OpenAI Codex integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountCreateData"
+ required:
+ - data
+ type: object
+ OpenAICodexIntegrationAccountResponse:
+ description: Response payload for a single OpenAI Codex integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponseData"
+ required:
+ - data
+ type: object
+ OpenAICodexIntegrationAccountResponseAttributes:
+ description: Attributes of an OpenAI Codex integration account returned in responses.
+ properties:
+ authentication:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountAuthenticationResponse"
+ dataflows:
+ $ref: "#/components/schemas/OpenAICodexIntegrationDataflowsResponse"
+ name:
+ description: Human-readable name of the OpenAI Codex integration account.
+ example: openai-codex-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountSettingsResponse"
+ required:
+ - name
+ - settings
+ type: object
+ OpenAICodexIntegrationAccountResponseData:
+ description: Data envelope of an OpenAI Codex integration account, including server-assigned identity.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponseAttributes"
+ id:
+ description: Server-generated unique identifier of the OpenAI Codex integration account.
+ example: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47
+ readOnly: true
+ type: string
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - id
+ - attributes
+ - type
+ type: object
+ OpenAICodexIntegrationAccountSettingsRequest:
+ additionalProperties: false
+ description: Settings for creating the OpenAI Codex integration account.
+ properties:
+ codex_workspace_id:
+ description: ID of the Codex workspace to collect data from.
+ example: your-workspace-id
+ type: string
+ required:
+ - codex_workspace_id
+ type: object
+ OpenAICodexIntegrationAccountSettingsResponse:
+ description: Settings configured on the OpenAI Codex integration account.
+ properties:
+ codex_workspace_id:
+ description: ID of the Codex workspace to collect data from.
+ example: your-workspace-id
+ type: string
+ required:
+ - codex_workspace_id
+ type: object
+ OpenAICodexIntegrationAccountSettingsUpdate:
+ additionalProperties: false
+ description: >-
+ Settings for updating the OpenAI Codex integration account. Only the fields provided are changed.
+ properties:
+ codex_workspace_id:
+ description: ID of the Codex workspace to collect data from.
+ example: your-workspace-id
+ type: string
+ type: object
+ OpenAICodexIntegrationAccountUpdateAttributes:
+ description: >-
+ Writable attributes used to update an OpenAI Codex integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration.
+ properties:
+ authentication:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountAuthenticationUpdate"
+ dataflows:
+ $ref: "#/components/schemas/OpenAICodexIntegrationDataflowsRequest"
+ name:
+ description: Human-readable name of the OpenAI Codex integration account.
+ example: openai-codex-acme
+ type: string
+ settings:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountSettingsUpdate"
+ type: object
+ OpenAICodexIntegrationAccountUpdateData:
+ description: Data envelope for updating an OpenAI Codex integration account.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountUpdateAttributes"
+ id:
+ description: Unique identifier of the OpenAI Codex integration account to update.
+ example: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47
+ type: string
+ type:
+ $ref: "#/components/schemas/IntegrationAccountType"
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ OpenAICodexIntegrationAccountUpdateRequest:
+ description: Request payload to update an OpenAI Codex integration account.
+ properties:
+ data:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountUpdateData"
+ required:
+ - data
+ type: object
+ OpenAICodexIntegrationAccountsResponse:
+ description: Response payload for a list of OpenAI Codex integration accounts.
+ properties:
+ data:
+ description: List of OpenAI Codex integration accounts.
+ items:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponseData"
+ type: array
+ required:
+ - data
+ type: object
+ OpenAICodexIntegrationDataflowsRequest:
+ additionalProperties: false
+ description: >-
+ Data Datadog collects from OpenAI Codex, keyed by dataflow id. Daily Codex analytics metrics are always collected; each dataflow here adds a further kind of collection on top of that baseline, so set `enabled` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted fields keep their current values. Every dataflow requires an OpenAI enterprise subscription with Codex enabled; a dataflow enabled without it is stored but collects no data.
+ properties:
+ openai-codex-dora:
+ $ref: "#/components/schemas/OpenAICodexDoraIntegrationDataflowRequest"
+ openai-codex-turn-metrics:
+ $ref: "#/components/schemas/OpenAICodexTurnMetricsIntegrationDataflowRequest"
+ type: object
+ OpenAICodexIntegrationDataflowsResponse:
+ description: Data Datadog collects from OpenAI Codex, keyed by dataflow id.
+ properties:
+ openai-codex-dora:
+ $ref: "#/components/schemas/OpenAICodexDoraIntegrationDataflowResponse"
+ openai-codex-metrics:
+ $ref: "#/components/schemas/OpenAICodexMetricsIntegrationDataflowResponse"
+ openai-codex-turn-metrics:
+ $ref: "#/components/schemas/OpenAICodexTurnMetricsIntegrationDataflowResponse"
+ type: object
+ OpenAICodexMetricsIntegrationDataflowResponse:
+ description: >-
+ Daily Codex analytics metrics under the `openai.codex.*` namespace: usage totals, token counts by model, thread and turn counts by client, lines of code attributable to Codex, and code reviews. This dataflow is always on and cannot be turned off, which is why it appears in responses only.
+ properties:
+ enabled:
+ description: Whether Datadog collects this data. Always `true`, because this collection cannot be turned off.
+ example: true
+ readOnly: true
+ type: boolean
+ status:
+ $ref: "#/components/schemas/IntegrationAccountDataflowStatus"
+ type: object
+ OpenAICodexTurnMetricsIntegrationDataflowRequest:
+ additionalProperties: false
+ description: >-
+ Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session identity, Work Insights classification, token usage, credits, estimated cost, duration, and skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from invoiced charges. Requires the `chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read` scope on the key in `authentication`; without it this dataflow collects no data.
+ properties:
+ enabled:
+ description: >-
+ Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.
+ example: true
+ type: boolean
+ type: object
+ OpenAICodexTurnMetricsIntegrationDataflowResponse:
+ description: >-
+ Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session identity, Work Insights classification, token usage, credits, estimated cost, duration, and skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from invoiced charges. Requires the `chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read` scope on the key in `authentication`; without it this dataflow collects no data.
+ properties:
+ enabled:
+ description: Whether Datadog collects this data.
+ example: true
+ type: boolean
+ status:
+ $ref: "#/components/schemas/IntegrationAccountDataflowStatus"
+ type: object
OpenAICredentials:
description: The definition of the `OpenAICredentials` object.
oneOf:
@@ -198229,6 +198525,280 @@ paths:
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ /api/v2/integration-interfaces/openai-codex/accounts:
+ get:
+ description: List OpenAI Codex integration accounts.
+ operationId: ListOpenAICodexIntegrationAccounts
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ openai-codex-dora:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-codex-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-codex-turn-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ name: openai-codex-acme
+ settings:
+ codex_workspace_id: your-workspace-id
+ id: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountsResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: List OpenAI Codex integration accounts
+ tags:
+ - OpenAI Codex Integration
+ "x-permission":
+ operator: OR
+ permissions:
+ - integrations_read
+ x-unstable: |-
+ **Note**: This endpoint is in preview and is subject to change.
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ post:
+ description: Create an OpenAI Codex integration account.
+ operationId: CreateOpenAICodexIntegrationAccount
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountCreateRequest"
+ required: true
+ responses:
+ "201":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ openai-codex-dora:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-codex-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-codex-turn-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ name: openai-codex-acme
+ settings:
+ codex_workspace_id: your-workspace-id
+ id: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponse"
+ description: Created
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "422":
+ $ref: "#/components/responses/UnprocessableEntityResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Create an OpenAI Codex integration account
+ tags:
+ - OpenAI Codex Integration
+ x-codegen-request-body-name: body
+ "x-permission":
+ operator: OR
+ permissions:
+ - manage_integrations
+ x-unstable: |-
+ **Note**: This endpoint is in preview and is subject to change.
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ /api/v2/integration-interfaces/openai-codex/accounts/{account_id}:
+ delete:
+ description: Delete an OpenAI Codex integration account.
+ operationId: DeleteOpenAICodexIntegrationAccount
+ parameters:
+ - $ref: "#/components/parameters/IntegrationAccountIdParameter"
+ responses:
+ "200":
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Delete an OpenAI Codex integration account
+ tags:
+ - OpenAI Codex Integration
+ "x-permission":
+ operator: OR
+ permissions:
+ - manage_integrations
+ x-unstable: |-
+ **Note**: This endpoint is in preview and is subject to change.
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ get:
+ description: Get an OpenAI Codex integration account.
+ operationId: GetOpenAICodexIntegrationAccount
+ parameters:
+ - $ref: "#/components/parameters/IntegrationAccountIdParameter"
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ openai-codex-dora:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-codex-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-codex-turn-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ name: openai-codex-acme
+ settings:
+ codex_workspace_id: your-workspace-id
+ id: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Get an OpenAI Codex integration account
+ tags:
+ - OpenAI Codex Integration
+ "x-permission":
+ operator: OR
+ permissions:
+ - integrations_read
+ x-unstable: |-
+ **Note**: This endpoint is in preview and is subject to change.
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ patch:
+ description: Update an OpenAI Codex integration account. Only the fields provided are changed.
+ operationId: UpdateOpenAICodexIntegrationAccount
+ parameters:
+ - $ref: "#/components/parameters/IntegrationAccountIdParameter"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountUpdateRequest"
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ authentication:
+ auth_type: bearer_token
+ dataflows:
+ openai-codex-dora:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-codex-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ openai-codex-turn-metrics:
+ enabled: true
+ status:
+ health: DATAFLOW_HEALTH_OK
+ updated_at: "2026-11-10T08:30:50Z"
+ name: openai-codex-acme
+ settings:
+ codex_workspace_id: your-workspace-id
+ id: 7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47
+ type: integration-account
+ schema:
+ $ref: "#/components/schemas/OpenAICodexIntegrationAccountResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/BadRequestResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/NotFoundResponse"
+ "422":
+ $ref: "#/components/responses/UnprocessableEntityResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ summary: Update an OpenAI Codex integration account
+ tags:
+ - OpenAI Codex Integration
+ x-codegen-request-body-name: body
+ "x-permission":
+ operator: OR
+ permissions:
+ - manage_integrations
+ x-unstable: |-
+ **Note**: This endpoint is in preview and is subject to change.
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/integration-interfaces/snowflake/accounts:
get:
description: List Snowflake integration accounts.
@@ -273083,6 +273653,15 @@ tags:
externalDocs:
url: https://docs.datadoghq.com/service_management/on-call/
name: On-Call Paging
+ - description: |-
+ Manage your Datadog OpenAI Codex integration accounts and account resources
+ directly through the Datadog API. See the
+ [OpenAI Codex integration page](https://docs.datadoghq.com/integrations/openai-codex/) for
+ more information.
+ externalDocs:
+ description: OpenAI Codex integration.
+ url: https://docs.datadoghq.com/integrations/openai-codex/
+ name: OpenAI Codex Integration
- description: |-
Configure your [Datadog Opsgenie integration](https://docs.datadoghq.com/integrations/opsgenie/)
directly through the Datadog API.
diff --git a/examples/v2/openai-codex-integration/CreateOpenAICodexIntegrationAccount.py b/examples/v2/openai-codex-integration/CreateOpenAICodexIntegrationAccount.py
new file mode 100644
index 0000000000..6d0c2d55bb
--- /dev/null
+++ b/examples/v2/openai-codex-integration/CreateOpenAICodexIntegrationAccount.py
@@ -0,0 +1,68 @@
+"""
+Create an OpenAI Codex integration account returns "Created" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.open_ai_codex_integration_api import OpenAICodexIntegrationApi
+from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+from datadog_api_client.v2.model.open_ai_codex_dora_integration_dataflow_request import (
+ OpenAICodexDoraIntegrationDataflowRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_request import (
+ OpenAICodexIntegrationAccountBearerTokenAuthRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_create_attributes import (
+ OpenAICodexIntegrationAccountCreateAttributes,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_create_data import (
+ OpenAICodexIntegrationAccountCreateData,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_create_request import (
+ OpenAICodexIntegrationAccountCreateRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_request import (
+ OpenAICodexIntegrationAccountSettingsRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_request import (
+ OpenAICodexIntegrationDataflowsRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_turn_metrics_integration_dataflow_request import (
+ OpenAICodexTurnMetricsIntegrationDataflowRequest,
+)
+
+body = OpenAICodexIntegrationAccountCreateRequest(
+ data=OpenAICodexIntegrationAccountCreateData(
+ attributes=OpenAICodexIntegrationAccountCreateAttributes(
+ authentication=OpenAICodexIntegrationAccountBearerTokenAuthRequest(
+ auth_type=OpenAICodexIntegrationAccountBearerTokenAuthType.BEARER_TOKEN,
+ token="your-token",
+ ),
+ dataflows=OpenAICodexIntegrationDataflowsRequest(
+ openai_codex_dora=OpenAICodexDoraIntegrationDataflowRequest(
+ enabled=True,
+ ),
+ openai_codex_turn_metrics=OpenAICodexTurnMetricsIntegrationDataflowRequest(
+ enabled=True,
+ ),
+ ),
+ name="openai-codex-acme",
+ settings=OpenAICodexIntegrationAccountSettingsRequest(
+ codex_workspace_id="your-workspace-id",
+ ),
+ ),
+ type=IntegrationAccountType.INTEGRATION_ACCOUNT,
+ ),
+)
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["create_open_ai_codex_integration_account"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = OpenAICodexIntegrationApi(api_client)
+ response = api_instance.create_open_ai_codex_integration_account(body=body)
+
+ print(response)
diff --git a/examples/v2/openai-codex-integration/DeleteOpenAICodexIntegrationAccount.py b/examples/v2/openai-codex-integration/DeleteOpenAICodexIntegrationAccount.py
new file mode 100644
index 0000000000..e5ed2d7d17
--- /dev/null
+++ b/examples/v2/openai-codex-integration/DeleteOpenAICodexIntegrationAccount.py
@@ -0,0 +1,16 @@
+"""
+Delete an OpenAI Codex integration account returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.open_ai_codex_integration_api import OpenAICodexIntegrationApi
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["delete_open_ai_codex_integration_account"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = OpenAICodexIntegrationApi(api_client)
+ api_instance.delete_open_ai_codex_integration_account(
+ account_id="account_id",
+ )
diff --git a/examples/v2/openai-codex-integration/GetOpenAICodexIntegrationAccount.py b/examples/v2/openai-codex-integration/GetOpenAICodexIntegrationAccount.py
new file mode 100644
index 0000000000..8b44cb4c8b
--- /dev/null
+++ b/examples/v2/openai-codex-integration/GetOpenAICodexIntegrationAccount.py
@@ -0,0 +1,18 @@
+"""
+Get an OpenAI Codex integration account returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.open_ai_codex_integration_api import OpenAICodexIntegrationApi
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["get_open_ai_codex_integration_account"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = OpenAICodexIntegrationApi(api_client)
+ response = api_instance.get_open_ai_codex_integration_account(
+ account_id="account_id",
+ )
+
+ print(response)
diff --git a/examples/v2/openai-codex-integration/ListOpenAICodexIntegrationAccounts.py b/examples/v2/openai-codex-integration/ListOpenAICodexIntegrationAccounts.py
new file mode 100644
index 0000000000..84da682326
--- /dev/null
+++ b/examples/v2/openai-codex-integration/ListOpenAICodexIntegrationAccounts.py
@@ -0,0 +1,16 @@
+"""
+List OpenAI Codex integration accounts returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.open_ai_codex_integration_api import OpenAICodexIntegrationApi
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["list_open_ai_codex_integration_accounts"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = OpenAICodexIntegrationApi(api_client)
+ response = api_instance.list_open_ai_codex_integration_accounts()
+
+ print(response)
diff --git a/examples/v2/openai-codex-integration/UpdateOpenAICodexIntegrationAccount.py b/examples/v2/openai-codex-integration/UpdateOpenAICodexIntegrationAccount.py
new file mode 100644
index 0000000000..454467153b
--- /dev/null
+++ b/examples/v2/openai-codex-integration/UpdateOpenAICodexIntegrationAccount.py
@@ -0,0 +1,69 @@
+"""
+Update an OpenAI Codex integration account returns "OK" response
+"""
+
+from os import environ
+from datadog_api_client import ApiClient, Configuration
+from datadog_api_client.v2.api.open_ai_codex_integration_api import OpenAICodexIntegrationApi
+from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+from datadog_api_client.v2.model.open_ai_codex_dora_integration_dataflow_request import (
+ OpenAICodexDoraIntegrationDataflowRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_update import (
+ OpenAICodexIntegrationAccountBearerTokenAuthUpdate,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_update import (
+ OpenAICodexIntegrationAccountSettingsUpdate,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_update_attributes import (
+ OpenAICodexIntegrationAccountUpdateAttributes,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_update_data import (
+ OpenAICodexIntegrationAccountUpdateData,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_update_request import (
+ OpenAICodexIntegrationAccountUpdateRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_request import (
+ OpenAICodexIntegrationDataflowsRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_turn_metrics_integration_dataflow_request import (
+ OpenAICodexTurnMetricsIntegrationDataflowRequest,
+)
+
+body = OpenAICodexIntegrationAccountUpdateRequest(
+ data=OpenAICodexIntegrationAccountUpdateData(
+ attributes=OpenAICodexIntegrationAccountUpdateAttributes(
+ authentication=OpenAICodexIntegrationAccountBearerTokenAuthUpdate(
+ auth_type=OpenAICodexIntegrationAccountBearerTokenAuthType.BEARER_TOKEN,
+ token="your-token",
+ ),
+ dataflows=OpenAICodexIntegrationDataflowsRequest(
+ openai_codex_dora=OpenAICodexDoraIntegrationDataflowRequest(
+ enabled=True,
+ ),
+ openai_codex_turn_metrics=OpenAICodexTurnMetricsIntegrationDataflowRequest(
+ enabled=True,
+ ),
+ ),
+ name="openai-codex-acme",
+ settings=OpenAICodexIntegrationAccountSettingsUpdate(
+ codex_workspace_id="your-workspace-id",
+ ),
+ ),
+ id="7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47",
+ type=IntegrationAccountType.INTEGRATION_ACCOUNT,
+ ),
+)
+
+configuration = Configuration()
+configuration.access_token = environ["DD_BEARER_TOKEN"]
+configuration.unstable_operations["update_open_ai_codex_integration_account"] = True
+with ApiClient(configuration) as api_client:
+ api_instance = OpenAICodexIntegrationApi(api_client)
+ response = api_instance.update_open_ai_codex_integration_account(account_id="account_id", body=body)
+
+ print(response)
diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py
index 2f5b980616..62038a3d39 100644
--- a/src/datadog_api_client/configuration.py
+++ b/src/datadog_api_client/configuration.py
@@ -736,6 +736,11 @@ def __init__(
"v2.get_elastic_cloud_integration_account": False,
"v2.list_elastic_cloud_integration_accounts": False,
"v2.update_elastic_cloud_integration_account": False,
+ "v2.create_open_ai_codex_integration_account": False,
+ "v2.delete_open_ai_codex_integration_account": False,
+ "v2.get_open_ai_codex_integration_account": False,
+ "v2.list_open_ai_codex_integration_accounts": False,
+ "v2.update_open_ai_codex_integration_account": False,
"v2.create_snowflake_integration_account": False,
"v2.delete_snowflake_integration_account": False,
"v2.get_snowflake_integration_account": False,
diff --git a/src/datadog_api_client/v2/api/open_ai_codex_integration_api.py b/src/datadog_api_client/v2/api/open_ai_codex_integration_api.py
new file mode 100644
index 0000000000..c14084c12a
--- /dev/null
+++ b/src/datadog_api_client/v2/api/open_ai_codex_integration_api.py
@@ -0,0 +1,224 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Any, Dict
+
+from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
+from datadog_api_client.configuration import Configuration
+from datadog_api_client.v2.model.open_ai_codex_integration_accounts_response import (
+ OpenAICodexIntegrationAccountsResponse,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_response import OpenAICodexIntegrationAccountResponse
+from datadog_api_client.v2.model.open_ai_codex_integration_account_create_request import (
+ OpenAICodexIntegrationAccountCreateRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_update_request import (
+ OpenAICodexIntegrationAccountUpdateRequest,
+)
+
+
+class OpenAICodexIntegrationApi:
+ """
+ Manage your Datadog OpenAI Codex integration accounts and account resources
+ directly through the Datadog API. See the
+ `OpenAI Codex integration page `_ for
+ more information.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient(Configuration())
+ self.api_client = api_client
+
+ self._create_open_ai_codex_integration_account_endpoint = _Endpoint(
+ settings={
+ "response_type": (OpenAICodexIntegrationAccountResponse,),
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/openai-codex/accounts",
+ "operation_id": "create_open_ai_codex_integration_account",
+ "http_method": "POST",
+ "version": "v2",
+ },
+ params_map={
+ "body": {
+ "required": True,
+ "openapi_types": (OpenAICodexIntegrationAccountCreateRequest,),
+ "location": "body",
+ },
+ },
+ headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
+ api_client=api_client,
+ )
+
+ self._delete_open_ai_codex_integration_account_endpoint = _Endpoint(
+ settings={
+ "response_type": None,
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}",
+ "operation_id": "delete_open_ai_codex_integration_account",
+ "http_method": "DELETE",
+ "version": "v2",
+ },
+ params_map={
+ "account_id": {
+ "required": True,
+ "openapi_types": (str,),
+ "attribute": "account_id",
+ "location": "path",
+ },
+ },
+ headers_map={
+ "accept": ["*/*"],
+ },
+ api_client=api_client,
+ )
+
+ self._get_open_ai_codex_integration_account_endpoint = _Endpoint(
+ settings={
+ "response_type": (OpenAICodexIntegrationAccountResponse,),
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}",
+ "operation_id": "get_open_ai_codex_integration_account",
+ "http_method": "GET",
+ "version": "v2",
+ },
+ params_map={
+ "account_id": {
+ "required": True,
+ "openapi_types": (str,),
+ "attribute": "account_id",
+ "location": "path",
+ },
+ },
+ headers_map={
+ "accept": ["application/json"],
+ },
+ api_client=api_client,
+ )
+
+ self._list_open_ai_codex_integration_accounts_endpoint = _Endpoint(
+ settings={
+ "response_type": (OpenAICodexIntegrationAccountsResponse,),
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/openai-codex/accounts",
+ "operation_id": "list_open_ai_codex_integration_accounts",
+ "http_method": "GET",
+ "version": "v2",
+ },
+ params_map={},
+ headers_map={
+ "accept": ["application/json"],
+ },
+ api_client=api_client,
+ )
+
+ self._update_open_ai_codex_integration_account_endpoint = _Endpoint(
+ settings={
+ "response_type": (OpenAICodexIntegrationAccountResponse,),
+ "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
+ "endpoint_path": "/api/v2/integration-interfaces/openai-codex/accounts/{account_id}",
+ "operation_id": "update_open_ai_codex_integration_account",
+ "http_method": "PATCH",
+ "version": "v2",
+ },
+ params_map={
+ "account_id": {
+ "required": True,
+ "openapi_types": (str,),
+ "attribute": "account_id",
+ "location": "path",
+ },
+ "body": {
+ "required": True,
+ "openapi_types": (OpenAICodexIntegrationAccountUpdateRequest,),
+ "location": "body",
+ },
+ },
+ headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
+ api_client=api_client,
+ )
+
+ def create_open_ai_codex_integration_account(
+ self,
+ body: OpenAICodexIntegrationAccountCreateRequest,
+ ) -> OpenAICodexIntegrationAccountResponse:
+ """Create an OpenAI Codex integration account.
+
+ Create an OpenAI Codex integration account.
+
+ :type body: OpenAICodexIntegrationAccountCreateRequest
+ :rtype: OpenAICodexIntegrationAccountResponse
+ """
+ kwargs: Dict[str, Any] = {}
+ kwargs["body"] = body
+
+ return self._create_open_ai_codex_integration_account_endpoint.call_with_http_info(**kwargs)
+
+ def delete_open_ai_codex_integration_account(
+ self,
+ account_id: str,
+ ) -> None:
+ """Delete an OpenAI Codex integration account.
+
+ Delete an OpenAI Codex integration account.
+
+ :param account_id: Unique identifier of the integration account.
+ :type account_id: str
+ :rtype: None
+ """
+ kwargs: Dict[str, Any] = {}
+ kwargs["account_id"] = account_id
+
+ return self._delete_open_ai_codex_integration_account_endpoint.call_with_http_info(**kwargs)
+
+ def get_open_ai_codex_integration_account(
+ self,
+ account_id: str,
+ ) -> OpenAICodexIntegrationAccountResponse:
+ """Get an OpenAI Codex integration account.
+
+ Get an OpenAI Codex integration account.
+
+ :param account_id: Unique identifier of the integration account.
+ :type account_id: str
+ :rtype: OpenAICodexIntegrationAccountResponse
+ """
+ kwargs: Dict[str, Any] = {}
+ kwargs["account_id"] = account_id
+
+ return self._get_open_ai_codex_integration_account_endpoint.call_with_http_info(**kwargs)
+
+ def list_open_ai_codex_integration_accounts(
+ self,
+ ) -> OpenAICodexIntegrationAccountsResponse:
+ """List OpenAI Codex integration accounts.
+
+ List OpenAI Codex integration accounts.
+
+ :rtype: OpenAICodexIntegrationAccountsResponse
+ """
+ kwargs: Dict[str, Any] = {}
+ return self._list_open_ai_codex_integration_accounts_endpoint.call_with_http_info(**kwargs)
+
+ def update_open_ai_codex_integration_account(
+ self,
+ account_id: str,
+ body: OpenAICodexIntegrationAccountUpdateRequest,
+ ) -> OpenAICodexIntegrationAccountResponse:
+ """Update an OpenAI Codex integration account.
+
+ Update an OpenAI Codex integration account. Only the fields provided are changed.
+
+ :param account_id: Unique identifier of the integration account.
+ :type account_id: str
+ :type body: OpenAICodexIntegrationAccountUpdateRequest
+ :rtype: OpenAICodexIntegrationAccountResponse
+ """
+ kwargs: Dict[str, Any] = {}
+ kwargs["account_id"] = account_id
+
+ kwargs["body"] = body
+
+ return self._update_open_ai_codex_integration_account_endpoint.call_with_http_info(**kwargs)
diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py
index e9da816e59..e4756c21c2 100644
--- a/src/datadog_api_client/v2/apis/__init__.py
+++ b/src/datadog_api_client/v2/apis/__init__.py
@@ -94,6 +94,7 @@
from datadog_api_client.v2.api.okta_integration_api import OktaIntegrationApi
from datadog_api_client.v2.api.on_call_api import OnCallApi
from datadog_api_client.v2.api.on_call_paging_api import OnCallPagingApi
+from datadog_api_client.v2.api.open_ai_codex_integration_api import OpenAICodexIntegrationApi
from datadog_api_client.v2.api.opsgenie_integration_api import OpsgenieIntegrationApi
from datadog_api_client.v2.api.org_authorized_clients_api import OrgAuthorizedClientsApi
from datadog_api_client.v2.api.org_connections_api import OrgConnectionsApi
@@ -256,6 +257,7 @@
"OktaIntegrationApi",
"OnCallApi",
"OnCallPagingApi",
+ "OpenAICodexIntegrationApi",
"OpsgenieIntegrationApi",
"OrgAuthorizedClientsApi",
"OrgConnectionsApi",
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_dora_integration_dataflow_request.py b/src/datadog_api_client/v2/model/open_ai_codex_dora_integration_dataflow_request.py
new file mode 100644
index 0000000000..9c15ac5d3c
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_dora_integration_dataflow_request.py
@@ -0,0 +1,40 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+class OpenAICodexDoraIntegrationDataflowRequest(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "enabled": (bool,),
+ }
+
+ attribute_map = {
+ "enabled": "enabled",
+ }
+
+ def __init__(self_, enabled: Union[bool, UnsetType] = unset, **kwargs):
+ """
+ A daily per-engineer engagement signal that `AI Impact `_ uses to attribute AI-assisted pull requests.
+
+ :param enabled: Whether Datadog collects this data. Defaults to ``true`` ; set to ``false`` to stop collection.
+ :type enabled: bool, optional
+ """
+ if enabled is not unset:
+ kwargs["enabled"] = enabled
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_dora_integration_dataflow_response.py b/src/datadog_api_client/v2/model/open_ai_codex_dora_integration_dataflow_response.py
new file mode 100644
index 0000000000..45e700f9a3
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_dora_integration_dataflow_response.py
@@ -0,0 +1,57 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.integration_account_dataflow_status import IntegrationAccountDataflowStatus
+
+
+class OpenAICodexDoraIntegrationDataflowResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.integration_account_dataflow_status import IntegrationAccountDataflowStatus
+
+ return {
+ "enabled": (bool,),
+ "status": (IntegrationAccountDataflowStatus,),
+ }
+
+ attribute_map = {
+ "enabled": "enabled",
+ "status": "status",
+ }
+ read_only_vars = {
+ "status",
+ }
+
+ def __init__(
+ self_,
+ enabled: Union[bool, UnsetType] = unset,
+ status: Union[IntegrationAccountDataflowStatus, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ A daily per-engineer engagement signal that `AI Impact `_ uses to attribute AI-assisted pull requests.
+
+ :param enabled: Whether Datadog collects this data.
+ :type enabled: bool, optional
+
+ :param status: Read-only collection status of a dataflow.
+ :type status: IntegrationAccountDataflowStatus, optional
+ """
+ if enabled is not unset:
+ kwargs["enabled"] = enabled
+ if status is not unset:
+ kwargs["status"] = status
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_request.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_request.py
new file mode 100644
index 0000000000..54c79f76ab
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_request.py
@@ -0,0 +1,43 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelComposed,
+ cached_property,
+)
+
+
+class OpenAICodexIntegrationAccountAuthenticationRequest(ModelComposed):
+ def __init__(self, **kwargs):
+ """
+ Authentication for creating the OpenAI Codex integration account. Exactly one method is set.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType
+
+ :param token: Secret token used to authenticate with OpenAI Codex.
+ :type token: str
+ """
+ super().__init__(kwargs)
+
+ @cached_property
+ def _composed_schemas(_):
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error because the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_request import (
+ OpenAICodexIntegrationAccountBearerTokenAuthRequest,
+ )
+
+ return {
+ "oneOf": [
+ OpenAICodexIntegrationAccountBearerTokenAuthRequest,
+ ],
+ }
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_response.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_response.py
new file mode 100644
index 0000000000..9d1d325154
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_response.py
@@ -0,0 +1,40 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelComposed,
+ cached_property,
+)
+
+
+class OpenAICodexIntegrationAccountAuthenticationResponse(ModelComposed):
+ def __init__(self, **kwargs):
+ """
+ Authentication configured on the OpenAI Codex integration account.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType
+ """
+ super().__init__(kwargs)
+
+ @cached_property
+ def _composed_schemas(_):
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error because the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_response import (
+ OpenAICodexIntegrationAccountBearerTokenAuthResponse,
+ )
+
+ return {
+ "oneOf": [
+ OpenAICodexIntegrationAccountBearerTokenAuthResponse,
+ ],
+ }
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_update.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_update.py
new file mode 100644
index 0000000000..9578ec6491
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_authentication_update.py
@@ -0,0 +1,43 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelComposed,
+ cached_property,
+)
+
+
+class OpenAICodexIntegrationAccountAuthenticationUpdate(ModelComposed):
+ def __init__(self, **kwargs):
+ """
+ Authentication for updating the OpenAI Codex integration account. Exactly one method is set.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType
+
+ :param token: Secret token used to authenticate with OpenAI Codex.
+ :type token: str, optional
+ """
+ super().__init__(kwargs)
+
+ @cached_property
+ def _composed_schemas(_):
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error because the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_update import (
+ OpenAICodexIntegrationAccountBearerTokenAuthUpdate,
+ )
+
+ return {
+ "oneOf": [
+ OpenAICodexIntegrationAccountBearerTokenAuthUpdate,
+ ],
+ }
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_request.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_request.py
new file mode 100644
index 0000000000..1b45e88912
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_request.py
@@ -0,0 +1,54 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+ )
+
+
+class OpenAICodexIntegrationAccountBearerTokenAuthRequest(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+ )
+
+ return {
+ "auth_type": (OpenAICodexIntegrationAccountBearerTokenAuthType,),
+ "token": (str,),
+ }
+
+ attribute_map = {
+ "auth_type": "auth_type",
+ "token": "token",
+ }
+
+ def __init__(self_, auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType, token: str, **kwargs):
+ """
+ Bearer token authentication. Use a workspace-scoped OpenAI Admin key with the ``codex.enterprise.analytics.read`` scope.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType
+
+ :param token: Secret token used to authenticate with OpenAI Codex.
+ :type token: str
+ """
+ super().__init__(kwargs)
+
+ self_.auth_type = auth_type
+ self_.token = token
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_response.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_response.py
new file mode 100644
index 0000000000..85489c1007
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_response.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+ )
+
+
+class OpenAICodexIntegrationAccountBearerTokenAuthResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+ )
+
+ return {
+ "auth_type": (OpenAICodexIntegrationAccountBearerTokenAuthType,),
+ }
+
+ attribute_map = {
+ "auth_type": "auth_type",
+ }
+
+ def __init__(self_, auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType, **kwargs):
+ """
+ The bearer token authentication method configured on the account.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType
+ """
+ super().__init__(kwargs)
+
+ self_.auth_type = auth_type
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_type.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_type.py
new file mode 100644
index 0000000000..6e8ca5bdcd
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_type.py
@@ -0,0 +1,37 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelSimple,
+ cached_property,
+)
+
+from typing import ClassVar
+
+
+class OpenAICodexIntegrationAccountBearerTokenAuthType(ModelSimple):
+ """
+ The authentication method type.
+
+ :param value: If omitted defaults to "bearer_token". Must be one of ["bearer_token"].
+ :type value: str
+ """
+
+ allowed_values = {
+ "bearer_token",
+ }
+ BEARER_TOKEN: ClassVar["OpenAICodexIntegrationAccountBearerTokenAuthType"]
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "value": (str,),
+ }
+
+
+OpenAICodexIntegrationAccountBearerTokenAuthType.BEARER_TOKEN = OpenAICodexIntegrationAccountBearerTokenAuthType(
+ "bearer_token"
+)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_update.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_update.py
new file mode 100644
index 0000000000..8f5d63976e
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_bearer_token_auth_update.py
@@ -0,0 +1,62 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+ )
+
+
+class OpenAICodexIntegrationAccountBearerTokenAuthUpdate(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+ )
+
+ return {
+ "auth_type": (OpenAICodexIntegrationAccountBearerTokenAuthType,),
+ "token": (str,),
+ }
+
+ attribute_map = {
+ "auth_type": "auth_type",
+ "token": "token",
+ }
+
+ def __init__(
+ self_,
+ auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType,
+ token: Union[str, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Bearer token authentication. Use a workspace-scoped OpenAI Admin key with the ``codex.enterprise.analytics.read`` scope. Only the fields provided are changed; omit ``token`` to keep the stored one.
+
+ :param auth_type: The authentication method type.
+ :type auth_type: OpenAICodexIntegrationAccountBearerTokenAuthType
+
+ :param token: Secret token used to authenticate with OpenAI Codex.
+ :type token: str, optional
+ """
+ if token is not unset:
+ kwargs["token"] = token
+ super().__init__(kwargs)
+
+ self_.auth_type = auth_type
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_attributes.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_attributes.py
new file mode 100644
index 0000000000..635324e00a
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_attributes.py
@@ -0,0 +1,89 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_request import (
+ OpenAICodexIntegrationAccountAuthenticationRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_request import (
+ OpenAICodexIntegrationDataflowsRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_request import (
+ OpenAICodexIntegrationAccountSettingsRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_request import (
+ OpenAICodexIntegrationAccountBearerTokenAuthRequest,
+ )
+
+
+class OpenAICodexIntegrationAccountCreateAttributes(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_request import (
+ OpenAICodexIntegrationAccountAuthenticationRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_request import (
+ OpenAICodexIntegrationDataflowsRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_request import (
+ OpenAICodexIntegrationAccountSettingsRequest,
+ )
+
+ return {
+ "authentication": (OpenAICodexIntegrationAccountAuthenticationRequest,),
+ "dataflows": (OpenAICodexIntegrationDataflowsRequest,),
+ "name": (str,),
+ "settings": (OpenAICodexIntegrationAccountSettingsRequest,),
+ }
+
+ attribute_map = {
+ "authentication": "authentication",
+ "dataflows": "dataflows",
+ "name": "name",
+ "settings": "settings",
+ }
+
+ def __init__(
+ self_,
+ authentication: Union[
+ OpenAICodexIntegrationAccountAuthenticationRequest, OpenAICodexIntegrationAccountBearerTokenAuthRequest
+ ],
+ name: str,
+ settings: OpenAICodexIntegrationAccountSettingsRequest,
+ dataflows: Union[OpenAICodexIntegrationDataflowsRequest, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Writable attributes used to create an OpenAI Codex integration account.
+
+ :param authentication: Authentication for creating the OpenAI Codex integration account. Exactly one method is set.
+ :type authentication: OpenAICodexIntegrationAccountAuthenticationRequest
+
+ :param dataflows: Data Datadog collects from OpenAI Codex, keyed by dataflow id. Daily Codex analytics metrics are always collected; each dataflow here adds a further kind of collection on top of that baseline, so set ``enabled`` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted fields keep their current values. Every dataflow requires an OpenAI enterprise subscription with Codex enabled; a dataflow enabled without it is stored but collects no data.
+ :type dataflows: OpenAICodexIntegrationDataflowsRequest, optional
+
+ :param name: Human-readable name of the OpenAI Codex integration account.
+ :type name: str
+
+ :param settings: Settings for creating the OpenAI Codex integration account.
+ :type settings: OpenAICodexIntegrationAccountSettingsRequest
+ """
+ if dataflows is not unset:
+ kwargs["dataflows"] = dataflows
+ super().__init__(kwargs)
+
+ self_.authentication = authentication
+ self_.name = name
+ self_.settings = settings
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_data.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_data.py
new file mode 100644
index 0000000000..b1af68d4b7
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_data.py
@@ -0,0 +1,54 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_create_attributes import (
+ OpenAICodexIntegrationAccountCreateAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+
+class OpenAICodexIntegrationAccountCreateData(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_create_attributes import (
+ OpenAICodexIntegrationAccountCreateAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+ return {
+ "attributes": (OpenAICodexIntegrationAccountCreateAttributes,),
+ "type": (IntegrationAccountType,),
+ }
+
+ attribute_map = {
+ "attributes": "attributes",
+ "type": "type",
+ }
+
+ def __init__(
+ self_, attributes: OpenAICodexIntegrationAccountCreateAttributes, type: IntegrationAccountType, **kwargs
+ ):
+ """
+ Data envelope for creating an OpenAI Codex integration account.
+
+ :param attributes: Writable attributes used to create an OpenAI Codex integration account.
+ :type attributes: OpenAICodexIntegrationAccountCreateAttributes
+
+ :param type: The type of the integration account resource. Always ``integration-account``.
+ :type type: IntegrationAccountType
+ """
+ super().__init__(kwargs)
+
+ self_.attributes = attributes
+ self_.type = type
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_request.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_request.py
new file mode 100644
index 0000000000..2451fabeb1
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_create_request.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_create_data import (
+ OpenAICodexIntegrationAccountCreateData,
+ )
+
+
+class OpenAICodexIntegrationAccountCreateRequest(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_create_data import (
+ OpenAICodexIntegrationAccountCreateData,
+ )
+
+ return {
+ "data": (OpenAICodexIntegrationAccountCreateData,),
+ }
+
+ attribute_map = {
+ "data": "data",
+ }
+
+ def __init__(self_, data: OpenAICodexIntegrationAccountCreateData, **kwargs):
+ """
+ Request payload to create an OpenAI Codex integration account.
+
+ :param data: Data envelope for creating an OpenAI Codex integration account.
+ :type data: OpenAICodexIntegrationAccountCreateData
+ """
+ super().__init__(kwargs)
+
+ self_.data = data
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response.py
new file mode 100644
index 0000000000..a741c7a514
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_response_data import (
+ OpenAICodexIntegrationAccountResponseData,
+ )
+
+
+class OpenAICodexIntegrationAccountResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_response_data import (
+ OpenAICodexIntegrationAccountResponseData,
+ )
+
+ return {
+ "data": (OpenAICodexIntegrationAccountResponseData,),
+ }
+
+ attribute_map = {
+ "data": "data",
+ }
+
+ def __init__(self_, data: OpenAICodexIntegrationAccountResponseData, **kwargs):
+ """
+ Response payload for a single OpenAI Codex integration account.
+
+ :param data: Data envelope of an OpenAI Codex integration account, including server-assigned identity.
+ :type data: OpenAICodexIntegrationAccountResponseData
+ """
+ super().__init__(kwargs)
+
+ self_.data = data
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response_attributes.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response_attributes.py
new file mode 100644
index 0000000000..1f61bb212a
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response_attributes.py
@@ -0,0 +1,92 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_response import (
+ OpenAICodexIntegrationAccountAuthenticationResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_response import (
+ OpenAICodexIntegrationDataflowsResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_response import (
+ OpenAICodexIntegrationAccountSettingsResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_response import (
+ OpenAICodexIntegrationAccountBearerTokenAuthResponse,
+ )
+
+
+class OpenAICodexIntegrationAccountResponseAttributes(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_response import (
+ OpenAICodexIntegrationAccountAuthenticationResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_response import (
+ OpenAICodexIntegrationDataflowsResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_response import (
+ OpenAICodexIntegrationAccountSettingsResponse,
+ )
+
+ return {
+ "authentication": (OpenAICodexIntegrationAccountAuthenticationResponse,),
+ "dataflows": (OpenAICodexIntegrationDataflowsResponse,),
+ "name": (str,),
+ "settings": (OpenAICodexIntegrationAccountSettingsResponse,),
+ }
+
+ attribute_map = {
+ "authentication": "authentication",
+ "dataflows": "dataflows",
+ "name": "name",
+ "settings": "settings",
+ }
+
+ def __init__(
+ self_,
+ name: str,
+ settings: OpenAICodexIntegrationAccountSettingsResponse,
+ authentication: Union[
+ OpenAICodexIntegrationAccountAuthenticationResponse,
+ OpenAICodexIntegrationAccountBearerTokenAuthResponse,
+ UnsetType,
+ ] = unset,
+ dataflows: Union[OpenAICodexIntegrationDataflowsResponse, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Attributes of an OpenAI Codex integration account returned in responses.
+
+ :param authentication: Authentication configured on the OpenAI Codex integration account.
+ :type authentication: OpenAICodexIntegrationAccountAuthenticationResponse, optional
+
+ :param dataflows: Data Datadog collects from OpenAI Codex, keyed by dataflow id.
+ :type dataflows: OpenAICodexIntegrationDataflowsResponse, optional
+
+ :param name: Human-readable name of the OpenAI Codex integration account.
+ :type name: str
+
+ :param settings: Settings configured on the OpenAI Codex integration account.
+ :type settings: OpenAICodexIntegrationAccountSettingsResponse
+ """
+ if authentication is not unset:
+ kwargs["authentication"] = authentication
+ if dataflows is not unset:
+ kwargs["dataflows"] = dataflows
+ super().__init__(kwargs)
+
+ self_.name = name
+ self_.settings = settings
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response_data.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response_data.py
new file mode 100644
index 0000000000..48f36d94fe
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_response_data.py
@@ -0,0 +1,67 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_response_attributes import (
+ OpenAICodexIntegrationAccountResponseAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+
+class OpenAICodexIntegrationAccountResponseData(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_response_attributes import (
+ OpenAICodexIntegrationAccountResponseAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+ return {
+ "attributes": (OpenAICodexIntegrationAccountResponseAttributes,),
+ "id": (str,),
+ "type": (IntegrationAccountType,),
+ }
+
+ attribute_map = {
+ "attributes": "attributes",
+ "id": "id",
+ "type": "type",
+ }
+ read_only_vars = {
+ "id",
+ }
+
+ def __init__(
+ self_,
+ attributes: OpenAICodexIntegrationAccountResponseAttributes,
+ id: str,
+ type: IntegrationAccountType,
+ **kwargs,
+ ):
+ """
+ Data envelope of an OpenAI Codex integration account, including server-assigned identity.
+
+ :param attributes: Attributes of an OpenAI Codex integration account returned in responses.
+ :type attributes: OpenAICodexIntegrationAccountResponseAttributes
+
+ :param id: Server-generated unique identifier of the OpenAI Codex integration account.
+ :type id: str
+
+ :param type: The type of the integration account resource. Always ``integration-account``.
+ :type type: IntegrationAccountType
+ """
+ super().__init__(kwargs)
+
+ self_.attributes = attributes
+ self_.id = id
+ self_.type = type
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_request.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_request.py
new file mode 100644
index 0000000000..4ba3dfa2a4
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_request.py
@@ -0,0 +1,37 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+class OpenAICodexIntegrationAccountSettingsRequest(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "codex_workspace_id": (str,),
+ }
+
+ attribute_map = {
+ "codex_workspace_id": "codex_workspace_id",
+ }
+
+ def __init__(self_, codex_workspace_id: str, **kwargs):
+ """
+ Settings for creating the OpenAI Codex integration account.
+
+ :param codex_workspace_id: ID of the Codex workspace to collect data from.
+ :type codex_workspace_id: str
+ """
+ super().__init__(kwargs)
+
+ self_.codex_workspace_id = codex_workspace_id
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_response.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_response.py
new file mode 100644
index 0000000000..323fd77db6
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_response.py
@@ -0,0 +1,33 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+class OpenAICodexIntegrationAccountSettingsResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ return {
+ "codex_workspace_id": (str,),
+ }
+
+ attribute_map = {
+ "codex_workspace_id": "codex_workspace_id",
+ }
+
+ def __init__(self_, codex_workspace_id: str, **kwargs):
+ """
+ Settings configured on the OpenAI Codex integration account.
+
+ :param codex_workspace_id: ID of the Codex workspace to collect data from.
+ :type codex_workspace_id: str
+ """
+ super().__init__(kwargs)
+
+ self_.codex_workspace_id = codex_workspace_id
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_update.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_update.py
new file mode 100644
index 0000000000..1599287451
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_settings_update.py
@@ -0,0 +1,40 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+class OpenAICodexIntegrationAccountSettingsUpdate(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "codex_workspace_id": (str,),
+ }
+
+ attribute_map = {
+ "codex_workspace_id": "codex_workspace_id",
+ }
+
+ def __init__(self_, codex_workspace_id: Union[str, UnsetType] = unset, **kwargs):
+ """
+ Settings for updating the OpenAI Codex integration account. Only the fields provided are changed.
+
+ :param codex_workspace_id: ID of the Codex workspace to collect data from.
+ :type codex_workspace_id: str, optional
+ """
+ if codex_workspace_id is not unset:
+ kwargs["codex_workspace_id"] = codex_workspace_id
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_attributes.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_attributes.py
new file mode 100644
index 0000000000..725c2d6b7f
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_attributes.py
@@ -0,0 +1,93 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_update import (
+ OpenAICodexIntegrationAccountAuthenticationUpdate,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_request import (
+ OpenAICodexIntegrationDataflowsRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_update import (
+ OpenAICodexIntegrationAccountSettingsUpdate,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_update import (
+ OpenAICodexIntegrationAccountBearerTokenAuthUpdate,
+ )
+
+
+class OpenAICodexIntegrationAccountUpdateAttributes(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_update import (
+ OpenAICodexIntegrationAccountAuthenticationUpdate,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_request import (
+ OpenAICodexIntegrationDataflowsRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_update import (
+ OpenAICodexIntegrationAccountSettingsUpdate,
+ )
+
+ return {
+ "authentication": (OpenAICodexIntegrationAccountAuthenticationUpdate,),
+ "dataflows": (OpenAICodexIntegrationDataflowsRequest,),
+ "name": (str,),
+ "settings": (OpenAICodexIntegrationAccountSettingsUpdate,),
+ }
+
+ attribute_map = {
+ "authentication": "authentication",
+ "dataflows": "dataflows",
+ "name": "name",
+ "settings": "settings",
+ }
+
+ def __init__(
+ self_,
+ authentication: Union[
+ OpenAICodexIntegrationAccountAuthenticationUpdate,
+ OpenAICodexIntegrationAccountBearerTokenAuthUpdate,
+ UnsetType,
+ ] = unset,
+ dataflows: Union[OpenAICodexIntegrationDataflowsRequest, UnsetType] = unset,
+ name: Union[str, UnsetType] = unset,
+ settings: Union[OpenAICodexIntegrationAccountSettingsUpdate, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Writable attributes used to update an OpenAI Codex integration account. Every field is optional; only the fields provided are changed. When ``dataflows`` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration.
+
+ :param authentication: Authentication for updating the OpenAI Codex integration account. Exactly one method is set.
+ :type authentication: OpenAICodexIntegrationAccountAuthenticationUpdate, optional
+
+ :param dataflows: Data Datadog collects from OpenAI Codex, keyed by dataflow id. Daily Codex analytics metrics are always collected; each dataflow here adds a further kind of collection on top of that baseline, so set ``enabled`` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted fields keep their current values. Every dataflow requires an OpenAI enterprise subscription with Codex enabled; a dataflow enabled without it is stored but collects no data.
+ :type dataflows: OpenAICodexIntegrationDataflowsRequest, optional
+
+ :param name: Human-readable name of the OpenAI Codex integration account.
+ :type name: str, optional
+
+ :param settings: Settings for updating the OpenAI Codex integration account. Only the fields provided are changed.
+ :type settings: OpenAICodexIntegrationAccountSettingsUpdate, optional
+ """
+ if authentication is not unset:
+ kwargs["authentication"] = authentication
+ if dataflows is not unset:
+ kwargs["dataflows"] = dataflows
+ if name is not unset:
+ kwargs["name"] = name
+ if settings is not unset:
+ kwargs["settings"] = settings
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_data.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_data.py
new file mode 100644
index 0000000000..d9ff69fb77
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_data.py
@@ -0,0 +1,64 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_update_attributes import (
+ OpenAICodexIntegrationAccountUpdateAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+
+class OpenAICodexIntegrationAccountUpdateData(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_update_attributes import (
+ OpenAICodexIntegrationAccountUpdateAttributes,
+ )
+ from datadog_api_client.v2.model.integration_account_type import IntegrationAccountType
+
+ return {
+ "attributes": (OpenAICodexIntegrationAccountUpdateAttributes,),
+ "id": (str,),
+ "type": (IntegrationAccountType,),
+ }
+
+ attribute_map = {
+ "attributes": "attributes",
+ "id": "id",
+ "type": "type",
+ }
+
+ def __init__(
+ self_,
+ attributes: OpenAICodexIntegrationAccountUpdateAttributes,
+ id: str,
+ type: IntegrationAccountType,
+ **kwargs,
+ ):
+ """
+ Data envelope for updating an OpenAI Codex integration account.
+
+ :param attributes: Writable attributes used to update an OpenAI Codex integration account. Every field is optional; only the fields provided are changed. When ``dataflows`` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration.
+ :type attributes: OpenAICodexIntegrationAccountUpdateAttributes
+
+ :param id: Unique identifier of the OpenAI Codex integration account to update.
+ :type id: str
+
+ :param type: The type of the integration account resource. Always ``integration-account``.
+ :type type: IntegrationAccountType
+ """
+ super().__init__(kwargs)
+
+ self_.attributes = attributes
+ self_.id = id
+ self_.type = type
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_request.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_request.py
new file mode 100644
index 0000000000..e307ed9c6d
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_account_update_request.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_update_data import (
+ OpenAICodexIntegrationAccountUpdateData,
+ )
+
+
+class OpenAICodexIntegrationAccountUpdateRequest(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_update_data import (
+ OpenAICodexIntegrationAccountUpdateData,
+ )
+
+ return {
+ "data": (OpenAICodexIntegrationAccountUpdateData,),
+ }
+
+ attribute_map = {
+ "data": "data",
+ }
+
+ def __init__(self_, data: OpenAICodexIntegrationAccountUpdateData, **kwargs):
+ """
+ Request payload to update an OpenAI Codex integration account.
+
+ :param data: Data envelope for updating an OpenAI Codex integration account.
+ :type data: OpenAICodexIntegrationAccountUpdateData
+ """
+ super().__init__(kwargs)
+
+ self_.data = data
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_accounts_response.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_accounts_response.py
new file mode 100644
index 0000000000..416ce35d84
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_accounts_response.py
@@ -0,0 +1,44 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import List, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_response_data import (
+ OpenAICodexIntegrationAccountResponseData,
+ )
+
+
+class OpenAICodexIntegrationAccountsResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_integration_account_response_data import (
+ OpenAICodexIntegrationAccountResponseData,
+ )
+
+ return {
+ "data": ([OpenAICodexIntegrationAccountResponseData],),
+ }
+
+ attribute_map = {
+ "data": "data",
+ }
+
+ def __init__(self_, data: List[OpenAICodexIntegrationAccountResponseData], **kwargs):
+ """
+ Response payload for a list of OpenAI Codex integration accounts.
+
+ :param data: List of OpenAI Codex integration accounts.
+ :type data: [OpenAICodexIntegrationAccountResponseData]
+ """
+ super().__init__(kwargs)
+
+ self_.data = data
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_dataflows_request.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_dataflows_request.py
new file mode 100644
index 0000000000..256d50760f
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_dataflows_request.py
@@ -0,0 +1,68 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_dora_integration_dataflow_request import (
+ OpenAICodexDoraIntegrationDataflowRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_turn_metrics_integration_dataflow_request import (
+ OpenAICodexTurnMetricsIntegrationDataflowRequest,
+ )
+
+
+class OpenAICodexIntegrationDataflowsRequest(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_dora_integration_dataflow_request import (
+ OpenAICodexDoraIntegrationDataflowRequest,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_turn_metrics_integration_dataflow_request import (
+ OpenAICodexTurnMetricsIntegrationDataflowRequest,
+ )
+
+ return {
+ "openai_codex_dora": (OpenAICodexDoraIntegrationDataflowRequest,),
+ "openai_codex_turn_metrics": (OpenAICodexTurnMetricsIntegrationDataflowRequest,),
+ }
+
+ attribute_map = {
+ "openai_codex_dora": "openai-codex-dora",
+ "openai_codex_turn_metrics": "openai-codex-turn-metrics",
+ }
+
+ def __init__(
+ self_,
+ openai_codex_dora: Union[OpenAICodexDoraIntegrationDataflowRequest, UnsetType] = unset,
+ openai_codex_turn_metrics: Union[OpenAICodexTurnMetricsIntegrationDataflowRequest, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Data Datadog collects from OpenAI Codex, keyed by dataflow id. Daily Codex analytics metrics are always collected; each dataflow here adds a further kind of collection on top of that baseline, so set ``enabled`` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted fields keep their current values. Every dataflow requires an OpenAI enterprise subscription with Codex enabled; a dataflow enabled without it is stored but collects no data.
+
+ :param openai_codex_dora: A daily per-engineer engagement signal that `AI Impact `_ uses to attribute AI-assisted pull requests.
+ :type openai_codex_dora: OpenAICodexDoraIntegrationDataflowRequest, optional
+
+ :param openai_codex_turn_metrics: Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session identity, Work Insights classification, token usage, credits, estimated cost, duration, and skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from invoiced charges. Requires the ``chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read`` scope on the key in ``authentication`` ; without it this dataflow collects no data.
+ :type openai_codex_turn_metrics: OpenAICodexTurnMetricsIntegrationDataflowRequest, optional
+ """
+ if openai_codex_dora is not unset:
+ kwargs["openai_codex_dora"] = openai_codex_dora
+ if openai_codex_turn_metrics is not unset:
+ kwargs["openai_codex_turn_metrics"] = openai_codex_turn_metrics
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_integration_dataflows_response.py b/src/datadog_api_client/v2/model/open_ai_codex_integration_dataflows_response.py
new file mode 100644
index 0000000000..356779597b
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_integration_dataflows_response.py
@@ -0,0 +1,78 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.open_ai_codex_dora_integration_dataflow_response import (
+ OpenAICodexDoraIntegrationDataflowResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_metrics_integration_dataflow_response import (
+ OpenAICodexMetricsIntegrationDataflowResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_turn_metrics_integration_dataflow_response import (
+ OpenAICodexTurnMetricsIntegrationDataflowResponse,
+ )
+
+
+class OpenAICodexIntegrationDataflowsResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.open_ai_codex_dora_integration_dataflow_response import (
+ OpenAICodexDoraIntegrationDataflowResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_metrics_integration_dataflow_response import (
+ OpenAICodexMetricsIntegrationDataflowResponse,
+ )
+ from datadog_api_client.v2.model.open_ai_codex_turn_metrics_integration_dataflow_response import (
+ OpenAICodexTurnMetricsIntegrationDataflowResponse,
+ )
+
+ return {
+ "openai_codex_dora": (OpenAICodexDoraIntegrationDataflowResponse,),
+ "openai_codex_metrics": (OpenAICodexMetricsIntegrationDataflowResponse,),
+ "openai_codex_turn_metrics": (OpenAICodexTurnMetricsIntegrationDataflowResponse,),
+ }
+
+ attribute_map = {
+ "openai_codex_dora": "openai-codex-dora",
+ "openai_codex_metrics": "openai-codex-metrics",
+ "openai_codex_turn_metrics": "openai-codex-turn-metrics",
+ }
+
+ def __init__(
+ self_,
+ openai_codex_dora: Union[OpenAICodexDoraIntegrationDataflowResponse, UnsetType] = unset,
+ openai_codex_metrics: Union[OpenAICodexMetricsIntegrationDataflowResponse, UnsetType] = unset,
+ openai_codex_turn_metrics: Union[OpenAICodexTurnMetricsIntegrationDataflowResponse, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Data Datadog collects from OpenAI Codex, keyed by dataflow id.
+
+ :param openai_codex_dora: A daily per-engineer engagement signal that `AI Impact `_ uses to attribute AI-assisted pull requests.
+ :type openai_codex_dora: OpenAICodexDoraIntegrationDataflowResponse, optional
+
+ :param openai_codex_metrics: Daily Codex analytics metrics under the ``openai.codex.*`` namespace: usage totals, token counts by model, thread and turn counts by client, lines of code attributable to Codex, and code reviews. This dataflow is always on and cannot be turned off, which is why it appears in responses only.
+ :type openai_codex_metrics: OpenAICodexMetricsIntegrationDataflowResponse, optional
+
+ :param openai_codex_turn_metrics: Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session identity, Work Insights classification, token usage, credits, estimated cost, duration, and skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from invoiced charges. Requires the ``chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read`` scope on the key in ``authentication`` ; without it this dataflow collects no data.
+ :type openai_codex_turn_metrics: OpenAICodexTurnMetricsIntegrationDataflowResponse, optional
+ """
+ if openai_codex_dora is not unset:
+ kwargs["openai_codex_dora"] = openai_codex_dora
+ if openai_codex_metrics is not unset:
+ kwargs["openai_codex_metrics"] = openai_codex_metrics
+ if openai_codex_turn_metrics is not unset:
+ kwargs["openai_codex_turn_metrics"] = openai_codex_turn_metrics
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_metrics_integration_dataflow_response.py b/src/datadog_api_client/v2/model/open_ai_codex_metrics_integration_dataflow_response.py
new file mode 100644
index 0000000000..141258ec63
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_metrics_integration_dataflow_response.py
@@ -0,0 +1,58 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.integration_account_dataflow_status import IntegrationAccountDataflowStatus
+
+
+class OpenAICodexMetricsIntegrationDataflowResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.integration_account_dataflow_status import IntegrationAccountDataflowStatus
+
+ return {
+ "enabled": (bool,),
+ "status": (IntegrationAccountDataflowStatus,),
+ }
+
+ attribute_map = {
+ "enabled": "enabled",
+ "status": "status",
+ }
+ read_only_vars = {
+ "enabled",
+ "status",
+ }
+
+ def __init__(
+ self_,
+ enabled: Union[bool, UnsetType] = unset,
+ status: Union[IntegrationAccountDataflowStatus, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Daily Codex analytics metrics under the ``openai.codex.*`` namespace: usage totals, token counts by model, thread and turn counts by client, lines of code attributable to Codex, and code reviews. This dataflow is always on and cannot be turned off, which is why it appears in responses only.
+
+ :param enabled: Whether Datadog collects this data. Always ``true`` , because this collection cannot be turned off.
+ :type enabled: bool, optional
+
+ :param status: Read-only collection status of a dataflow.
+ :type status: IntegrationAccountDataflowStatus, optional
+ """
+ if enabled is not unset:
+ kwargs["enabled"] = enabled
+ if status is not unset:
+ kwargs["status"] = status
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_turn_metrics_integration_dataflow_request.py b/src/datadog_api_client/v2/model/open_ai_codex_turn_metrics_integration_dataflow_request.py
new file mode 100644
index 0000000000..d527bba9d3
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_turn_metrics_integration_dataflow_request.py
@@ -0,0 +1,40 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+class OpenAICodexTurnMetricsIntegrationDataflowRequest(ModelNormal):
+ @cached_property
+ def additional_properties_type(_):
+ return None
+
+ @cached_property
+ def openapi_types(_):
+ return {
+ "enabled": (bool,),
+ }
+
+ attribute_map = {
+ "enabled": "enabled",
+ }
+
+ def __init__(self_, enabled: Union[bool, UnsetType] = unset, **kwargs):
+ """
+ Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session identity, Work Insights classification, token usage, credits, estimated cost, duration, and skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from invoiced charges. Requires the ``chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read`` scope on the key in ``authentication`` ; without it this dataflow collects no data.
+
+ :param enabled: Whether Datadog collects this data. Defaults to ``false`` ; set to ``true`` to start collection.
+ :type enabled: bool, optional
+ """
+ if enabled is not unset:
+ kwargs["enabled"] = enabled
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/open_ai_codex_turn_metrics_integration_dataflow_response.py b/src/datadog_api_client/v2/model/open_ai_codex_turn_metrics_integration_dataflow_response.py
new file mode 100644
index 0000000000..d56c388128
--- /dev/null
+++ b/src/datadog_api_client/v2/model/open_ai_codex_turn_metrics_integration_dataflow_response.py
@@ -0,0 +1,57 @@
+# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+# This product includes software developed at Datadog (https://www.datadoghq.com/).
+# Copyright 2019-Present Datadog, Inc.
+from __future__ import annotations
+
+from typing import Union, TYPE_CHECKING
+
+from datadog_api_client.model_utils import (
+ ModelNormal,
+ cached_property,
+ unset,
+ UnsetType,
+)
+
+
+if TYPE_CHECKING:
+ from datadog_api_client.v2.model.integration_account_dataflow_status import IntegrationAccountDataflowStatus
+
+
+class OpenAICodexTurnMetricsIntegrationDataflowResponse(ModelNormal):
+ @cached_property
+ def openapi_types(_):
+ from datadog_api_client.v2.model.integration_account_dataflow_status import IntegrationAccountDataflowStatus
+
+ return {
+ "enabled": (bool,),
+ "status": (IntegrationAccountDataflowStatus,),
+ }
+
+ attribute_map = {
+ "enabled": "enabled",
+ "status": "status",
+ }
+ read_only_vars = {
+ "status",
+ }
+
+ def __init__(
+ self_,
+ enabled: Union[bool, UnsetType] = unset,
+ status: Union[IntegrationAccountDataflowStatus, UnsetType] = unset,
+ **kwargs,
+ ):
+ """
+ Hourly turn-level metrics from the OpenAI Compliance Logs Platform, including turn and session identity, Work Insights classification, token usage, credits, estimated cost, duration, and skill, plugin, and artifact activity. Turn cost is a provider estimate and can differ from invoiced charges. Requires the ``chatgpt.enterprise.compliance_logs_platform.workspace_analytics.read`` scope on the key in ``authentication`` ; without it this dataflow collects no data.
+
+ :param enabled: Whether Datadog collects this data.
+ :type enabled: bool, optional
+
+ :param status: Read-only collection status of a dataflow.
+ :type status: IntegrationAccountDataflowStatus, optional
+ """
+ if enabled is not unset:
+ kwargs["enabled"] = enabled
+ if status is not unset:
+ kwargs["status"] = status
+ super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py
index 96db396e60..90f8893f44 100644
--- a/src/datadog_api_client/v2/models/__init__.py
+++ b/src/datadog_api_client/v2/models/__init__.py
@@ -8636,6 +8636,85 @@
from datadog_api_client.v2.model.open_aiapi_key_type import OpenAIAPIKeyType
from datadog_api_client.v2.model.open_aiapi_key_update import OpenAIAPIKeyUpdate
from datadog_api_client.v2.model.open_aiapi_key_update_api_token import OpenAIAPIKeyUpdateApiToken
+from datadog_api_client.v2.model.open_ai_codex_dora_integration_dataflow_request import (
+ OpenAICodexDoraIntegrationDataflowRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_dora_integration_dataflow_response import (
+ OpenAICodexDoraIntegrationDataflowResponse,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_request import (
+ OpenAICodexIntegrationAccountAuthenticationRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_response import (
+ OpenAICodexIntegrationAccountAuthenticationResponse,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_authentication_update import (
+ OpenAICodexIntegrationAccountAuthenticationUpdate,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_request import (
+ OpenAICodexIntegrationAccountBearerTokenAuthRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_response import (
+ OpenAICodexIntegrationAccountBearerTokenAuthResponse,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_type import (
+ OpenAICodexIntegrationAccountBearerTokenAuthType,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_bearer_token_auth_update import (
+ OpenAICodexIntegrationAccountBearerTokenAuthUpdate,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_create_attributes import (
+ OpenAICodexIntegrationAccountCreateAttributes,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_create_data import (
+ OpenAICodexIntegrationAccountCreateData,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_create_request import (
+ OpenAICodexIntegrationAccountCreateRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_response import OpenAICodexIntegrationAccountResponse
+from datadog_api_client.v2.model.open_ai_codex_integration_account_response_attributes import (
+ OpenAICodexIntegrationAccountResponseAttributes,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_response_data import (
+ OpenAICodexIntegrationAccountResponseData,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_request import (
+ OpenAICodexIntegrationAccountSettingsRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_response import (
+ OpenAICodexIntegrationAccountSettingsResponse,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_settings_update import (
+ OpenAICodexIntegrationAccountSettingsUpdate,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_update_attributes import (
+ OpenAICodexIntegrationAccountUpdateAttributes,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_update_data import (
+ OpenAICodexIntegrationAccountUpdateData,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_account_update_request import (
+ OpenAICodexIntegrationAccountUpdateRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_accounts_response import (
+ OpenAICodexIntegrationAccountsResponse,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_request import (
+ OpenAICodexIntegrationDataflowsRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_integration_dataflows_response import (
+ OpenAICodexIntegrationDataflowsResponse,
+)
+from datadog_api_client.v2.model.open_ai_codex_metrics_integration_dataflow_response import (
+ OpenAICodexMetricsIntegrationDataflowResponse,
+)
+from datadog_api_client.v2.model.open_ai_codex_turn_metrics_integration_dataflow_request import (
+ OpenAICodexTurnMetricsIntegrationDataflowRequest,
+)
+from datadog_api_client.v2.model.open_ai_codex_turn_metrics_integration_dataflow_response import (
+ OpenAICodexTurnMetricsIntegrationDataflowResponse,
+)
from datadog_api_client.v2.model.open_ai_credentials import OpenAICredentials
from datadog_api_client.v2.model.open_ai_credentials_update import OpenAICredentialsUpdate
from datadog_api_client.v2.model.open_ai_integration import OpenAIIntegration
@@ -19648,6 +19727,33 @@
"OpenAIAPIKeyType",
"OpenAIAPIKeyUpdate",
"OpenAIAPIKeyUpdateApiToken",
+ "OpenAICodexDoraIntegrationDataflowRequest",
+ "OpenAICodexDoraIntegrationDataflowResponse",
+ "OpenAICodexIntegrationAccountAuthenticationRequest",
+ "OpenAICodexIntegrationAccountAuthenticationResponse",
+ "OpenAICodexIntegrationAccountAuthenticationUpdate",
+ "OpenAICodexIntegrationAccountBearerTokenAuthRequest",
+ "OpenAICodexIntegrationAccountBearerTokenAuthResponse",
+ "OpenAICodexIntegrationAccountBearerTokenAuthType",
+ "OpenAICodexIntegrationAccountBearerTokenAuthUpdate",
+ "OpenAICodexIntegrationAccountCreateAttributes",
+ "OpenAICodexIntegrationAccountCreateData",
+ "OpenAICodexIntegrationAccountCreateRequest",
+ "OpenAICodexIntegrationAccountResponse",
+ "OpenAICodexIntegrationAccountResponseAttributes",
+ "OpenAICodexIntegrationAccountResponseData",
+ "OpenAICodexIntegrationAccountSettingsRequest",
+ "OpenAICodexIntegrationAccountSettingsResponse",
+ "OpenAICodexIntegrationAccountSettingsUpdate",
+ "OpenAICodexIntegrationAccountUpdateAttributes",
+ "OpenAICodexIntegrationAccountUpdateData",
+ "OpenAICodexIntegrationAccountUpdateRequest",
+ "OpenAICodexIntegrationAccountsResponse",
+ "OpenAICodexIntegrationDataflowsRequest",
+ "OpenAICodexIntegrationDataflowsResponse",
+ "OpenAICodexMetricsIntegrationDataflowResponse",
+ "OpenAICodexTurnMetricsIntegrationDataflowRequest",
+ "OpenAICodexTurnMetricsIntegrationDataflowResponse",
"OpenAICredentials",
"OpenAICredentialsUpdate",
"OpenAIIntegration",
diff --git a/tests/v2/features/openai_codex_integration.feature b/tests/v2/features/openai_codex_integration.feature
new file mode 100644
index 0000000000..4e8f7a24b9
--- /dev/null
+++ b/tests/v2/features/openai_codex_integration.feature
@@ -0,0 +1,148 @@
+@endpoint(openai-codex-integration) @endpoint(openai-codex-integration-v2)
+Feature: OpenAI Codex Integration
+ Manage your Datadog OpenAI Codex integration accounts and account
+ resources directly through the Datadog API. See the [OpenAI Codex
+ integration page](https://docs.datadoghq.com/integrations/openai-codex/)
+ for more information.
+
+ Background:
+ Given a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And an instance of "OpenAICodexIntegration" API
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Create an OpenAI Codex integration account returns "Bad Request" response
+ Given operation "CreateOpenAICodexIntegrationAccount" enabled
+ And new "CreateOpenAICodexIntegrationAccount" request
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Create an OpenAI Codex integration account returns "Created" response
+ Given operation "CreateOpenAICodexIntegrationAccount" enabled
+ And new "CreateOpenAICodexIntegrationAccount" request
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 201 Created
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Create an OpenAI Codex integration account returns "Not Found" response
+ Given operation "CreateOpenAICodexIntegrationAccount" enabled
+ And new "CreateOpenAICodexIntegrationAccount" request
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Create an OpenAI Codex integration account returns "The server cannot process the request because it contains invalid data." response
+ Given operation "CreateOpenAICodexIntegrationAccount" enabled
+ And new "CreateOpenAICodexIntegrationAccount" request
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 422 The server cannot process the request because it contains invalid data.
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Delete an OpenAI Codex integration account returns "Bad Request" response
+ Given operation "DeleteOpenAICodexIntegrationAccount" enabled
+ And new "DeleteOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Delete an OpenAI Codex integration account returns "Not Found" response
+ Given operation "DeleteOpenAICodexIntegrationAccount" enabled
+ And new "DeleteOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Delete an OpenAI Codex integration account returns "OK" response
+ Given operation "DeleteOpenAICodexIntegrationAccount" enabled
+ And new "DeleteOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Get an OpenAI Codex integration account returns "Bad Request" response
+ Given operation "GetOpenAICodexIntegrationAccount" enabled
+ And new "GetOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Get an OpenAI Codex integration account returns "Not Found" response
+ Given operation "GetOpenAICodexIntegrationAccount" enabled
+ And new "GetOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Get an OpenAI Codex integration account returns "OK" response
+ Given operation "GetOpenAICodexIntegrationAccount" enabled
+ And new "GetOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: List OpenAI Codex integration accounts returns "Bad Request" response
+ Given operation "ListOpenAICodexIntegrationAccounts" enabled
+ And new "ListOpenAICodexIntegrationAccounts" request
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: List OpenAI Codex integration accounts returns "Not Found" response
+ Given operation "ListOpenAICodexIntegrationAccounts" enabled
+ And new "ListOpenAICodexIntegrationAccounts" request
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: List OpenAI Codex integration accounts returns "OK" response
+ Given operation "ListOpenAICodexIntegrationAccounts" enabled
+ And new "ListOpenAICodexIntegrationAccounts" request
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Update an OpenAI Codex integration account returns "Bad Request" response
+ Given operation "UpdateOpenAICodexIntegrationAccount" enabled
+ And new "UpdateOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "id": "7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47", "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Update an OpenAI Codex integration account returns "Not Found" response
+ Given operation "UpdateOpenAICodexIntegrationAccount" enabled
+ And new "UpdateOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "id": "7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47", "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Update an OpenAI Codex integration account returns "OK" response
+ Given operation "UpdateOpenAICodexIntegrationAccount" enabled
+ And new "UpdateOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "id": "7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47", "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:ddoghq/saas-integrations
+ Scenario: Update an OpenAI Codex integration account returns "The server cannot process the request because it contains invalid data." response
+ Given operation "UpdateOpenAICodexIntegrationAccount" enabled
+ And new "UpdateOpenAICodexIntegrationAccount" request
+ And request contains "account_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"authentication": {"auth_type": "bearer_token", "token": "your-token"}, "dataflows": {"openai-codex-dora": {"enabled": true}, "openai-codex-turn-metrics": {"enabled": true}}, "name": "openai-codex-acme", "settings": {"codex_workspace_id": "your-workspace-id"}}, "id": "7d2f9c4e-3a1b-4c8e-9f6d-2b5a8e1c0d47", "type": "integration-account"}}
+ When the request is sent
+ Then the response status is 422 The server cannot process the request because it contains invalid data.
diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json
index c8de5bd66d..d0529b63e5 100644
--- a/tests/v2/features/undo.json
+++ b/tests/v2/features/undo.json
@@ -4322,6 +4322,43 @@
"type": "idempotent"
}
},
+ "ListOpenAICodexIntegrationAccounts": {
+ "tag": "OpenAI Codex Integration",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "CreateOpenAICodexIntegrationAccount": {
+ "tag": "OpenAI Codex Integration",
+ "undo": {
+ "operationId": "DeleteOpenAICodexIntegrationAccount",
+ "parameters": [
+ {
+ "name": "account_id",
+ "source": "data.id"
+ }
+ ],
+ "type": "unsafe"
+ }
+ },
+ "DeleteOpenAICodexIntegrationAccount": {
+ "tag": "OpenAI Codex Integration",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
+ "GetOpenAICodexIntegrationAccount": {
+ "tag": "OpenAI Codex Integration",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "UpdateOpenAICodexIntegrationAccount": {
+ "tag": "OpenAI Codex Integration",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
"ListSnowflakeIntegrationAccounts": {
"tag": "Snowflake Integration",
"undo": {