From 49c8eeef87d09a759802b58822174d90d97b4812 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 15 Sep 2026 16:14:10 +0000 Subject: [PATCH] Regenerate client from commit b241667 of spec repo --- .generator/schemas/v2/openapi.yaml | 127 ++++++++++++++++++ src/datadog_api_client/configuration.py | 1 + .../v2/api/o_auth2_client_public_api.py | 81 +++++++++++ .../v2/model/oidc_discovery_document.py | 80 +++++++++++ src/datadog_api_client/v2/models/__init__.py | 2 + 5 files changed, 291 insertions(+) create mode 100644 src/datadog_api_client/v2/model/oidc_discovery_document.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5b57cf7c6d..4fe9742dbe 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -73745,6 +73745,55 @@ components: required: - data type: object + OIDCDiscoveryDocument: + description: OpenID Connect provider metadata. + properties: + authorization_endpoint: + description: URL of the OAuth2 authorization endpoint. + example: https://app.datadoghq.com/oauth2/v1/authorize + type: string + id_token_signing_alg_values_supported: + description: Signing algorithms supported for ID tokens. + example: + - RS256 + items: + type: string + type: array + issuer: + description: URL identifying the OpenID Connect issuer. + example: https://app.datadoghq.com/api/v2/oauth2 + type: string + jwks_uri: + description: URL of the JSON Web Key Set used to verify ID token signatures. + example: https://app.datadoghq.com/oauth2/v1/keys + type: string + response_types_supported: + description: OAuth2 response types supported by the provider. + example: + - code + items: + type: string + type: array + subject_types_supported: + description: Subject identifier types supported by the provider. + example: + - public + items: + type: string + type: array + token_endpoint: + description: URL of the OAuth2 token endpoint. + example: https://app.datadoghq.com/api/v2/oauth2/token + type: string + required: + - issuer + - authorization_endpoint + - token_endpoint + - jwks_uri + - response_types_supported + - subject_types_supported + - id_token_signing_alg_values_supported + type: object ObservabilityPipeline: description: Top-level schema representing a pipeline. properties: @@ -183680,6 +183729,84 @@ paths: operator: OR permissions: - network_connections_read + /api/v2/oauth2/.well-known/openid-configuration: + get: + description: Retrieve OpenID Connect provider metadata for the OAuth2 v2 token endpoint. + operationId: GetOIDCDiscoveryDocument + responses: + "200": + content: + application/json: + examples: + default: + value: + authorization_endpoint: https://app.datadoghq.com/oauth2/v1/authorize + id_token_signing_alg_values_supported: + - RS256 + issuer: https://app.datadoghq.com/api/v2/oauth2 + jwks_uri: https://app.datadoghq.com/oauth2/v1/keys + response_types_supported: + - code + subject_types_supported: + - public + token_endpoint: https://app.datadoghq.com/api/v2/oauth2/token + schema: + $ref: "#/components/schemas/OIDCDiscoveryDocument" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: [] + servers: + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: The regional site for Datadog customers. + enum: + - datadoghq.com + - us3.datadoghq.com + - us5.datadoghq.com + - ap1.datadoghq.com + - ap2.datadoghq.com + - uk1.datadoghq.com + - datadoghq.eu + - ddog-gov.com + - us2.ddog-gov.com + x-enum-varnames: + - US1 + - US3 + - US5 + - AP1 + - AP2 + - UK1 + - EU1 + - GOV + - US2_GOV + subdomain: + default: app + description: The subdomain where the API is deployed. + - url: "{protocol}://{name}" + variables: + name: + default: app.datadoghq.com + description: Full site DNS name. + protocol: + default: https + description: The protocol for accessing the API. + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: Any Datadog deployment. + subdomain: + default: app + description: The subdomain where the API is deployed. + summary: Get OpenID Connect provider metadata + tags: + - OAuth2 Client Public + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/oauth2/.well-known/sites: get: 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. diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index a6b191e760..97b96ebb9a 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -730,6 +730,7 @@ def __init__( "v2.list_network_health_insights": False, "v2.delete_scopes_restriction": False, "v2.get_o_auth2_well_known_sites": False, + "v2.get_oidc_discovery_document": False, "v2.get_scopes_restriction": False, "v2.register_o_auth_client": False, "v2.upsert_scopes_restriction": False, diff --git a/src/datadog_api_client/v2/api/o_auth2_client_public_api.py b/src/datadog_api_client/v2/api/o_auth2_client_public_api.py index 0dffac2334..36d8a45652 100644 --- a/src/datadog_api_client/v2/api/o_auth2_client_public_api.py +++ b/src/datadog_api_client/v2/api/o_auth2_client_public_api.py @@ -10,6 +10,7 @@ from datadog_api_client.model_utils import ( UUID, ) +from datadog_api_client.v2.model.oidc_discovery_document import OIDCDiscoveryDocument from datadog_api_client.v2.model.o_auth2_well_known_sites_response import OAuth2WellKnownSitesResponse from datadog_api_client.v2.model.o_auth_scopes_restriction_response import OAuthScopesRestrictionResponse from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_request import UpsertOAuthScopesRestrictionRequest @@ -67,6 +68,74 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_oidc_discovery_document_endpoint = _Endpoint( + settings={ + "response_type": (OIDCDiscoveryDocument,), + "auth": [], + "endpoint_path": "/api/v2/oauth2/.well-known/openid-configuration", + "operation_id": "get_oidc_discovery_document", + "http_method": "GET", + "version": "v2", + "servers": [ + { + "url": "https://{subdomain}.{site}", + "variables": { + "site": { + "description": "The regional site for Datadog customers.", + "default_value": "datadoghq.com", + "enum_values": [ + "datadoghq.com", + "us3.datadoghq.com", + "us5.datadoghq.com", + "ap1.datadoghq.com", + "ap2.datadoghq.com", + "uk1.datadoghq.com", + "datadoghq.eu", + "ddog-gov.com", + "us2.ddog-gov.com", + ], + }, + "subdomain": { + "description": "The subdomain where the API is deployed.", + "default_value": "app", + }, + }, + }, + { + "url": "{protocol}://{name}", + "variables": { + "name": { + "description": "Full site DNS name.", + "default_value": "app.datadoghq.com", + }, + "protocol": { + "description": "The protocol for accessing the API.", + "default_value": "https", + }, + }, + }, + { + "url": "https://{subdomain}.{site}", + "variables": { + "site": { + "description": "Any Datadog deployment.", + "default_value": "datadoghq.com", + }, + "subdomain": { + "description": "The subdomain where the API is deployed.", + "default_value": "app", + }, + }, + }, + ], + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_scopes_restriction_endpoint = _Endpoint( settings={ "response_type": (OAuthScopesRestrictionResponse,), @@ -165,6 +234,18 @@ def get_o_auth2_well_known_sites( kwargs: Dict[str, Any] = {} return self._get_o_auth2_well_known_sites_endpoint.call_with_http_info(**kwargs) + def get_oidc_discovery_document( + self, + ) -> OIDCDiscoveryDocument: + """Get OpenID Connect provider metadata. + + Retrieve OpenID Connect provider metadata for the OAuth2 v2 token endpoint. + + :rtype: OIDCDiscoveryDocument + """ + kwargs: Dict[str, Any] = {} + return self._get_oidc_discovery_document_endpoint.call_with_http_info(**kwargs) + def get_scopes_restriction( self, client_uuid: UUID, diff --git a/src/datadog_api_client/v2/model/oidc_discovery_document.py b/src/datadog_api_client/v2/model/oidc_discovery_document.py new file mode 100644 index 0000000000..cd5dbc877e --- /dev/null +++ b/src/datadog_api_client/v2/model/oidc_discovery_document.py @@ -0,0 +1,80 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class OIDCDiscoveryDocument(ModelNormal): + @cached_property + def openapi_types(_): + return { + "authorization_endpoint": (str,), + "id_token_signing_alg_values_supported": ([str],), + "issuer": (str,), + "jwks_uri": (str,), + "response_types_supported": ([str],), + "subject_types_supported": ([str],), + "token_endpoint": (str,), + } + + attribute_map = { + "authorization_endpoint": "authorization_endpoint", + "id_token_signing_alg_values_supported": "id_token_signing_alg_values_supported", + "issuer": "issuer", + "jwks_uri": "jwks_uri", + "response_types_supported": "response_types_supported", + "subject_types_supported": "subject_types_supported", + "token_endpoint": "token_endpoint", + } + + def __init__( + self_, + authorization_endpoint: str, + id_token_signing_alg_values_supported: List[str], + issuer: str, + jwks_uri: str, + response_types_supported: List[str], + subject_types_supported: List[str], + token_endpoint: str, + **kwargs, + ): + """ + OpenID Connect provider metadata. + + :param authorization_endpoint: URL of the OAuth2 authorization endpoint. + :type authorization_endpoint: str + + :param id_token_signing_alg_values_supported: Signing algorithms supported for ID tokens. + :type id_token_signing_alg_values_supported: [str] + + :param issuer: URL identifying the OpenID Connect issuer. + :type issuer: str + + :param jwks_uri: URL of the JSON Web Key Set used to verify ID token signatures. + :type jwks_uri: str + + :param response_types_supported: OAuth2 response types supported by the provider. + :type response_types_supported: [str] + + :param subject_types_supported: Subject identifier types supported by the provider. + :type subject_types_supported: [str] + + :param token_endpoint: URL of the OAuth2 token endpoint. + :type token_endpoint: str + """ + super().__init__(kwargs) + + self_.authorization_endpoint = authorization_endpoint + self_.id_token_signing_alg_values_supported = id_token_signing_alg_values_supported + self_.issuer = issuer + self_.jwks_uri = jwks_uri + self_.response_types_supported = response_types_supported + self_.subject_types_supported = subject_types_supported + self_.token_endpoint = token_endpoint diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 5745dec4a4..8db1f7f35d 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -5875,6 +5875,7 @@ from datadog_api_client.v2.model.oci_config_attributes import OCIConfigAttributes from datadog_api_client.v2.model.oci_config_type import OCIConfigType from datadog_api_client.v2.model.oci_configs_response import OCIConfigsResponse +from datadog_api_client.v2.model.oidc_discovery_document import OIDCDiscoveryDocument from datadog_api_client.v2.model.observability_pipeline import ObservabilityPipeline from datadog_api_client.v2.model.observability_pipeline_add_env_vars_processor import ( ObservabilityPipelineAddEnvVarsProcessor, @@ -15935,6 +15936,7 @@ "OCIConfigAttributes", "OCIConfigType", "OCIConfigsResponse", + "OIDCDiscoveryDocument", "ObservabilityPipeline", "ObservabilityPipelineAddEnvVarsProcessor", "ObservabilityPipelineAddEnvVarsProcessorType",