diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index d9c881cd836..6136c4fe7ba 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -42828,6 +42828,9 @@ components:
description: Attributes of the SPA Recommendation resource. Contains recommendations
for both driver and executor components.
properties:
+ confidence_level:
+ format: double
+ type: number
driver:
$ref: '#/components/schemas/ComponentRecommendation'
executor:
@@ -86625,13 +86628,79 @@ paths:
x-unstable: '**Note**: This feature is in private beta. To request access, use
the request access form in the [Service Level Objectives](https://docs.datadoghq.com/service_management/service_level_objectives/#slo-csv-export)
docs.'
- /api/v2/spa/recommendations/{service}/{shard}:
+ /api/v2/spa/recommendations/{service}:
get:
- description: Retrieve resource recommendations for a Spark job. The caller (Spark
- Gateway or DJM UI) provides a service name and shard identifier, and SPA returns
- structured recommendations for driver and executor resources.
+ description: This endpoint is currently experimental and restricted to Datadog
+ internal use only. Retrieve resource recommendations for a Spark job. The
+ caller (Spark Gateway or DJM UI) provides a service name and SPA returns structured
+ recommendations for driver and executor resources. The version with a shard
+ should be preferred, where possible, as it gives more accurate results.
operationId: GetSPARecommendations
parameters:
+ - description: The recommendation service should not use its metrics cache.
+ in: query
+ name: bypass_cache
+ schema:
+ type: string
+ - description: The service name for a spark job.
+ in: path
+ name: service
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ example:
+ data:
+ attributes:
+ driver:
+ estimation:
+ cpu:
+ max: 1500
+ p75: 1000
+ p95: 1200
+ ephemeral_storage: 896
+ heap: 6144
+ memory: 7168
+ overhead: 1024
+ executor:
+ estimation:
+ cpu:
+ max: 2000
+ p75: 1200
+ p95: 1500
+ ephemeral_storage: 512
+ heap: 3072
+ memory: 4096
+ overhead: 1024
+ id: dedupeactivecontexts:adp_dedupeactivecontexts_org2
+ type: recommendation
+ schema:
+ $ref: '#/components/schemas/RecommendationDocument'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - AuthZ: []
+ summary: Get SPA Recommendations
+ tags:
+ - Spa
+ x-unstable: '**Note**: This endpoint is in preview and may change in the future.
+ It is not yet recommended for production use.'
+ /api/v2/spa/recommendations/{service}/{shard}:
+ get:
+ description: This endpoint is currently experimental and restricted to Datadog
+ internal use only. Retrieve resource recommendations for a Spark job. The
+ caller (Spark Gateway or DJM UI) provides a service name and shard identifier,
+ and SPA returns structured recommendations for driver and executor resources.
+ operationId: GetSPARecommendationsWithShard
+ parameters:
- description: The shard tag for a spark job, which differentiates jobs within
the same service that have different resource needs
in: path
@@ -86645,6 +86714,11 @@ paths:
required: true
schema:
type: string
+ - description: The recommendation service should not use its metrics cache.
+ in: query
+ name: bypass_cache
+ schema:
+ type: string
responses:
'200':
content:
@@ -86683,11 +86757,13 @@ paths:
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get SPA Recommendations
+ security:
+ - AuthZ: []
+ summary: Get SPA Recommendations with a shard parameter
tags:
- Spa
- x-unstable: '**Note**: This endpoint is in public beta and may change in the
- future. It is not yet recommended for production use.'
+ x-unstable: '**Note**: This endpoint is in preview and may change in the future.
+ It is not yet recommended for production use.'
/api/v2/spans/analytics/aggregate:
post:
description: 'The API endpoint to aggregate spans into buckets and compute metrics
diff --git a/examples/v2/spa/GetSPARecommendations.java b/examples/v2/spa/GetSPARecommendations.java
index 6f4859fb5e1..439e58a4d51 100644
--- a/examples/v2/spa/GetSPARecommendations.java
+++ b/examples/v2/spa/GetSPARecommendations.java
@@ -12,7 +12,7 @@ public static void main(String[] args) {
SpaApi apiInstance = new SpaApi(defaultClient);
try {
- RecommendationDocument result = apiInstance.getSPARecommendations("shard", "service");
+ RecommendationDocument result = apiInstance.getSPARecommendations("service");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SpaApi#getSPARecommendations");
diff --git a/examples/v2/spa/GetSPARecommendationsWithShard.java b/examples/v2/spa/GetSPARecommendationsWithShard.java
new file mode 100644
index 00000000000..90c6a532c57
--- /dev/null
+++ b/examples/v2/spa/GetSPARecommendationsWithShard.java
@@ -0,0 +1,26 @@
+// Get SPA Recommendations with a shard parameter returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.SpaApi;
+import com.datadog.api.client.v2.model.RecommendationDocument;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ defaultClient.setUnstableOperationEnabled("v2.getSPARecommendationsWithShard", true);
+ SpaApi apiInstance = new SpaApi(defaultClient);
+
+ try {
+ RecommendationDocument result =
+ apiInstance.getSPARecommendationsWithShard("shard", "service");
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling SpaApi#getSPARecommendationsWithShard");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java
index 439a59c339c..7dead757718 100644
--- a/src/main/java/com/datadog/api/client/ApiClient.java
+++ b/src/main/java/com/datadog/api/client/ApiClient.java
@@ -901,6 +901,7 @@ public class ApiClient {
put("v2.getSLOReport", false);
put("v2.getSLOReportJobStatus", false);
put("v2.getSPARecommendations", false);
+ put("v2.getSPARecommendationsWithShard", false);
put("v2.createSCAResolveVulnerableSymbols", false);
put("v2.createSCAResult", false);
put("v2.addMemberTeam", false);
diff --git a/src/main/java/com/datadog/api/client/v2/api/SpaApi.java b/src/main/java/com/datadog/api/client/v2/api/SpaApi.java
index e2a098df9a3..56d2eec9f57 100644
--- a/src/main/java/com/datadog/api/client/v2/api/SpaApi.java
+++ b/src/main/java/com/datadog/api/client/v2/api/SpaApi.java
@@ -9,6 +9,7 @@
import jakarta.ws.rs.core.GenericType;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
@@ -43,35 +44,309 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
+ /** Manage optional parameters to getSPARecommendations. */
+ public static class GetSPARecommendationsOptionalParameters {
+ private String bypassCache;
+
+ /**
+ * Set bypassCache.
+ *
+ * @param bypassCache The recommendation service should not use its metrics cache. (optional)
+ * @return GetSPARecommendationsOptionalParameters
+ */
+ public GetSPARecommendationsOptionalParameters bypassCache(String bypassCache) {
+ this.bypassCache = bypassCache;
+ return this;
+ }
+ }
+
+ /**
+ * Get SPA Recommendations.
+ *
+ *
See {@link #getSPARecommendationsWithHttpInfo}.
+ *
+ * @param service The service name for a spark job. (required)
+ * @return RecommendationDocument
+ * @throws ApiException if fails to make API call
+ */
+ public RecommendationDocument getSPARecommendations(String service) throws ApiException {
+ return getSPARecommendationsWithHttpInfo(service, new GetSPARecommendationsOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Get SPA Recommendations.
+ *
+ *
See {@link #getSPARecommendationsWithHttpInfoAsync}.
+ *
+ * @param service The service name for a spark job. (required)
+ * @return CompletableFuture<RecommendationDocument>
+ */
+ public CompletableFuture getSPARecommendationsAsync(String service) {
+ return getSPARecommendationsWithHttpInfoAsync(
+ service, new GetSPARecommendationsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get SPA Recommendations.
+ *
+ * See {@link #getSPARecommendationsWithHttpInfo}.
+ *
+ * @param service The service name for a spark job. (required)
+ * @param parameters Optional parameters for the request.
+ * @return RecommendationDocument
+ * @throws ApiException if fails to make API call
+ */
+ public RecommendationDocument getSPARecommendations(
+ String service, GetSPARecommendationsOptionalParameters parameters) throws ApiException {
+ return getSPARecommendationsWithHttpInfo(service, parameters).getData();
+ }
+
+ /**
+ * Get SPA Recommendations.
+ *
+ *
See {@link #getSPARecommendationsWithHttpInfoAsync}.
+ *
+ * @param service The service name for a spark job. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<RecommendationDocument>
+ */
+ public CompletableFuture getSPARecommendationsAsync(
+ String service, GetSPARecommendationsOptionalParameters parameters) {
+ return getSPARecommendationsWithHttpInfoAsync(service, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * This endpoint is currently experimental and restricted to Datadog internal use only. Retrieve
+ * resource recommendations for a Spark job. The caller (Spark Gateway or DJM UI) provides a
+ * service name and SPA returns structured recommendations for driver and executor resources. The
+ * version with a shard should be preferred, where possible, as it gives more accurate results.
+ *
+ * @param service The service name for a spark job. (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<RecommendationDocument>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 403 | Not Authorized | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getSPARecommendationsWithHttpInfo(
+ String service, GetSPARecommendationsOptionalParameters parameters) throws ApiException {
+ // Check if unstable operation is enabled
+ String operationId = "getSPARecommendations";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'service' is set
+ if (service == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'service' when calling getSPARecommendations");
+ }
+ String bypassCache = parameters.bypassCache;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/spa/recommendations/{service}"
+ .replaceAll("\\{" + "service" + "\\}", apiClient.escapeString(service.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "bypass_cache", bypassCache));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.SpaApi.getSPARecommendations",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
/**
* Get SPA Recommendations.
*
* See {@link #getSPARecommendationsWithHttpInfo}.
*
+ * @param service The service name for a spark job. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<RecommendationDocument>>
+ */
+ public CompletableFuture>
+ getSPARecommendationsWithHttpInfoAsync(
+ String service, GetSPARecommendationsOptionalParameters parameters) {
+ // Check if unstable operation is enabled
+ String operationId = "getSPARecommendations";
+ if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
+ apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
+ } else {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
+ return result;
+ }
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'service' is set
+ if (service == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'service' when calling getSPARecommendations"));
+ return result;
+ }
+ String bypassCache = parameters.bypassCache;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/spa/recommendations/{service}"
+ .replaceAll("\\{" + "service" + "\\}", apiClient.escapeString(service.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "bypass_cache", bypassCache));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.SpaApi.getSPARecommendations",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to getSPARecommendationsWithShard. */
+ public static class GetSPARecommendationsWithShardOptionalParameters {
+ private String bypassCache;
+
+ /**
+ * Set bypassCache.
+ *
+ * @param bypassCache The recommendation service should not use its metrics cache. (optional)
+ * @return GetSPARecommendationsWithShardOptionalParameters
+ */
+ public GetSPARecommendationsWithShardOptionalParameters bypassCache(String bypassCache) {
+ this.bypassCache = bypassCache;
+ return this;
+ }
+ }
+
+ /**
+ * Get SPA Recommendations with a shard parameter.
+ *
+ * See {@link #getSPARecommendationsWithShardWithHttpInfo}.
+ *
* @param shard The shard tag for a spark job, which differentiates jobs within the same service
* that have different resource needs (required)
* @param service The service name for a spark job (required)
* @return RecommendationDocument
* @throws ApiException if fails to make API call
*/
- public RecommendationDocument getSPARecommendations(String shard, String service)
+ public RecommendationDocument getSPARecommendationsWithShard(String shard, String service)
throws ApiException {
- return getSPARecommendationsWithHttpInfo(shard, service).getData();
+ return getSPARecommendationsWithShardWithHttpInfo(
+ shard, service, new GetSPARecommendationsWithShardOptionalParameters())
+ .getData();
}
/**
- * Get SPA Recommendations.
+ * Get SPA Recommendations with a shard parameter.
*
- *
See {@link #getSPARecommendationsWithHttpInfoAsync}.
+ *
See {@link #getSPARecommendationsWithShardWithHttpInfoAsync}.
*
* @param shard The shard tag for a spark job, which differentiates jobs within the same service
* that have different resource needs (required)
* @param service The service name for a spark job (required)
* @return CompletableFuture<RecommendationDocument>
*/
- public CompletableFuture getSPARecommendationsAsync(
+ public CompletableFuture getSPARecommendationsWithShardAsync(
String shard, String service) {
- return getSPARecommendationsWithHttpInfoAsync(shard, service)
+ return getSPARecommendationsWithShardWithHttpInfoAsync(
+ shard, service, new GetSPARecommendationsWithShardOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get SPA Recommendations with a shard parameter.
+ *
+ * See {@link #getSPARecommendationsWithShardWithHttpInfo}.
+ *
+ * @param shard The shard tag for a spark job, which differentiates jobs within the same service
+ * that have different resource needs (required)
+ * @param service The service name for a spark job (required)
+ * @param parameters Optional parameters for the request.
+ * @return RecommendationDocument
+ * @throws ApiException if fails to make API call
+ */
+ public RecommendationDocument getSPARecommendationsWithShard(
+ String shard, String service, GetSPARecommendationsWithShardOptionalParameters parameters)
+ throws ApiException {
+ return getSPARecommendationsWithShardWithHttpInfo(shard, service, parameters).getData();
+ }
+
+ /**
+ * Get SPA Recommendations with a shard parameter.
+ *
+ *
See {@link #getSPARecommendationsWithShardWithHttpInfoAsync}.
+ *
+ * @param shard The shard tag for a spark job, which differentiates jobs within the same service
+ * that have different resource needs (required)
+ * @param service The service name for a spark job (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<RecommendationDocument>
+ */
+ public CompletableFuture getSPARecommendationsWithShardAsync(
+ String shard, String service, GetSPARecommendationsWithShardOptionalParameters parameters) {
+ return getSPARecommendationsWithShardWithHttpInfoAsync(shard, service, parameters)
.thenApply(
response -> {
return response.getData();
@@ -79,13 +354,15 @@ public CompletableFuture getSPARecommendationsAsync(
}
/**
- * Retrieve resource recommendations for a Spark job. The caller (Spark Gateway or DJM UI)
- * provides a service name and shard identifier, and SPA returns structured recommendations for
- * driver and executor resources.
+ * This endpoint is currently experimental and restricted to Datadog internal use only. Retrieve
+ * resource recommendations for a Spark job. The caller (Spark Gateway or DJM UI) provides a
+ * service name and shard identifier, and SPA returns structured recommendations for driver and
+ * executor resources.
*
* @param shard The shard tag for a spark job, which differentiates jobs within the same service
* that have different resource needs (required)
* @param service The service name for a spark job (required)
+ * @param parameters Optional parameters for the request.
* @return ApiResponse<RecommendationDocument>
* @throws ApiException if fails to make API call
* @http.response.details
@@ -98,10 +375,11 @@ public CompletableFuture getSPARecommendationsAsync(
* | 429 | Too many requests | - |
*
*/
- public ApiResponse getSPARecommendationsWithHttpInfo(
- String shard, String service) throws ApiException {
+ public ApiResponse getSPARecommendationsWithShardWithHttpInfo(
+ String shard, String service, GetSPARecommendationsWithShardOptionalParameters parameters)
+ throws ApiException {
// Check if unstable operation is enabled
- String operationId = "getSPARecommendations";
+ String operationId = "getSPARecommendationsWithShard";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
@@ -112,31 +390,37 @@ public ApiResponse getSPARecommendationsWithHttpInfo(
// verify the required parameter 'shard' is set
if (shard == null) {
throw new ApiException(
- 400, "Missing the required parameter 'shard' when calling getSPARecommendations");
+ 400,
+ "Missing the required parameter 'shard' when calling getSPARecommendationsWithShard");
}
// verify the required parameter 'service' is set
if (service == null) {
throw new ApiException(
- 400, "Missing the required parameter 'service' when calling getSPARecommendations");
+ 400,
+ "Missing the required parameter 'service' when calling getSPARecommendationsWithShard");
}
+ String bypassCache = parameters.bypassCache;
// create path and map variables
String localVarPath =
"/api/v2/spa/recommendations/{service}/{shard}"
.replaceAll("\\{" + "shard" + "\\}", apiClient.escapeString(shard.toString()))
.replaceAll("\\{" + "service" + "\\}", apiClient.escapeString(service.toString()));
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "bypass_cache", bypassCache));
+
Invocation.Builder builder =
apiClient.createBuilder(
- "v2.SpaApi.getSPARecommendations",
+ "v2.SpaApi.getSPARecommendationsWithShard",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
- new String[] {"apiKeyAuth", "appKeyAuth"});
+ new String[] {"AuthZ"});
return apiClient.invokeAPI(
"GET",
builder,
@@ -149,19 +433,23 @@ public ApiResponse getSPARecommendationsWithHttpInfo(
}
/**
- * Get SPA Recommendations.
+ * Get SPA Recommendations with a shard parameter.
*
- * See {@link #getSPARecommendationsWithHttpInfo}.
+ *
See {@link #getSPARecommendationsWithShardWithHttpInfo}.
*
* @param shard The shard tag for a spark job, which differentiates jobs within the same service
* that have different resource needs (required)
* @param service The service name for a spark job (required)
+ * @param parameters Optional parameters for the request.
* @return CompletableFuture<ApiResponse<RecommendationDocument>>
*/
public CompletableFuture>
- getSPARecommendationsWithHttpInfoAsync(String shard, String service) {
+ getSPARecommendationsWithShardWithHttpInfoAsync(
+ String shard,
+ String service,
+ GetSPARecommendationsWithShardOptionalParameters parameters) {
// Check if unstable operation is enabled
- String operationId = "getSPARecommendations";
+ String operationId = "getSPARecommendationsWithShard";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
@@ -177,7 +465,9 @@ public ApiResponse getSPARecommendationsWithHttpInfo(
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
- 400, "Missing the required parameter 'shard' when calling getSPARecommendations"));
+ 400,
+ "Missing the required parameter 'shard' when calling"
+ + " getSPARecommendationsWithShard"));
return result;
}
@@ -186,28 +476,34 @@ public ApiResponse getSPARecommendationsWithHttpInfo(
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
- 400, "Missing the required parameter 'service' when calling getSPARecommendations"));
+ 400,
+ "Missing the required parameter 'service' when calling"
+ + " getSPARecommendationsWithShard"));
return result;
}
+ String bypassCache = parameters.bypassCache;
// create path and map variables
String localVarPath =
"/api/v2/spa/recommendations/{service}/{shard}"
.replaceAll("\\{" + "shard" + "\\}", apiClient.escapeString(shard.toString()))
.replaceAll("\\{" + "service" + "\\}", apiClient.escapeString(service.toString()));
+ List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "bypass_cache", bypassCache));
+
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
- "v2.SpaApi.getSPARecommendations",
+ "v2.SpaApi.getSPARecommendationsWithShard",
localVarPath,
- new ArrayList(),
+ localVarQueryParams,
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
- new String[] {"apiKeyAuth", "appKeyAuth"});
+ new String[] {"AuthZ"});
} catch (ApiException ex) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
diff --git a/src/main/java/com/datadog/api/client/v2/model/RecommendationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RecommendationAttributes.java
index babf04d55e7..b0fd6d5eea4 100644
--- a/src/main/java/com/datadog/api/client/v2/model/RecommendationAttributes.java
+++ b/src/main/java/com/datadog/api/client/v2/model/RecommendationAttributes.java
@@ -22,6 +22,7 @@
* executor components.
*/
@JsonPropertyOrder({
+ RecommendationAttributes.JSON_PROPERTY_CONFIDENCE_LEVEL,
RecommendationAttributes.JSON_PROPERTY_DRIVER,
RecommendationAttributes.JSON_PROPERTY_EXECUTOR
})
@@ -29,6 +30,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class RecommendationAttributes {
@JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CONFIDENCE_LEVEL = "confidence_level";
+ private Double confidenceLevel;
+
public static final String JSON_PROPERTY_DRIVER = "driver";
private ComponentRecommendation driver;
@@ -48,6 +52,27 @@ public RecommendationAttributes(
this.unparsed |= executor.unparsed;
}
+ public RecommendationAttributes confidenceLevel(Double confidenceLevel) {
+ this.confidenceLevel = confidenceLevel;
+ return this;
+ }
+
+ /**
+ * GetconfidenceLevel
+ *
+ * @return confidenceLevel
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CONFIDENCE_LEVEL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Double getConfidenceLevel() {
+ return confidenceLevel;
+ }
+
+ public void setConfidenceLevel(Double confidenceLevel) {
+ this.confidenceLevel = confidenceLevel;
+ }
+
public RecommendationAttributes driver(ComponentRecommendation driver) {
this.driver = driver;
this.unparsed |= driver.unparsed;
@@ -148,20 +173,22 @@ public boolean equals(Object o) {
return false;
}
RecommendationAttributes recommendationAttributes = (RecommendationAttributes) o;
- return Objects.equals(this.driver, recommendationAttributes.driver)
+ return Objects.equals(this.confidenceLevel, recommendationAttributes.confidenceLevel)
+ && Objects.equals(this.driver, recommendationAttributes.driver)
&& Objects.equals(this.executor, recommendationAttributes.executor)
&& Objects.equals(this.additionalProperties, recommendationAttributes.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(driver, executor, additionalProperties);
+ return Objects.hash(confidenceLevel, driver, executor, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RecommendationAttributes {\n");
+ sb.append(" confidenceLevel: ").append(toIndentedString(confidenceLevel)).append("\n");
sb.append(" driver: ").append(toIndentedString(driver)).append("\n");
sb.append(" executor: ").append(toIndentedString(executor)).append("\n");
sb.append(" additionalProperties: ")
diff --git a/src/test/resources/com/datadog/api/client/v2/api/spa.feature b/src/test/resources/com/datadog/api/client/v2/api/spa.feature
index 327bbf16ac0..0e6ac6b3a76 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/spa.feature
+++ b/src/test/resources/com/datadog/api/client/v2/api/spa.feature
@@ -4,29 +4,49 @@ Feature: Spa
insights to help optimize Spark job configurations.
Background:
- Given a valid "apiKeyAuth" key in the system
- And a valid "appKeyAuth" key in the system
- And an instance of "Spa" API
- And operation "GetSPARecommendations" enabled
- And new "GetSPARecommendations" request
+ Given an instance of "Spa" API
@generated @skip @team:DataDog/data-and-analytics-processing
Scenario: Get SPA Recommendations returns "Bad Request" response
- Given request contains "shard" parameter from "REPLACE.ME"
+ Given operation "GetSPARecommendations" enabled
+ And new "GetSPARecommendations" request
And request contains "service" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/data-and-analytics-processing
Scenario: Get SPA Recommendations returns "OK" response
- Given request contains "shard" parameter from "REPLACE.ME"
+ Given operation "GetSPARecommendations" enabled
+ And new "GetSPARecommendations" request
+ And request contains "service" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/data-and-analytics-processing
+ Scenario: Get SPA Recommendations with a shard parameter returns "Bad Request" response
+ Given operation "GetSPARecommendationsWithShard" enabled
+ And new "GetSPARecommendationsWithShard" request
+ And request contains "shard" parameter from "REPLACE.ME"
+ And request contains "service" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/data-and-analytics-processing
+ Scenario: Get SPA Recommendations with a shard parameter returns "OK" response
+ Given operation "GetSPARecommendationsWithShard" enabled
+ And new "GetSPARecommendationsWithShard" request
+ And request contains "shard" parameter from "REPLACE.ME"
And request contains "service" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@skip @team:DataDog/data-and-analytics-processing
Scenario: GetSPARecommendations returns a JSON:API Recommendation with driver and executor estimations
- Given request contains "service" parameter with value "dedupeactivecontexts"
+ Given new "GetSPARecommendations" request
+ And a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And operation "GetSPARecommendations" enabled
+ And request contains "service" parameter with value "dedupeactivecontexts"
And request contains "shard" parameter with value "adp_dedupeactivecontexts_org2"
When the request is sent
Then the response status is 404 Not Found
diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json
index b54378e93ba..c6c7be16489 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/undo.json
+++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json
@@ -4484,6 +4484,12 @@
"type": "safe"
}
},
+ "GetSPARecommendationsWithShard": {
+ "tag": "Spa",
+ "undo": {
+ "type": "safe"
+ }
+ },
"AggregateSpans": {
"tag": "Spans",
"undo": {