Skip to content

Commit bc8db86

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b241667 of spec repo
1 parent 6388e54 commit bc8db86

4 files changed

Lines changed: 682 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73745,6 +73745,55 @@ components:
7374573745
required:
7374673746
- data
7374773747
type: object
73748+
OIDCDiscoveryDocument:
73749+
description: OpenID Connect provider metadata.
73750+
properties:
73751+
authorization_endpoint:
73752+
description: URL of the OAuth2 authorization endpoint.
73753+
example: https://app.datadoghq.com/oauth2/v1/authorize
73754+
type: string
73755+
id_token_signing_alg_values_supported:
73756+
description: Signing algorithms supported for ID tokens.
73757+
example:
73758+
- RS256
73759+
items:
73760+
type: string
73761+
type: array
73762+
issuer:
73763+
description: URL identifying the OpenID Connect issuer.
73764+
example: https://app.datadoghq.com/api/v2/oauth2
73765+
type: string
73766+
jwks_uri:
73767+
description: URL of the JSON Web Key Set used to verify ID token signatures.
73768+
example: https://app.datadoghq.com/oauth2/v1/keys
73769+
type: string
73770+
response_types_supported:
73771+
description: OAuth2 response types supported by the provider.
73772+
example:
73773+
- code
73774+
items:
73775+
type: string
73776+
type: array
73777+
subject_types_supported:
73778+
description: Subject identifier types supported by the provider.
73779+
example:
73780+
- public
73781+
items:
73782+
type: string
73783+
type: array
73784+
token_endpoint:
73785+
description: URL of the OAuth2 token endpoint.
73786+
example: https://app.datadoghq.com/api/v2/oauth2/token
73787+
type: string
73788+
required:
73789+
- issuer
73790+
- authorization_endpoint
73791+
- token_endpoint
73792+
- jwks_uri
73793+
- response_types_supported
73794+
- subject_types_supported
73795+
- id_token_signing_alg_values_supported
73796+
type: object
7374873797
ObservabilityPipeline:
7374973798
description: Top-level schema representing a pipeline.
7375073799
properties:
@@ -183680,6 +183729,84 @@ paths:
183680183729
operator: OR
183681183730
permissions:
183682183731
- network_connections_read
183732+
/api/v2/oauth2/.well-known/openid-configuration:
183733+
get:
183734+
description: Retrieve OpenID Connect provider metadata for the OAuth2 v2 token endpoint.
183735+
operationId: GetOIDCDiscoveryDocument
183736+
responses:
183737+
"200":
183738+
content:
183739+
application/json:
183740+
examples:
183741+
default:
183742+
value:
183743+
authorization_endpoint: https://app.datadoghq.com/oauth2/v1/authorize
183744+
id_token_signing_alg_values_supported:
183745+
- RS256
183746+
issuer: https://app.datadoghq.com/api/v2/oauth2
183747+
jwks_uri: https://app.datadoghq.com/oauth2/v1/keys
183748+
response_types_supported:
183749+
- code
183750+
subject_types_supported:
183751+
- public
183752+
token_endpoint: https://app.datadoghq.com/api/v2/oauth2/token
183753+
schema:
183754+
$ref: "#/components/schemas/OIDCDiscoveryDocument"
183755+
description: OK
183756+
"429":
183757+
$ref: "#/components/responses/TooManyRequestsResponse"
183758+
security: []
183759+
servers:
183760+
- url: https://{subdomain}.{site}
183761+
variables:
183762+
site:
183763+
default: datadoghq.com
183764+
description: The regional site for Datadog customers.
183765+
enum:
183766+
- datadoghq.com
183767+
- us3.datadoghq.com
183768+
- us5.datadoghq.com
183769+
- ap1.datadoghq.com
183770+
- ap2.datadoghq.com
183771+
- uk1.datadoghq.com
183772+
- datadoghq.eu
183773+
- ddog-gov.com
183774+
- us2.ddog-gov.com
183775+
x-enum-varnames:
183776+
- US1
183777+
- US3
183778+
- US5
183779+
- AP1
183780+
- AP2
183781+
- UK1
183782+
- EU1
183783+
- GOV
183784+
- US2_GOV
183785+
subdomain:
183786+
default: app
183787+
description: The subdomain where the API is deployed.
183788+
- url: "{protocol}://{name}"
183789+
variables:
183790+
name:
183791+
default: app.datadoghq.com
183792+
description: Full site DNS name.
183793+
protocol:
183794+
default: https
183795+
description: The protocol for accessing the API.
183796+
- url: https://{subdomain}.{site}
183797+
variables:
183798+
site:
183799+
default: datadoghq.com
183800+
description: Any Datadog deployment.
183801+
subdomain:
183802+
default: app
183803+
description: The subdomain where the API is deployed.
183804+
summary: Get OpenID Connect provider metadata
183805+
tags:
183806+
- OAuth2 Client Public
183807+
x-unstable: |-
183808+
**Note**: This endpoint is in preview and is subject to change.
183809+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
183683183810
/api/v2/oauth2/.well-known/sites:
183684183811
get:
183685183812
description: Retrieve the list of public OAuth2 sites available for the current environment. This endpoint is used for OAuth2 discovery and returns sites where users can authenticate.

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

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,77 @@ public class ApiClient {
430430
new HashSet<String>()));
431431
}
432432
}))));
433+
put(
434+
"v2.OAuth2ClientPublicApi.getOIDCDiscoveryDocument",
435+
new ArrayList<ServerConfiguration>(
436+
Arrays.asList(
437+
new ServerConfiguration(
438+
"https://{subdomain}.{site}",
439+
"No description provided",
440+
new HashMap<String, ServerVariable>() {
441+
{
442+
put(
443+
"site",
444+
new ServerVariable(
445+
"The regional site for Datadog customers.",
446+
"datadoghq.com",
447+
new HashSet<String>(
448+
Arrays.asList(
449+
"datadoghq.com",
450+
"us3.datadoghq.com",
451+
"us5.datadoghq.com",
452+
"ap1.datadoghq.com",
453+
"ap2.datadoghq.com",
454+
"uk1.datadoghq.com",
455+
"datadoghq.eu",
456+
"ddog-gov.com",
457+
"us2.ddog-gov.com"))));
458+
put(
459+
"subdomain",
460+
new ServerVariable(
461+
"The subdomain where the API is deployed.",
462+
"app",
463+
new HashSet<String>()));
464+
}
465+
}),
466+
new ServerConfiguration(
467+
"{protocol}://{name}",
468+
"No description provided",
469+
new HashMap<String, ServerVariable>() {
470+
{
471+
put(
472+
"name",
473+
new ServerVariable(
474+
"Full site DNS name.",
475+
"app.datadoghq.com",
476+
new HashSet<String>()));
477+
put(
478+
"protocol",
479+
new ServerVariable(
480+
"The protocol for accessing the API.",
481+
"https",
482+
new HashSet<String>()));
483+
}
484+
}),
485+
new ServerConfiguration(
486+
"https://{subdomain}.{site}",
487+
"No description provided",
488+
new HashMap<String, ServerVariable>() {
489+
{
490+
put(
491+
"site",
492+
new ServerVariable(
493+
"Any Datadog deployment.",
494+
"datadoghq.com",
495+
new HashSet<String>()));
496+
put(
497+
"subdomain",
498+
new ServerVariable(
499+
"The subdomain where the API is deployed.",
500+
"app",
501+
new HashSet<String>()));
502+
}
503+
}))));
433504
put(
434505
"v2.OnCallPagingApi.createOnCallPage",
435506
new ArrayList<ServerConfiguration>(
@@ -1312,6 +1383,7 @@ public class ApiClient {
13121383
put("v2.listNetworkHealthInsights", false);
13131384
put("v2.deleteScopesRestriction", false);
13141385
put("v2.getOAuth2WellKnownSites", false);
1386+
put("v2.getOIDCDiscoveryDocument", false);
13151387
put("v2.getScopesRestriction", false);
13161388
put("v2.registerOAuthClient", false);
13171389
put("v2.upsertScopesRestriction", false);

src/main/java/com/datadog/api/client/v2/api/OAuth2ClientPublicApi.java

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.datadog.api.client.v2.model.OAuthClientRegistrationRequest;
99
import com.datadog.api.client.v2.model.OAuthClientRegistrationResponse;
1010
import com.datadog.api.client.v2.model.OAuthScopesRestrictionResponse;
11+
import com.datadog.api.client.v2.model.OIDCDiscoveryDocument;
1112
import com.datadog.api.client.v2.model.UpsertOAuthScopesRestrictionRequest;
1213
import jakarta.ws.rs.client.Invocation;
1314
import jakarta.ws.rs.core.GenericType;
@@ -332,6 +333,133 @@ public ApiResponse<OAuth2WellKnownSitesResponse> getOAuth2WellKnownSitesWithHttp
332333
new GenericType<OAuth2WellKnownSitesResponse>() {});
333334
}
334335

336+
/**
337+
* Get OpenID Connect provider metadata.
338+
*
339+
* <p>See {@link #getOIDCDiscoveryDocumentWithHttpInfo}.
340+
*
341+
* @return OIDCDiscoveryDocument
342+
* @throws ApiException if fails to make API call
343+
*/
344+
public OIDCDiscoveryDocument getOIDCDiscoveryDocument() throws ApiException {
345+
return getOIDCDiscoveryDocumentWithHttpInfo().getData();
346+
}
347+
348+
/**
349+
* Get OpenID Connect provider metadata.
350+
*
351+
* <p>See {@link #getOIDCDiscoveryDocumentWithHttpInfoAsync}.
352+
*
353+
* @return CompletableFuture&lt;OIDCDiscoveryDocument&gt;
354+
*/
355+
public CompletableFuture<OIDCDiscoveryDocument> getOIDCDiscoveryDocumentAsync() {
356+
return getOIDCDiscoveryDocumentWithHttpInfoAsync()
357+
.thenApply(
358+
response -> {
359+
return response.getData();
360+
});
361+
}
362+
363+
/**
364+
* Retrieve OpenID Connect provider metadata for the OAuth2 v2 token endpoint.
365+
*
366+
* @return ApiResponse&lt;OIDCDiscoveryDocument&gt;
367+
* @throws ApiException if fails to make API call
368+
* @http.response.details
369+
* <table border="1">
370+
* <caption>Response details</caption>
371+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
372+
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
373+
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
374+
* </table>
375+
*/
376+
public ApiResponse<OIDCDiscoveryDocument> getOIDCDiscoveryDocumentWithHttpInfo()
377+
throws ApiException {
378+
// Check if unstable operation is enabled
379+
String operationId = "getOIDCDiscoveryDocument";
380+
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
381+
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
382+
} else {
383+
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
384+
}
385+
Object localVarPostBody = null;
386+
// create path and map variables
387+
String localVarPath = "/api/v2/oauth2/.well-known/openid-configuration";
388+
389+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
390+
391+
Invocation.Builder builder =
392+
apiClient.createBuilder(
393+
"v2.OAuth2ClientPublicApi.getOIDCDiscoveryDocument",
394+
localVarPath,
395+
new ArrayList<Pair>(),
396+
localVarHeaderParams,
397+
new HashMap<String, String>(),
398+
new String[] {"application/json"},
399+
new String[] {});
400+
return apiClient.invokeAPI(
401+
"GET",
402+
builder,
403+
localVarHeaderParams,
404+
new String[] {},
405+
localVarPostBody,
406+
new HashMap<String, Object>(),
407+
false,
408+
new GenericType<OIDCDiscoveryDocument>() {});
409+
}
410+
411+
/**
412+
* Get OpenID Connect provider metadata.
413+
*
414+
* <p>See {@link #getOIDCDiscoveryDocumentWithHttpInfo}.
415+
*
416+
* @return CompletableFuture&lt;ApiResponse&lt;OIDCDiscoveryDocument&gt;&gt;
417+
*/
418+
public CompletableFuture<ApiResponse<OIDCDiscoveryDocument>>
419+
getOIDCDiscoveryDocumentWithHttpInfoAsync() {
420+
// Check if unstable operation is enabled
421+
String operationId = "getOIDCDiscoveryDocument";
422+
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
423+
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
424+
} else {
425+
CompletableFuture<ApiResponse<OIDCDiscoveryDocument>> result = new CompletableFuture<>();
426+
result.completeExceptionally(
427+
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
428+
return result;
429+
}
430+
Object localVarPostBody = null;
431+
// create path and map variables
432+
String localVarPath = "/api/v2/oauth2/.well-known/openid-configuration";
433+
434+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
435+
436+
Invocation.Builder builder;
437+
try {
438+
builder =
439+
apiClient.createBuilder(
440+
"v2.OAuth2ClientPublicApi.getOIDCDiscoveryDocument",
441+
localVarPath,
442+
new ArrayList<Pair>(),
443+
localVarHeaderParams,
444+
new HashMap<String, String>(),
445+
new String[] {"application/json"},
446+
new String[] {});
447+
} catch (ApiException ex) {
448+
CompletableFuture<ApiResponse<OIDCDiscoveryDocument>> result = new CompletableFuture<>();
449+
result.completeExceptionally(ex);
450+
return result;
451+
}
452+
return apiClient.invokeAPIAsync(
453+
"GET",
454+
builder,
455+
localVarHeaderParams,
456+
new String[] {},
457+
localVarPostBody,
458+
new HashMap<String, Object>(),
459+
false,
460+
new GenericType<OIDCDiscoveryDocument>() {});
461+
}
462+
335463
/**
336464
* Get an OAuth2 client scopes restriction.
337465
*

0 commit comments

Comments
 (0)