Skip to content

Commit bfac14c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d998cc7 of spec repo
1 parent 7e48bf8 commit bfac14c

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165921,6 +165921,18 @@ paths:
165921165921
the authenticated org or the request is rejected. Successful calls disable the org
165922165922
and return the resulting state from the downstream service. Requires the
165923165923
`org_management` permission.
165924+
165925+
**Limitations**:
165926+
165927+
- **Organization age**: Only organizations created within the last 10 days can be disabled
165928+
through this endpoint. This restriction is a safeguard against accidentally disabling
165929+
long-running organizations. Attempting to disable an older organization returns a `403 Forbidden`.
165930+
- **Feature flag**: The feature flag `org_disable_self_service_enabled` must be enabled for the
165931+
target organization or one of its ancestor organizations. Contact
165932+
[Datadog support](https://docs.datadoghq.com/help/) to enable this for your organization.
165933+
Requests for organizations without this flag return a `403 Forbidden`.
165934+
- **Already-disabled organizations**: If the target organization is already disabled, the request
165935+
returns a `409 Conflict`.
165924165936
operationId: DisableCustomerOrg
165925165937
requestBody:
165926165938
content:
@@ -165969,6 +165981,12 @@ paths:
165969165981
schema:
165970165982
$ref: "#/components/schemas/JSONAPIErrorResponse"
165971165983
description: Forbidden
165984+
"409":
165985+
content:
165986+
application/json:
165987+
schema:
165988+
$ref: "#/components/schemas/JSONAPIErrorResponse"
165989+
description: Conflict
165972165990
"429":
165973165991
$ref: "#/components/responses/TooManyRequestsResponse"
165974165992
"500":

features/v2/customer_org.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Feature: Customer Org
1717
When the request is sent
1818
Then the response status is 400 Bad Request
1919

20+
@generated @skip @team:DataDog/org-management
21+
Scenario: Disable the authenticated customer organization returns "Conflict" response
22+
When the request is sent
23+
Then the response status is 409 Conflict
24+
2025
@generated @skip @team:DataDog/org-management
2126
Scenario: Disable the authenticated customer organization returns "OK" response
2227
When the request is sent

packages/datadog-api-client-v2/apis/CustomerOrgApi.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export class CustomerOrgApiResponseProcessor {
9595
response.httpStatusCode === 400 ||
9696
response.httpStatusCode === 401 ||
9797
response.httpStatusCode === 403 ||
98+
response.httpStatusCode === 409 ||
9899
response.httpStatusCode === 500
99100
) {
100101
const bodyText = ObjectSerializer.parse(
@@ -188,6 +189,18 @@ export class CustomerOrgApi {
188189
* the authenticated org or the request is rejected. Successful calls disable the org
189190
* and return the resulting state from the downstream service. Requires the
190191
* `org_management` permission.
192+
*
193+
* **Limitations**:
194+
*
195+
* - **Organization age**: Only organizations created within the last 10 days can be disabled
196+
* through this endpoint. This restriction is a safeguard against accidentally disabling
197+
* long-running organizations. Attempting to disable an older organization returns a `403 Forbidden`.
198+
* - **Feature flag**: The feature flag `org_disable_self_service_enabled` must be enabled for the
199+
* target organization or one of its ancestor organizations. Contact
200+
* [Datadog support](https://docs.datadoghq.com/help/) to enable this for your organization.
201+
* Requests for organizations without this flag return a `403 Forbidden`.
202+
* - **Already-disabled organizations**: If the target organization is already disabled, the request
203+
* returns a `409 Conflict`.
191204
* @param param The request object
192205
*/
193206
public disableCustomerOrg(

0 commit comments

Comments
 (0)