From 948d0f51bae834276ce3cc09db95c142fac5a8f1 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 23 Jul 2026 14:29:25 +0000 Subject: [PATCH] Regenerate client from commit 7abb459 of spec repo --- .generator/schemas/v2/openapi.yaml | 18 ++++++++++++++ src/datadogV2/api/api_customer_org.rs | 24 +++++++++++++++++++ .../features/v2/customer_org.feature | 5 ++++ 3 files changed, 47 insertions(+) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 53a4ea6a1a..b42236ad8d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -165498,6 +165498,18 @@ paths: the authenticated org or the request is rejected. Successful calls disable the org and return the resulting state from the downstream service. Requires the `org_management` permission. + + **Limitations**: + + - **Organization age**: Only organizations created within the last 10 days can be disabled + through this endpoint. This restriction is a safeguard against accidentally disabling + long-running organizations. Attempting to disable an older organization returns a `403 Forbidden`. + - **Feature flag**: The feature flag `org_disable_self_service_enabled` must be enabled for the + target organization or one of its ancestor organizations. Contact + [Datadog support](https://docs.datadoghq.com/help/) to enable this for your organization. + Requests for organizations without this flag return a `403 Forbidden`. + - **Already-disabled organizations**: If the target organization is already disabled, the request + returns a `409 Conflict`. operationId: DisableCustomerOrg requestBody: content: @@ -165546,6 +165558,12 @@ paths: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict "429": $ref: "#/components/responses/TooManyRequestsResponse" "500": diff --git a/src/datadogV2/api/api_customer_org.rs b/src/datadogV2/api/api_customer_org.rs index 65b0260127..9985ede31f 100644 --- a/src/datadogV2/api/api_customer_org.rs +++ b/src/datadogV2/api/api_customer_org.rs @@ -100,6 +100,18 @@ impl CustomerOrgAPI { /// the authenticated org or the request is rejected. Successful calls disable the org /// and return the resulting state from the downstream service. Requires the /// `org_management` permission. + /// + /// **Limitations**: + /// + /// - **Organization age**: Only organizations created within the last 10 days can be disabled + /// through this endpoint. This restriction is a safeguard against accidentally disabling + /// long-running organizations. Attempting to disable an older organization returns a `403 Forbidden`. + /// - **Feature flag**: The feature flag `org_disable_self_service_enabled` must be enabled for the + /// target organization or one of its ancestor organizations. Contact + /// [Datadog support]() to enable this for your organization. + /// Requests for organizations without this flag return a `403 Forbidden`. + /// - **Already-disabled organizations**: If the target organization is already disabled, the request + /// returns a `409 Conflict`. pub async fn disable_customer_org( &self, body: crate::datadogV2::model::CustomerOrgDisableRequest, @@ -126,6 +138,18 @@ impl CustomerOrgAPI { /// the authenticated org or the request is rejected. Successful calls disable the org /// and return the resulting state from the downstream service. Requires the /// `org_management` permission. + /// + /// **Limitations**: + /// + /// - **Organization age**: Only organizations created within the last 10 days can be disabled + /// through this endpoint. This restriction is a safeguard against accidentally disabling + /// long-running organizations. Attempting to disable an older organization returns a `403 Forbidden`. + /// - **Feature flag**: The feature flag `org_disable_self_service_enabled` must be enabled for the + /// target organization or one of its ancestor organizations. Contact + /// [Datadog support]() to enable this for your organization. + /// Requests for organizations without this flag return a `403 Forbidden`. + /// - **Already-disabled organizations**: If the target organization is already disabled, the request + /// returns a `409 Conflict`. pub async fn disable_customer_org_with_http_info( &self, body: crate::datadogV2::model::CustomerOrgDisableRequest, diff --git a/tests/scenarios/features/v2/customer_org.feature b/tests/scenarios/features/v2/customer_org.feature index 319625f6d0..361daf2716 100644 --- a/tests/scenarios/features/v2/customer_org.feature +++ b/tests/scenarios/features/v2/customer_org.feature @@ -17,6 +17,11 @@ Feature: Customer Org When the request is sent Then the response status is 400 Bad Request + @generated @skip @team:DataDog/org-management + Scenario: Disable the authenticated customer organization returns "Conflict" response + When the request is sent + Then the response status is 409 Conflict + @generated @skip @team:DataDog/org-management Scenario: Disable the authenticated customer organization returns "OK" response When the request is sent