diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 53a4ea6a1a5..b42236ad8d2 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/main/java/com/datadog/api/client/v2/api/CustomerOrgApi.java b/src/main/java/com/datadog/api/client/v2/api/CustomerOrgApi.java index 5847c7305ee..66cfd459dd3 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CustomerOrgApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CustomerOrgApi.java @@ -82,6 +82,22 @@ public CompletableFuture disableCustomerOrgAsync( * resulting state from the downstream service. Requires the org_management * permission. * + *

Limitations: + * + *

+ * * @param body (required) * @return ApiResponse<CustomerOrgDisableResponse> * @throws ApiException if fails to make API call @@ -93,6 +109,7 @@ public CompletableFuture disableCustomerOrgAsync( * 400 Bad Request - * 401 Unauthorized - * 403 Forbidden - + * 409 Conflict - * 429 Too many requests - * 500 Internal Server Error - * diff --git a/src/test/resources/com/datadog/api/client/v2/api/customer_org.feature b/src/test/resources/com/datadog/api/client/v2/api/customer_org.feature index 319625f6d0b..361daf2716d 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/customer_org.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/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