Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,058 changes: 1,058 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions examples/v2/csm-ownership/CreateOwnershipFeedback.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Submit feedback on an ownership inference returns "Created" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmOwnershipApi;
import com.datadog.api.client.v2.model.OwnershipFeedbackAction;
import com.datadog.api.client.v2.model.OwnershipFeedbackRequest;
import com.datadog.api.client.v2.model.OwnershipFeedbackRequestAttributes;
import com.datadog.api.client.v2.model.OwnershipFeedbackRequestData;
import com.datadog.api.client.v2.model.OwnershipFeedbackResponse;
import com.datadog.api.client.v2.model.OwnershipFeedbackType;
import com.datadog.api.client.v2.model.OwnershipOwnerType;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.createOwnershipFeedback", true);
CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient);

OwnershipFeedbackRequest body =
new OwnershipFeedbackRequest()
.data(
new OwnershipFeedbackRequestData()
.attributes(
new OwnershipFeedbackRequestAttributes()
.action(OwnershipFeedbackAction.CONFIRM)
.actorHandle("user@example.com")
.actorType("user")
.correctedOwnerHandle("team-b")
.correctedOwnerType("team")
.inferenceChecksum("abc123")
.reason("Confirmed by team lead."))
.type(OwnershipFeedbackType.OWNERSHIP_FEEDBACK));

try {
OwnershipFeedbackResponse result =
apiInstance.createOwnershipFeedback("res-1", OwnershipOwnerType.TEAM, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsmOwnershipApi#createOwnershipFeedback");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
27 changes: 27 additions & 0 deletions examples/v2/csm-ownership/GetOwnershipEvidence.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Get the evidence for an ownership inference returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmOwnershipApi;
import com.datadog.api.client.v2.model.OwnershipEvidenceResponse;
import com.datadog.api.client.v2.model.OwnershipOwnerType;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getOwnershipEvidence", true);
CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient);

try {
OwnershipEvidenceResponse result =
apiInstance.getOwnershipEvidence("test-resource", OwnershipOwnerType.TEAM);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsmOwnershipApi#getOwnershipEvidence");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
27 changes: 27 additions & 0 deletions examples/v2/csm-ownership/GetOwnershipInference.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Get an ownership inference by owner type returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmOwnershipApi;
import com.datadog.api.client.v2.model.OwnershipInferenceResponse;
import com.datadog.api.client.v2.model.OwnershipOwnerType;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getOwnershipInference", true);
CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient);

try {
OwnershipInferenceResponse result =
apiInstance.getOwnershipInference("test-resource", OwnershipOwnerType.TEAM);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsmOwnershipApi#getOwnershipInference");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
25 changes: 25 additions & 0 deletions examples/v2/csm-ownership/ListOwnershipHistory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// List ownership inference history for a resource returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmOwnershipApi;
import com.datadog.api.client.v2.model.OwnershipHistoryResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.listOwnershipHistory", true);
CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient);

try {
OwnershipHistoryResponse result = apiInstance.listOwnershipHistory("res-1");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsmOwnershipApi#listOwnershipHistory");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
27 changes: 27 additions & 0 deletions examples/v2/csm-ownership/ListOwnershipHistoryByOwnerType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// List ownership history by owner type returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmOwnershipApi;
import com.datadog.api.client.v2.model.OwnershipHistoryResponse;
import com.datadog.api.client.v2.model.OwnershipOwnerType;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.listOwnershipHistoryByOwnerType", true);
CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient);

try {
OwnershipHistoryResponse result =
apiInstance.listOwnershipHistoryByOwnerType("res-1", OwnershipOwnerType.TEAM);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsmOwnershipApi#listOwnershipHistoryByOwnerType");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
25 changes: 25 additions & 0 deletions examples/v2/csm-ownership/ListOwnershipInferences.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// List ownership inferences for a resource returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CsmOwnershipApi;
import com.datadog.api.client.v2.model.OwnershipInferenceListResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.listOwnershipInferences", true);
CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient);

try {
OwnershipInferenceListResponse result = apiInstance.listOwnershipInferences("test-resource");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CsmOwnershipApi#listOwnershipInferences");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
6 changes: 6 additions & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,12 @@ public class ApiClient {
put("v2.listCostTagMetadataMonths", false);
put("v2.listCostTagMetadataOrchestrators", false);
put("v2.searchCostRecommendations", false);
put("v2.createOwnershipFeedback", false);
put("v2.getOwnershipEvidence", false);
put("v2.getOwnershipInference", false);
put("v2.listOwnershipHistory", false);
put("v2.listOwnershipHistoryByOwnerType", false);
put("v2.listOwnershipInferences", false);
put("v2.createDashboardSecureEmbed", false);
put("v2.deleteDashboardSecureEmbed", false);
put("v2.getDashboardSecureEmbed", false);
Expand Down
Loading
Loading