Skip to content

Commit 762f281

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a8db8b5 of spec repo
1 parent 9cd3fee commit 762f281

File tree

8 files changed

+494
-42
lines changed

8 files changed

+494
-42
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 81 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42859,6 +42859,9 @@ components:
4285942859
description: Attributes of the SPA Recommendation resource. Contains recommendations
4286042860
for both driver and executor components.
4286142861
properties:
42862+
confidence_level:
42863+
format: double
42864+
type: number
4286242865
driver:
4286342866
$ref: '#/components/schemas/ComponentRecommendation'
4286442867
executor:
@@ -86654,13 +86657,79 @@ paths:
8665486657
x-unstable: '**Note**: This feature is in private beta. To request access, use
8665586658
the request access form in the [Service Level Objectives](https://docs.datadoghq.com/service_management/service_level_objectives/#slo-csv-export)
8665686659
docs.'
86657-
/api/v2/spa/recommendations/{service}/{shard}:
86660+
/api/v2/spa/recommendations/{service}:
8665886661
get:
86659-
description: Retrieve resource recommendations for a Spark job. The caller (Spark
86660-
Gateway or DJM UI) provides a service name and shard identifier, and SPA returns
86661-
structured recommendations for driver and executor resources.
86662+
description: This endpoint is currently experimental and restricted to Datadog
86663+
internal use only. Retrieve resource recommendations for a Spark job. The
86664+
caller (Spark Gateway or DJM UI) provides a service name and SPA returns structured
86665+
recommendations for driver and executor resources. The version with a shard
86666+
should be preferred, where possible, as it gives more accurate results.
8666286667
operationId: GetSPARecommendations
8666386668
parameters:
86669+
- description: The recommendation service should not use its metrics cache.
86670+
in: query
86671+
name: bypass_cache
86672+
schema:
86673+
type: string
86674+
- description: The service name for a spark job
86675+
in: path
86676+
name: service
86677+
required: true
86678+
schema:
86679+
type: string
86680+
responses:
86681+
'200':
86682+
content:
86683+
application/json:
86684+
example:
86685+
data:
86686+
attributes:
86687+
driver:
86688+
estimation:
86689+
cpu:
86690+
max: 1500
86691+
p75: 1000
86692+
p95: 1200
86693+
ephemeral_storage: 896
86694+
heap: 6144
86695+
memory: 7168
86696+
overhead: 1024
86697+
executor:
86698+
estimation:
86699+
cpu:
86700+
max: 2000
86701+
p75: 1200
86702+
p95: 1500
86703+
ephemeral_storage: 512
86704+
heap: 3072
86705+
memory: 4096
86706+
overhead: 1024
86707+
id: dedupeactivecontexts:adp_dedupeactivecontexts_org2
86708+
type: recommendation
86709+
schema:
86710+
$ref: '#/components/schemas/RecommendationDocument'
86711+
description: OK
86712+
'400':
86713+
$ref: '#/components/responses/BadRequestResponse'
86714+
'403':
86715+
$ref: '#/components/responses/NotAuthorizedResponse'
86716+
'429':
86717+
$ref: '#/components/responses/TooManyRequestsResponse'
86718+
security:
86719+
- AuthZ: []
86720+
summary: Get SPA Recommendations
86721+
tags:
86722+
- Spa
86723+
x-unstable: '**Note**: This endpoint is in public beta and may change in the
86724+
future. It is not yet recommended for production use.'
86725+
/api/v2/spa/recommendations/{service}/{shard}:
86726+
get:
86727+
description: This endpoint is currently experimental and restricted to Datadog
86728+
internal use only. Retrieve resource recommendations for a Spark job. The
86729+
caller (Spark Gateway or DJM UI) provides a service name and shard identifier,
86730+
and SPA returns structured recommendations for driver and executor resources.
86731+
operationId: GetSPARecommendationsWithShard
86732+
parameters:
8666486733
- description: The shard tag for a spark job, which differentiates jobs within
8666586734
the same service that have different resource needs
8666686735
in: path
@@ -86674,6 +86743,11 @@ paths:
8667486743
required: true
8667586744
schema:
8667686745
type: string
86746+
- description: The recommendation service should not use its metrics cache.
86747+
in: query
86748+
name: bypass_cache
86749+
schema:
86750+
type: string
8667786751
responses:
8667886752
'200':
8667986753
content:
@@ -86712,7 +86786,9 @@ paths:
8671286786
$ref: '#/components/responses/NotAuthorizedResponse'
8671386787
'429':
8671486788
$ref: '#/components/responses/TooManyRequestsResponse'
86715-
summary: Get SPA Recommendations
86789+
security:
86790+
- AuthZ: []
86791+
summary: Get SPA Recommendations with a shard parameter
8671686792
tags:
8671786793
- Spa
8671886794
x-unstable: '**Note**: This endpoint is in public beta and may change in the

examples/v2/spa/GetSPARecommendations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static void main(String[] args) {
1212
SpaApi apiInstance = new SpaApi(defaultClient);
1313

1414
try {
15-
RecommendationDocument result = apiInstance.getSPARecommendations("shard", "service");
15+
RecommendationDocument result = apiInstance.getSPARecommendations("service");
1616
System.out.println(result);
1717
} catch (ApiException e) {
1818
System.err.println("Exception when calling SpaApi#getSPARecommendations");
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Get SPA Recommendations with a shard parameter 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.SpaApi;
6+
import com.datadog.api.client.v2.model.RecommendationDocument;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getSPARecommendationsWithShard", true);
12+
SpaApi apiInstance = new SpaApi(defaultClient);
13+
14+
try {
15+
RecommendationDocument result =
16+
apiInstance.getSPARecommendationsWithShard("shard", "service");
17+
System.out.println(result);
18+
} catch (ApiException e) {
19+
System.err.println("Exception when calling SpaApi#getSPARecommendationsWithShard");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,7 @@ public class ApiClient {
903903
put("v2.getSLOReport", false);
904904
put("v2.getSLOReportJobStatus", false);
905905
put("v2.getSPARecommendations", false);
906+
put("v2.getSPARecommendationsWithShard", false);
906907
put("v2.createSCAResolveVulnerableSymbols", false);
907908
put("v2.createSCAResult", false);
908909
put("v2.addMemberTeam", false);

0 commit comments

Comments
 (0)