diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 453a74bab7..de0bc3fd58 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1026,15 +1026,6 @@ components: required: true schema: type: string - OAuthClientUUIDPathParameter: - description: UUID of the OAuth2 client. - in: path - name: client_uuid - required: true - schema: - example: fafa8e1c-36a5-11f0-a83d-da7ad0900001 - format: uuid - type: string OnDemandTaskId: description: The UUID of the task. example: "6d09294c-9ad9-42fd-a759-a0c1599b4828" @@ -26528,6 +26519,9 @@ components: description: description: Description of the degradation. type: string + is_backfilled: + description: Whether the degradation was backfilled. + type: boolean modified_at: description: Timestamp of when the degradation was last modified. format: date-time @@ -50260,6 +50254,9 @@ components: in_progress_description: description: The description shown while the maintenance is in progress. type: string + is_backfilled: + description: Whether the maintenance was backfilled. + type: boolean modified_at: description: Timestamp of when the maintenance was last modified. format: date-time @@ -54605,256 +54602,6 @@ components: - id - type type: object - OAuthClientRegistrationError: - description: Error payload returned by OAuth2 dynamic client registration as defined by RFC 7591. - properties: - error: - description: Single ASCII error code per RFC 7591, such as `invalid_request` or `invalid_client_metadata`. - example: invalid_client_metadata - type: string - error_description: - description: Human-readable description of the error. - example: redirect URI is not well-formed - type: string - required: - - error - - error_description - type: object - OAuthClientRegistrationGrantType: - description: OAuth 2.0 grant type that a registered client may use. - enum: - - authorization_code - - refresh_token - example: authorization_code - type: string - x-enum-varnames: - - AUTHORIZATION_CODE - - REFRESH_TOKEN - OAuthClientRegistrationRequest: - description: Request payload for OAuth2 dynamic client registration as defined by RFC 7591. - properties: - client_name: - description: Human-readable name of the client. Control characters are rejected. - example: Example MCP Client - maxLength: 1000 - type: string - client_uri: - description: URL of the home page of the client. - example: https://example.com - maxLength: 1000 - type: string - grant_types: - description: |- - OAuth 2.0 grant types the client may use. - Defaults to `authorization_code` and `refresh_token` when omitted. - example: - - authorization_code - - refresh_token - items: - $ref: "#/components/schemas/OAuthClientRegistrationGrantType" - type: array - jwks_uri: - description: URL referencing the client's JSON Web Key Set. - example: https://example.com/.well-known/jwks.json - maxLength: 1000 - type: string - logo_uri: - description: URL referencing a logo for the client. - example: https://example.com/logo.png - maxLength: 1000 - type: string - policy_uri: - description: URL pointing to the client's privacy policy. - example: https://example.com/privacy - maxLength: 1000 - type: string - redirect_uris: - description: Array of redirection URI strings used by the client in redirect-based flows. - example: - - https://example.com/oauth/callback - items: - description: Redirection URI registered for the client. - example: https://example.com/oauth/callback - maxLength: 1000 - type: string - type: array - response_types: - description: OAuth 2.0 response types the client may use. Only `code` is supported. - example: - - code - items: - $ref: "#/components/schemas/OAuthClientRegistrationResponseType" - type: array - scope: - description: Space-separated list of scope values the client may request. - example: openid profile - maxLength: 1000 - type: string - token_endpoint_auth_method: - description: Requested authentication method for the token endpoint. Only `none` is supported. - example: none - maxLength: 20 - type: string - tos_uri: - description: URL pointing to the client's terms of service. - example: https://example.com/tos - maxLength: 1000 - type: string - required: - - client_name - - redirect_uris - type: object - OAuthClientRegistrationResponse: - description: Response payload for a successful OAuth2 dynamic client registration as defined by RFC 7591. - properties: - client_id: - description: Unique identifier assigned to the registered client. - example: 72b68208-36a6-11f0-b21b-da7ad0900002 - format: uuid - type: string - client_name: - description: Human-readable name of the client. - example: Example MCP Client - type: string - grant_types: - description: OAuth 2.0 grant types registered for the client. - example: - - authorization_code - - refresh_token - items: - $ref: "#/components/schemas/OAuthClientRegistrationGrantType" - type: array - redirect_uris: - description: Redirection URIs registered for the client. - example: - - https://example.com/oauth/callback - items: - description: Redirection URI registered for the client. - example: https://example.com/oauth/callback - type: string - type: array - response_types: - description: OAuth 2.0 response types registered for the client. - example: - - code - items: - $ref: "#/components/schemas/OAuthClientRegistrationResponseType" - type: array - token_endpoint_auth_method: - description: Authentication method registered for the token endpoint. Always `none`. - example: none - type: string - required: - - client_id - - client_name - - redirect_uris - - token_endpoint_auth_method - - grant_types - - response_types - type: object - OAuthClientRegistrationResponseType: - description: OAuth 2.0 response type that a registered client may use. - enum: - - code - example: code - type: string - x-enum-varnames: - - CODE - OAuthOidcScope: - description: OIDC scope a client may be restricted to. - enum: - - openid - - profile - - email - - offline_access - example: openid - type: string - x-enum-varnames: - - OPENID - - PROFILE - - EMAIL - - OFFLINE_ACCESS - OAuthScopesRestriction: - description: Allowlist of OIDC and permission scopes enforced for the OAuth2 client. - nullable: true - properties: - oidc_scopes: - description: OIDC scopes the client is restricted to. - example: - - openid - - email - items: - $ref: "#/components/schemas/OAuthOidcScope" - type: array - permission_scopes: - description: Datadog permission scopes the client is restricted to. - example: - - dashboards_read - - metrics_read - items: - description: Datadog permission scope name. - example: dashboards_read - type: string - type: array - required: - - oidc_scopes - - permission_scopes - type: object - OAuthScopesRestrictionResponse: - description: Response payload describing the scopes restriction of an OAuth2 client. - properties: - data: - $ref: "#/components/schemas/OAuthScopesRestrictionResponseData" - required: - - data - type: object - OAuthScopesRestrictionResponseAttributes: - description: Attributes of an OAuth2 client scopes restriction. - properties: - required_permission_scopes: - description: |- - Permission scopes automatically required for this client (for example, mobile-app permission scopes). - Returns `null` when no scopes are required. - example: - - mobile_app_access - items: - description: Datadog permission scope name. - example: mobile_app_access - type: string - nullable: true - type: array - scopes_restriction: - $ref: "#/components/schemas/OAuthScopesRestriction" - required: - - scopes_restriction - - required_permission_scopes - type: object - OAuthScopesRestrictionResponseData: - description: Data object of an OAuth2 client scopes restriction response. - properties: - attributes: - $ref: "#/components/schemas/OAuthScopesRestrictionResponseAttributes" - id: - description: UUID of the OAuth2 client this restriction applies to. - example: fafa8e1c-36a5-11f0-a83d-da7ad0900001 - format: uuid - type: string - type: - $ref: "#/components/schemas/OAuthScopesRestrictionType" - required: - - id - - type - - attributes - type: object - OAuthScopesRestrictionType: - default: scopes_restriction - description: JSON:API resource type for an OAuth2 client scopes restriction. - enum: - - scopes_restriction - example: scopes_restriction - type: string - x-enum-varnames: - - SCOPES_RESTRICTION OCIConfig: description: OCI config. properties: @@ -92399,57 +92146,6 @@ components: - id - attributes type: object - UpsertOAuthScopesRestrictionData: - description: Data object of an upsert OAuth2 scopes restriction request. - properties: - attributes: - $ref: "#/components/schemas/UpsertOAuthScopesRestrictionDataAttributes" - type: - $ref: "#/components/schemas/UpsertOAuthScopesRestrictionType" - required: - - type - type: object - UpsertOAuthScopesRestrictionDataAttributes: - description: Attributes of an upsert OAuth2 scopes restriction request. - properties: - oidc_scopes: - description: OIDC scopes the client is allowed to request. - example: - - openid - - email - items: - $ref: "#/components/schemas/OAuthOidcScope" - type: array - permission_scopes: - description: |- - Datadog permission scopes the client is allowed to request. - Each value must be a valid permission name. - example: - - dashboards_read - - metrics_read - items: - description: Datadog permission scope name. - example: dashboards_read - type: string - type: array - type: object - UpsertOAuthScopesRestrictionRequest: - description: Request payload for creating or updating the scopes restriction of an OAuth2 client. - properties: - data: - $ref: "#/components/schemas/UpsertOAuthScopesRestrictionData" - required: - - data - type: object - UpsertOAuthScopesRestrictionType: - default: upsert_scopes_restriction - description: JSON:API resource type for an upsert OAuth2 client scopes restriction request. - enum: - - upsert_scopes_restriction - example: upsert_scopes_restriction - type: string - x-enum-varnames: - - UPSERT_SCOPES_RESTRICTION Urgency: description: Specifies the level of urgency for a routing rule (low, high, or dynamic). enum: @@ -134520,223 +134216,6 @@ paths: summary: Get all aggregated DNS traffic tags: - Cloud Network Monitoring - /api/v2/oauth2/clients/{client_uuid}/scopes_restriction: - delete: - description: Delete the scopes restriction configured for the OAuth2 client. - operationId: DeleteScopesRestriction - parameters: - - $ref: "#/components/parameters/OAuthClientUUIDPathParameter" - responses: - "204": - description: No Content - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Delete an OAuth2 client scopes restriction - tags: - - OAuth2 Client Public - x-permission: - operator: OR - permissions: - - org_authorized_apps_write - 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/). - get: - description: Get the scopes restriction configured for the OAuth2 client. - operationId: GetScopesRestriction - parameters: - - $ref: "#/components/parameters/OAuthClientUUIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - required_permission_scopes: - scopes_restriction: - oidc_scopes: - - openid - - email - permission_scopes: - - dashboards_read - - metrics_read - id: fafa8e1c-36a5-11f0-a83d-da7ad0900001 - type: scopes_restriction - schema: - $ref: "#/components/schemas/OAuthScopesRestrictionResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get an OAuth2 client scopes restriction - tags: - - OAuth2 Client Public - x-permission: - operator: OR - permissions: - - org_authorized_apps_read - 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/). - post: - description: Create or update the scopes restriction configured for the OAuth2 client. - operationId: UpsertScopesRestriction - parameters: - - $ref: "#/components/parameters/OAuthClientUUIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - oidc_scopes: - - openid - - email - permission_scopes: - - dashboards_read - - metrics_read - type: upsert_scopes_restriction - schema: - $ref: "#/components/schemas/UpsertOAuthScopesRestrictionRequest" - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - required_permission_scopes: - scopes_restriction: - oidc_scopes: - - openid - - email - permission_scopes: - - dashboards_read - - metrics_read - id: fafa8e1c-36a5-11f0-a83d-da7ad0900001 - type: scopes_restriction - schema: - $ref: "#/components/schemas/OAuthScopesRestrictionResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Upsert an OAuth2 client scopes restriction - tags: - - OAuth2 Client Public - x-codegen-request-body-name: body - x-permission: - operator: OR - permissions: - - org_authorized_apps_write - 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/register: - post: - description: Register an OAuth2 client using the Dynamic Client Registration protocol defined in RFC 7591. - operationId: RegisterOAuthClient - requestBody: - content: - application/json: - examples: - default: - value: - client_name: Example MCP Client - grant_types: - - authorization_code - - refresh_token - redirect_uris: - - https://example.com/oauth/callback - response_types: - - code - token_endpoint_auth_method: none - schema: - $ref: "#/components/schemas/OAuthClientRegistrationRequest" - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - client_id: 72b68208-36a6-11f0-b21b-da7ad0900002 - client_name: Example MCP Client - grant_types: - - authorization_code - - refresh_token - redirect_uris: - - https://example.com/oauth/callback - response_types: - - code - token_endpoint_auth_method: none - schema: - $ref: "#/components/schemas/OAuthClientRegistrationResponse" - description: Created - "400": - content: - application/json: - examples: - default: - value: - error: invalid_client_metadata - error_description: redirect URI is not well-formed - schema: - $ref: "#/components/schemas/OAuthClientRegistrationError" - description: Bad Request - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: [] - summary: Register an OAuth2 client - tags: - - OAuth2 Client Public - x-codegen-request-body-name: body - 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/obs-pipelines/pipelines: get: description: Retrieve a list of pipelines. @@ -168153,10 +167632,6 @@ tags: - description: |- The Network Device Monitoring API allows you to fetch devices and interfaces and their attributes. See the [Network Device Monitoring page](https://docs.datadoghq.com/network_monitoring/) for more information. name: Network Device Monitoring - - description: |- - Configure OAuth2 clients for Datadog. - Supports RFC 7591 Dynamic Client Registration and management of OAuth2 client scopes restrictions. - name: OAuth2 Client Public - description: Auto-generated tag OCI Integration name: OCI Integration - description: |- diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 6189ddfe73..b983e4d251 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -473,13 +473,6 @@ datadog\_api\_client.v2.api.network\_device\_monitoring\_api module :members: :show-inheritance: -datadog\_api\_client.v2.api.o\_auth2\_client\_public\_api module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.api.o_auth2_client_public_api - :members: - :show-inheritance: - datadog\_api\_client.v2.api.observability\_pipelines\_api module ---------------------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 4474e4ed4a..48710cf4f3 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -23426,83 +23426,6 @@ datadog\_api\_client.v2.model.nullable\_user\_relationship\_data module :members: :show-inheritance: -datadog\_api\_client.v2.model.o\_auth\_client\_registration\_error module -------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_client_registration_error - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_client\_registration\_grant\_type module -------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_client_registration_grant_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_client\_registration\_request module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_client_registration_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_client\_registration\_response module ----------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_client_registration_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_client\_registration\_response\_type module ----------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_client_registration_response_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_oidc\_scope module ---------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_oidc_scope - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_scopes\_restriction module ------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.o_auth_scopes_restriction - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_scopes\_restriction\_response module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_scopes_restriction_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_scopes\_restriction\_response\_attributes module ---------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_scopes_restriction_response_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_scopes\_restriction\_response\_data module ---------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.o_auth_scopes_restriction_response_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.o\_auth\_scopes\_restriction\_type module ------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.o_auth_scopes_restriction_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.observability\_pipeline module ------------------------------------------------------------ @@ -40296,34 +40219,6 @@ datadog\_api\_client.v2.model.upsert\_cloud\_inventory\_sync\_config\_request\_d :members: :show-inheritance: -datadog\_api\_client.v2.model.upsert\_o\_auth\_scopes\_restriction\_data module -------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.upsert\_o\_auth\_scopes\_restriction\_data\_attributes module -------------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.upsert\_o\_auth\_scopes\_restriction\_request module ----------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.upsert\_o\_auth\_scopes\_restriction\_type module -------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.urgency module -------------------------------------------- diff --git a/examples/v2/oauth2-client-public/DeleteScopesRestriction.py b/examples/v2/oauth2-client-public/DeleteScopesRestriction.py deleted file mode 100644 index 86101a3d85..0000000000 --- a/examples/v2/oauth2-client-public/DeleteScopesRestriction.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -Delete an OAuth2 client scopes restriction returns "No Content" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.o_auth2_client_public_api import OAuth2ClientPublicApi -from uuid import UUID - -configuration = Configuration() -configuration.unstable_operations["delete_scopes_restriction"] = True -with ApiClient(configuration) as api_client: - api_instance = OAuth2ClientPublicApi(api_client) - api_instance.delete_scopes_restriction( - client_uuid=UUID("fafa8e1c-36a5-11f0-a83d-da7ad0900001"), - ) diff --git a/examples/v2/oauth2-client-public/GetScopesRestriction.py b/examples/v2/oauth2-client-public/GetScopesRestriction.py deleted file mode 100644 index 5e4dde568c..0000000000 --- a/examples/v2/oauth2-client-public/GetScopesRestriction.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Get an OAuth2 client scopes restriction returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.o_auth2_client_public_api import OAuth2ClientPublicApi -from uuid import UUID - -configuration = Configuration() -configuration.unstable_operations["get_scopes_restriction"] = True -with ApiClient(configuration) as api_client: - api_instance = OAuth2ClientPublicApi(api_client) - response = api_instance.get_scopes_restriction( - client_uuid=UUID("fafa8e1c-36a5-11f0-a83d-da7ad0900001"), - ) - - print(response) diff --git a/examples/v2/oauth2-client-public/RegisterOAuthClient.py b/examples/v2/oauth2-client-public/RegisterOAuthClient.py deleted file mode 100644 index 106acdbc6c..0000000000 --- a/examples/v2/oauth2-client-public/RegisterOAuthClient.py +++ /dev/null @@ -1,38 +0,0 @@ -""" -Register an OAuth2 client returns "Created" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.o_auth2_client_public_api import OAuth2ClientPublicApi -from datadog_api_client.v2.model.o_auth_client_registration_grant_type import OAuthClientRegistrationGrantType -from datadog_api_client.v2.model.o_auth_client_registration_request import OAuthClientRegistrationRequest -from datadog_api_client.v2.model.o_auth_client_registration_response_type import OAuthClientRegistrationResponseType - -body = OAuthClientRegistrationRequest( - client_name="Example MCP Client", - client_uri="https://example.com", - grant_types=[ - OAuthClientRegistrationGrantType.AUTHORIZATION_CODE, - OAuthClientRegistrationGrantType.REFRESH_TOKEN, - ], - jwks_uri="https://example.com/.well-known/jwks.json", - logo_uri="https://example.com/logo.png", - policy_uri="https://example.com/privacy", - redirect_uris=[ - "https://example.com/oauth/callback", - ], - response_types=[ - OAuthClientRegistrationResponseType.CODE, - ], - scope="openid profile", - token_endpoint_auth_method="none", - tos_uri="https://example.com/tos", -) - -configuration = Configuration() -configuration.unstable_operations["register_o_auth_client"] = True -with ApiClient(configuration) as api_client: - api_instance = OAuth2ClientPublicApi(api_client) - response = api_instance.register_o_auth_client(body=body) - - print(response) diff --git a/examples/v2/oauth2-client-public/UpsertScopesRestriction.py b/examples/v2/oauth2-client-public/UpsertScopesRestriction.py deleted file mode 100644 index ecda5c6b40..0000000000 --- a/examples/v2/oauth2-client-public/UpsertScopesRestriction.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -Upsert an OAuth2 client scopes restriction returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.o_auth2_client_public_api import OAuth2ClientPublicApi -from datadog_api_client.v2.model.o_auth_oidc_scope import OAuthOidcScope -from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data import UpsertOAuthScopesRestrictionData -from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data_attributes import ( - UpsertOAuthScopesRestrictionDataAttributes, -) -from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_request import UpsertOAuthScopesRestrictionRequest -from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_type import UpsertOAuthScopesRestrictionType -from uuid import UUID - -body = UpsertOAuthScopesRestrictionRequest( - data=UpsertOAuthScopesRestrictionData( - attributes=UpsertOAuthScopesRestrictionDataAttributes( - oidc_scopes=[ - OAuthOidcScope.OPENID, - OAuthOidcScope.EMAIL, - ], - permission_scopes=[ - "dashboards_read", - "metrics_read", - ], - ), - type=UpsertOAuthScopesRestrictionType.UPSERT_SCOPES_RESTRICTION, - ), -) - -configuration = Configuration() -configuration.unstable_operations["upsert_scopes_restriction"] = True -with ApiClient(configuration) as api_client: - api_instance = OAuth2ClientPublicApi(api_client) - response = api_instance.upsert_scopes_restriction( - client_uuid=UUID("fafa8e1c-36a5-11f0-a83d-da7ad0900001"), body=body - ) - - print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index ac07f0278e..8c495dc5dd 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -578,10 +578,6 @@ def __init__( "v2.update_monitor_user_template": False, "v2.validate_existing_monitor_user_template": False, "v2.validate_monitor_user_template": False, - "v2.delete_scopes_restriction": False, - "v2.get_scopes_restriction": False, - "v2.register_o_auth_client": False, - "v2.upsert_scopes_restriction": False, "v2.bulk_update_org_group_memberships": False, "v2.create_org_group": False, "v2.create_org_group_policy": 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 deleted file mode 100644 index fb59506fc6..0000000000 --- a/src/datadog_api_client/v2/api/o_auth2_client_public_api.py +++ /dev/null @@ -1,191 +0,0 @@ -# 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 Any, Dict - -from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint -from datadog_api_client.configuration import Configuration -from datadog_api_client.model_utils import ( - UUID, -) -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 -from datadog_api_client.v2.model.o_auth_client_registration_response import OAuthClientRegistrationResponse -from datadog_api_client.v2.model.o_auth_client_registration_request import OAuthClientRegistrationRequest - - -class OAuth2ClientPublicApi: - """ - Configure OAuth2 clients for Datadog. - Supports RFC 7591 Dynamic Client Registration and management of OAuth2 client scopes restrictions. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient(Configuration()) - self.api_client = api_client - - self._delete_scopes_restriction_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/oauth2/clients/{client_uuid}/scopes_restriction", - "operation_id": "delete_scopes_restriction", - "http_method": "DELETE", - "version": "v2", - }, - params_map={ - "client_uuid": { - "required": True, - "openapi_types": (UUID,), - "attribute": "client_uuid", - "location": "path", - }, - }, - headers_map={ - "accept": ["*/*"], - }, - api_client=api_client, - ) - - self._get_scopes_restriction_endpoint = _Endpoint( - settings={ - "response_type": (OAuthScopesRestrictionResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/oauth2/clients/{client_uuid}/scopes_restriction", - "operation_id": "get_scopes_restriction", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "client_uuid": { - "required": True, - "openapi_types": (UUID,), - "attribute": "client_uuid", - "location": "path", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._register_o_auth_client_endpoint = _Endpoint( - settings={ - "response_type": (OAuthClientRegistrationResponse,), - "auth": [], - "endpoint_path": "/api/v2/oauth2/register", - "operation_id": "register_o_auth_client", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "body": { - "required": True, - "openapi_types": (OAuthClientRegistrationRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - self._upsert_scopes_restriction_endpoint = _Endpoint( - settings={ - "response_type": (OAuthScopesRestrictionResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/oauth2/clients/{client_uuid}/scopes_restriction", - "operation_id": "upsert_scopes_restriction", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "client_uuid": { - "required": True, - "openapi_types": (UUID,), - "attribute": "client_uuid", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (UpsertOAuthScopesRestrictionRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - def delete_scopes_restriction( - self, - client_uuid: UUID, - ) -> None: - """Delete an OAuth2 client scopes restriction. - - Delete the scopes restriction configured for the OAuth2 client. - - :param client_uuid: UUID of the OAuth2 client. - :type client_uuid: UUID - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["client_uuid"] = client_uuid - - return self._delete_scopes_restriction_endpoint.call_with_http_info(**kwargs) - - def get_scopes_restriction( - self, - client_uuid: UUID, - ) -> OAuthScopesRestrictionResponse: - """Get an OAuth2 client scopes restriction. - - Get the scopes restriction configured for the OAuth2 client. - - :param client_uuid: UUID of the OAuth2 client. - :type client_uuid: UUID - :rtype: OAuthScopesRestrictionResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["client_uuid"] = client_uuid - - return self._get_scopes_restriction_endpoint.call_with_http_info(**kwargs) - - def register_o_auth_client( - self, - body: OAuthClientRegistrationRequest, - ) -> OAuthClientRegistrationResponse: - """Register an OAuth2 client. - - Register an OAuth2 client using the Dynamic Client Registration protocol defined in RFC 7591. - - :type body: OAuthClientRegistrationRequest - :rtype: OAuthClientRegistrationResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["body"] = body - - return self._register_o_auth_client_endpoint.call_with_http_info(**kwargs) - - def upsert_scopes_restriction( - self, - client_uuid: UUID, - body: UpsertOAuthScopesRestrictionRequest, - ) -> OAuthScopesRestrictionResponse: - """Upsert an OAuth2 client scopes restriction. - - Create or update the scopes restriction configured for the OAuth2 client. - - :param client_uuid: UUID of the OAuth2 client. - :type client_uuid: UUID - :type body: UpsertOAuthScopesRestrictionRequest - :rtype: OAuthScopesRestrictionResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["client_uuid"] = client_uuid - - kwargs["body"] = body - - return self._upsert_scopes_restriction_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 0e18bb1881..6f2ebf73d1 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -65,7 +65,6 @@ from datadog_api_client.v2.api.model_lab_api_api import ModelLabAPIApi from datadog_api_client.v2.api.monitors_api import MonitorsApi from datadog_api_client.v2.api.network_device_monitoring_api import NetworkDeviceMonitoringApi -from datadog_api_client.v2.api.o_auth2_client_public_api import OAuth2ClientPublicApi from datadog_api_client.v2.api.oci_integration_api import OCIIntegrationApi from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi from datadog_api_client.v2.api.okta_integration_api import OktaIntegrationApi @@ -182,7 +181,6 @@ "ModelLabAPIApi", "MonitorsApi", "NetworkDeviceMonitoringApi", - "OAuth2ClientPublicApi", "OCIIntegrationApi", "ObservabilityPipelinesApi", "OktaIntegrationApi", diff --git a/src/datadog_api_client/v2/model/degradation_data_attributes.py b/src/datadog_api_client/v2/model/degradation_data_attributes.py index 6e6b3a4e35..86d5c1879d 100644 --- a/src/datadog_api_client/v2/model/degradation_data_attributes.py +++ b/src/datadog_api_client/v2/model/degradation_data_attributes.py @@ -45,6 +45,7 @@ def openapi_types(_): "components_affected": ([DegradationDataAttributesComponentsAffectedItems],), "created_at": (datetime,), "description": (str,), + "is_backfilled": (bool,), "modified_at": (datetime,), "source": (DegradationDataAttributesSource,), "status": (CreateDegradationRequestDataAttributesStatus,), @@ -56,6 +57,7 @@ def openapi_types(_): "components_affected": "components_affected", "created_at": "created_at", "description": "description", + "is_backfilled": "is_backfilled", "modified_at": "modified_at", "source": "source", "status": "status", @@ -68,6 +70,7 @@ def __init__( components_affected: Union[List[DegradationDataAttributesComponentsAffectedItems], UnsetType] = unset, created_at: Union[datetime, UnsetType] = unset, description: Union[str, UnsetType] = unset, + is_backfilled: Union[bool, UnsetType] = unset, modified_at: Union[datetime, UnsetType] = unset, source: Union[DegradationDataAttributesSource, UnsetType] = unset, status: Union[CreateDegradationRequestDataAttributesStatus, UnsetType] = unset, @@ -87,6 +90,9 @@ def __init__( :param description: Description of the degradation. :type description: str, optional + :param is_backfilled: Whether the degradation was backfilled. + :type is_backfilled: bool, optional + :param modified_at: Timestamp of when the degradation was last modified. :type modified_at: datetime, optional @@ -108,6 +114,8 @@ def __init__( kwargs["created_at"] = created_at if description is not unset: kwargs["description"] = description + if is_backfilled is not unset: + kwargs["is_backfilled"] = is_backfilled if modified_at is not unset: kwargs["modified_at"] = modified_at if source is not unset: diff --git a/src/datadog_api_client/v2/model/maintenance_data_attributes.py b/src/datadog_api_client/v2/model/maintenance_data_attributes.py index 6a304a4495..11b7f3fc6c 100644 --- a/src/datadog_api_client/v2/model/maintenance_data_attributes.py +++ b/src/datadog_api_client/v2/model/maintenance_data_attributes.py @@ -40,6 +40,7 @@ def openapi_types(_): "completed_description": (str,), "components_affected": ([MaintenanceDataAttributesComponentsAffectedItems],), "in_progress_description": (str,), + "is_backfilled": (bool,), "modified_at": (datetime,), "published_date": (datetime,), "scheduled_description": (str,), @@ -54,6 +55,7 @@ def openapi_types(_): "completed_description": "completed_description", "components_affected": "components_affected", "in_progress_description": "in_progress_description", + "is_backfilled": "is_backfilled", "modified_at": "modified_at", "published_date": "published_date", "scheduled_description": "scheduled_description", @@ -69,6 +71,7 @@ def __init__( completed_description: Union[str, UnsetType] = unset, components_affected: Union[List[MaintenanceDataAttributesComponentsAffectedItems], UnsetType] = unset, in_progress_description: Union[str, UnsetType] = unset, + is_backfilled: Union[bool, UnsetType] = unset, modified_at: Union[datetime, UnsetType] = unset, published_date: Union[datetime, UnsetType] = unset, scheduled_description: Union[str, UnsetType] = unset, @@ -93,6 +96,9 @@ def __init__( :param in_progress_description: The description shown while the maintenance is in progress. :type in_progress_description: str, optional + :param is_backfilled: Whether the maintenance was backfilled. + :type is_backfilled: bool, optional + :param modified_at: Timestamp of when the maintenance was last modified. :type modified_at: datetime, optional @@ -122,6 +128,8 @@ def __init__( kwargs["components_affected"] = components_affected if in_progress_description is not unset: kwargs["in_progress_description"] = in_progress_description + if is_backfilled is not unset: + kwargs["is_backfilled"] = is_backfilled if modified_at is not unset: kwargs["modified_at"] = modified_at if published_date is not unset: diff --git a/src/datadog_api_client/v2/model/o_auth_client_registration_error.py b/src/datadog_api_client/v2/model/o_auth_client_registration_error.py deleted file mode 100644 index 541a138237..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_client_registration_error.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class OAuthClientRegistrationError(ModelNormal): - @cached_property - def openapi_types(_): - return { - "error": (str,), - "error_description": (str,), - } - - attribute_map = { - "error": "error", - "error_description": "error_description", - } - - def __init__(self_, error: str, error_description: str, **kwargs): - """ - Error payload returned by OAuth2 dynamic client registration as defined by RFC 7591. - - :param error: Single ASCII error code per RFC 7591, such as ``invalid_request`` or ``invalid_client_metadata``. - :type error: str - - :param error_description: Human-readable description of the error. - :type error_description: str - """ - super().__init__(kwargs) - - self_.error = error - self_.error_description = error_description diff --git a/src/datadog_api_client/v2/model/o_auth_client_registration_grant_type.py b/src/datadog_api_client/v2/model/o_auth_client_registration_grant_type.py deleted file mode 100644 index 1a36fa31ef..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_client_registration_grant_type.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OAuthClientRegistrationGrantType(ModelSimple): - """ - OAuth 2.0 grant type that a registered client may use. - - :param value: Must be one of ["authorization_code", "refresh_token"]. - :type value: str - """ - - allowed_values = { - "authorization_code", - "refresh_token", - } - AUTHORIZATION_CODE: ClassVar["OAuthClientRegistrationGrantType"] - REFRESH_TOKEN: ClassVar["OAuthClientRegistrationGrantType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OAuthClientRegistrationGrantType.AUTHORIZATION_CODE = OAuthClientRegistrationGrantType("authorization_code") -OAuthClientRegistrationGrantType.REFRESH_TOKEN = OAuthClientRegistrationGrantType("refresh_token") diff --git a/src/datadog_api_client/v2/model/o_auth_client_registration_request.py b/src/datadog_api_client/v2/model/o_auth_client_registration_request.py deleted file mode 100644 index 545537cd2d..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_client_registration_request.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.o_auth_client_registration_grant_type import OAuthClientRegistrationGrantType - from datadog_api_client.v2.model.o_auth_client_registration_response_type import OAuthClientRegistrationResponseType - - -class OAuthClientRegistrationRequest(ModelNormal): - validations = { - "client_name": { - "max_length": 1000, - }, - "client_uri": { - "max_length": 1000, - }, - "jwks_uri": { - "max_length": 1000, - }, - "logo_uri": { - "max_length": 1000, - }, - "policy_uri": { - "max_length": 1000, - }, - "scope": { - "max_length": 1000, - }, - "token_endpoint_auth_method": { - "max_length": 20, - }, - "tos_uri": { - "max_length": 1000, - }, - } - - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.o_auth_client_registration_grant_type import OAuthClientRegistrationGrantType - from datadog_api_client.v2.model.o_auth_client_registration_response_type import ( - OAuthClientRegistrationResponseType, - ) - - return { - "client_name": (str,), - "client_uri": (str,), - "grant_types": ([OAuthClientRegistrationGrantType],), - "jwks_uri": (str,), - "logo_uri": (str,), - "policy_uri": (str,), - "redirect_uris": ([str],), - "response_types": ([OAuthClientRegistrationResponseType],), - "scope": (str,), - "token_endpoint_auth_method": (str,), - "tos_uri": (str,), - } - - attribute_map = { - "client_name": "client_name", - "client_uri": "client_uri", - "grant_types": "grant_types", - "jwks_uri": "jwks_uri", - "logo_uri": "logo_uri", - "policy_uri": "policy_uri", - "redirect_uris": "redirect_uris", - "response_types": "response_types", - "scope": "scope", - "token_endpoint_auth_method": "token_endpoint_auth_method", - "tos_uri": "tos_uri", - } - - def __init__( - self_, - client_name: str, - redirect_uris: List[str], - client_uri: Union[str, UnsetType] = unset, - grant_types: Union[List[OAuthClientRegistrationGrantType], UnsetType] = unset, - jwks_uri: Union[str, UnsetType] = unset, - logo_uri: Union[str, UnsetType] = unset, - policy_uri: Union[str, UnsetType] = unset, - response_types: Union[List[OAuthClientRegistrationResponseType], UnsetType] = unset, - scope: Union[str, UnsetType] = unset, - token_endpoint_auth_method: Union[str, UnsetType] = unset, - tos_uri: Union[str, UnsetType] = unset, - **kwargs, - ): - """ - Request payload for OAuth2 dynamic client registration as defined by RFC 7591. - - :param client_name: Human-readable name of the client. Control characters are rejected. - :type client_name: str - - :param client_uri: URL of the home page of the client. - :type client_uri: str, optional - - :param grant_types: OAuth 2.0 grant types the client may use. - Defaults to ``authorization_code`` and ``refresh_token`` when omitted. - :type grant_types: [OAuthClientRegistrationGrantType], optional - - :param jwks_uri: URL referencing the client's JSON Web Key Set. - :type jwks_uri: str, optional - - :param logo_uri: URL referencing a logo for the client. - :type logo_uri: str, optional - - :param policy_uri: URL pointing to the client's privacy policy. - :type policy_uri: str, optional - - :param redirect_uris: Array of redirection URI strings used by the client in redirect-based flows. - :type redirect_uris: [str] - - :param response_types: OAuth 2.0 response types the client may use. Only ``code`` is supported. - :type response_types: [OAuthClientRegistrationResponseType], optional - - :param scope: Space-separated list of scope values the client may request. - :type scope: str, optional - - :param token_endpoint_auth_method: Requested authentication method for the token endpoint. Only ``none`` is supported. - :type token_endpoint_auth_method: str, optional - - :param tos_uri: URL pointing to the client's terms of service. - :type tos_uri: str, optional - """ - if client_uri is not unset: - kwargs["client_uri"] = client_uri - if grant_types is not unset: - kwargs["grant_types"] = grant_types - if jwks_uri is not unset: - kwargs["jwks_uri"] = jwks_uri - if logo_uri is not unset: - kwargs["logo_uri"] = logo_uri - if policy_uri is not unset: - kwargs["policy_uri"] = policy_uri - if response_types is not unset: - kwargs["response_types"] = response_types - if scope is not unset: - kwargs["scope"] = scope - if token_endpoint_auth_method is not unset: - kwargs["token_endpoint_auth_method"] = token_endpoint_auth_method - if tos_uri is not unset: - kwargs["tos_uri"] = tos_uri - super().__init__(kwargs) - - self_.client_name = client_name - self_.redirect_uris = redirect_uris diff --git a/src/datadog_api_client/v2/model/o_auth_client_registration_response.py b/src/datadog_api_client/v2/model/o_auth_client_registration_response.py deleted file mode 100644 index 4f8d54ed9c..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_client_registration_response.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - UUID, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.o_auth_client_registration_grant_type import OAuthClientRegistrationGrantType - from datadog_api_client.v2.model.o_auth_client_registration_response_type import OAuthClientRegistrationResponseType - - -class OAuthClientRegistrationResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.o_auth_client_registration_grant_type import OAuthClientRegistrationGrantType - from datadog_api_client.v2.model.o_auth_client_registration_response_type import ( - OAuthClientRegistrationResponseType, - ) - - return { - "client_id": (UUID,), - "client_name": (str,), - "grant_types": ([OAuthClientRegistrationGrantType],), - "redirect_uris": ([str],), - "response_types": ([OAuthClientRegistrationResponseType],), - "token_endpoint_auth_method": (str,), - } - - attribute_map = { - "client_id": "client_id", - "client_name": "client_name", - "grant_types": "grant_types", - "redirect_uris": "redirect_uris", - "response_types": "response_types", - "token_endpoint_auth_method": "token_endpoint_auth_method", - } - - def __init__( - self_, - client_id: UUID, - client_name: str, - grant_types: List[OAuthClientRegistrationGrantType], - redirect_uris: List[str], - response_types: List[OAuthClientRegistrationResponseType], - token_endpoint_auth_method: str, - **kwargs, - ): - """ - Response payload for a successful OAuth2 dynamic client registration as defined by RFC 7591. - - :param client_id: Unique identifier assigned to the registered client. - :type client_id: UUID - - :param client_name: Human-readable name of the client. - :type client_name: str - - :param grant_types: OAuth 2.0 grant types registered for the client. - :type grant_types: [OAuthClientRegistrationGrantType] - - :param redirect_uris: Redirection URIs registered for the client. - :type redirect_uris: [str] - - :param response_types: OAuth 2.0 response types registered for the client. - :type response_types: [OAuthClientRegistrationResponseType] - - :param token_endpoint_auth_method: Authentication method registered for the token endpoint. Always ``none``. - :type token_endpoint_auth_method: str - """ - super().__init__(kwargs) - - self_.client_id = client_id - self_.client_name = client_name - self_.grant_types = grant_types - self_.redirect_uris = redirect_uris - self_.response_types = response_types - self_.token_endpoint_auth_method = token_endpoint_auth_method diff --git a/src/datadog_api_client/v2/model/o_auth_client_registration_response_type.py b/src/datadog_api_client/v2/model/o_auth_client_registration_response_type.py deleted file mode 100644 index 32b5f3c5a2..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_client_registration_response_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OAuthClientRegistrationResponseType(ModelSimple): - """ - OAuth 2.0 response type that a registered client may use. - - :param value: If omitted defaults to "code". Must be one of ["code"]. - :type value: str - """ - - allowed_values = { - "code", - } - CODE: ClassVar["OAuthClientRegistrationResponseType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OAuthClientRegistrationResponseType.CODE = OAuthClientRegistrationResponseType("code") diff --git a/src/datadog_api_client/v2/model/o_auth_oidc_scope.py b/src/datadog_api_client/v2/model/o_auth_oidc_scope.py deleted file mode 100644 index 6243ad84c2..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_oidc_scope.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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 datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OAuthOidcScope(ModelSimple): - """ - OIDC scope a client may be restricted to. - - :param value: Must be one of ["openid", "profile", "email", "offline_access"]. - :type value: str - """ - - allowed_values = { - "openid", - "profile", - "email", - "offline_access", - } - OPENID: ClassVar["OAuthOidcScope"] - PROFILE: ClassVar["OAuthOidcScope"] - EMAIL: ClassVar["OAuthOidcScope"] - OFFLINE_ACCESS: ClassVar["OAuthOidcScope"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OAuthOidcScope.OPENID = OAuthOidcScope("openid") -OAuthOidcScope.PROFILE = OAuthOidcScope("profile") -OAuthOidcScope.EMAIL = OAuthOidcScope("email") -OAuthOidcScope.OFFLINE_ACCESS = OAuthOidcScope("offline_access") diff --git a/src/datadog_api_client/v2/model/o_auth_scopes_restriction.py b/src/datadog_api_client/v2/model/o_auth_scopes_restriction.py deleted file mode 100644 index f4774fa527..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_scopes_restriction.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.o_auth_oidc_scope import OAuthOidcScope - - -class OAuthScopesRestriction(ModelNormal): - _nullable = True - - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.o_auth_oidc_scope import OAuthOidcScope - - return { - "oidc_scopes": ([OAuthOidcScope],), - "permission_scopes": ([str],), - } - - attribute_map = { - "oidc_scopes": "oidc_scopes", - "permission_scopes": "permission_scopes", - } - - def __init__(self_, oidc_scopes: List[OAuthOidcScope], permission_scopes: List[str], **kwargs): - """ - Allowlist of OIDC and permission scopes enforced for the OAuth2 client. - - :param oidc_scopes: OIDC scopes the client is restricted to. - :type oidc_scopes: [OAuthOidcScope] - - :param permission_scopes: Datadog permission scopes the client is restricted to. - :type permission_scopes: [str] - """ - super().__init__(kwargs) - - self_.oidc_scopes = oidc_scopes - self_.permission_scopes = permission_scopes diff --git a/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response.py b/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response.py deleted file mode 100644 index 82c84c3439..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.o_auth_scopes_restriction_response_data import OAuthScopesRestrictionResponseData - - -class OAuthScopesRestrictionResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.o_auth_scopes_restriction_response_data import ( - OAuthScopesRestrictionResponseData, - ) - - return { - "data": (OAuthScopesRestrictionResponseData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: OAuthScopesRestrictionResponseData, **kwargs): - """ - Response payload describing the scopes restriction of an OAuth2 client. - - :param data: Data object of an OAuth2 client scopes restriction response. - :type data: OAuthScopesRestrictionResponseData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_attributes.py b/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_attributes.py deleted file mode 100644 index 4cd1104bf3..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_attributes.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - none_type, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.o_auth_scopes_restriction import OAuthScopesRestriction - - -class OAuthScopesRestrictionResponseAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.o_auth_scopes_restriction import OAuthScopesRestriction - - return { - "required_permission_scopes": ([str], none_type), - "scopes_restriction": (OAuthScopesRestriction,), - } - - attribute_map = { - "required_permission_scopes": "required_permission_scopes", - "scopes_restriction": "scopes_restriction", - } - - def __init__( - self_, - required_permission_scopes: Union[List[str], none_type], - scopes_restriction: Union[OAuthScopesRestriction, none_type], - **kwargs, - ): - """ - Attributes of an OAuth2 client scopes restriction. - - :param required_permission_scopes: Permission scopes automatically required for this client (for example, mobile-app permission scopes). - Returns ``null`` when no scopes are required. - :type required_permission_scopes: [str], none_type - - :param scopes_restriction: Allowlist of OIDC and permission scopes enforced for the OAuth2 client. - :type scopes_restriction: OAuthScopesRestriction, none_type - """ - super().__init__(kwargs) - - self_.required_permission_scopes = required_permission_scopes - self_.scopes_restriction = scopes_restriction diff --git a/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_data.py b/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_data.py deleted file mode 100644 index c2987b439c..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_data.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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 TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - UUID, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.o_auth_scopes_restriction_response_attributes import ( - OAuthScopesRestrictionResponseAttributes, - ) - from datadog_api_client.v2.model.o_auth_scopes_restriction_type import OAuthScopesRestrictionType - - -class OAuthScopesRestrictionResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.o_auth_scopes_restriction_response_attributes import ( - OAuthScopesRestrictionResponseAttributes, - ) - from datadog_api_client.v2.model.o_auth_scopes_restriction_type import OAuthScopesRestrictionType - - return { - "attributes": (OAuthScopesRestrictionResponseAttributes,), - "id": (UUID,), - "type": (OAuthScopesRestrictionType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__( - self_, - attributes: OAuthScopesRestrictionResponseAttributes, - id: UUID, - type: OAuthScopesRestrictionType, - **kwargs, - ): - """ - Data object of an OAuth2 client scopes restriction response. - - :param attributes: Attributes of an OAuth2 client scopes restriction. - :type attributes: OAuthScopesRestrictionResponseAttributes - - :param id: UUID of the OAuth2 client this restriction applies to. - :type id: UUID - - :param type: JSON:API resource type for an OAuth2 client scopes restriction. - :type type: OAuthScopesRestrictionType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/o_auth_scopes_restriction_type.py b/src/datadog_api_client/v2/model/o_auth_scopes_restriction_type.py deleted file mode 100644 index ff83d7845c..0000000000 --- a/src/datadog_api_client/v2/model/o_auth_scopes_restriction_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class OAuthScopesRestrictionType(ModelSimple): - """ - JSON:API resource type for an OAuth2 client scopes restriction. - - :param value: If omitted defaults to "scopes_restriction". Must be one of ["scopes_restriction"]. - :type value: str - """ - - allowed_values = { - "scopes_restriction", - } - SCOPES_RESTRICTION: ClassVar["OAuthScopesRestrictionType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OAuthScopesRestrictionType.SCOPES_RESTRICTION = OAuthScopesRestrictionType("scopes_restriction") diff --git a/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data.py b/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data.py deleted file mode 100644 index 2b85b7c964..0000000000 --- a/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data_attributes import ( - UpsertOAuthScopesRestrictionDataAttributes, - ) - from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_type import UpsertOAuthScopesRestrictionType - - -class UpsertOAuthScopesRestrictionData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data_attributes import ( - UpsertOAuthScopesRestrictionDataAttributes, - ) - from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_type import UpsertOAuthScopesRestrictionType - - return { - "attributes": (UpsertOAuthScopesRestrictionDataAttributes,), - "type": (UpsertOAuthScopesRestrictionType,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__( - self_, - type: UpsertOAuthScopesRestrictionType, - attributes: Union[UpsertOAuthScopesRestrictionDataAttributes, UnsetType] = unset, - **kwargs, - ): - """ - Data object of an upsert OAuth2 scopes restriction request. - - :param attributes: Attributes of an upsert OAuth2 scopes restriction request. - :type attributes: UpsertOAuthScopesRestrictionDataAttributes, optional - - :param type: JSON:API resource type for an upsert OAuth2 client scopes restriction request. - :type type: UpsertOAuthScopesRestrictionType - """ - if attributes is not unset: - kwargs["attributes"] = attributes - super().__init__(kwargs) - - self_.type = type diff --git a/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data_attributes.py b/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data_attributes.py deleted file mode 100644 index 61c8166bf7..0000000000 --- a/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data_attributes.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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, Union, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.o_auth_oidc_scope import OAuthOidcScope - - -class UpsertOAuthScopesRestrictionDataAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.o_auth_oidc_scope import OAuthOidcScope - - return { - "oidc_scopes": ([OAuthOidcScope],), - "permission_scopes": ([str],), - } - - attribute_map = { - "oidc_scopes": "oidc_scopes", - "permission_scopes": "permission_scopes", - } - - def __init__( - self_, - oidc_scopes: Union[List[OAuthOidcScope], UnsetType] = unset, - permission_scopes: Union[List[str], UnsetType] = unset, - **kwargs, - ): - """ - Attributes of an upsert OAuth2 scopes restriction request. - - :param oidc_scopes: OIDC scopes the client is allowed to request. - :type oidc_scopes: [OAuthOidcScope], optional - - :param permission_scopes: Datadog permission scopes the client is allowed to request. - Each value must be a valid permission name. - :type permission_scopes: [str], optional - """ - if oidc_scopes is not unset: - kwargs["oidc_scopes"] = oidc_scopes - if permission_scopes is not unset: - kwargs["permission_scopes"] = permission_scopes - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_request.py b/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_request.py deleted file mode 100644 index 6b2c3a492b..0000000000 --- a/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data import UpsertOAuthScopesRestrictionData - - -class UpsertOAuthScopesRestrictionRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data import UpsertOAuthScopesRestrictionData - - return { - "data": (UpsertOAuthScopesRestrictionData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: UpsertOAuthScopesRestrictionData, **kwargs): - """ - Request payload for creating or updating the scopes restriction of an OAuth2 client. - - :param data: Data object of an upsert OAuth2 scopes restriction request. - :type data: UpsertOAuthScopesRestrictionData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_type.py b/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_type.py deleted file mode 100644 index fe790e56b3..0000000000 --- a/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_type.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class UpsertOAuthScopesRestrictionType(ModelSimple): - """ - JSON:API resource type for an upsert OAuth2 client scopes restriction request. - - :param value: If omitted defaults to "upsert_scopes_restriction". Must be one of ["upsert_scopes_restriction"]. - :type value: str - """ - - allowed_values = { - "upsert_scopes_restriction", - } - UPSERT_SCOPES_RESTRICTION: ClassVar["UpsertOAuthScopesRestrictionType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -UpsertOAuthScopesRestrictionType.UPSERT_SCOPES_RESTRICTION = UpsertOAuthScopesRestrictionType( - "upsert_scopes_restriction" -) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 651c6d0431..73ad5c5d31 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -4396,19 +4396,6 @@ from datadog_api_client.v2.model.nullable_relationship_to_user_data import NullableRelationshipToUserData from datadog_api_client.v2.model.nullable_user_relationship import NullableUserRelationship from datadog_api_client.v2.model.nullable_user_relationship_data import NullableUserRelationshipData -from datadog_api_client.v2.model.o_auth_client_registration_error import OAuthClientRegistrationError -from datadog_api_client.v2.model.o_auth_client_registration_grant_type import OAuthClientRegistrationGrantType -from datadog_api_client.v2.model.o_auth_client_registration_request import OAuthClientRegistrationRequest -from datadog_api_client.v2.model.o_auth_client_registration_response import OAuthClientRegistrationResponse -from datadog_api_client.v2.model.o_auth_client_registration_response_type import OAuthClientRegistrationResponseType -from datadog_api_client.v2.model.o_auth_oidc_scope import OAuthOidcScope -from datadog_api_client.v2.model.o_auth_scopes_restriction import OAuthScopesRestriction -from datadog_api_client.v2.model.o_auth_scopes_restriction_response import OAuthScopesRestrictionResponse -from datadog_api_client.v2.model.o_auth_scopes_restriction_response_attributes import ( - OAuthScopesRestrictionResponseAttributes, -) -from datadog_api_client.v2.model.o_auth_scopes_restriction_response_data import OAuthScopesRestrictionResponseData -from datadog_api_client.v2.model.o_auth_scopes_restriction_type import OAuthScopesRestrictionType from datadog_api_client.v2.model.oci_config import OCIConfig from datadog_api_client.v2.model.oci_config_attributes import OCIConfigAttributes from datadog_api_client.v2.model.oci_config_type import OCIConfigType @@ -8235,12 +8222,6 @@ from datadog_api_client.v2.model.upsert_cloud_inventory_sync_config_request_data import ( UpsertCloudInventorySyncConfigRequestData, ) -from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data import UpsertOAuthScopesRestrictionData -from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_data_attributes import ( - UpsertOAuthScopesRestrictionDataAttributes, -) -from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_request import UpsertOAuthScopesRestrictionRequest -from datadog_api_client.v2.model.upsert_o_auth_scopes_restriction_type import UpsertOAuthScopesRestrictionType from datadog_api_client.v2.model.urgency import Urgency from datadog_api_client.v2.model.url_param import UrlParam from datadog_api_client.v2.model.url_param_update import UrlParamUpdate @@ -11780,17 +11761,6 @@ "NullableRelationshipToUserData", "NullableUserRelationship", "NullableUserRelationshipData", - "OAuthClientRegistrationError", - "OAuthClientRegistrationGrantType", - "OAuthClientRegistrationRequest", - "OAuthClientRegistrationResponse", - "OAuthClientRegistrationResponseType", - "OAuthOidcScope", - "OAuthScopesRestriction", - "OAuthScopesRestrictionResponse", - "OAuthScopesRestrictionResponseAttributes", - "OAuthScopesRestrictionResponseData", - "OAuthScopesRestrictionType", "OCIConfig", "OCIConfigAttributes", "OCIConfigType", @@ -14197,10 +14167,6 @@ "UpsertCloudInventorySyncConfigRequest", "UpsertCloudInventorySyncConfigRequestAttributes", "UpsertCloudInventorySyncConfigRequestData", - "UpsertOAuthScopesRestrictionData", - "UpsertOAuthScopesRestrictionDataAttributes", - "UpsertOAuthScopesRestrictionRequest", - "UpsertOAuthScopesRestrictionType", "Urgency", "UrlParam", "UrlParamUpdate", diff --git a/tests/v2/features/oauth2_client_public.feature b/tests/v2/features/oauth2_client_public.feature deleted file mode 100644 index a5c7d195ef..0000000000 --- a/tests/v2/features/oauth2_client_public.feature +++ /dev/null @@ -1,100 +0,0 @@ -@endpoint(oauth2-client-public) @endpoint(oauth2-client-public-v2) -Feature: OAuth2 Client Public - Configure OAuth2 clients for Datadog. Supports RFC 7591 Dynamic Client - Registration and management of OAuth2 client scopes restrictions. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "OAuth2ClientPublic" API - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Delete an OAuth2 client scopes restriction returns "Bad Request" response - Given operation "DeleteScopesRestriction" enabled - And new "DeleteScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Delete an OAuth2 client scopes restriction returns "No Content" response - Given operation "DeleteScopesRestriction" enabled - And new "DeleteScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Delete an OAuth2 client scopes restriction returns "Not Found" response - Given operation "DeleteScopesRestriction" enabled - And new "DeleteScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Get an OAuth2 client scopes restriction returns "Bad Request" response - Given operation "GetScopesRestriction" enabled - And new "GetScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Get an OAuth2 client scopes restriction returns "Not Found" response - Given operation "GetScopesRestriction" enabled - And new "GetScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Get an OAuth2 client scopes restriction returns "OK" response - Given operation "GetScopesRestriction" enabled - And new "GetScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Register an OAuth2 client returns "Bad Request" response - Given operation "RegisterOAuthClient" enabled - And new "RegisterOAuthClient" request - And body with value {"client_name": "Example MCP Client", "client_uri": "https://example.com", "grant_types": ["authorization_code", "refresh_token"], "jwks_uri": "https://example.com/.well-known/jwks.json", "logo_uri": "https://example.com/logo.png", "policy_uri": "https://example.com/privacy", "redirect_uris": ["https://example.com/oauth/callback"], "response_types": ["code"], "scope": "openid profile", "token_endpoint_auth_method": "none", "tos_uri": "https://example.com/tos"} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Register an OAuth2 client returns "Created" response - Given operation "RegisterOAuthClient" enabled - And new "RegisterOAuthClient" request - And body with value {"client_name": "Example MCP Client", "client_uri": "https://example.com", "grant_types": ["authorization_code", "refresh_token"], "jwks_uri": "https://example.com/.well-known/jwks.json", "logo_uri": "https://example.com/logo.png", "policy_uri": "https://example.com/privacy", "redirect_uris": ["https://example.com/oauth/callback"], "response_types": ["code"], "scope": "openid profile", "token_endpoint_auth_method": "none", "tos_uri": "https://example.com/tos"} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Upsert an OAuth2 client scopes restriction returns "Bad Request" response - Given operation "UpsertScopesRestriction" enabled - And new "UpsertScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Upsert an OAuth2 client scopes restriction returns "Not Found" response - Given operation "UpsertScopesRestriction" enabled - And new "UpsertScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/delegated-auth-login - Scenario: Upsert an OAuth2 client scopes restriction returns "OK" response - Given operation "UpsertScopesRestriction" enabled - And new "UpsertScopesRestriction" request - And request contains "client_uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}} - When the request is sent - Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index b55e20fd7e..d86d61c228 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -4666,30 +4666,6 @@ "type": "safe" } }, - "DeleteScopesRestriction": { - "tag": "OAuth2 Client Public", - "undo": { - "type": "idempotent" - } - }, - "GetScopesRestriction": { - "tag": "OAuth2 Client Public", - "undo": { - "type": "safe" - } - }, - "UpsertScopesRestriction": { - "tag": "OAuth2 Client Public", - "undo": { - "type": "idempotent" - } - }, - "RegisterOAuthClient": { - "tag": "OAuth2 Client Public", - "undo": { - "type": "idempotent" - } - }, "ListPipelines": { "tag": "Observability Pipelines", "undo": {