From 144dfe227c5fc9290bf13d5456858b3598d5317c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 28 May 2026 15:02:42 +0000 Subject: [PATCH] Regenerate client from commit 597f461 of spec repo --- .generator/schemas/v2/openapi.yaml | 863 ++++++++++++++++++ docs/datadog_api_client.v2.api.rst | 7 + docs/datadog_api_client.v2.model.rst | 161 ++++ .../DeleteCostTagDescriptionByKey.py | 13 + .../GenerateCostTagDescriptionByKey.py | 15 + .../GetCostTagDescriptionByKey.py | 15 + .../UpsertCostTagDescriptionByKey.py | 28 + .../DeleteScopesRestriction.py | 15 + .../GetScopesRestriction.py | 17 + .../RegisterOAuthClient.py | 38 + .../UpsertScopesRestriction.py | 40 + src/datadog_api_client/configuration.py | 4 + .../v2/api/cloud_cost_management_api.py | 194 ++++ .../v2/api/o_auth2_client_public_api.py | 191 ++++ src/datadog_api_client/v2/apis/__init__.py | 2 + .../v2/model/cost_tag_description_response.py | 40 + .../cost_tag_description_upsert_request.py | 42 + ...ost_tag_description_upsert_request_data.py | 67 ++ ...cription_upsert_request_data_attributes.py | 43 + .../generate_cost_tag_description_response.py | 40 + .../model/generated_cost_tag_description.py | 64 ++ ...nerated_cost_tag_description_attributes.py | 33 + .../generated_cost_tag_description_type.py | 37 + .../model/o_auth_client_registration_error.py | 39 + .../o_auth_client_registration_grant_type.py | 38 + .../o_auth_client_registration_request.py | 157 ++++ .../o_auth_client_registration_response.py | 84 ++ ..._auth_client_registration_response_type.py | 35 + .../v2/model/o_auth_oidc_scope.py | 44 + .../v2/model/o_auth_scopes_restriction.py | 48 + .../o_auth_scopes_restriction_response.py | 42 + ..._scopes_restriction_response_attributes.py | 53 ++ ...o_auth_scopes_restriction_response_data.py | 65 ++ .../model/o_auth_scopes_restriction_type.py | 35 + .../upsert_o_auth_scopes_restriction_data.py | 60 ++ ...auth_scopes_restriction_data_attributes.py | 55 ++ ...psert_o_auth_scopes_restriction_request.py | 40 + .../upsert_o_auth_scopes_restriction_type.py | 37 + src/datadog_api_client/v2/models/__init__.py | 52 ++ .../v2/features/cloud_cost_management.feature | 65 ++ .../v2/features/oauth2_client_public.feature | 100 ++ tests/v2/features/undo.json | 48 + 42 files changed, 3066 insertions(+) create mode 100644 examples/v2/cloud-cost-management/DeleteCostTagDescriptionByKey.py create mode 100644 examples/v2/cloud-cost-management/GenerateCostTagDescriptionByKey.py create mode 100644 examples/v2/cloud-cost-management/GetCostTagDescriptionByKey.py create mode 100644 examples/v2/cloud-cost-management/UpsertCostTagDescriptionByKey.py create mode 100644 examples/v2/oauth2-client-public/DeleteScopesRestriction.py create mode 100644 examples/v2/oauth2-client-public/GetScopesRestriction.py create mode 100644 examples/v2/oauth2-client-public/RegisterOAuthClient.py create mode 100644 examples/v2/oauth2-client-public/UpsertScopesRestriction.py create mode 100644 src/datadog_api_client/v2/api/o_auth2_client_public_api.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_description_response.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_description_upsert_request.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_description_upsert_request_data.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_description_upsert_request_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/generate_cost_tag_description_response.py create mode 100644 src/datadog_api_client/v2/model/generated_cost_tag_description.py create mode 100644 src/datadog_api_client/v2/model/generated_cost_tag_description_attributes.py create mode 100644 src/datadog_api_client/v2/model/generated_cost_tag_description_type.py create mode 100644 src/datadog_api_client/v2/model/o_auth_client_registration_error.py create mode 100644 src/datadog_api_client/v2/model/o_auth_client_registration_grant_type.py create mode 100644 src/datadog_api_client/v2/model/o_auth_client_registration_request.py create mode 100644 src/datadog_api_client/v2/model/o_auth_client_registration_response.py create mode 100644 src/datadog_api_client/v2/model/o_auth_client_registration_response_type.py create mode 100644 src/datadog_api_client/v2/model/o_auth_oidc_scope.py create mode 100644 src/datadog_api_client/v2/model/o_auth_scopes_restriction.py create mode 100644 src/datadog_api_client/v2/model/o_auth_scopes_restriction_response.py create mode 100644 src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_attributes.py create mode 100644 src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_data.py create mode 100644 src/datadog_api_client/v2/model/o_auth_scopes_restriction_type.py create mode 100644 src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data.py create mode 100644 src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_request.py create mode 100644 src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_type.py create mode 100644 tests/v2/features/oauth2_client_public.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index dede702aea..bc16917af1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1034,6 +1034,15 @@ 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" @@ -19553,6 +19562,25 @@ components: - tag_key - updated_at type: object + CostTagDescriptionResponse: + description: Single Cloud Cost Management tag key description returned by the get-by-key endpoint. + example: + data: + attributes: + cloud: aws + created_at: "2026-01-01T12:00:00Z" + description: AWS account that owns this cost. + source: human + tag_key: account_id + updated_at: "2026-01-01T12:00:00Z" + id: account_id + type: cost_tag_description + properties: + data: + $ref: "#/components/schemas/CostTagDescription" + required: + - data + type: object CostTagDescriptionSource: description: Origin of the description. `human` indicates the description was written by a user, `ai_generated` was produced by AI, and `datadog` is a default supplied by Datadog. enum: @@ -19574,6 +19602,50 @@ components: type: string x-enum-varnames: - COST_TAG_DESCRIPTION + CostTagDescriptionUpsertRequest: + description: Request body for creating or updating a Cloud Cost Management tag key description. + example: + data: + attributes: + cloud: aws + description: AWS account that owns this cost. + id: account_id + type: cost_tag_description + properties: + data: + $ref: "#/components/schemas/CostTagDescriptionUpsertRequestData" + required: + - data + type: object + CostTagDescriptionUpsertRequestData: + description: Resource envelope carrying the tag key description being upserted. The `id` is informational; the authoritative tag key is taken from the URL path. + properties: + attributes: + $ref: "#/components/schemas/CostTagDescriptionUpsertRequestDataAttributes" + id: + description: Identifier of the tag key the description applies to. Matches the `tag_key` path parameter. + example: account_id + type: string + type: + $ref: "#/components/schemas/CostTagDescriptionType" + required: + - attributes + - type + type: object + CostTagDescriptionUpsertRequestDataAttributes: + description: Mutable attributes set when creating or updating a Cloud Cost Management tag key description. + properties: + cloud: + description: Cloud provider this description applies to (for example, `aws`). Omit to set the cross-cloud default for the tag key. + example: aws + type: string + description: + description: The human-readable description for the tag key. + example: AWS account that owns this cost. + type: string + required: + - description + type: object CostTagDescriptionsResponse: description: List of Cloud Cost Management tag key descriptions for the organization, optionally filtered to a single cloud provider. example: @@ -35598,6 +35670,55 @@ components: required: - type type: object + GenerateCostTagDescriptionResponse: + description: Response wrapping an AI-generated Cloud Cost Management tag key description. + example: + data: + attributes: + description: AWS account that owns this cost. + id: account_id + type: cost_generated_tag_description + properties: + data: + $ref: "#/components/schemas/GeneratedCostTagDescription" + required: + - data + type: object + GeneratedCostTagDescription: + description: AI-generated Cloud Cost Management tag key description returned by the generate endpoint. The result is returned to the client but is not persisted by this endpoint. + properties: + attributes: + $ref: "#/components/schemas/GeneratedCostTagDescriptionAttributes" + id: + description: The tag key the AI description was generated for. + example: account_id + type: string + type: + $ref: "#/components/schemas/GeneratedCostTagDescriptionType" + required: + - attributes + - id + - type + type: object + GeneratedCostTagDescriptionAttributes: + description: Attributes of an AI-generated Cloud Cost Management tag key description. + properties: + description: + description: The AI-generated description for the tag key. + example: AWS account that owns this cost. + type: string + required: + - description + type: object + GeneratedCostTagDescriptionType: + default: cost_generated_tag_description + description: Type of the AI-generated Cloud Cost Management tag description resource. + enum: + - cost_generated_tag_description + example: cost_generated_tag_description + type: string + x-enum-varnames: + - COST_GENERATED_TAG_DESCRIPTION GetActionConnectionResponse: description: The response for found connection properties: @@ -54649,6 +54770,256 @@ 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: @@ -92269,6 +92640,57 @@ 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: @@ -110944,6 +111366,226 @@ paths: operator: OR permissions: - cloud_cost_management_read + /api/v2/cost/tag_descriptions/{tag_key}: + delete: + description: Delete a Cloud Cost Management tag key description. When `cloud` is omitted, deletes every description for the tag key, falling back to Datadog's global default when available. When `cloud` is provided, deletes only the description scoped to that cloud provider. + operationId: DeleteCostTagDescriptionByKey + parameters: + - description: The tag key whose description is being deleted. + in: path + name: tag_key + required: true + schema: + type: string + - description: Cloud provider to scope the deletion to (for example, `aws`). Omit to delete every description for the tag key. + in: query + name: cloud + required: false + schema: + type: string + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Delete a Cloud Cost Management tag description + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_write + get: + description: Get the Cloud Cost Management description for a single tag key. Use `filter[cloud]` to scope the lookup to a specific cloud provider; when omitted, the response resolves the description in fallback order (cloud-specific organization override, then cloudless organization default, then Datadog's global default). + operationId: GetCostTagDescriptionByKey + parameters: + - description: The tag key whose description is being fetched. + in: path + name: tag_key + required: true + schema: + type: string + - description: Cloud provider to scope the lookup to (for example, `aws`). Omit to use the resolved fallback. + in: query + name: filter[cloud] + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cloud: aws + created_at: "2026-01-01T12:00:00Z" + description: AWS account that owns this cost. + source: human + tag_key: account_id + updated_at: "2026-01-01T12:00:00Z" + id: account_id + type: cost_tag_description + schema: + $ref: "#/components/schemas/CostTagDescriptionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get a Cloud Cost Management tag description + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read + put: + description: Create or update a Cloud Cost Management tag key description. The new description and optional cloud scoping are supplied in the request body. Omit `cloud` to set a cross-cloud default for the tag key. + operationId: UpsertCostTagDescriptionByKey + parameters: + - description: The tag key whose description is being upserted. + in: path + name: tag_key + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + cloud: aws + description: AWS account that owns this cost. + id: account_id + type: cost_tag_description + schema: + $ref: "#/components/schemas/CostTagDescriptionUpsertRequest" + required: true + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Upsert a Cloud Cost Management tag description + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_write + /api/v2/cost/tag_descriptions/{tag_key}/generate: + get: + description: Use AI to draft a Cloud Cost Management tag key description based on associated cost data. The generated description is returned in the response and is not persisted by this endpoint; follow up with `UpsertCostTagDescriptionByKey` to save it. + operationId: GenerateCostTagDescriptionByKey + parameters: + - description: The tag key to generate an AI description for. + in: path + name: tag_key + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + description: AWS account that owns this cost. + id: account_id + type: cost_generated_tag_description + schema: + $ref: "#/components/schemas/GenerateCostTagDescriptionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Generate a Cloud Cost Management tag description + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read /api/v2/cost/tag_keys: get: description: List Cloud Cost Management tag keys. @@ -134428,6 +135070,223 @@ 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. @@ -167842,6 +168701,10 @@ 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 b983e4d251..6189ddfe73 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -473,6 +473,13 @@ 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 8c6243db4a..73b2f7504f 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -7732,6 +7732,13 @@ datadog\_api\_client.v2.model.cost\_tag\_description\_attributes module :members: :show-inheritance: +datadog\_api\_client.v2.model.cost\_tag\_description\_response module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_description_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.cost\_tag\_description\_source module ------------------------------------------------------------------- @@ -7746,6 +7753,27 @@ datadog\_api\_client.v2.model.cost\_tag\_description\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.cost\_tag\_description\_upsert\_request module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_description_upsert_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_description\_upsert\_request\_data module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_description_upsert_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_description\_upsert\_request\_data\_attributes module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_description_upsert_request_data_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.cost\_tag\_descriptions\_response module ---------------------------------------------------------------------- @@ -14634,6 +14662,34 @@ datadog\_api\_client.v2.model.gemini\_integration\_update module :members: :show-inheritance: +datadog\_api\_client.v2.model.generate\_cost\_tag\_description\_response module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.generate_cost_tag_description_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.generated\_cost\_tag\_description module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.generated_cost_tag_description + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.generated\_cost\_tag\_description\_attributes module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.generated_cost_tag_description_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.generated\_cost\_tag\_description\_type module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.generated_cost_tag_description_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.get\_action\_connection\_response module ---------------------------------------------------------------------- @@ -23447,6 +23503,83 @@ 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 ------------------------------------------------------------ @@ -40261,6 +40394,34 @@ 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/cloud-cost-management/DeleteCostTagDescriptionByKey.py b/examples/v2/cloud-cost-management/DeleteCostTagDescriptionByKey.py new file mode 100644 index 0000000000..b77277960c --- /dev/null +++ b/examples/v2/cloud-cost-management/DeleteCostTagDescriptionByKey.py @@ -0,0 +1,13 @@ +""" +Delete a Cloud Cost Management tag description returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + api_instance.delete_cost_tag_description_by_key( + tag_key="tag_key", + ) diff --git a/examples/v2/cloud-cost-management/GenerateCostTagDescriptionByKey.py b/examples/v2/cloud-cost-management/GenerateCostTagDescriptionByKey.py new file mode 100644 index 0000000000..53b0e6ab7a --- /dev/null +++ b/examples/v2/cloud-cost-management/GenerateCostTagDescriptionByKey.py @@ -0,0 +1,15 @@ +""" +Generate a Cloud Cost Management tag description returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + response = api_instance.generate_cost_tag_description_by_key( + tag_key="tag_key", + ) + + print(response) diff --git a/examples/v2/cloud-cost-management/GetCostTagDescriptionByKey.py b/examples/v2/cloud-cost-management/GetCostTagDescriptionByKey.py new file mode 100644 index 0000000000..57eacf6829 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostTagDescriptionByKey.py @@ -0,0 +1,15 @@ +""" +Get a Cloud Cost Management tag description returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + response = api_instance.get_cost_tag_description_by_key( + tag_key="tag_key", + ) + + print(response) diff --git a/examples/v2/cloud-cost-management/UpsertCostTagDescriptionByKey.py b/examples/v2/cloud-cost-management/UpsertCostTagDescriptionByKey.py new file mode 100644 index 0000000000..0c3b19897d --- /dev/null +++ b/examples/v2/cloud-cost-management/UpsertCostTagDescriptionByKey.py @@ -0,0 +1,28 @@ +""" +Upsert a Cloud Cost Management tag description returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi +from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType +from datadog_api_client.v2.model.cost_tag_description_upsert_request import CostTagDescriptionUpsertRequest +from datadog_api_client.v2.model.cost_tag_description_upsert_request_data import CostTagDescriptionUpsertRequestData +from datadog_api_client.v2.model.cost_tag_description_upsert_request_data_attributes import ( + CostTagDescriptionUpsertRequestDataAttributes, +) + +body = CostTagDescriptionUpsertRequest( + data=CostTagDescriptionUpsertRequestData( + attributes=CostTagDescriptionUpsertRequestDataAttributes( + cloud="aws", + description="AWS account that owns this cost.", + ), + id="account_id", + type=CostTagDescriptionType.COST_TAG_DESCRIPTION, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + api_instance.upsert_cost_tag_description_by_key(tag_key="tag_key", body=body) diff --git a/examples/v2/oauth2-client-public/DeleteScopesRestriction.py b/examples/v2/oauth2-client-public/DeleteScopesRestriction.py new file mode 100644 index 0000000000..86101a3d85 --- /dev/null +++ b/examples/v2/oauth2-client-public/DeleteScopesRestriction.py @@ -0,0 +1,15 @@ +""" +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 new file mode 100644 index 0000000000..5e4dde568c --- /dev/null +++ b/examples/v2/oauth2-client-public/GetScopesRestriction.py @@ -0,0 +1,17 @@ +""" +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 new file mode 100644 index 0000000000..106acdbc6c --- /dev/null +++ b/examples/v2/oauth2-client-public/RegisterOAuthClient.py @@ -0,0 +1,38 @@ +""" +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 new file mode 100644 index 0000000000..ecda5c6b40 --- /dev/null +++ b/examples/v2/oauth2-client-public/UpsertScopesRestriction.py @@ -0,0 +1,40 @@ +""" +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 3b007a97f4..5df4e9829f 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -578,6 +578,10 @@ 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/cloud_cost_management_api.py b/src/datadog_api_client/v2/api/cloud_cost_management_api.py index 87248097b9..8bc5d60063 100644 --- a/src/datadog_api_client/v2/api/cloud_cost_management_api.py +++ b/src/datadog_api_client/v2/api/cloud_cost_management_api.py @@ -59,6 +59,9 @@ from datadog_api_client.v2.model.cost_recommendation_array import CostRecommendationArray from datadog_api_client.v2.model.recommendations_filter_request import RecommendationsFilterRequest from datadog_api_client.v2.model.cost_tag_descriptions_response import CostTagDescriptionsResponse +from datadog_api_client.v2.model.cost_tag_description_response import CostTagDescriptionResponse +from datadog_api_client.v2.model.cost_tag_description_upsert_request import CostTagDescriptionUpsertRequest +from datadog_api_client.v2.model.generate_cost_tag_description_response import GenerateCostTagDescriptionResponse from datadog_api_client.v2.model.cost_tag_keys_response import CostTagKeysResponse from datadog_api_client.v2.model.cost_tag_key_response import CostTagKeyResponse from datadog_api_client.v2.model.cost_tag_key_metadata_response import CostTagKeyMetadataResponse @@ -281,6 +284,34 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._delete_cost_tag_description_by_key_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_descriptions/{tag_key}", + "operation_id": "delete_cost_tag_description_by_key", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "tag_key": { + "required": True, + "openapi_types": (str,), + "attribute": "tag_key", + "location": "path", + }, + "cloud": { + "openapi_types": (str,), + "attribute": "cloud", + "location": "query", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._delete_custom_allocation_rule_endpoint = _Endpoint( settings={ "response_type": None, @@ -350,6 +381,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._generate_cost_tag_description_by_key_endpoint = _Endpoint( + settings={ + "response_type": (GenerateCostTagDescriptionResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_descriptions/{tag_key}/generate", + "operation_id": "generate_cost_tag_description_by_key", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "tag_key": { + "required": True, + "openapi_types": (str,), + "attribute": "tag_key", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_budget_endpoint = _Endpoint( settings={ "response_type": (BudgetWithEntries,), @@ -848,6 +902,34 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_cost_tag_description_by_key_endpoint = _Endpoint( + settings={ + "response_type": (CostTagDescriptionResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_descriptions/{tag_key}", + "operation_id": "get_cost_tag_description_by_key", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "tag_key": { + "required": True, + "openapi_types": (str,), + "attribute": "tag_key", + "location": "path", + }, + "filter_cloud": { + "openapi_types": (str,), + "attribute": "filter[cloud]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_cost_tag_key_endpoint = _Endpoint( settings={ "response_type": (CostTagKeyResponse,), @@ -1734,6 +1816,32 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._upsert_cost_tag_description_by_key_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_descriptions/{tag_key}", + "operation_id": "upsert_cost_tag_description_by_key", + "http_method": "PUT", + "version": "v2", + }, + params_map={ + "tag_key": { + "required": True, + "openapi_types": (str,), + "attribute": "tag_key", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (CostTagDescriptionUpsertRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._validate_budget_endpoint = _Endpoint( settings={ "response_type": (BudgetValidationResponse,), @@ -1952,6 +2060,30 @@ def delete_cost_gcp_usage_cost_config( return self._delete_cost_gcp_usage_cost_config_endpoint.call_with_http_info(**kwargs) + def delete_cost_tag_description_by_key( + self, + tag_key: str, + *, + cloud: Union[str, UnsetType] = unset, + ) -> None: + """Delete a Cloud Cost Management tag description. + + Delete a Cloud Cost Management tag key description. When ``cloud`` is omitted, deletes every description for the tag key, falling back to Datadog's global default when available. When ``cloud`` is provided, deletes only the description scoped to that cloud provider. + + :param tag_key: The tag key whose description is being deleted. + :type tag_key: str + :param cloud: Cloud provider to scope the deletion to (for example, ``aws`` ). Omit to delete every description for the tag key. + :type cloud: str, optional + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["tag_key"] = tag_key + + if cloud is not unset: + kwargs["cloud"] = cloud + + return self._delete_cost_tag_description_by_key_endpoint.call_with_http_info(**kwargs) + def delete_custom_allocation_rule( self, rule_id: int, @@ -2003,6 +2135,23 @@ def delete_tag_pipelines_ruleset( return self._delete_tag_pipelines_ruleset_endpoint.call_with_http_info(**kwargs) + def generate_cost_tag_description_by_key( + self, + tag_key: str, + ) -> GenerateCostTagDescriptionResponse: + """Generate a Cloud Cost Management tag description. + + Use AI to draft a Cloud Cost Management tag key description based on associated cost data. The generated description is returned in the response and is not persisted by this endpoint; follow up with ``UpsertCostTagDescriptionByKey`` to save it. + + :param tag_key: The tag key to generate an AI description for. + :type tag_key: str + :rtype: GenerateCostTagDescriptionResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["tag_key"] = tag_key + + return self._generate_cost_tag_description_by_key_endpoint.call_with_http_info(**kwargs) + def get_budget( self, budget_id: str, @@ -2418,6 +2567,30 @@ def get_cost_gcp_usage_cost_config( return self._get_cost_gcp_usage_cost_config_endpoint.call_with_http_info(**kwargs) + def get_cost_tag_description_by_key( + self, + tag_key: str, + *, + filter_cloud: Union[str, UnsetType] = unset, + ) -> CostTagDescriptionResponse: + """Get a Cloud Cost Management tag description. + + Get the Cloud Cost Management description for a single tag key. Use ``filter[cloud]`` to scope the lookup to a specific cloud provider; when omitted, the response resolves the description in fallback order (cloud-specific organization override, then cloudless organization default, then Datadog's global default). + + :param tag_key: The tag key whose description is being fetched. + :type tag_key: str + :param filter_cloud: Cloud provider to scope the lookup to (for example, ``aws`` ). Omit to use the resolved fallback. + :type filter_cloud: str, optional + :rtype: CostTagDescriptionResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["tag_key"] = tag_key + + if filter_cloud is not unset: + kwargs["filter_cloud"] = filter_cloud + + return self._get_cost_tag_description_by_key_endpoint.call_with_http_info(**kwargs) + def get_cost_tag_key( self, tag_key: str, @@ -3200,6 +3373,27 @@ def upsert_budget( return self._upsert_budget_endpoint.call_with_http_info(**kwargs) + def upsert_cost_tag_description_by_key( + self, + tag_key: str, + body: CostTagDescriptionUpsertRequest, + ) -> None: + """Upsert a Cloud Cost Management tag description. + + Create or update a Cloud Cost Management tag key description. The new description and optional cloud scoping are supplied in the request body. Omit ``cloud`` to set a cross-cloud default for the tag key. + + :param tag_key: The tag key whose description is being upserted. + :type tag_key: str + :type body: CostTagDescriptionUpsertRequest + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["tag_key"] = tag_key + + kwargs["body"] = body + + return self._upsert_cost_tag_description_by_key_endpoint.call_with_http_info(**kwargs) + def validate_budget( self, body: BudgetValidationRequest, 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 new file mode 100644 index 0000000000..fb59506fc6 --- /dev/null +++ b/src/datadog_api_client/v2/api/o_auth2_client_public_api.py @@ -0,0 +1,191 @@ +# 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 6f2ebf73d1..0e18bb1881 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -65,6 +65,7 @@ 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 @@ -181,6 +182,7 @@ "ModelLabAPIApi", "MonitorsApi", "NetworkDeviceMonitoringApi", + "OAuth2ClientPublicApi", "OCIIntegrationApi", "ObservabilityPipelinesApi", "OktaIntegrationApi", diff --git a/src/datadog_api_client/v2/model/cost_tag_description_response.py b/src/datadog_api_client/v2/model/cost_tag_description_response.py new file mode 100644 index 0000000000..59cc9424ef --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_description_response.py @@ -0,0 +1,40 @@ +# 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.cost_tag_description import CostTagDescription + + +class CostTagDescriptionResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_description import CostTagDescription + + return { + "data": (CostTagDescription,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: CostTagDescription, **kwargs): + """ + Single Cloud Cost Management tag key description returned by the get-by-key endpoint. + + :param data: A Cloud Cost Management tag key description, either cross-cloud or scoped to a single cloud provider. + :type data: CostTagDescription + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/cost_tag_description_upsert_request.py b/src/datadog_api_client/v2/model/cost_tag_description_upsert_request.py new file mode 100644 index 0000000000..6c737374ca --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_description_upsert_request.py @@ -0,0 +1,42 @@ +# 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.cost_tag_description_upsert_request_data import CostTagDescriptionUpsertRequestData + + +class CostTagDescriptionUpsertRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_description_upsert_request_data import ( + CostTagDescriptionUpsertRequestData, + ) + + return { + "data": (CostTagDescriptionUpsertRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: CostTagDescriptionUpsertRequestData, **kwargs): + """ + Request body for creating or updating a Cloud Cost Management tag key description. + + :param data: Resource envelope carrying the tag key description being upserted. The ``id`` is informational; the authoritative tag key is taken from the URL path. + :type data: CostTagDescriptionUpsertRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/cost_tag_description_upsert_request_data.py b/src/datadog_api_client/v2/model/cost_tag_description_upsert_request_data.py new file mode 100644 index 0000000000..8235562357 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_description_upsert_request_data.py @@ -0,0 +1,67 @@ +# 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.cost_tag_description_upsert_request_data_attributes import ( + CostTagDescriptionUpsertRequestDataAttributes, + ) + from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType + + +class CostTagDescriptionUpsertRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_description_upsert_request_data_attributes import ( + CostTagDescriptionUpsertRequestDataAttributes, + ) + from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType + + return { + "attributes": (CostTagDescriptionUpsertRequestDataAttributes,), + "id": (str,), + "type": (CostTagDescriptionType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: CostTagDescriptionUpsertRequestDataAttributes, + type: CostTagDescriptionType, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Resource envelope carrying the tag key description being upserted. The ``id`` is informational; the authoritative tag key is taken from the URL path. + + :param attributes: Mutable attributes set when creating or updating a Cloud Cost Management tag key description. + :type attributes: CostTagDescriptionUpsertRequestDataAttributes + + :param id: Identifier of the tag key the description applies to. Matches the ``tag_key`` path parameter. + :type id: str, optional + + :param type: Type of the Cloud Cost Management tag description resource. + :type type: CostTagDescriptionType + """ + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/cost_tag_description_upsert_request_data_attributes.py b/src/datadog_api_client/v2/model/cost_tag_description_upsert_request_data_attributes.py new file mode 100644 index 0000000000..37d6e9cee8 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_description_upsert_request_data_attributes.py @@ -0,0 +1,43 @@ +# 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 + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class CostTagDescriptionUpsertRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "cloud": (str,), + "description": (str,), + } + + attribute_map = { + "cloud": "cloud", + "description": "description", + } + + def __init__(self_, description: str, cloud: Union[str, UnsetType] = unset, **kwargs): + """ + Mutable attributes set when creating or updating a Cloud Cost Management tag key description. + + :param cloud: Cloud provider this description applies to (for example, ``aws`` ). Omit to set the cross-cloud default for the tag key. + :type cloud: str, optional + + :param description: The human-readable description for the tag key. + :type description: str + """ + if cloud is not unset: + kwargs["cloud"] = cloud + super().__init__(kwargs) + + self_.description = description diff --git a/src/datadog_api_client/v2/model/generate_cost_tag_description_response.py b/src/datadog_api_client/v2/model/generate_cost_tag_description_response.py new file mode 100644 index 0000000000..3fc515cb79 --- /dev/null +++ b/src/datadog_api_client/v2/model/generate_cost_tag_description_response.py @@ -0,0 +1,40 @@ +# 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.generated_cost_tag_description import GeneratedCostTagDescription + + +class GenerateCostTagDescriptionResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.generated_cost_tag_description import GeneratedCostTagDescription + + return { + "data": (GeneratedCostTagDescription,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: GeneratedCostTagDescription, **kwargs): + """ + Response wrapping an AI-generated Cloud Cost Management tag key description. + + :param data: AI-generated Cloud Cost Management tag key description returned by the generate endpoint. The result is returned to the client but is not persisted by this endpoint. + :type data: GeneratedCostTagDescription + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/generated_cost_tag_description.py b/src/datadog_api_client/v2/model/generated_cost_tag_description.py new file mode 100644 index 0000000000..ac8195f3f2 --- /dev/null +++ b/src/datadog_api_client/v2/model/generated_cost_tag_description.py @@ -0,0 +1,64 @@ +# 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.generated_cost_tag_description_attributes import ( + GeneratedCostTagDescriptionAttributes, + ) + from datadog_api_client.v2.model.generated_cost_tag_description_type import GeneratedCostTagDescriptionType + + +class GeneratedCostTagDescription(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.generated_cost_tag_description_attributes import ( + GeneratedCostTagDescriptionAttributes, + ) + from datadog_api_client.v2.model.generated_cost_tag_description_type import GeneratedCostTagDescriptionType + + return { + "attributes": (GeneratedCostTagDescriptionAttributes,), + "id": (str,), + "type": (GeneratedCostTagDescriptionType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: GeneratedCostTagDescriptionAttributes, + id: str, + type: GeneratedCostTagDescriptionType, + **kwargs, + ): + """ + AI-generated Cloud Cost Management tag key description returned by the generate endpoint. The result is returned to the client but is not persisted by this endpoint. + + :param attributes: Attributes of an AI-generated Cloud Cost Management tag key description. + :type attributes: GeneratedCostTagDescriptionAttributes + + :param id: The tag key the AI description was generated for. + :type id: str + + :param type: Type of the AI-generated Cloud Cost Management tag description resource. + :type type: GeneratedCostTagDescriptionType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/generated_cost_tag_description_attributes.py b/src/datadog_api_client/v2/model/generated_cost_tag_description_attributes.py new file mode 100644 index 0000000000..f104e08f69 --- /dev/null +++ b/src/datadog_api_client/v2/model/generated_cost_tag_description_attributes.py @@ -0,0 +1,33 @@ +# 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 GeneratedCostTagDescriptionAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "description": (str,), + } + + attribute_map = { + "description": "description", + } + + def __init__(self_, description: str, **kwargs): + """ + Attributes of an AI-generated Cloud Cost Management tag key description. + + :param description: The AI-generated description for the tag key. + :type description: str + """ + super().__init__(kwargs) + + self_.description = description diff --git a/src/datadog_api_client/v2/model/generated_cost_tag_description_type.py b/src/datadog_api_client/v2/model/generated_cost_tag_description_type.py new file mode 100644 index 0000000000..775090aee7 --- /dev/null +++ b/src/datadog_api_client/v2/model/generated_cost_tag_description_type.py @@ -0,0 +1,37 @@ +# 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 GeneratedCostTagDescriptionType(ModelSimple): + """ + Type of the AI-generated Cloud Cost Management tag description resource. + + :param value: If omitted defaults to "cost_generated_tag_description". Must be one of ["cost_generated_tag_description"]. + :type value: str + """ + + allowed_values = { + "cost_generated_tag_description", + } + COST_GENERATED_TAG_DESCRIPTION: ClassVar["GeneratedCostTagDescriptionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +GeneratedCostTagDescriptionType.COST_GENERATED_TAG_DESCRIPTION = GeneratedCostTagDescriptionType( + "cost_generated_tag_description" +) 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 new file mode 100644 index 0000000000..541a138237 --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_client_registration_error.py @@ -0,0 +1,39 @@ +# 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 new file mode 100644 index 0000000000..1a36fa31ef --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_client_registration_grant_type.py @@ -0,0 +1,38 @@ +# 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 new file mode 100644 index 0000000000..545537cd2d --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_client_registration_request.py @@ -0,0 +1,157 @@ +# 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 new file mode 100644 index 0000000000..4f8d54ed9c --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_client_registration_response.py @@ -0,0 +1,84 @@ +# 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 new file mode 100644 index 0000000000..32b5f3c5a2 --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_client_registration_response_type.py @@ -0,0 +1,35 @@ +# 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 new file mode 100644 index 0000000000..6243ad84c2 --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_oidc_scope.py @@ -0,0 +1,44 @@ +# 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 new file mode 100644 index 0000000000..f4774fa527 --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_scopes_restriction.py @@ -0,0 +1,48 @@ +# 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 new file mode 100644 index 0000000000..82c84c3439 --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response.py @@ -0,0 +1,42 @@ +# 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 new file mode 100644 index 0000000000..4cd1104bf3 --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_attributes.py @@ -0,0 +1,53 @@ +# 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 new file mode 100644 index 0000000000..c2987b439c --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_scopes_restriction_response_data.py @@ -0,0 +1,65 @@ +# 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 new file mode 100644 index 0000000000..ff83d7845c --- /dev/null +++ b/src/datadog_api_client/v2/model/o_auth_scopes_restriction_type.py @@ -0,0 +1,35 @@ +# 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 new file mode 100644 index 0000000000..2b85b7c964 --- /dev/null +++ b/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data.py @@ -0,0 +1,60 @@ +# 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 new file mode 100644 index 0000000000..61c8166bf7 --- /dev/null +++ b/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_data_attributes.py @@ -0,0 +1,55 @@ +# 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 new file mode 100644 index 0000000000..6b2c3a492b --- /dev/null +++ b/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_request.py @@ -0,0 +1,40 @@ +# 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 new file mode 100644 index 0000000000..fe790e56b3 --- /dev/null +++ b/src/datadog_api_client/v2/model/upsert_o_auth_scopes_restriction_type.py @@ -0,0 +1,37 @@ +# 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 43f1649b2a..c35c6dbd27 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1412,8 +1412,14 @@ from datadog_api_client.v2.model.cost_tag_attributes import CostTagAttributes from datadog_api_client.v2.model.cost_tag_description import CostTagDescription from datadog_api_client.v2.model.cost_tag_description_attributes import CostTagDescriptionAttributes +from datadog_api_client.v2.model.cost_tag_description_response import CostTagDescriptionResponse from datadog_api_client.v2.model.cost_tag_description_source import CostTagDescriptionSource from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType +from datadog_api_client.v2.model.cost_tag_description_upsert_request import CostTagDescriptionUpsertRequest +from datadog_api_client.v2.model.cost_tag_description_upsert_request_data import CostTagDescriptionUpsertRequestData +from datadog_api_client.v2.model.cost_tag_description_upsert_request_data_attributes import ( + CostTagDescriptionUpsertRequestDataAttributes, +) from datadog_api_client.v2.model.cost_tag_descriptions_response import CostTagDescriptionsResponse from datadog_api_client.v2.model.cost_tag_key import CostTagKey from datadog_api_client.v2.model.cost_tag_key_attributes import CostTagKeyAttributes @@ -2742,6 +2748,10 @@ from datadog_api_client.v2.model.gemini_integration import GeminiIntegration from datadog_api_client.v2.model.gemini_integration_type import GeminiIntegrationType from datadog_api_client.v2.model.gemini_integration_update import GeminiIntegrationUpdate +from datadog_api_client.v2.model.generate_cost_tag_description_response import GenerateCostTagDescriptionResponse +from datadog_api_client.v2.model.generated_cost_tag_description import GeneratedCostTagDescription +from datadog_api_client.v2.model.generated_cost_tag_description_attributes import GeneratedCostTagDescriptionAttributes +from datadog_api_client.v2.model.generated_cost_tag_description_type import GeneratedCostTagDescriptionType from datadog_api_client.v2.model.get_action_connection_response import GetActionConnectionResponse from datadog_api_client.v2.model.get_app_key_registration_response import GetAppKeyRegistrationResponse from datadog_api_client.v2.model.get_app_response import GetAppResponse @@ -4399,6 +4409,19 @@ 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 @@ -8234,6 +8257,12 @@ 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 @@ -9531,8 +9560,12 @@ "CostTagAttributes", "CostTagDescription", "CostTagDescriptionAttributes", + "CostTagDescriptionResponse", "CostTagDescriptionSource", "CostTagDescriptionType", + "CostTagDescriptionUpsertRequest", + "CostTagDescriptionUpsertRequestData", + "CostTagDescriptionUpsertRequestDataAttributes", "CostTagDescriptionsResponse", "CostTagKey", "CostTagKeyAttributes", @@ -10517,6 +10550,10 @@ "GeminiIntegration", "GeminiIntegrationType", "GeminiIntegrationUpdate", + "GenerateCostTagDescriptionResponse", + "GeneratedCostTagDescription", + "GeneratedCostTagDescriptionAttributes", + "GeneratedCostTagDescriptionType", "GetActionConnectionResponse", "GetAppKeyRegistrationResponse", "GetAppResponse", @@ -11776,6 +11813,17 @@ "NullableRelationshipToUserData", "NullableUserRelationship", "NullableUserRelationshipData", + "OAuthClientRegistrationError", + "OAuthClientRegistrationGrantType", + "OAuthClientRegistrationRequest", + "OAuthClientRegistrationResponse", + "OAuthClientRegistrationResponseType", + "OAuthOidcScope", + "OAuthScopesRestriction", + "OAuthScopesRestrictionResponse", + "OAuthScopesRestrictionResponseAttributes", + "OAuthScopesRestrictionResponseData", + "OAuthScopesRestrictionType", "OCIConfig", "OCIConfigAttributes", "OCIConfigType", @@ -14185,6 +14233,10 @@ "UpsertCloudInventorySyncConfigRequest", "UpsertCloudInventorySyncConfigRequestAttributes", "UpsertCloudInventorySyncConfigRequestData", + "UpsertOAuthScopesRestrictionData", + "UpsertOAuthScopesRestrictionDataAttributes", + "UpsertOAuthScopesRestrictionRequest", + "UpsertOAuthScopesRestrictionType", "Urgency", "UrlParam", "UrlParamUpdate", diff --git a/tests/v2/features/cloud_cost_management.feature b/tests/v2/features/cloud_cost_management.feature index b41928f4cb..535fe88d7c 100644 --- a/tests/v2/features/cloud_cost_management.feature +++ b/tests/v2/features/cloud_cost_management.feature @@ -190,6 +190,20 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Delete a Cloud Cost Management tag description returns "Bad Request" response + Given new "DeleteCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Delete a Cloud Cost Management tag description returns "No Content" response + Given new "DeleteCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + @team:DataDog/cloud-cost-management Scenario: Delete a budget returns "Bad Request" response Given new "DeleteBudget" request @@ -218,6 +232,20 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 204 No Content + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Generate a Cloud Cost Management tag description returns "Bad Request" response + Given new "GenerateCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Generate a Cloud Cost Management tag description returns "OK" response + Given new "GenerateCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: Get Custom Costs File returns "OK" response Given new "GetCustomCostsFile" request @@ -250,6 +278,27 @@ Feature: Cloud Cost Management And the response "data.type" is equal to "gcp_uc_config" And the response "data.attributes.account_id" is equal to "123456_ABCDEF_123ABC" + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get a Cloud Cost Management tag description returns "Bad Request" response + Given new "GetCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get a Cloud Cost Management tag description returns "Not Found" response + Given new "GetCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Get a Cloud Cost Management tag description returns "OK" response + Given new "GetCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management Scenario: Get a Cloud Cost Management tag key returns "Bad Request" response Given new "GetCostTagKey" request @@ -873,6 +922,22 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 400 Bad Request + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Upsert a Cloud Cost Management tag description returns "Bad Request" response + Given new "UpsertCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cloud": "aws", "description": "AWS account that owns this cost."}, "id": "account_id", "type": "cost_tag_description"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Upsert a Cloud Cost Management tag description returns "No Content" response + Given new "UpsertCostTagDescriptionByKey" request + And request contains "tag_key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cloud": "aws", "description": "AWS account that owns this cost."}, "id": "account_id", "type": "cost_tag_description"}} + When the request is sent + Then the response status is 204 No Content + @generated @skip @team:DataDog/cloud-cost-management Scenario: Validate CSV budget returns "OK" response Given new "ValidateCsvBudget" request diff --git a/tests/v2/features/oauth2_client_public.feature b/tests/v2/features/oauth2_client_public.feature new file mode 100644 index 0000000000..a5c7d195ef --- /dev/null +++ b/tests/v2/features/oauth2_client_public.feature @@ -0,0 +1,100 @@ +@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 0878797ffd..30001c2fcc 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1874,6 +1874,30 @@ "type": "safe" } }, + "DeleteCostTagDescriptionByKey": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "GetCostTagDescriptionByKey": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "UpsertCostTagDescriptionByKey": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "GenerateCostTagDescriptionByKey": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "ListCostTagKeys": { "tag": "Cloud Cost Management", "undo": { @@ -4678,6 +4702,30 @@ "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": {