diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index dede702aea..a26fc1aec8 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" @@ -27850,6 +27859,304 @@ components: format: int64 type: integer type: object + DeviceBaseArray: + description: Response body for the list devices endpoint. + properties: + data: + description: List of devices matching the request. + items: + $ref: "#/components/schemas/DeviceBaseData" + type: array + required: + - data + type: object + DeviceBaseData: + description: A single device entry as returned by the list devices endpoint. + properties: + attributes: + $ref: "#/components/schemas/DeviceBaseDataAttributes" + id: + description: Unique identifier of the device. Matches the Datadog host identifier. + example: LAPTOP-DEMO-001 + type: string + type: + $ref: "#/components/schemas/DeviceDetailsDataType" + required: + - type + - id + type: object + DeviceBaseDataAttributes: + description: Common health and identity attributes shared by every End User Device Monitoring device record. + properties: + agent_key: + description: Public key of the Datadog Agent installed on the device. + type: string + agent_version: + description: Version of the Datadog Agent installed on the device. + type: string + battery_max_capacity_pct: + description: Maximum battery capacity expressed as a percentage of the device's design capacity. + format: int64 + type: integer + cpu_cores: + description: Number of physical CPU cores on the device. + format: int64 + type: integer + cpu_logical_processors: + description: Number of logical CPU processors (hardware threads) on the device. + format: int64 + type: integer + cpu_model: + description: Human-readable name of the device's CPU model. + type: string + cpu_usage: + description: Average CPU usage on the device, as a percentage between 0 and 100. + format: double + type: number + disk_usage: + description: Average disk usage on the device, as a percentage between 0 and 100. + format: double + type: number + ip_address: + description: Last observed IPv4 or IPv6 address of the device. + type: string + issues: + description: |- + List of issue identifiers currently affecting the device. + References entries returned by the issues endpoint. + items: + description: Identifier of a single issue currently affecting the device. + type: string + type: array + kernel_name: + description: Name of the operating system kernel running on the device. + type: string + last_seen: + description: Timestamp of the most recent telemetry received from the device, in RFC 3339 format. + type: string + manufacturer: + description: Manufacturer of the device. + type: string + mem_usage: + description: Average memory usage on the device, as a percentage between 0 and 100. + format: double + type: number + memory_total_kb: + description: Total amount of physical memory available on the device, in kilobytes. + format: int64 + type: integer + model_name: + description: Marketing or product name of the device model. + type: string + model_number: + description: Manufacturer-assigned model number of the device. + type: string + os: + description: Operating system family running on the device (for example, `mac`, `windows`, or `linux`). + type: string + os_version: + description: Operating system version running on the device. + type: string + resource_id: + description: Datadog resource identifier for the device. + type: string + serial_number: + description: Serial number assigned to the device by its manufacturer. + type: string + status: + description: Health status of the device computed from its issues and recent telemetry. + type: string + type: + description: Hardware type of the device (for example, `laptop`, `desktop`, or `mobile`). + type: string + uptime: + description: Time elapsed since the device last booted, in seconds. + format: double + type: number + wlan_bssid: + description: |- + BSSID (MAC address of the access point) of the wireless network the device is + currently connected to. + type: string + wlan_rssi: + description: Received signal strength indicator of the device's current wireless connection, in dBm. + format: double + type: number + wlan_ssid: + description: SSID of the wireless network the device is currently connected to. + type: string + type: object + DeviceDetails: + description: Response body for the get device endpoint, returning a single device with full attribute detail. + properties: + data: + $ref: "#/components/schemas/DeviceDetailsData" + type: object + DeviceDetailsData: + description: A single device entry with full attribute detail. + properties: + attributes: + $ref: "#/components/schemas/DeviceDetailsDataAttributes" + id: + description: Unique identifier of the device. Matches the Datadog host identifier. + example: LAPTOP-DEMO-001 + type: string + type: + $ref: "#/components/schemas/DeviceDetailsDataType" + required: + - type + - id + type: object + DeviceDetailsDataAttributes: + description: |- + Extended set of attributes for a single End User Device Monitoring device, + including detailed network and battery metrics. + properties: + agent_key: + description: Public key of the Datadog Agent installed on the device. + type: string + agent_version: + description: Version of the Datadog Agent installed on the device. + type: string + battery_charge_pct: + description: Current battery charge level as a percentage between 0 and 100. + format: int64 + type: integer + battery_charge_rate: + description: |- + Rate at which the battery is charging or discharging, in milliamperes. + Negative values indicate discharge. + format: int64 + type: integer + battery_cycle_count: + description: Number of full charge cycles the battery has gone through. + format: int64 + type: integer + battery_max_capacity_pct: + description: Maximum battery capacity expressed as a percentage of the device's design capacity. + format: int64 + type: integer + cpu_cores: + description: Number of physical CPU cores on the device. + format: int64 + type: integer + cpu_logical_processors: + description: Number of logical CPU processors (hardware threads) on the device. + format: int64 + type: integer + cpu_model: + description: Human-readable name of the device's CPU model. + type: string + cpu_usage: + description: Average CPU usage on the device, as a percentage between 0 and 100. + format: double + type: number + disk_usage: + description: Average disk usage on the device, as a percentage between 0 and 100. + format: double + type: number + ip_address: + description: Last observed IPv4 or IPv6 address of the device. + type: string + issues: + description: |- + List of issue identifiers currently affecting the device. + References entries returned by the issues endpoint. + items: + description: Identifier of a single issue currently affecting the device. + type: string + type: array + kernel_name: + description: Name of the operating system kernel running on the device. + type: string + last_seen: + description: Timestamp of the most recent telemetry received from the device, in RFC 3339 format. + type: string + manufacturer: + description: Manufacturer of the device. + type: string + mem_usage: + description: Average memory usage on the device, as a percentage between 0 and 100. + format: double + type: number + memory_total_kb: + description: Total amount of physical memory available on the device, in kilobytes. + format: int64 + type: integer + model_name: + description: Marketing or product name of the device model. + type: string + model_number: + description: Manufacturer-assigned model number of the device. + type: string + os: + description: Operating system family running on the device (for example, `mac`, `windows`, or `linux`). + type: string + os_version: + description: Operating system version running on the device. + type: string + packets_in_drop: + description: Average rate of dropped inbound network packets, in packets per second. + format: double + type: number + packets_in_error: + description: Average rate of inbound network packets received with errors, in packets per second. + format: double + type: number + packets_out_drop: + description: Average rate of dropped outbound network packets, in packets per second. + format: double + type: number + packets_out_error: + description: Average rate of outbound network packets sent with errors, in packets per second. + format: double + type: number + resource_id: + description: Datadog resource identifier for the device. + type: string + serial_number: + description: Serial number assigned to the device by its manufacturer. + type: string + status: + description: Health status of the device computed from its issues and recent telemetry. + type: string + tcp_out_segs: + description: Average rate of TCP segments sent by the device, in segments per second. + format: double + type: number + tcp_retrans_segs: + description: Average rate of TCP segments retransmitted by the device, in segments per second. + format: double + type: number + type: + description: Hardware type of the device (for example, `laptop`, `desktop`, or `mobile`). + type: string + uptime: + description: Time elapsed since the device last booted, in seconds. + format: double + type: number + wlan_bssid: + description: |- + BSSID (MAC address of the access point) of the wireless network the device is + currently connected to. + type: string + wlan_rssi: + description: Received signal strength indicator of the device's current wireless connection, in dBm. + format: double + type: number + wlan_ssid: + description: SSID of the wireless network the device is currently connected to. + type: string + type: object + DeviceDetailsDataType: + default: devices + description: Devices resource type. + enum: + - devices + example: devices + type: string + x-enum-varnames: + - DEVICES DevicesListData: description: The devices list data properties: @@ -36945,6 +37252,66 @@ components: - id - type type: object + GraphItemArray: + description: Response body for the graph endpoint, returning per-grouping device counts. + properties: + data: + description: List of grouping entries with their associated device counts. + items: + $ref: "#/components/schemas/GraphItemData" + type: array + required: + - data + type: object + GraphItemData: + description: A single grouping entry in the End User Device Monitoring graph response. + properties: + attributes: + $ref: "#/components/schemas/GraphItemDataAttributes" + id: + description: Unique identifier of the grouping, derived from the grouping column. + example: macOS + type: string + type: + $ref: "#/components/schemas/GraphItemDataType" + required: + - type + - id + type: object + GraphItemDataAttributes: + description: Attributes of a single grouping in the End User Device Monitoring graph response. + properties: + counts: + description: List of per-value counts for the grouping column. + items: + $ref: "#/components/schemas/GraphItemDataAttributesCountsItems" + type: array + type: + description: Identifier of the grouping column (for example, `os` or `type`). + type: string + type: object + GraphItemDataAttributesCountsItems: + description: Count of devices for a single value of the grouping column in the End User Device Monitoring graph. + properties: + columnName: + description: |- + Value of the grouping column for this bucket (for example, an operating system + name or a device type). + type: string + count: + description: Number of devices that fall into this bucket. + format: int64 + type: integer + type: object + GraphItemDataType: + default: graph_items + description: Graph items resource type. + enum: + - graph_items + example: graph_items + type: string + x-enum-varnames: + - GRAPH_ITEMS GreyNoiseAPIKey: description: The definition of the `GreyNoiseAPIKey` object. properties: @@ -42037,6 +42404,61 @@ components: type: string x-enum-varnames: - CASE + IssueDefinitionArray: + description: Response body for the issues endpoint, returning all available device issue definitions. + properties: + data: + description: List of available issue definitions. + items: + $ref: "#/components/schemas/IssueDefinitionData" + type: array + required: + - data + type: object + IssueDefinitionData: + description: A single issue definition entry returned by the issues endpoint. + properties: + attributes: + $ref: "#/components/schemas/IssueDefinitionDataAttributes" + id: + description: Stable identifier of the issue definition, used in the `issues` field of a device record. + example: low-battery-capacity + type: string + type: + $ref: "#/components/schemas/IssueDefinitionDataType" + required: + - type + - id + type: object + IssueDefinitionDataAttributes: + description: Attributes of a single End User Device Monitoring issue definition. + properties: + category: + description: Category of the issue (for example, `battery`, `network`, or `performance`). + example: battery + type: string + label: + description: Human-readable label describing the issue, suitable for display in the Datadog UI. + example: Battery health is below 80% + type: string + level: + description: Severity level of the issue (for example, `warning` or `critical`). + example: warning + type: string + required: + - category + - label + - level + type: object + IssueDefinitionDataType: + default: issue_definitions + description: Issue definitions resource type. + enum: + - issue_definitions + example: issue_definitions + type: string + x-enum-varnames: + - ISSUE_DEFINITIONS IssueIncluded: description: An array of related resources, returned when the `include` query parameter is used. oneOf: @@ -54649,6 +55071,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: @@ -62639,6 +63311,54 @@ components: - ARRAY_NUMBER - ARRAY_BOOLEAN - ARRAY_OBJECT + OverviewItemArray: + description: |- + Response body for the overview endpoint, returning the tiles shown on the + End User Device Monitoring overview dashboard. + properties: + data: + description: List of overview tiles. + items: + $ref: "#/components/schemas/OverviewItemData" + type: array + required: + - data + type: object + OverviewItemData: + description: A single tile entry in the End User Device Monitoring overview response. + properties: + attributes: + $ref: "#/components/schemas/OverviewItemDataAttributes" + id: + description: Unique identifier of the overview tile. + example: total_devices + type: string + type: + $ref: "#/components/schemas/OverviewItemDataType" + required: + - type + - id + type: object + OverviewItemDataAttributes: + description: Attributes of a single tile in the End User Device Monitoring overview dashboard. + properties: + name: + description: Human-readable name of the overview tile. + type: string + value: + description: Numeric value displayed on the overview tile. + format: int64 + type: integer + type: object + OverviewItemDataType: + default: overview_items + description: Overview items resource type. + enum: + - overview_items + example: overview_items + type: string + x-enum-varnames: + - OVERVIEW_ITEMS OverwriteAllocationsRequest: description: Request to overwrite targeting rules (allocations) for a feature flag in an environment. properties: @@ -92269,6 +92989,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: @@ -115654,6 +116425,234 @@ paths: summary: Update the state of an issue tags: - Error Tracking + /api/v2/eudm/devices: + get: + operationId: GetEUDMDevices + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + cpu_usage: 12.4 + disk_usage: 38.2 + issues: [] + last_seen: "2026-05-20T10:15:30Z" + manufacturer: Apple + mem_usage: 47.1 + model_name: MacBook Pro + os: macOS + os_version: macOS 15.6.1 arm64 + status: healthy + id: LAPTOP-DEMO-001 + type: devices + schema: + $ref: "#/components/schemas/DeviceBaseArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get all devices + tags: + - End User Device Monitoring + /api/v2/eudm/devices/{device_id}: + get: + operationId: GetEUDMDevice + parameters: + - description: Unique identifier of the device to fetch. Matches the Datadog host identifier. + in: path + name: device_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + battery_charge_pct: 82 + battery_charge_rate: 1200 + battery_cycle_count: 134 + battery_max_capacity_pct: 96 + cpu_cores: 10 + cpu_logical_processors: 10 + cpu_model: Apple M1 Pro + cpu_usage: 12.4 + disk_usage: 38.2 + ip_address: 192.0.2.10 + issues: [] + kernel_name: Darwin + last_seen: "2026-05-20T10:15:30Z" + manufacturer: Apple + mem_usage: 47.1 + memory_total_kb: 16777216 + model_name: MacBook Pro + model_number: MacBookPro18,3 + os: macOS + os_version: macOS 15.6.1 arm64 + packets_in_drop: 0.0 + packets_in_error: 0.0 + packets_out_drop: 0.0 + packets_out_error: 0.0 + serial_number: TESTDEVICE001 + status: healthy + tcp_out_segs: 4321.0 + tcp_retrans_segs: 12.0 + uptime: 432000 + wlan_bssid: 00:00:5e:00:53:01 + wlan_rssi: -55.0 + wlan_ssid: corp-wifi + id: LAPTOP-DEMO-001 + type: devices + schema: + $ref: "#/components/schemas/DeviceDetails" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get a device + tags: + - End User Device Monitoring + /api/v2/eudm/graph: + get: + operationId: GetEUDMGraph + parameters: + - description: |- + Device attribute to group by (for example, `os` or `type`). + Determines which column the response counts are bucketed against. + in: query + name: by + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + counts: + - columnName: mac + count: 42 + - columnName: windows + count: 17 + - columnName: linux + count: 3 + type: os + id: os + type: graph_items + schema: + $ref: "#/components/schemas/GraphItemArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get device counts grouped by attribute + tags: + - End User Device Monitoring + /api/v2/eudm/issues: + get: + operationId: GetEUDMIssues + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + category: battery + label: Battery health is below 80% + level: warning + id: battery_low_health + type: issue_definitions + - attributes: + category: agent + label: Datadog Agent has not reported in over 24 hours + level: critical + id: agent_offline + type: issue_definitions + schema: + $ref: "#/components/schemas/IssueDefinitionArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get all device issue definitions + tags: + - End User Device Monitoring + /api/v2/eudm/overview: + get: + operationId: GetEUDMOverview + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + name: Total devices + value: 62 + id: total_devices + type: overview_items + - attributes: + name: Devices with issues + value: 4 + id: devices_with_issues + type: overview_items + schema: + $ref: "#/components/schemas/OverviewItemArray" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - hosts_read + - metrics_read + summary: Get overview tiles + tags: + - End User Device Monitoring /api/v2/events: get: description: |- @@ -134428,6 +135427,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. @@ -167676,6 +168892,10 @@ tags: scopes from alerting. Downtime settings, which can be scheduled with start and end times, prevent all alerting related to specified Datadog tags. name: Downtimes + - description: |- + Inspect devices reported by the Datadog Agent on end-user laptops, desktops, + and mobile devices, including their health, hardware, and connectivity attributes. + name: End User Device Monitoring - description: Manage per-integration configurations for the Internal Developer Portal (IDP). These configurations control which external resources (for example, GitHub repositories, Jira projects, or PagerDuty services) are synced as entities into the Software Catalog. name: Entity Integration Configs - description: Retrieves security risk scores for entities in your organization. @@ -167842,6 +169062,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..d9e392559f 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -284,6 +284,13 @@ datadog\_api\_client.v2.api.downtimes\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.end\_user\_device\_monitoring\_api module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.end_user_device_monitoring_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.entity\_integration\_configs\_api module -------------------------------------------------------------------- @@ -473,6 +480,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..5c9ef8dea2 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -11043,6 +11043,55 @@ datadog\_api\_client.v2.model.device\_attributes\_interface\_statuses module :members: :show-inheritance: +datadog\_api\_client.v2.model.device\_base\_array module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.device_base_array + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.device\_base\_data module +------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.device_base_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.device\_base\_data\_attributes module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.device_base_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.device\_details module +---------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.device_details + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.device\_details\_data module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.device_details_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.device\_details\_data\_attributes module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.device_details_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.device\_details\_data\_type module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.device_details_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.devices\_list\_data module -------------------------------------------------------- @@ -15369,6 +15418,41 @@ datadog\_api\_client.v2.model.google\_meet\_configuration\_reference\_data modul :members: :show-inheritance: +datadog\_api\_client.v2.model.graph\_item\_array module +------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.graph_item_array + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.graph\_item\_data module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.graph_item_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.graph\_item\_data\_attributes module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.graph_item_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.graph\_item\_data\_attributes\_counts\_items module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.graph_item_data_attributes_counts_items + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.graph\_item\_data\_type module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.graph_item_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.grey\_noise\_api\_key module ---------------------------------------------------------- @@ -17574,6 +17658,34 @@ datadog\_api\_client.v2.model.issue\_case\_resource\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.issue\_definition\_array module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.issue_definition_array + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.issue\_definition\_data module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.issue_definition_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.issue\_definition\_data\_attributes module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.issue_definition_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.issue\_definition\_data\_type module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.issue_definition_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.issue\_included module ---------------------------------------------------- @@ -23447,6 +23559,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 ------------------------------------------------------------ @@ -26989,6 +27178,34 @@ datadog\_api\_client.v2.model.output\_schema\_parameters\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.overview\_item\_array module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.overview_item_array + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.overview\_item\_data module +--------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.overview_item_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.overview\_item\_data\_attributes module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.overview_item_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.overview\_item\_data\_type module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.overview_item_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.overwrite\_allocations\_request module -------------------------------------------------------------------- @@ -40261,6 +40478,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/end-user-device-monitoring/GetEUDMDevice.py b/examples/v2/end-user-device-monitoring/GetEUDMDevice.py new file mode 100644 index 0000000000..599d7206f9 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMDevice.py @@ -0,0 +1,15 @@ +""" +Get a device returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = EndUserDeviceMonitoringApi(api_client) + response = api_instance.get_eudm_device( + device_id="device_id", + ) + + print(response) diff --git a/examples/v2/end-user-device-monitoring/GetEUDMDevices.py b/examples/v2/end-user-device-monitoring/GetEUDMDevices.py new file mode 100644 index 0000000000..0730c1129a --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMDevices.py @@ -0,0 +1,13 @@ +""" +Get all devices returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = EndUserDeviceMonitoringApi(api_client) + response = api_instance.get_eudm_devices() + + print(response) diff --git a/examples/v2/end-user-device-monitoring/GetEUDMGraph.py b/examples/v2/end-user-device-monitoring/GetEUDMGraph.py new file mode 100644 index 0000000000..f49c76a293 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMGraph.py @@ -0,0 +1,15 @@ +""" +Get device counts grouped by attribute returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = EndUserDeviceMonitoringApi(api_client) + response = api_instance.get_eudm_graph( + by="by", + ) + + print(response) diff --git a/examples/v2/end-user-device-monitoring/GetEUDMIssues.py b/examples/v2/end-user-device-monitoring/GetEUDMIssues.py new file mode 100644 index 0000000000..c11fdba446 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMIssues.py @@ -0,0 +1,13 @@ +""" +Get all device issue definitions returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = EndUserDeviceMonitoringApi(api_client) + response = api_instance.get_eudm_issues() + + print(response) diff --git a/examples/v2/end-user-device-monitoring/GetEUDMOverview.py b/examples/v2/end-user-device-monitoring/GetEUDMOverview.py new file mode 100644 index 0000000000..5817cb91c8 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMOverview.py @@ -0,0 +1,13 @@ +""" +Get overview tiles returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = EndUserDeviceMonitoringApi(api_client) + response = api_instance.get_eudm_overview() + + print(response) 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/end_user_device_monitoring_api.py b/src/datadog_api_client/v2/api/end_user_device_monitoring_api.py new file mode 100644 index 0000000000..8c5c8356b1 --- /dev/null +++ b/src/datadog_api_client/v2/api/end_user_device_monitoring_api.py @@ -0,0 +1,181 @@ +# 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.v2.model.device_base_array import DeviceBaseArray +from datadog_api_client.v2.model.device_details import DeviceDetails +from datadog_api_client.v2.model.graph_item_array import GraphItemArray +from datadog_api_client.v2.model.issue_definition_array import IssueDefinitionArray +from datadog_api_client.v2.model.overview_item_array import OverviewItemArray + + +class EndUserDeviceMonitoringApi: + """ + Inspect devices reported by the Datadog Agent on end-user laptops, desktops, + and mobile devices, including their health, hardware, and connectivity attributes. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._get_eudm_device_endpoint = _Endpoint( + settings={ + "response_type": (DeviceDetails,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/eudm/devices/{device_id}", + "operation_id": "get_eudm_device", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "device_id": { + "required": True, + "openapi_types": (str,), + "attribute": "device_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_eudm_devices_endpoint = _Endpoint( + settings={ + "response_type": (DeviceBaseArray,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/eudm/devices", + "operation_id": "get_eudm_devices", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_eudm_graph_endpoint = _Endpoint( + settings={ + "response_type": (GraphItemArray,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/eudm/graph", + "operation_id": "get_eudm_graph", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "by": { + "required": True, + "openapi_types": (str,), + "attribute": "by", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_eudm_issues_endpoint = _Endpoint( + settings={ + "response_type": (IssueDefinitionArray,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/eudm/issues", + "operation_id": "get_eudm_issues", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_eudm_overview_endpoint = _Endpoint( + settings={ + "response_type": (OverviewItemArray,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/eudm/overview", + "operation_id": "get_eudm_overview", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + def get_eudm_device( + self, + device_id: str, + ) -> DeviceDetails: + """Get a device. + + :param device_id: Unique identifier of the device to fetch. Matches the Datadog host identifier. + :type device_id: str + :rtype: DeviceDetails + """ + kwargs: Dict[str, Any] = {} + kwargs["device_id"] = device_id + + return self._get_eudm_device_endpoint.call_with_http_info(**kwargs) + + def get_eudm_devices( + self, + ) -> DeviceBaseArray: + """Get all devices. + + :rtype: DeviceBaseArray + """ + kwargs: Dict[str, Any] = {} + return self._get_eudm_devices_endpoint.call_with_http_info(**kwargs) + + def get_eudm_graph( + self, + by: str, + ) -> GraphItemArray: + """Get device counts grouped by attribute. + + :param by: Device attribute to group by (for example, ``os`` or ``type`` ). + Determines which column the response counts are bucketed against. + :type by: str + :rtype: GraphItemArray + """ + kwargs: Dict[str, Any] = {} + kwargs["by"] = by + + return self._get_eudm_graph_endpoint.call_with_http_info(**kwargs) + + def get_eudm_issues( + self, + ) -> IssueDefinitionArray: + """Get all device issue definitions. + + :rtype: IssueDefinitionArray + """ + kwargs: Dict[str, Any] = {} + return self._get_eudm_issues_endpoint.call_with_http_info(**kwargs) + + def get_eudm_overview( + self, + ) -> OverviewItemArray: + """Get overview tiles. + + :rtype: OverviewItemArray + """ + kwargs: Dict[str, Any] = {} + return self._get_eudm_overview_endpoint.call_with_http_info(**kwargs) 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..e6863ad9b8 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -38,6 +38,7 @@ from datadog_api_client.v2.api.deployment_gates_api import DeploymentGatesApi from datadog_api_client.v2.api.domain_allowlist_api import DomainAllowlistApi from datadog_api_client.v2.api.downtimes_api import DowntimesApi +from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi from datadog_api_client.v2.api.entity_integration_configs_api import EntityIntegrationConfigsApi from datadog_api_client.v2.api.entity_risk_scores_api import EntityRiskScoresApi from datadog_api_client.v2.api.error_tracking_api import ErrorTrackingApi @@ -65,6 +66,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 @@ -154,6 +156,7 @@ "DeploymentGatesApi", "DomainAllowlistApi", "DowntimesApi", + "EndUserDeviceMonitoringApi", "EntityIntegrationConfigsApi", "EntityRiskScoresApi", "ErrorTrackingApi", @@ -181,6 +184,7 @@ "ModelLabAPIApi", "MonitorsApi", "NetworkDeviceMonitoringApi", + "OAuth2ClientPublicApi", "OCIIntegrationApi", "ObservabilityPipelinesApi", "OktaIntegrationApi", diff --git a/src/datadog_api_client/v2/model/device_base_array.py b/src/datadog_api_client/v2/model/device_base_array.py new file mode 100644 index 0000000000..4aa8997ffd --- /dev/null +++ b/src/datadog_api_client/v2/model/device_base_array.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 List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.device_base_data import DeviceBaseData + + +class DeviceBaseArray(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.device_base_data import DeviceBaseData + + return { + "data": ([DeviceBaseData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[DeviceBaseData], **kwargs): + """ + Response body for the list devices endpoint. + + :param data: List of devices matching the request. + :type data: [DeviceBaseData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/device_base_data.py b/src/datadog_api_client/v2/model/device_base_data.py new file mode 100644 index 0000000000..757bd4b337 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_base_data.py @@ -0,0 +1,63 @@ +# 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.device_base_data_attributes import DeviceBaseDataAttributes + from datadog_api_client.v2.model.device_details_data_type import DeviceDetailsDataType + + +class DeviceBaseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.device_base_data_attributes import DeviceBaseDataAttributes + from datadog_api_client.v2.model.device_details_data_type import DeviceDetailsDataType + + return { + "attributes": (DeviceBaseDataAttributes,), + "id": (str,), + "type": (DeviceDetailsDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + id: str, + type: DeviceDetailsDataType, + attributes: Union[DeviceBaseDataAttributes, UnsetType] = unset, + **kwargs, + ): + """ + A single device entry as returned by the list devices endpoint. + + :param attributes: Common health and identity attributes shared by every End User Device Monitoring device record. + :type attributes: DeviceBaseDataAttributes, optional + + :param id: Unique identifier of the device. Matches the Datadog host identifier. + :type id: str + + :param type: Devices resource type. + :type type: DeviceDetailsDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/device_base_data_attributes.py b/src/datadog_api_client/v2/model/device_base_data_attributes.py new file mode 100644 index 0000000000..581bb53d25 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_base_data_attributes.py @@ -0,0 +1,250 @@ +# 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 + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DeviceBaseDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "agent_key": (str,), + "agent_version": (str,), + "battery_max_capacity_pct": (int,), + "cpu_cores": (int,), + "cpu_logical_processors": (int,), + "cpu_model": (str,), + "cpu_usage": (float,), + "disk_usage": (float,), + "ip_address": (str,), + "issues": ([str],), + "kernel_name": (str,), + "last_seen": (str,), + "manufacturer": (str,), + "mem_usage": (float,), + "memory_total_kb": (int,), + "model_name": (str,), + "model_number": (str,), + "os": (str,), + "os_version": (str,), + "resource_id": (str,), + "serial_number": (str,), + "status": (str,), + "type": (str,), + "uptime": (float,), + "wlan_bssid": (str,), + "wlan_rssi": (float,), + "wlan_ssid": (str,), + } + + attribute_map = { + "agent_key": "agent_key", + "agent_version": "agent_version", + "battery_max_capacity_pct": "battery_max_capacity_pct", + "cpu_cores": "cpu_cores", + "cpu_logical_processors": "cpu_logical_processors", + "cpu_model": "cpu_model", + "cpu_usage": "cpu_usage", + "disk_usage": "disk_usage", + "ip_address": "ip_address", + "issues": "issues", + "kernel_name": "kernel_name", + "last_seen": "last_seen", + "manufacturer": "manufacturer", + "mem_usage": "mem_usage", + "memory_total_kb": "memory_total_kb", + "model_name": "model_name", + "model_number": "model_number", + "os": "os", + "os_version": "os_version", + "resource_id": "resource_id", + "serial_number": "serial_number", + "status": "status", + "type": "type", + "uptime": "uptime", + "wlan_bssid": "wlan_bssid", + "wlan_rssi": "wlan_rssi", + "wlan_ssid": "wlan_ssid", + } + + def __init__( + self_, + agent_key: Union[str, UnsetType] = unset, + agent_version: Union[str, UnsetType] = unset, + battery_max_capacity_pct: Union[int, UnsetType] = unset, + cpu_cores: Union[int, UnsetType] = unset, + cpu_logical_processors: Union[int, UnsetType] = unset, + cpu_model: Union[str, UnsetType] = unset, + cpu_usage: Union[float, UnsetType] = unset, + disk_usage: Union[float, UnsetType] = unset, + ip_address: Union[str, UnsetType] = unset, + issues: Union[List[str], UnsetType] = unset, + kernel_name: Union[str, UnsetType] = unset, + last_seen: Union[str, UnsetType] = unset, + manufacturer: Union[str, UnsetType] = unset, + mem_usage: Union[float, UnsetType] = unset, + memory_total_kb: Union[int, UnsetType] = unset, + model_name: Union[str, UnsetType] = unset, + model_number: Union[str, UnsetType] = unset, + os: Union[str, UnsetType] = unset, + os_version: Union[str, UnsetType] = unset, + resource_id: Union[str, UnsetType] = unset, + serial_number: Union[str, UnsetType] = unset, + status: Union[str, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + uptime: Union[float, UnsetType] = unset, + wlan_bssid: Union[str, UnsetType] = unset, + wlan_rssi: Union[float, UnsetType] = unset, + wlan_ssid: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Common health and identity attributes shared by every End User Device Monitoring device record. + + :param agent_key: Public key of the Datadog Agent installed on the device. + :type agent_key: str, optional + + :param agent_version: Version of the Datadog Agent installed on the device. + :type agent_version: str, optional + + :param battery_max_capacity_pct: Maximum battery capacity expressed as a percentage of the device's design capacity. + :type battery_max_capacity_pct: int, optional + + :param cpu_cores: Number of physical CPU cores on the device. + :type cpu_cores: int, optional + + :param cpu_logical_processors: Number of logical CPU processors (hardware threads) on the device. + :type cpu_logical_processors: int, optional + + :param cpu_model: Human-readable name of the device's CPU model. + :type cpu_model: str, optional + + :param cpu_usage: Average CPU usage on the device, as a percentage between 0 and 100. + :type cpu_usage: float, optional + + :param disk_usage: Average disk usage on the device, as a percentage between 0 and 100. + :type disk_usage: float, optional + + :param ip_address: Last observed IPv4 or IPv6 address of the device. + :type ip_address: str, optional + + :param issues: List of issue identifiers currently affecting the device. + References entries returned by the issues endpoint. + :type issues: [str], optional + + :param kernel_name: Name of the operating system kernel running on the device. + :type kernel_name: str, optional + + :param last_seen: Timestamp of the most recent telemetry received from the device, in RFC 3339 format. + :type last_seen: str, optional + + :param manufacturer: Manufacturer of the device. + :type manufacturer: str, optional + + :param mem_usage: Average memory usage on the device, as a percentage between 0 and 100. + :type mem_usage: float, optional + + :param memory_total_kb: Total amount of physical memory available on the device, in kilobytes. + :type memory_total_kb: int, optional + + :param model_name: Marketing or product name of the device model. + :type model_name: str, optional + + :param model_number: Manufacturer-assigned model number of the device. + :type model_number: str, optional + + :param os: Operating system family running on the device (for example, ``mac`` , ``windows`` , or ``linux`` ). + :type os: str, optional + + :param os_version: Operating system version running on the device. + :type os_version: str, optional + + :param resource_id: Datadog resource identifier for the device. + :type resource_id: str, optional + + :param serial_number: Serial number assigned to the device by its manufacturer. + :type serial_number: str, optional + + :param status: Health status of the device computed from its issues and recent telemetry. + :type status: str, optional + + :param type: Hardware type of the device (for example, ``laptop`` , ``desktop`` , or ``mobile`` ). + :type type: str, optional + + :param uptime: Time elapsed since the device last booted, in seconds. + :type uptime: float, optional + + :param wlan_bssid: BSSID (MAC address of the access point) of the wireless network the device is + currently connected to. + :type wlan_bssid: str, optional + + :param wlan_rssi: Received signal strength indicator of the device's current wireless connection, in dBm. + :type wlan_rssi: float, optional + + :param wlan_ssid: SSID of the wireless network the device is currently connected to. + :type wlan_ssid: str, optional + """ + if agent_key is not unset: + kwargs["agent_key"] = agent_key + if agent_version is not unset: + kwargs["agent_version"] = agent_version + if battery_max_capacity_pct is not unset: + kwargs["battery_max_capacity_pct"] = battery_max_capacity_pct + if cpu_cores is not unset: + kwargs["cpu_cores"] = cpu_cores + if cpu_logical_processors is not unset: + kwargs["cpu_logical_processors"] = cpu_logical_processors + if cpu_model is not unset: + kwargs["cpu_model"] = cpu_model + if cpu_usage is not unset: + kwargs["cpu_usage"] = cpu_usage + if disk_usage is not unset: + kwargs["disk_usage"] = disk_usage + if ip_address is not unset: + kwargs["ip_address"] = ip_address + if issues is not unset: + kwargs["issues"] = issues + if kernel_name is not unset: + kwargs["kernel_name"] = kernel_name + if last_seen is not unset: + kwargs["last_seen"] = last_seen + if manufacturer is not unset: + kwargs["manufacturer"] = manufacturer + if mem_usage is not unset: + kwargs["mem_usage"] = mem_usage + if memory_total_kb is not unset: + kwargs["memory_total_kb"] = memory_total_kb + if model_name is not unset: + kwargs["model_name"] = model_name + if model_number is not unset: + kwargs["model_number"] = model_number + if os is not unset: + kwargs["os"] = os + if os_version is not unset: + kwargs["os_version"] = os_version + if resource_id is not unset: + kwargs["resource_id"] = resource_id + if serial_number is not unset: + kwargs["serial_number"] = serial_number + if status is not unset: + kwargs["status"] = status + if type is not unset: + kwargs["type"] = type + if uptime is not unset: + kwargs["uptime"] = uptime + if wlan_bssid is not unset: + kwargs["wlan_bssid"] = wlan_bssid + if wlan_rssi is not unset: + kwargs["wlan_rssi"] = wlan_rssi + if wlan_ssid is not unset: + kwargs["wlan_ssid"] = wlan_ssid + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/device_details.py b/src/datadog_api_client/v2/model/device_details.py new file mode 100644 index 0000000000..5a4ffe8298 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_details.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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.device_details_data import DeviceDetailsData + + +class DeviceDetails(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.device_details_data import DeviceDetailsData + + return { + "data": (DeviceDetailsData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[DeviceDetailsData, UnsetType] = unset, **kwargs): + """ + Response body for the get device endpoint, returning a single device with full attribute detail. + + :param data: A single device entry with full attribute detail. + :type data: DeviceDetailsData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/device_details_data.py b/src/datadog_api_client/v2/model/device_details_data.py new file mode 100644 index 0000000000..31e441c8b5 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_details_data.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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.device_details_data_attributes import DeviceDetailsDataAttributes + from datadog_api_client.v2.model.device_details_data_type import DeviceDetailsDataType + + +class DeviceDetailsData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.device_details_data_attributes import DeviceDetailsDataAttributes + from datadog_api_client.v2.model.device_details_data_type import DeviceDetailsDataType + + return { + "attributes": (DeviceDetailsDataAttributes,), + "id": (str,), + "type": (DeviceDetailsDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + id: str, + type: DeviceDetailsDataType, + attributes: Union[DeviceDetailsDataAttributes, UnsetType] = unset, + **kwargs, + ): + """ + A single device entry with full attribute detail. + + :param attributes: Extended set of attributes for a single End User Device Monitoring device, + including detailed network and battery metrics. + :type attributes: DeviceDetailsDataAttributes, optional + + :param id: Unique identifier of the device. Matches the Datadog host identifier. + :type id: str + + :param type: Devices resource type. + :type type: DeviceDetailsDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/device_details_data_attributes.py b/src/datadog_api_client/v2/model/device_details_data_attributes.py new file mode 100644 index 0000000000..99ca09eeb4 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_details_data_attributes.py @@ -0,0 +1,324 @@ +# 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 + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DeviceDetailsDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "agent_key": (str,), + "agent_version": (str,), + "battery_charge_pct": (int,), + "battery_charge_rate": (int,), + "battery_cycle_count": (int,), + "battery_max_capacity_pct": (int,), + "cpu_cores": (int,), + "cpu_logical_processors": (int,), + "cpu_model": (str,), + "cpu_usage": (float,), + "disk_usage": (float,), + "ip_address": (str,), + "issues": ([str],), + "kernel_name": (str,), + "last_seen": (str,), + "manufacturer": (str,), + "mem_usage": (float,), + "memory_total_kb": (int,), + "model_name": (str,), + "model_number": (str,), + "os": (str,), + "os_version": (str,), + "packets_in_drop": (float,), + "packets_in_error": (float,), + "packets_out_drop": (float,), + "packets_out_error": (float,), + "resource_id": (str,), + "serial_number": (str,), + "status": (str,), + "tcp_out_segs": (float,), + "tcp_retrans_segs": (float,), + "type": (str,), + "uptime": (float,), + "wlan_bssid": (str,), + "wlan_rssi": (float,), + "wlan_ssid": (str,), + } + + attribute_map = { + "agent_key": "agent_key", + "agent_version": "agent_version", + "battery_charge_pct": "battery_charge_pct", + "battery_charge_rate": "battery_charge_rate", + "battery_cycle_count": "battery_cycle_count", + "battery_max_capacity_pct": "battery_max_capacity_pct", + "cpu_cores": "cpu_cores", + "cpu_logical_processors": "cpu_logical_processors", + "cpu_model": "cpu_model", + "cpu_usage": "cpu_usage", + "disk_usage": "disk_usage", + "ip_address": "ip_address", + "issues": "issues", + "kernel_name": "kernel_name", + "last_seen": "last_seen", + "manufacturer": "manufacturer", + "mem_usage": "mem_usage", + "memory_total_kb": "memory_total_kb", + "model_name": "model_name", + "model_number": "model_number", + "os": "os", + "os_version": "os_version", + "packets_in_drop": "packets_in_drop", + "packets_in_error": "packets_in_error", + "packets_out_drop": "packets_out_drop", + "packets_out_error": "packets_out_error", + "resource_id": "resource_id", + "serial_number": "serial_number", + "status": "status", + "tcp_out_segs": "tcp_out_segs", + "tcp_retrans_segs": "tcp_retrans_segs", + "type": "type", + "uptime": "uptime", + "wlan_bssid": "wlan_bssid", + "wlan_rssi": "wlan_rssi", + "wlan_ssid": "wlan_ssid", + } + + def __init__( + self_, + agent_key: Union[str, UnsetType] = unset, + agent_version: Union[str, UnsetType] = unset, + battery_charge_pct: Union[int, UnsetType] = unset, + battery_charge_rate: Union[int, UnsetType] = unset, + battery_cycle_count: Union[int, UnsetType] = unset, + battery_max_capacity_pct: Union[int, UnsetType] = unset, + cpu_cores: Union[int, UnsetType] = unset, + cpu_logical_processors: Union[int, UnsetType] = unset, + cpu_model: Union[str, UnsetType] = unset, + cpu_usage: Union[float, UnsetType] = unset, + disk_usage: Union[float, UnsetType] = unset, + ip_address: Union[str, UnsetType] = unset, + issues: Union[List[str], UnsetType] = unset, + kernel_name: Union[str, UnsetType] = unset, + last_seen: Union[str, UnsetType] = unset, + manufacturer: Union[str, UnsetType] = unset, + mem_usage: Union[float, UnsetType] = unset, + memory_total_kb: Union[int, UnsetType] = unset, + model_name: Union[str, UnsetType] = unset, + model_number: Union[str, UnsetType] = unset, + os: Union[str, UnsetType] = unset, + os_version: Union[str, UnsetType] = unset, + packets_in_drop: Union[float, UnsetType] = unset, + packets_in_error: Union[float, UnsetType] = unset, + packets_out_drop: Union[float, UnsetType] = unset, + packets_out_error: Union[float, UnsetType] = unset, + resource_id: Union[str, UnsetType] = unset, + serial_number: Union[str, UnsetType] = unset, + status: Union[str, UnsetType] = unset, + tcp_out_segs: Union[float, UnsetType] = unset, + tcp_retrans_segs: Union[float, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + uptime: Union[float, UnsetType] = unset, + wlan_bssid: Union[str, UnsetType] = unset, + wlan_rssi: Union[float, UnsetType] = unset, + wlan_ssid: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Extended set of attributes for a single End User Device Monitoring device, + including detailed network and battery metrics. + + :param agent_key: Public key of the Datadog Agent installed on the device. + :type agent_key: str, optional + + :param agent_version: Version of the Datadog Agent installed on the device. + :type agent_version: str, optional + + :param battery_charge_pct: Current battery charge level as a percentage between 0 and 100. + :type battery_charge_pct: int, optional + + :param battery_charge_rate: Rate at which the battery is charging or discharging, in milliamperes. + Negative values indicate discharge. + :type battery_charge_rate: int, optional + + :param battery_cycle_count: Number of full charge cycles the battery has gone through. + :type battery_cycle_count: int, optional + + :param battery_max_capacity_pct: Maximum battery capacity expressed as a percentage of the device's design capacity. + :type battery_max_capacity_pct: int, optional + + :param cpu_cores: Number of physical CPU cores on the device. + :type cpu_cores: int, optional + + :param cpu_logical_processors: Number of logical CPU processors (hardware threads) on the device. + :type cpu_logical_processors: int, optional + + :param cpu_model: Human-readable name of the device's CPU model. + :type cpu_model: str, optional + + :param cpu_usage: Average CPU usage on the device, as a percentage between 0 and 100. + :type cpu_usage: float, optional + + :param disk_usage: Average disk usage on the device, as a percentage between 0 and 100. + :type disk_usage: float, optional + + :param ip_address: Last observed IPv4 or IPv6 address of the device. + :type ip_address: str, optional + + :param issues: List of issue identifiers currently affecting the device. + References entries returned by the issues endpoint. + :type issues: [str], optional + + :param kernel_name: Name of the operating system kernel running on the device. + :type kernel_name: str, optional + + :param last_seen: Timestamp of the most recent telemetry received from the device, in RFC 3339 format. + :type last_seen: str, optional + + :param manufacturer: Manufacturer of the device. + :type manufacturer: str, optional + + :param mem_usage: Average memory usage on the device, as a percentage between 0 and 100. + :type mem_usage: float, optional + + :param memory_total_kb: Total amount of physical memory available on the device, in kilobytes. + :type memory_total_kb: int, optional + + :param model_name: Marketing or product name of the device model. + :type model_name: str, optional + + :param model_number: Manufacturer-assigned model number of the device. + :type model_number: str, optional + + :param os: Operating system family running on the device (for example, ``mac`` , ``windows`` , or ``linux`` ). + :type os: str, optional + + :param os_version: Operating system version running on the device. + :type os_version: str, optional + + :param packets_in_drop: Average rate of dropped inbound network packets, in packets per second. + :type packets_in_drop: float, optional + + :param packets_in_error: Average rate of inbound network packets received with errors, in packets per second. + :type packets_in_error: float, optional + + :param packets_out_drop: Average rate of dropped outbound network packets, in packets per second. + :type packets_out_drop: float, optional + + :param packets_out_error: Average rate of outbound network packets sent with errors, in packets per second. + :type packets_out_error: float, optional + + :param resource_id: Datadog resource identifier for the device. + :type resource_id: str, optional + + :param serial_number: Serial number assigned to the device by its manufacturer. + :type serial_number: str, optional + + :param status: Health status of the device computed from its issues and recent telemetry. + :type status: str, optional + + :param tcp_out_segs: Average rate of TCP segments sent by the device, in segments per second. + :type tcp_out_segs: float, optional + + :param tcp_retrans_segs: Average rate of TCP segments retransmitted by the device, in segments per second. + :type tcp_retrans_segs: float, optional + + :param type: Hardware type of the device (for example, ``laptop`` , ``desktop`` , or ``mobile`` ). + :type type: str, optional + + :param uptime: Time elapsed since the device last booted, in seconds. + :type uptime: float, optional + + :param wlan_bssid: BSSID (MAC address of the access point) of the wireless network the device is + currently connected to. + :type wlan_bssid: str, optional + + :param wlan_rssi: Received signal strength indicator of the device's current wireless connection, in dBm. + :type wlan_rssi: float, optional + + :param wlan_ssid: SSID of the wireless network the device is currently connected to. + :type wlan_ssid: str, optional + """ + if agent_key is not unset: + kwargs["agent_key"] = agent_key + if agent_version is not unset: + kwargs["agent_version"] = agent_version + if battery_charge_pct is not unset: + kwargs["battery_charge_pct"] = battery_charge_pct + if battery_charge_rate is not unset: + kwargs["battery_charge_rate"] = battery_charge_rate + if battery_cycle_count is not unset: + kwargs["battery_cycle_count"] = battery_cycle_count + if battery_max_capacity_pct is not unset: + kwargs["battery_max_capacity_pct"] = battery_max_capacity_pct + if cpu_cores is not unset: + kwargs["cpu_cores"] = cpu_cores + if cpu_logical_processors is not unset: + kwargs["cpu_logical_processors"] = cpu_logical_processors + if cpu_model is not unset: + kwargs["cpu_model"] = cpu_model + if cpu_usage is not unset: + kwargs["cpu_usage"] = cpu_usage + if disk_usage is not unset: + kwargs["disk_usage"] = disk_usage + if ip_address is not unset: + kwargs["ip_address"] = ip_address + if issues is not unset: + kwargs["issues"] = issues + if kernel_name is not unset: + kwargs["kernel_name"] = kernel_name + if last_seen is not unset: + kwargs["last_seen"] = last_seen + if manufacturer is not unset: + kwargs["manufacturer"] = manufacturer + if mem_usage is not unset: + kwargs["mem_usage"] = mem_usage + if memory_total_kb is not unset: + kwargs["memory_total_kb"] = memory_total_kb + if model_name is not unset: + kwargs["model_name"] = model_name + if model_number is not unset: + kwargs["model_number"] = model_number + if os is not unset: + kwargs["os"] = os + if os_version is not unset: + kwargs["os_version"] = os_version + if packets_in_drop is not unset: + kwargs["packets_in_drop"] = packets_in_drop + if packets_in_error is not unset: + kwargs["packets_in_error"] = packets_in_error + if packets_out_drop is not unset: + kwargs["packets_out_drop"] = packets_out_drop + if packets_out_error is not unset: + kwargs["packets_out_error"] = packets_out_error + if resource_id is not unset: + kwargs["resource_id"] = resource_id + if serial_number is not unset: + kwargs["serial_number"] = serial_number + if status is not unset: + kwargs["status"] = status + if tcp_out_segs is not unset: + kwargs["tcp_out_segs"] = tcp_out_segs + if tcp_retrans_segs is not unset: + kwargs["tcp_retrans_segs"] = tcp_retrans_segs + if type is not unset: + kwargs["type"] = type + if uptime is not unset: + kwargs["uptime"] = uptime + if wlan_bssid is not unset: + kwargs["wlan_bssid"] = wlan_bssid + if wlan_rssi is not unset: + kwargs["wlan_rssi"] = wlan_rssi + if wlan_ssid is not unset: + kwargs["wlan_ssid"] = wlan_ssid + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/device_details_data_type.py b/src/datadog_api_client/v2/model/device_details_data_type.py new file mode 100644 index 0000000000..468cbccc22 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_details_data_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 DeviceDetailsDataType(ModelSimple): + """ + Devices resource type. + + :param value: If omitted defaults to "devices". Must be one of ["devices"]. + :type value: str + """ + + allowed_values = { + "devices", + } + DEVICES: ClassVar["DeviceDetailsDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DeviceDetailsDataType.DEVICES = DeviceDetailsDataType("devices") diff --git a/src/datadog_api_client/v2/model/graph_item_array.py b/src/datadog_api_client/v2/model/graph_item_array.py new file mode 100644 index 0000000000..abb49a54d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/graph_item_array.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 List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.graph_item_data import GraphItemData + + +class GraphItemArray(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.graph_item_data import GraphItemData + + return { + "data": ([GraphItemData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[GraphItemData], **kwargs): + """ + Response body for the graph endpoint, returning per-grouping device counts. + + :param data: List of grouping entries with their associated device counts. + :type data: [GraphItemData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/graph_item_data.py b/src/datadog_api_client/v2/model/graph_item_data.py new file mode 100644 index 0000000000..e2d65819f0 --- /dev/null +++ b/src/datadog_api_client/v2/model/graph_item_data.py @@ -0,0 +1,59 @@ +# 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.graph_item_data_attributes import GraphItemDataAttributes + from datadog_api_client.v2.model.graph_item_data_type import GraphItemDataType + + +class GraphItemData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.graph_item_data_attributes import GraphItemDataAttributes + from datadog_api_client.v2.model.graph_item_data_type import GraphItemDataType + + return { + "attributes": (GraphItemDataAttributes,), + "id": (str,), + "type": (GraphItemDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, id: str, type: GraphItemDataType, attributes: Union[GraphItemDataAttributes, UnsetType] = unset, **kwargs + ): + """ + A single grouping entry in the End User Device Monitoring graph response. + + :param attributes: Attributes of a single grouping in the End User Device Monitoring graph response. + :type attributes: GraphItemDataAttributes, optional + + :param id: Unique identifier of the grouping, derived from the grouping column. + :type id: str + + :param type: Graph items resource type. + :type type: GraphItemDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/graph_item_data_attributes.py b/src/datadog_api_client/v2/model/graph_item_data_attributes.py new file mode 100644 index 0000000000..f83133732b --- /dev/null +++ b/src/datadog_api_client/v2/model/graph_item_data_attributes.py @@ -0,0 +1,56 @@ +# 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.graph_item_data_attributes_counts_items import GraphItemDataAttributesCountsItems + + +class GraphItemDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.graph_item_data_attributes_counts_items import ( + GraphItemDataAttributesCountsItems, + ) + + return { + "counts": ([GraphItemDataAttributesCountsItems],), + "type": (str,), + } + + attribute_map = { + "counts": "counts", + "type": "type", + } + + def __init__( + self_, + counts: Union[List[GraphItemDataAttributesCountsItems], UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a single grouping in the End User Device Monitoring graph response. + + :param counts: List of per-value counts for the grouping column. + :type counts: [GraphItemDataAttributesCountsItems], optional + + :param type: Identifier of the grouping column (for example, ``os`` or ``type`` ). + :type type: str, optional + """ + if counts is not unset: + kwargs["counts"] = counts + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/graph_item_data_attributes_counts_items.py b/src/datadog_api_client/v2/model/graph_item_data_attributes_counts_items.py new file mode 100644 index 0000000000..ddd5337386 --- /dev/null +++ b/src/datadog_api_client/v2/model/graph_item_data_attributes_counts_items.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 typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class GraphItemDataAttributesCountsItems(ModelNormal): + @cached_property + def openapi_types(_): + return { + "column_name": (str,), + "count": (int,), + } + + attribute_map = { + "column_name": "columnName", + "count": "count", + } + + def __init__(self_, column_name: Union[str, UnsetType] = unset, count: Union[int, UnsetType] = unset, **kwargs): + """ + Count of devices for a single value of the grouping column in the End User Device Monitoring graph. + + :param column_name: Value of the grouping column for this bucket (for example, an operating system + name or a device type). + :type column_name: str, optional + + :param count: Number of devices that fall into this bucket. + :type count: int, optional + """ + if column_name is not unset: + kwargs["column_name"] = column_name + if count is not unset: + kwargs["count"] = count + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/graph_item_data_type.py b/src/datadog_api_client/v2/model/graph_item_data_type.py new file mode 100644 index 0000000000..f7aaaad516 --- /dev/null +++ b/src/datadog_api_client/v2/model/graph_item_data_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 GraphItemDataType(ModelSimple): + """ + Graph items resource type. + + :param value: If omitted defaults to "graph_items". Must be one of ["graph_items"]. + :type value: str + """ + + allowed_values = { + "graph_items", + } + GRAPH_ITEMS: ClassVar["GraphItemDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +GraphItemDataType.GRAPH_ITEMS = GraphItemDataType("graph_items") diff --git a/src/datadog_api_client/v2/model/issue_definition_array.py b/src/datadog_api_client/v2/model/issue_definition_array.py new file mode 100644 index 0000000000..29e00d0a25 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_definition_array.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 List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_definition_data import IssueDefinitionData + + +class IssueDefinitionArray(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_definition_data import IssueDefinitionData + + return { + "data": ([IssueDefinitionData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[IssueDefinitionData], **kwargs): + """ + Response body for the issues endpoint, returning all available device issue definitions. + + :param data: List of available issue definitions. + :type data: [IssueDefinitionData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/issue_definition_data.py b/src/datadog_api_client/v2/model/issue_definition_data.py new file mode 100644 index 0000000000..282ffbea4a --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_definition_data.py @@ -0,0 +1,63 @@ +# 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.issue_definition_data_attributes import IssueDefinitionDataAttributes + from datadog_api_client.v2.model.issue_definition_data_type import IssueDefinitionDataType + + +class IssueDefinitionData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_definition_data_attributes import IssueDefinitionDataAttributes + from datadog_api_client.v2.model.issue_definition_data_type import IssueDefinitionDataType + + return { + "attributes": (IssueDefinitionDataAttributes,), + "id": (str,), + "type": (IssueDefinitionDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + id: str, + type: IssueDefinitionDataType, + attributes: Union[IssueDefinitionDataAttributes, UnsetType] = unset, + **kwargs, + ): + """ + A single issue definition entry returned by the issues endpoint. + + :param attributes: Attributes of a single End User Device Monitoring issue definition. + :type attributes: IssueDefinitionDataAttributes, optional + + :param id: Stable identifier of the issue definition, used in the ``issues`` field of a device record. + :type id: str + + :param type: Issue definitions resource type. + :type type: IssueDefinitionDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/issue_definition_data_attributes.py b/src/datadog_api_client/v2/model/issue_definition_data_attributes.py new file mode 100644 index 0000000000..79b2ccd25c --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_definition_data_attributes.py @@ -0,0 +1,45 @@ +# 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 IssueDefinitionDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "category": (str,), + "label": (str,), + "level": (str,), + } + + attribute_map = { + "category": "category", + "label": "label", + "level": "level", + } + + def __init__(self_, category: str, label: str, level: str, **kwargs): + """ + Attributes of a single End User Device Monitoring issue definition. + + :param category: Category of the issue (for example, ``battery`` , ``network`` , or ``performance`` ). + :type category: str + + :param label: Human-readable label describing the issue, suitable for display in the Datadog UI. + :type label: str + + :param level: Severity level of the issue (for example, ``warning`` or ``critical`` ). + :type level: str + """ + super().__init__(kwargs) + + self_.category = category + self_.label = label + self_.level = level diff --git a/src/datadog_api_client/v2/model/issue_definition_data_type.py b/src/datadog_api_client/v2/model/issue_definition_data_type.py new file mode 100644 index 0000000000..a993305456 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_definition_data_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 IssueDefinitionDataType(ModelSimple): + """ + Issue definitions resource type. + + :param value: If omitted defaults to "issue_definitions". Must be one of ["issue_definitions"]. + :type value: str + """ + + allowed_values = { + "issue_definitions", + } + ISSUE_DEFINITIONS: ClassVar["IssueDefinitionDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IssueDefinitionDataType.ISSUE_DEFINITIONS = IssueDefinitionDataType("issue_definitions") 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/overview_item_array.py b/src/datadog_api_client/v2/model/overview_item_array.py new file mode 100644 index 0000000000..400a374c3d --- /dev/null +++ b/src/datadog_api_client/v2/model/overview_item_array.py @@ -0,0 +1,41 @@ +# 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.overview_item_data import OverviewItemData + + +class OverviewItemArray(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.overview_item_data import OverviewItemData + + return { + "data": ([OverviewItemData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[OverviewItemData], **kwargs): + """ + Response body for the overview endpoint, returning the tiles shown on the + End User Device Monitoring overview dashboard. + + :param data: List of overview tiles. + :type data: [OverviewItemData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/overview_item_data.py b/src/datadog_api_client/v2/model/overview_item_data.py new file mode 100644 index 0000000000..de429933fd --- /dev/null +++ b/src/datadog_api_client/v2/model/overview_item_data.py @@ -0,0 +1,63 @@ +# 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.overview_item_data_attributes import OverviewItemDataAttributes + from datadog_api_client.v2.model.overview_item_data_type import OverviewItemDataType + + +class OverviewItemData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.overview_item_data_attributes import OverviewItemDataAttributes + from datadog_api_client.v2.model.overview_item_data_type import OverviewItemDataType + + return { + "attributes": (OverviewItemDataAttributes,), + "id": (str,), + "type": (OverviewItemDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + id: str, + type: OverviewItemDataType, + attributes: Union[OverviewItemDataAttributes, UnsetType] = unset, + **kwargs, + ): + """ + A single tile entry in the End User Device Monitoring overview response. + + :param attributes: Attributes of a single tile in the End User Device Monitoring overview dashboard. + :type attributes: OverviewItemDataAttributes, optional + + :param id: Unique identifier of the overview tile. + :type id: str + + :param type: Overview items resource type. + :type type: OverviewItemDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/overview_item_data_attributes.py b/src/datadog_api_client/v2/model/overview_item_data_attributes.py new file mode 100644 index 0000000000..8e4076446f --- /dev/null +++ b/src/datadog_api_client/v2/model/overview_item_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 OverviewItemDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "value": (int,), + } + + attribute_map = { + "name": "name", + "value": "value", + } + + def __init__(self_, name: Union[str, UnsetType] = unset, value: Union[int, UnsetType] = unset, **kwargs): + """ + Attributes of a single tile in the End User Device Monitoring overview dashboard. + + :param name: Human-readable name of the overview tile. + :type name: str, optional + + :param value: Numeric value displayed on the overview tile. + :type value: int, optional + """ + if name is not unset: + kwargs["name"] = name + if value is not unset: + kwargs["value"] = value + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/overview_item_data_type.py b/src/datadog_api_client/v2/model/overview_item_data_type.py new file mode 100644 index 0000000000..9d7d8fdd54 --- /dev/null +++ b/src/datadog_api_client/v2/model/overview_item_data_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 OverviewItemDataType(ModelSimple): + """ + Overview items resource type. + + :param value: If omitted defaults to "overview_items". Must be one of ["overview_items"]. + :type value: str + """ + + allowed_values = { + "overview_items", + } + OVERVIEW_ITEMS: ClassVar["OverviewItemDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OverviewItemDataType.OVERVIEW_ITEMS = OverviewItemDataType("overview_items") 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..8cfd78b585 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2159,6 +2159,13 @@ from datadog_api_client.v2.model.detailed_finding_type import DetailedFindingType from datadog_api_client.v2.model.device_attributes import DeviceAttributes from datadog_api_client.v2.model.device_attributes_interface_statuses import DeviceAttributesInterfaceStatuses +from datadog_api_client.v2.model.device_base_array import DeviceBaseArray +from datadog_api_client.v2.model.device_base_data import DeviceBaseData +from datadog_api_client.v2.model.device_base_data_attributes import DeviceBaseDataAttributes +from datadog_api_client.v2.model.device_details import DeviceDetails +from datadog_api_client.v2.model.device_details_data import DeviceDetailsData +from datadog_api_client.v2.model.device_details_data_attributes import DeviceDetailsDataAttributes +from datadog_api_client.v2.model.device_details_data_type import DeviceDetailsDataType from datadog_api_client.v2.model.devices_list_data import DevicesListData from datadog_api_client.v2.model.dns_metric_key import DnsMetricKey from datadog_api_client.v2.model.domain_allowlist import DomainAllowlist @@ -2897,6 +2904,11 @@ ) from datadog_api_client.v2.model.google_meet_configuration_reference import GoogleMeetConfigurationReference from datadog_api_client.v2.model.google_meet_configuration_reference_data import GoogleMeetConfigurationReferenceData +from datadog_api_client.v2.model.graph_item_array import GraphItemArray +from datadog_api_client.v2.model.graph_item_data import GraphItemData +from datadog_api_client.v2.model.graph_item_data_attributes import GraphItemDataAttributes +from datadog_api_client.v2.model.graph_item_data_attributes_counts_items import GraphItemDataAttributesCountsItems +from datadog_api_client.v2.model.graph_item_data_type import GraphItemDataType from datadog_api_client.v2.model.grey_noise_api_key import GreyNoiseAPIKey from datadog_api_client.v2.model.grey_noise_api_key_type import GreyNoiseAPIKeyType from datadog_api_client.v2.model.grey_noise_api_key_update import GreyNoiseAPIKeyUpdate @@ -3286,6 +3298,10 @@ from datadog_api_client.v2.model.issue_case_relationship import IssueCaseRelationship from datadog_api_client.v2.model.issue_case_relationships import IssueCaseRelationships from datadog_api_client.v2.model.issue_case_resource_type import IssueCaseResourceType +from datadog_api_client.v2.model.issue_definition_array import IssueDefinitionArray +from datadog_api_client.v2.model.issue_definition_data import IssueDefinitionData +from datadog_api_client.v2.model.issue_definition_data_attributes import IssueDefinitionDataAttributes +from datadog_api_client.v2.model.issue_definition_data_type import IssueDefinitionDataType from datadog_api_client.v2.model.issue_included import IssueIncluded from datadog_api_client.v2.model.issue_language import IssueLanguage from datadog_api_client.v2.model.issue_platform import IssuePlatform @@ -4399,6 +4415,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 @@ -5474,6 +5503,10 @@ from datadog_api_client.v2.model.output_schema import OutputSchema from datadog_api_client.v2.model.output_schema_parameters import OutputSchemaParameters from datadog_api_client.v2.model.output_schema_parameters_type import OutputSchemaParametersType +from datadog_api_client.v2.model.overview_item_array import OverviewItemArray +from datadog_api_client.v2.model.overview_item_data import OverviewItemData +from datadog_api_client.v2.model.overview_item_data_attributes import OverviewItemDataAttributes +from datadog_api_client.v2.model.overview_item_data_type import OverviewItemDataType from datadog_api_client.v2.model.overwrite_allocations_request import OverwriteAllocationsRequest from datadog_api_client.v2.model.page_urgency import PageUrgency from datadog_api_client.v2.model.paginated_response_meta import PaginatedResponseMeta @@ -8234,6 +8267,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 @@ -10038,6 +10077,13 @@ "DetailedFindingType", "DeviceAttributes", "DeviceAttributesInterfaceStatuses", + "DeviceBaseArray", + "DeviceBaseData", + "DeviceBaseDataAttributes", + "DeviceDetails", + "DeviceDetailsData", + "DeviceDetailsDataAttributes", + "DeviceDetailsDataType", "DevicesListData", "DnsMetricKey", "DomainAllowlist", @@ -10622,6 +10668,11 @@ "GoogleChatUpdateOrganizationHandleRequestData", "GoogleMeetConfigurationReference", "GoogleMeetConfigurationReferenceData", + "GraphItemArray", + "GraphItemData", + "GraphItemDataAttributes", + "GraphItemDataAttributesCountsItems", + "GraphItemDataType", "GreyNoiseAPIKey", "GreyNoiseAPIKeyType", "GreyNoiseAPIKeyUpdate", @@ -10937,6 +10988,10 @@ "IssueCaseRelationship", "IssueCaseRelationships", "IssueCaseResourceType", + "IssueDefinitionArray", + "IssueDefinitionData", + "IssueDefinitionDataAttributes", + "IssueDefinitionDataType", "IssueIncluded", "IssueLanguage", "IssuePlatform", @@ -11776,6 +11831,17 @@ "NullableRelationshipToUserData", "NullableUserRelationship", "NullableUserRelationshipData", + "OAuthClientRegistrationError", + "OAuthClientRegistrationGrantType", + "OAuthClientRegistrationRequest", + "OAuthClientRegistrationResponse", + "OAuthClientRegistrationResponseType", + "OAuthOidcScope", + "OAuthScopesRestriction", + "OAuthScopesRestrictionResponse", + "OAuthScopesRestrictionResponseAttributes", + "OAuthScopesRestrictionResponseData", + "OAuthScopesRestrictionType", "OCIConfig", "OCIConfigAttributes", "OCIConfigType", @@ -12283,6 +12349,10 @@ "OutputSchema", "OutputSchemaParameters", "OutputSchemaParametersType", + "OverviewItemArray", + "OverviewItemData", + "OverviewItemDataAttributes", + "OverviewItemDataType", "OverwriteAllocationsRequest", "PageUrgency", "PaginatedResponseMeta", @@ -14185,6 +14255,10 @@ "UpsertCloudInventorySyncConfigRequest", "UpsertCloudInventorySyncConfigRequestAttributes", "UpsertCloudInventorySyncConfigRequestData", + "UpsertOAuthScopesRestrictionData", + "UpsertOAuthScopesRestrictionDataAttributes", + "UpsertOAuthScopesRestrictionRequest", + "UpsertOAuthScopesRestrictionType", "Urgency", "UrlParam", "UrlParamUpdate", diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_device_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_a_device_returns_not_found_response.frozen new file mode 100644 index 0000000000..94c48fa600 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_a_device_returns_not_found_response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:26.244Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_device_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_a_device_returns_not_found_response.yaml new file mode 100644 index 0000000000..becfd6f512 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_a_device_returns_not_found_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/devices/not_found + response: + body: + string: '{"errors":[{"status":"404","title":"Not Found"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_device_issue_definitions_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_all_device_issue_definitions_returns_ok_response.frozen new file mode 100644 index 0000000000..c79fc24e61 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_device_issue_definitions_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:27.655Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_device_issue_definitions_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_all_device_issue_definitions_returns_ok_response.yaml new file mode 100644 index 0000000000..0469ff1c56 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_device_issue_definitions_returns_ok_response.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/issues + response: + body: + string: '{"data":[{"id":"high-cpu","type":"issue_definitions","attributes":{"category":"cpu","label":"CPU + Usage above 70%","level":"warning"}},{"id":"critical-cpu","type":"issue_definitions","attributes":{"category":"cpu","label":"CPU + Usage above 90%","level":"critical"}},{"id":"high-memory","type":"issue_definitions","attributes":{"category":"memory","label":"Memory + Usage above 75%","level":"warning"}},{"id":"critical-memory","type":"issue_definitions","attributes":{"category":"memory","label":"Memory + Usage above 90%","level":"critical"}},{"id":"high-disk","type":"issue_definitions","attributes":{"category":"disk","label":"Disk + Usage above 80%","level":"warning"}},{"id":"critical-disk","type":"issue_definitions","attributes":{"category":"disk","label":"Disk + Usage above 95%","level":"critical"}},{"id":"low-battery-capacity","type":"issue_definitions","attributes":{"category":"battery","label":"Battery + Capacity below 80%","level":"warning"}},{"id":"critical-battery-capacity","type":"issue_definitions","attributes":{"category":"battery","label":"Battery + Capacity below 70%","level":"critical"}},{"id":"weak-wifi","type":"issue_definitions","attributes":{"category":"wifi","label":"Poor + WiFi Connectivity","level":"warning"}},{"id":"recent-restart","type":"issue_definitions","attributes":{"category":"notable_events","label":"Recent + System Restart","level":"info"}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_devices_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_all_devices_returns_ok_response.frozen new file mode 100644 index 0000000000..408385be9a --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_devices_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:27.236Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_all_devices_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_all_devices_returns_ok_response.yaml new file mode 100644 index 0000000000..2582f6838b --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_all_devices_returns_ok_response.yaml @@ -0,0 +1,35 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/devices + response: + body: + string: '{"data":[{"id":"LAPTOP-DEMO-001","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","cpu_model":"Apple + M1 Pro","cpu_cores":10,"cpu_logical_processors":10,"cpu_usage":11.4,"mem_usage":47.1,"memory_total_kb":16777216,"disk_usage":38.2,"ip_address":"192.0.2.10","issues":[],"kernel_name":"Darwin","last_seen":"2026-05-26T22:49:00Z","manufacturer":"Apple","model_name":"MacBook + Pro","model_number":"MacBookPro18,3","os":"macOS","os_version":"macOS 15.6.1 + arm64","resource_id":"10000000000001","serial_number":"TESTDEVICE001","status":"healthy","type":"laptop","uptime":432000.0,"wlan_bssid":"00:00:5e:00:53:01","wlan_rssi":-55.0,"wlan_ssid":"corp-wifi"}},{"id":"LAPTOP-DEMO-002","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","cpu_model":"Intel(R) + Core(TM) i7-1185G7","cpu_cores":4,"cpu_logical_processors":8,"cpu_usage":76.2,"mem_usage":81.5,"memory_total_kb":16777216,"disk_usage":62.4,"ip_address":"192.0.2.11","issues":["high-cpu","high-memory"],"kernel_name":"WindowsNT","last_seen":"2026-05-26T22:48:30Z","manufacturer":"Dell + Inc.","model_name":"Latitude 5420","model_number":"Latitude 5420","os":"Windows","os_version":"Windows + 11 Pro 10.0 Build 22631","resource_id":"10000000000002","serial_number":"TESTDEVICE002","status":"degraded","type":"laptop","uptime":86400.0,"wlan_bssid":"00:00:5e:00:53:02","wlan_rssi":-72.5,"wlan_ssid":"corp-wifi"}},{"id":"LAPTOP-DEMO-003","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.71.0","cpu_model":"Intel(R) + Core(TM) i5-1135G7","cpu_cores":4,"cpu_logical_processors":8,"cpu_usage":92.8,"mem_usage":95.2,"memory_total_kb":8388608,"disk_usage":96.5,"ip_address":"198.51.100.10","issues":["critical-cpu","critical-memory","critical-disk"],"kernel_name":"WindowsNT","last_seen":"2026-05-26T22:47:00Z","manufacturer":"Lenovo","model_name":"ThinkPad + X1 Carbon","model_number":"20XW","os":"Windows","os_version":"Windows 10 Pro + 10.0 Build 19045","resource_id":"10000000000003","serial_number":"TESTDEVICE003","status":"critical","type":"laptop","uptime":7200.0,"wlan_bssid":"00:00:5e:00:53:03","wlan_rssi":-81.0,"wlan_ssid":"guest-network"}},{"id":"DESKTOP-DEMO-001","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","cpu_model":"AMD + Ryzen 7 5800X","cpu_cores":8,"cpu_logical_processors":16,"cpu_usage":8.3,"mem_usage":32.0,"memory_total_kb":33554432,"disk_usage":41.7,"ip_address":"192.0.2.20","issues":[],"kernel_name":"WindowsNT","last_seen":"2026-05-26T22:49:00Z","manufacturer":"Custom","model_name":"Workstation","model_number":"","os":"Windows","os_version":"Windows + 11 Pro 10.0 Build 26100","resource_id":"10000000000004","serial_number":"TESTDEVICE004","status":"healthy","type":"desktop","uptime":1209600.0,"wlan_bssid":"","wlan_ssid":""}},{"id":"LAPTOP-DEMO-004","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","battery_max_capacity_pct":73,"cpu_model":"Apple + M2","cpu_cores":8,"cpu_logical_processors":8,"cpu_usage":22.1,"mem_usage":55.0,"memory_total_kb":16777216,"disk_usage":51.0,"ip_address":"192.0.2.21","issues":["low-battery-capacity"],"kernel_name":"Darwin","last_seen":"2026-05-26T22:49:00Z","manufacturer":"Apple","model_name":"MacBook + Air","model_number":"Mac14,2","os":"macOS","os_version":"macOS 26.4.1 arm64","resource_id":"10000000000005","serial_number":"TESTDEVICE005","status":"degraded","type":"laptop","uptime":14400.0,"wlan_bssid":"00:00:5e:00:53:05","wlan_rssi":-62.0,"wlan_ssid":"home-network"}},{"id":"LAPTOP-DEMO-005","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.70.0","ip_address":"203.0.113.10","issues":[],"kernel_name":"WindowsNT","last_seen":"2026-05-20T08:15:00Z","manufacturer":"HP","model_name":"EliteBook + 840","model_number":"G9","os":"Windows","os_version":"Windows 11 Pro 10.0 + Build 22621","resource_id":"10000000000006","serial_number":"TESTDEVICE006","status":"inactive","type":"laptop","wlan_ssid":"","wlan_bssid":""}},{"id":"DESKTOP-DEMO-002","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.72.2","cpu_cores":16,"cpu_logical_processors":32,"cpu_model":"AMD + Ryzen 9 7950X","cpu_usage":14.6,"mem_usage":28.4,"memory_total_kb":67108864,"disk_usage":22.1,"ip_address":"198.51.100.20","issues":[],"kernel_name":"Linux","last_seen":"2026-05-26T22:49:00Z","manufacturer":"Custom","model_name":"Workstation","model_number":"","os":"linux","os_version":"Ubuntu + 24.04 LTS","resource_id":"10000000000007","serial_number":"TESTDEVICE007","status":"healthy","type":"desktop","uptime":2592000.0}},{"id":"DEVICE-DEMO-UNKNOWN","type":"devices","attributes":{"agent_key":"00000000000000000000000000000000","agent_version":"7.65.0","ip_address":"203.0.113.20","issues":["recent-restart"],"last_seen":"2026-05-26T22:35:00Z","os":"","os_version":"","resource_id":"10000000000008","status":"healthy","type":"unknown"}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_device_counts_grouped_by_attribute_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_device_counts_grouped_by_attribute_returns_ok_response.frozen new file mode 100644 index 0000000000..a51815e9e1 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_device_counts_grouped_by_attribute_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:27.588Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_device_counts_grouped_by_attribute_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_device_counts_grouped_by_attribute_returns_ok_response.yaml new file mode 100644 index 0000000000..9f1ad54b54 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_device_counts_grouped_by_attribute_returns_ok_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/graph?by=os + response: + body: + string: '{"data":[{"id":"macOS","type":"graph_items","attributes":{"type":"macOS","counts":[{"columnName":"total","count":18},{"columnName":"healthy","count":9},{"columnName":"degraded","count":4},{"columnName":"critical","count":1},{"columnName":"inactive","count":4}]}},{"id":"Windows","type":"graph_items","attributes":{"type":"Windows","counts":[{"columnName":"total","count":112},{"columnName":"healthy","count":48},{"columnName":"degraded","count":17},{"columnName":"critical","count":5},{"columnName":"inactive","count":42}]}},{"id":"linux","type":"graph_items","attributes":{"type":"linux","counts":[{"columnName":"total","count":7},{"columnName":"healthy","count":6},{"columnName":"degraded","count":0},{"columnName":"critical","count":0},{"columnName":"inactive","count":1}]}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_overview_tiles_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_overview_tiles_returns_ok_response.frozen new file mode 100644 index 0000000000..0185521c55 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_overview_tiles_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-05-26T22:33:27.698Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_overview_tiles_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_overview_tiles_returns_ok_response.yaml new file mode 100644 index 0000000000..6d1feaa49e --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_get_overview_tiles_returns_ok_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/eudm/overview + response: + body: + string: '{"data":[{"id":"total","type":"overview_items","attributes":{"name":"total","value":0}},{"id":"healthy","type":"overview_items","attributes":{"name":"healthy","value":0}},{"id":"degraded","type":"overview_items","attributes":{"name":"degraded","value":0}},{"id":"critical","type":"overview_items","attributes":{"name":"critical","value":0}},{"id":"inactive","type":"overview_items","attributes":{"name":"inactive","value":0}},{"id":"high-cpu","type":"overview_items","attributes":{"name":"high-cpu","value":0}},{"id":"weak-wifi","type":"overview_items","attributes":{"name":"weak-wifi","value":0}},{"id":"recent-restart","type":"overview_items","attributes":{"name":"recent-restart","value":0}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/features/end_user_device_monitoring.feature b/tests/v2/features/end_user_device_monitoring.feature new file mode 100644 index 0000000000..00e5433bd7 --- /dev/null +++ b/tests/v2/features/end_user_device_monitoring.feature @@ -0,0 +1,49 @@ +@endpoint(end-user-device-monitoring) @endpoint(end-user-device-monitoring-v2) +Feature: End User Device Monitoring + Inspect devices reported by the Datadog Agent on end-user laptops, + desktops, and mobile devices, including their health, hardware, and + connectivity attributes. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "EndUserDeviceMonitoring" API + + @generated @skip @team:DataDog/windows-products + Scenario: Get a device returns "Not Found" response + Given new "GetEUDMDevice" request + And request contains "device_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/windows-products + Scenario: Get a device returns "OK" response + Given new "GetEUDMDevice" request + And request contains "device_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/windows-products + Scenario: Get all device issue definitions returns "OK" response + Given new "GetEUDMIssues" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/windows-products + Scenario: Get all devices returns "OK" response + Given new "GetEUDMDevices" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/windows-products + Scenario: Get device counts grouped by attribute returns "OK" response + Given new "GetEUDMGraph" request + And request contains "by" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/windows-products + Scenario: Get overview tiles returns "OK" response + Given new "GetEUDMOverview" request + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/eudm.feature b/tests/v2/features/eudm.feature new file mode 100644 index 0000000000..6c929e77a9 --- /dev/null +++ b/tests/v2/features/eudm.feature @@ -0,0 +1,42 @@ +@endpoint(eudm) @endpoint(eudm-v2) +Feature: End User Device Monitoring + Inspect devices reported by the Datadog Agent on end-user laptops, desktops, + and mobile devices, including their health, hardware, and connectivity + attributes. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "EndUserDeviceMonitoring" API + + @team:DataDog/windows-products + Scenario: Get a device returns "Not Found" response + Given new "GetEUDMDevice" request + And request contains "device_id" parameter with value "not_found" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/windows-products + Scenario: Get all devices returns "OK" response + Given new "GetEUDMDevices" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/windows-products + Scenario: Get device counts grouped by attribute returns "OK" response + Given new "GetEUDMGraph" request + And request contains "by" parameter with value "os" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/windows-products + Scenario: Get all device issue definitions returns "OK" response + Given new "GetEUDMIssues" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/windows-products + Scenario: Get overview tiles returns "OK" response + Given new "GetEUDMOverview" request + When the request is sent + Then the response status is 200 OK 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..05798ab7d6 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -2382,6 +2382,36 @@ "type": "idempotent" } }, + "GetEUDMDevices": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMDevice": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMGraph": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMIssues": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMOverview": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, "ListEvents": { "tag": "Events", "undo": { @@ -4678,6 +4708,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": {