Skip to content

Commit bbbb46b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 16b6798 of spec repo
1 parent 5784831 commit bbbb46b

15 files changed

Lines changed: 1623 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26647,6 +26647,100 @@ components:
2664726647
required:
2664826648
- data
2664926649
type: object
26650+
CustomerOrgDisableRequest:
26651+
description: Request payload for disabling the authenticated customer organization.
26652+
properties:
26653+
data:
26654+
$ref: "#/components/schemas/CustomerOrgDisableRequestData"
26655+
required:
26656+
- data
26657+
type: object
26658+
CustomerOrgDisableRequestAttributes:
26659+
description: |-
26660+
Optional attributes for a customer org disable request. When supplied, `org_uuid`
26661+
must match the authenticated organization or the request is rejected.
26662+
properties:
26663+
org_uuid:
26664+
description: |-
26665+
Datadog organization UUID. If supplied, must match the authenticated
26666+
organization.
26667+
example: "abcdef01-2345-6789-abcd-ef0123456789"
26668+
type: string
26669+
type: object
26670+
CustomerOrgDisableRequestData:
26671+
description: Data object for a customer org disable request.
26672+
properties:
26673+
attributes:
26674+
$ref: "#/components/schemas/CustomerOrgDisableRequestAttributes"
26675+
id:
26676+
description: |-
26677+
Optional client-supplied identifier for the request. Useful for client-side
26678+
correlation; the server does not use this value.
26679+
example: "1"
26680+
type: string
26681+
type:
26682+
$ref: "#/components/schemas/CustomerOrgDisableType"
26683+
required:
26684+
- type
26685+
type: object
26686+
CustomerOrgDisableResponse:
26687+
description: Response describing the outcome of disabling the customer organization.
26688+
properties:
26689+
data:
26690+
$ref: "#/components/schemas/CustomerOrgDisableResponseData"
26691+
required:
26692+
- data
26693+
type: object
26694+
CustomerOrgDisableResponseAttributes:
26695+
description: Attributes describing the outcome of the disable action on the customer organization.
26696+
properties:
26697+
status:
26698+
$ref: "#/components/schemas/CustomerOrgDisableStatus"
26699+
required:
26700+
- status
26701+
type: object
26702+
CustomerOrgDisableResponseData:
26703+
description: Data object returned after disabling the customer organization.
26704+
properties:
26705+
attributes:
26706+
$ref: "#/components/schemas/CustomerOrgDisableResponseAttributes"
26707+
id:
26708+
description: Identifier of the disabled organization.
26709+
example: "abcdef01-2345-6789-abcd-ef0123456789"
26710+
type: string
26711+
type:
26712+
$ref: "#/components/schemas/CustomerOrgDisableResponseType"
26713+
required:
26714+
- type
26715+
- id
26716+
- attributes
26717+
type: object
26718+
CustomerOrgDisableResponseType:
26719+
description: JSON:API resource type for a customer org disable response.
26720+
enum:
26721+
- org_disable
26722+
example: "org_disable"
26723+
type: string
26724+
x-enum-varnames:
26725+
- ORG_DISABLE
26726+
CustomerOrgDisableStatus:
26727+
description: Resulting lifecycle status of the organization after the disable action.
26728+
enum:
26729+
- disabled
26730+
- pending_disable
26731+
example: "disabled"
26732+
type: string
26733+
x-enum-varnames:
26734+
- DISABLED
26735+
- PENDING_DISABLE
26736+
CustomerOrgDisableType:
26737+
description: JSON:API resource type for a customer org disable request.
26738+
enum:
26739+
- customer_org_disable
26740+
example: "customer_org_disable"
26741+
type: string
26742+
x-enum-varnames:
26743+
- CUSTOMER_ORG_DISABLE
2665026744
DORACustomTags:
2665126745
description: A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event.
2665226746
example:
@@ -144869,6 +144963,81 @@ paths:
144869144963
permissions:
144870144964
- org_management
144871144965
- org_connections_write
144966+
/api/v2/org/disable:
144967+
post:
144968+
description: |-
144969+
Disable the Datadog organization associated with the authenticated user or API key.
144970+
The request body uses JSON:API format. If `org_uuid` is supplied, it must match
144971+
the authenticated org or the request is rejected. Successful calls disable the org
144972+
and return the resulting state from the downstream service. Requires the
144973+
`org_management` permission.
144974+
operationId: DisableCustomerOrg
144975+
requestBody:
144976+
content:
144977+
application/json:
144978+
examples:
144979+
default:
144980+
value:
144981+
data:
144982+
attributes:
144983+
org_uuid: "abcdef01-2345-6789-abcd-ef0123456789"
144984+
id: "1"
144985+
type: "customer_org_disable"
144986+
schema:
144987+
$ref: "#/components/schemas/CustomerOrgDisableRequest"
144988+
required: true
144989+
responses:
144990+
"200":
144991+
content:
144992+
application/json:
144993+
examples:
144994+
default:
144995+
value:
144996+
data:
144997+
attributes:
144998+
status: "disabled"
144999+
id: "abcdef01-2345-6789-abcd-ef0123456789"
145000+
type: "org_disable"
145001+
schema:
145002+
$ref: "#/components/schemas/CustomerOrgDisableResponse"
145003+
description: OK
145004+
"400":
145005+
content:
145006+
application/json:
145007+
schema:
145008+
$ref: "#/components/schemas/JSONAPIErrorResponse"
145009+
description: Bad Request
145010+
"401":
145011+
content:
145012+
application/json:
145013+
schema:
145014+
$ref: "#/components/schemas/JSONAPIErrorResponse"
145015+
description: Unauthorized
145016+
"403":
145017+
content:
145018+
application/json:
145019+
schema:
145020+
$ref: "#/components/schemas/JSONAPIErrorResponse"
145021+
description: Forbidden
145022+
"429":
145023+
$ref: "#/components/responses/TooManyRequestsResponse"
145024+
"500":
145025+
content:
145026+
application/json:
145027+
schema:
145028+
$ref: "#/components/schemas/JSONAPIErrorResponse"
145029+
description: Internal Server Error
145030+
security:
145031+
- apiKeyAuth: []
145032+
appKeyAuth: []
145033+
- AuthZ:
145034+
- org_management
145035+
summary: Disable the authenticated customer organization
145036+
tags:
145037+
- Customer Org
145038+
x-unstable: |-
145039+
**Note**: This endpoint is in preview and is subject to change.
145040+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
144872145041
/api/v2/org_configs:
144873145042
get:
144874145043
description: Returns all Org Configs (name, description, and value).
@@ -178361,6 +178530,10 @@ tags:
178361178530
- description: |-
178362178531
The Containers API allows you to query container data for your organization. See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for more information.
178363178532
name: Containers
178533+
- description: |-
178534+
Programmatic management of a customer's Datadog organization. Use this API to perform
178535+
self-service organization lifecycle actions such as disabling the authenticated org.
178536+
name: Customer Org
178364178537
- description: |-
178365178538
Search, send, or delete events for DORA Metrics to measure and improve your software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/) for more information.
178366178539

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Disable the authenticated customer organization returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CustomerOrgApi;
6+
import com.datadog.api.client.v2.model.CustomerOrgDisableRequest;
7+
import com.datadog.api.client.v2.model.CustomerOrgDisableRequestAttributes;
8+
import com.datadog.api.client.v2.model.CustomerOrgDisableRequestData;
9+
import com.datadog.api.client.v2.model.CustomerOrgDisableResponse;
10+
import com.datadog.api.client.v2.model.CustomerOrgDisableType;
11+
12+
public class Example {
13+
public static void main(String[] args) {
14+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
15+
defaultClient.setUnstableOperationEnabled("v2.disableCustomerOrg", true);
16+
CustomerOrgApi apiInstance = new CustomerOrgApi(defaultClient);
17+
18+
CustomerOrgDisableRequest body =
19+
new CustomerOrgDisableRequest()
20+
.data(
21+
new CustomerOrgDisableRequestData()
22+
.attributes(
23+
new CustomerOrgDisableRequestAttributes()
24+
.orgUuid("abcdef01-2345-6789-abcd-ef0123456789"))
25+
.id("1")
26+
.type(CustomerOrgDisableType.CUSTOMER_ORG_DISABLE));
27+
28+
try {
29+
CustomerOrgDisableResponse result = apiInstance.disableCustomerOrg(body);
30+
System.out.println(result);
31+
} catch (ApiException e) {
32+
System.err.println("Exception when calling CustomerOrgApi#disableCustomerOrg");
33+
System.err.println("Status code: " + e.getCode());
34+
System.err.println("Reason: " + e.getResponseBody());
35+
System.err.println("Response headers: " + e.getResponseHeaders());
36+
e.printStackTrace();
37+
}
38+
}
39+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,7 @@ public class ApiClient {
11061106
put("v2.getScopesRestriction", false);
11071107
put("v2.registerOAuthClient", false);
11081108
put("v2.upsertScopesRestriction", false);
1109+
put("v2.disableCustomerOrg", false);
11091110
put("v2.bulkUpdateOrgGroupMemberships", false);
11101111
put("v2.createOrgGroup", false);
11111112
put("v2.createOrgGroupPolicy", false);

0 commit comments

Comments
 (0)