Skip to content

Commit 185b1ae

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 277d5fb of spec repo (#3797)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3dc8d9f commit 185b1ae

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189428,6 +189428,18 @@ paths:
189428189428
the authenticated org or the request is rejected. Successful calls disable the org
189429189429
and return the resulting state from the downstream service. Requires the
189430189430
`org_management` permission.
189431+
189432+
**Limitations**:
189433+
189434+
- **Organization age**: Only organizations created within the last 10 days can be disabled
189435+
through this endpoint. This restriction is a safeguard against accidentally disabling
189436+
long-running organizations. Attempting to disable an older organization returns a `403 Forbidden`.
189437+
- **Feature flag**: The feature flag `org_disable_self_service_enabled` must be enabled for the
189438+
target organization or one of its ancestor organizations. Contact
189439+
[Datadog support](https://docs.datadoghq.com/help/) to enable this for your organization.
189440+
Requests for organizations without this flag return a `403 Forbidden`.
189441+
- **Already-disabled organizations**: If the target organization is already disabled, the request
189442+
returns a `409 Conflict`.
189431189443
operationId: DisableCustomerOrg
189432189444
requestBody:
189433189445
content:
@@ -189476,6 +189488,12 @@ paths:
189476189488
schema:
189477189489
$ref: "#/components/schemas/JSONAPIErrorResponse"
189478189490
description: Forbidden
189491+
"409":
189492+
content:
189493+
application/json:
189494+
schema:
189495+
$ref: "#/components/schemas/JSONAPIErrorResponse"
189496+
description: Conflict
189479189497
"429":
189480189498
$ref: "#/components/responses/TooManyRequestsResponse"
189481189499
"500":

‎src/datadog_api_client/v2/api/customer_org_api.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ def disable_customer_org(
5454
and return the resulting state from the downstream service. Requires the
5555
``org_management`` permission.
5656
57+
**Limitations** :
58+
59+
* **Organization age** : Only organizations created within the last 10 days can be disabled
60+
through this endpoint. This restriction is a safeguard against accidentally disabling
61+
long-running organizations. Attempting to disable an older organization returns a ``403 Forbidden``.
62+
* **Feature flag** : The feature flag ``org_disable_self_service_enabled`` must be enabled for the
63+
target organization or one of its ancestor organizations. Contact
64+
`Datadog support <https://docs.datadoghq.com/help/>`_ to enable this for your organization.
65+
Requests for organizations without this flag return a ``403 Forbidden``.
66+
* **Already-disabled organizations** : If the target organization is already disabled, the request
67+
returns a ``409 Conflict``.
68+
5769
:type body: CustomerOrgDisableRequest
5870
:rtype: CustomerOrgDisableResponse
5971
"""

‎tests/v2/features/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

0 commit comments

Comments
 (0)