diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7991818c67..0b3f1b043a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -15763,6 +15763,29 @@ components: type: string x-enum-varnames: - UPSERT_ARBITRARY_RULE + ArbitraryRuleMappingTransform: + description: >- + Only supported for `proportional_timeseries` and `even_timeseries` rules. Creates a synthetic tag from timeseries input rows before `tag_transforms` are applied. + properties: + mapping: + additionalProperties: {} + description: Recursive mapping node. Each `match_on_values` branch contains a value and a nested node. + example: + default: other + match_on_tag: service + match_on_values: + - node: + default: web-team + value: web-store + type: object + synthetic_tag: + description: The name of the synthetic tag created by the mapping. + example: "team" + type: string + required: + - synthetic_tag + - mapping + type: object ArbitraryRuleResponse: description: The definition of `ArbitraryRuleResponse` object. example: @@ -15984,6 +16007,9 @@ components: description: The `attributes` `enabled`. example: false type: boolean + is_ootb: + description: Whether the rule is an out-of-the-box rule provided by Datadog. Omitted when `false`. + type: boolean last_modified_user_uuid: description: The `attributes` `last_modified_user_uuid`. example: "" @@ -16008,6 +16034,8 @@ components: rejected: description: The `attributes` `rejected`. type: boolean + rule_category: + $ref: "#/components/schemas/ArbitraryRuleResponseDataAttributesRuleCategory" rule_name: description: The `attributes` `rule_name`. example: "" @@ -16023,6 +16051,14 @@ components: example: "" format: date-time type: string + valid_from_date: + description: The first date the rule applies to. Omitted when the rule has no start date. + format: date + type: string + valid_through_date: + description: The last date the rule applies to. Omitted when the rule has no end date. + format: date + type: string version: description: The `attributes` `version`. example: 0 @@ -16067,6 +16103,15 @@ components: - condition - tag type: object + ArbitraryRuleResponseDataAttributesRuleCategory: + description: Rule category. Omitted for custom rules. + enum: + - custom + - ai_gateway + type: string + x-enum-varnames: + - CUSTOM + - AI_GATEWAY ArbitraryRuleResponseDataAttributesStrategy: description: The definition of `ArbitraryRuleResponseDataAttributesStrategy` object. properties: @@ -16109,10 +16154,24 @@ components: granularity: description: The `strategy` `granularity`. type: string + mapping_transform: + $ref: "#/components/schemas/ArbitraryRuleMappingTransform" method: description: The `strategy` `method`. example: "" type: string + static_tags: + description: Tags added to every cost row allocated by the rule. + items: + $ref: "#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems" + type: array + supporting_timeseries: + additionalProperties: {} + description: Integration metrics query used to calculate coverage. + nullable: true + type: object + tag_transforms: + $ref: "#/components/schemas/ArbitraryRuleTagTransforms" required: - method type: object @@ -16288,6 +16347,60 @@ components: type: string x-enum-varnames: - ARBITRARY_RULE_STATUS + ArbitraryRuleTagTransforms: + description: >- + Only supported for `proportional_timeseries` and `even_timeseries` rules. Applies tag key renames and tag value transforms to timeseries input rows after `mapping_transform`. + properties: + tag_key_rename: + additionalProperties: + type: string + description: Map of source tag key to renamed tag key. + type: object + tag_value_transforms: + additionalProperties: + $ref: "#/components/schemas/ArbitraryRuleTagValueTransform" + description: Map of tag key to the transform applied to its values. + type: object + type: object + ArbitraryRuleTagValueTransform: + description: A transform applied to the values of one tag key. + properties: + default: + description: The value used when no `map` entry matches. + type: string + map: + additionalProperties: + type: string + description: Lookup map from input value to output value, for `lookup_map`. + type: object + pattern: + description: The regular expression, for `regex_extract` and `regex_replace`. + type: string + replacement: + description: The replacement string, for `string_replace` and `regex_replace`. + type: string + target: + description: The substring to replace, for `string_replace`. + type: string + type: + $ref: "#/components/schemas/ArbitraryRuleTagValueTransformType" + required: + - type + type: object + ArbitraryRuleTagValueTransformType: + description: The kind of transform. + enum: + - string_replace + - regex_extract + - regex_replace + - lookup_map + example: string_replace + type: string + x-enum-varnames: + - STRING_REPLACE + - REGEX_EXTRACT + - REGEX_REPLACE + - LOOKUP_MAP ArchiveSearchCreateRehydration: description: |- Rehydration settings. Include this object to index the matched logs into a retained historical view. @@ -18107,7 +18220,6 @@ components: type: string created_at: description: The timestamp when the AWS CUR config was created. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string error_messages: description: The error messages for the AWS CUR config. @@ -18136,11 +18248,9 @@ components: type: string status_updated_at: description: The timestamp when the AWS CUR config status was updated. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string updated_at: description: The timestamp when the AWS CUR config status was updated. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string required: - account_id @@ -18284,14 +18394,14 @@ components: account_id: "123456789123" bucket_name: dd-cost-bucket bucket_region: us-east-1 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" error_messages: [] months: 36 report_name: dd-report-name report_prefix: dd-report-prefix status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: aws_cur_config properties: @@ -18910,7 +19020,6 @@ components: type: string created_at: description: The timestamp when the Azure config was created. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string dataset_type: description: The dataset type of the Azure config. @@ -18950,7 +19059,6 @@ components: type: string status_updated_at: description: The timestamp when the Azure config status was last updated. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string storage_account: description: The name of the storage account where the Azure Export is saved. @@ -18962,7 +19070,6 @@ components: type: string updated_at: description: The timestamp when the Azure config was last updated. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string required: - account_id @@ -43191,6 +43298,455 @@ 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 + links: + $ref: "#/components/schemas/DeviceBaseArrayLinks" + meta: + $ref: "#/components/schemas/DeviceBaseArrayMeta" + required: + - data + type: object + DeviceBaseArrayLinks: + description: Links related to the current page of devices. + properties: + next: + description: URL of the next page of devices. Present only when more devices remain. + example: /api/v2/eudm/devices?page%5Bcursor%5D=TEFQVE9QLURFTU8tMDAx&page%5Blimit%5D=1 + type: string + self: + description: URL of the current request. + example: /api/v2/eudm/devices?page%5Blimit%5D=1 + type: string + type: object + DeviceBaseArrayMeta: + description: Metadata about the list devices response. + properties: + page: + $ref: "#/components/schemas/DeviceBaseArrayMetaPage" + type: object + DeviceBaseArrayMetaPage: + description: Pagination information for the list devices response. + properties: + after: + description: |- + Cursor to pass as `page[cursor]` to get the next page. + Present only when more devices remain. + example: TEFQVE9QLURFTU8tMDAx + type: string + 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_critical: + description: Whether the device's battery health has degraded to a critical level. + type: boolean + 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 + employee: + $ref: "#/components/schemas/DeviceEmployee" + geo_ip: + $ref: "#/components/schemas/DeviceGeoIP" + ip_address: + description: Last observed IPv4 or IPv6 address of the device. + type: string + issues: + description: |- + List of issue identifiers currently affecting the device. + 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_reboot: + description: Timestamp of the most recent device reboot, in RFC 3339 format. + 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, as reported by the Datadog Agent + (for example, `macOS`, `Windows`, or `linux`). Empty when unknown. + 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: + $ref: "#/components/schemas/DeviceStatus" + type: + description: Hardware type of the device (for example, `laptop` or `desktop`). `unknown` when the type cannot be determined. + 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 Cloud Network Monitoring 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_critical: + description: Whether the device's battery health has degraded to a critical level. + type: boolean + 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 + cnm_enabled: + description: Whether Cloud Network Monitoring is enabled on the device. + type: boolean + 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 + employee: + $ref: "#/components/schemas/DeviceEmployee" + geo_ip: + $ref: "#/components/schemas/DeviceGeoIP" + ip_address: + description: Last observed IPv4 or IPv6 address of the device. + type: string + issues: + description: |- + List of issue identifiers currently affecting the device. + 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_reboot: + description: Timestamp of the most recent device reboot, in RFC 3339 format. + 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, as reported by the Datadog Agent + (for example, `macOS`, `Windows`, or `linux`). Empty when unknown. + type: string + os_version: + description: Operating system version running on the device. + type: string + packet_sent: + description: |- + Number of TCP packets sent by the device over the query window, + as reported by Cloud Network Monitoring. + format: double + type: number + resource_id: + description: Datadog resource identifier for the device. + type: string + retransmit: + description: Number of TCP packets retransmitted by the device over the query window. + format: double + type: number + retransmit_pct: + description: Percentage of sent TCP packets that were retransmitted, between 0 and 100. + format: double + type: number + serial_number: + description: Serial number assigned to the device by its manufacturer. + type: string + status: + $ref: "#/components/schemas/DeviceStatus" + tcp_canceled: + description: Number of TCP connection attempts canceled by the device over the query window. + format: double + type: number + tcp_established: + description: Number of TCP connections established by the device over the query window. + format: double + type: number + tcp_establishment_failure_pct: + description: Percentage of TCP connection attempts that failed, between 0 and 100. + format: double + type: number + tcp_establishment_failures: + description: Number of TCP connection attempts that failed over the query window. + format: double + type: number + tcp_host_unreachable: + description: Number of TCP connection attempts that failed because the host was unreachable. + format: double + type: number + tcp_network_unreachable: + description: Number of TCP connection attempts that failed because the network was unreachable. + format: double + type: number + tcp_refusals: + description: Number of TCP connection attempts refused by the remote host over the query window. + format: double + type: number + tcp_timeouts: + description: Number of TCP connection attempts that timed out over the query window. + format: double + type: number + type: + description: Hardware type of the device (for example, `laptop` or `desktop`). `unknown` when the type cannot be determined. + 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 + DeviceEmployee: + description: |- + Directory information about the employee associated with the device, + sourced from a customer reference table. + Absent when no reference table is configured or the device has no match. + properties: + city: + description: City where the employee is based. + type: string + country: + description: Country where the employee is based. + type: string + department: + description: Department the employee belongs to. + type: string + email: + description: Email address of the employee. + type: string + name: + description: Full name of the employee. + type: string + office: + description: Office the employee is assigned to. + type: string + team: + description: Team the employee belongs to. + type: string + type: object + DeviceGeoIP: + description: |- + Location derived from the device's public IP address. + Absent when no location data is available. + properties: + geo_city: + description: City resolved from the device's public IP address. + type: string + geo_country_iso_code: + description: ISO 3166-1 alpha-2 country code resolved from the device's public IP address. + type: string + geo_latitude: + description: Latitude resolved from the device's public IP address. + format: double + type: number + geo_longitude: + description: Longitude resolved from the device's public IP address. + format: double + type: number + geo_subdivision_iso_code: + description: |- + ISO 3166-2 subdivision code (for example, a state or province) + resolved from the device's public IP address. + type: string + public_ip_address: + description: Public IPv4 or IPv6 address of the device. + type: string + type: object + DeviceStatus: + description: |- + Health status of the device, computed from its issues and recent telemetry. + `inactive` means the device stopped reporting. `unknown` means no telemetry is available yet. + enum: + - healthy + - degraded + - critical + - inactive + - unknown + example: healthy + type: string + x-enum-varnames: + - HEALTHY + - DEGRADED + - CRITICAL + - INACTIVE + - UNKNOWN DeviceTagsBySource: description: Tags associated with a device from a specific source. properties: @@ -60527,6 +61083,45 @@ components: description: The definition of the `GCPCredentialsUpdate` object. oneOf: - $ref: "#/components/schemas/GCPServiceAccountUpdate" + GCPCudMetadataConfig: + description: >- + The BigQuery table the committed use discount (CUD) metadata is read from. Only returned when CUD metadata is configured for the account. + properties: + dataset_id: + description: The BigQuery dataset ID of the CUD metadata export. + example: "billing_cud_metadata" + type: string + project_id: + description: The Google Cloud project ID of the CUD metadata export. + example: "my-cud-project-123" + type: string + table_id: + description: The BigQuery table ID of the CUD metadata export. + example: "cud_metadata_export" + type: string + required: + - project_id + - dataset_id + - table_id + type: object + GCPCudMetadataErrorCodes: + description: >- + The error codes reported for the committed use discount (CUD) metadata export. Only returned when CUD metadata is configured for the account. + items: + description: A CUD metadata error code. + format: int32 + maximum: 2147483647 + type: integer + type: array + GCPCudMetadataState: + description: >- + The state of the Google Cloud committed use discount (CUD) metadata export. Only returned when CUD metadata is configured for the account. + type: string + GCPCudMetadataStatusUpdatedAt: + description: >- + The timestamp when the committed use discount (CUD) metadata state was last updated. Only returned when CUD metadata is configured for the account. + example: "2023-01-01T12:00:00Z" + type: string GCPIntegration: description: The definition of the `GCPIntegration` object. properties: @@ -60896,8 +61491,15 @@ components: type: string created_at: description: The timestamp when the Google Cloud Usage Cost config was created. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string + cud_metadata_config: + $ref: "#/components/schemas/GCPCudMetadataConfig" + cud_metadata_error_codes: + $ref: "#/components/schemas/GCPCudMetadataErrorCodes" + cud_metadata_state: + $ref: "#/components/schemas/GCPCudMetadataState" + cud_metadata_status_updated_at: + $ref: "#/components/schemas/GCPCudMetadataStatusUpdatedAt" dataset: description: The export dataset name used for the Google Cloud Usage Cost Report. example: "billing" @@ -60937,11 +61539,9 @@ components: type: string status_updated_at: description: The timestamp when the Google Cloud Usage Cost config status was updated. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string updated_at: description: The timestamp when the Google Cloud Usage Cost config status was updated. - pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string required: - account_id @@ -61209,7 +61809,7 @@ components: attributes: account_id: 123456_A123BC_12AB34 bucket_name: dd-cost-bucket - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset: billing error_messages: [] export_prefix: datadog_cloud_cost_usage_export @@ -61218,8 +61818,8 @@ components: project_id: my-project-123 service_account: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: gcp_uc_config properties: @@ -61251,6 +61851,14 @@ components: created_at: description: The `attributes` `created_at`. type: string + cud_metadata_config: + $ref: "#/components/schemas/GCPCudMetadataConfig" + cud_metadata_error_codes: + $ref: "#/components/schemas/GCPCudMetadataErrorCodes" + cud_metadata_state: + $ref: "#/components/schemas/GCPCudMetadataState" + cud_metadata_status_updated_at: + $ref: "#/components/schemas/GCPCudMetadataStatusUpdatedAt" dataset: description: The `attributes` `dataset`. type: string @@ -114874,7 +115482,7 @@ components: example: data: attributes: - Query: example:query AND test:true + query: example:query AND test:true type: validate_query properties: data: @@ -114896,12 +115504,13 @@ components: RulesValidateQueryRequestDataAttributes: description: The definition of `RulesValidateQueryRequestDataAttributes` object. properties: - Query: - description: The `attributes` `Query`. - example: "" + query: + description: >- + The tag pipeline rule query to validate, in Datadog tag query syntax: `tag:value` terms combined with `AND`, `OR`, and `NOT`. + example: "example:query AND test:true" type: string required: - - Query + - query type: object RulesValidateQueryRequestDataType: default: validate_query @@ -148194,7 +148803,7 @@ components: configs: - account_id: 1234abcd-1234-abcd-1234-1234abcd1234 client_id: 1234abcd-1234-abcd-1234-1234abcd1234 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset_type: actual error_messages: [] export_name: dd-actual-export @@ -148203,10 +148812,10 @@ components: months: 36 scope: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 status: active - status_updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" storage_account: dd-storage-account storage_container: dd-storage-container - updated_at: "2023-01-01T12:00:00.000000" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: azure_uc_configs properties: @@ -149747,7 +150356,6 @@ components: attributes: enabled: true last_version: 1 - name: Updated Ruleset rules: - enabled: true mapping: @@ -149789,6 +150397,7 @@ components: - http_status - status_description table_name: http_status_codes + id: Updated Ruleset type: update_ruleset properties: data: @@ -169379,14 +169988,14 @@ paths: account_id: "123456789123" bucket_name: dd-cost-bucket bucket_region: us-east-1 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" error_messages: [] months: 36 report_name: dd-report-name report_prefix: dd-report-prefix status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123" type: aws_cur_config schema: @@ -169457,14 +170066,14 @@ paths: account_id: "123456789123" bucket_name: dd-cost-bucket bucket_region: us-east-1 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" error_messages: [] months: 36 report_name: dd-report-name report_prefix: dd-report-prefix status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: aws_cur_config schema: @@ -169559,14 +170168,14 @@ paths: account_id: "123456789123" bucket_name: dd-cost-bucket bucket_region: us-east-1 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" error_messages: [] months: 36 report_name: dd-report-name report_prefix: dd-report-prefix status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: aws_cur_config schema: @@ -169620,14 +170229,14 @@ paths: account_id: "123456789123" bucket_name: dd-cost-bucket bucket_region: us-east-1 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" error_messages: [] months: 36 report_name: dd-report-name report_prefix: dd-report-prefix status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123" type: aws_cur_config schema: @@ -169675,7 +170284,7 @@ paths: configs: - account_id: 1234abcd-1234-abcd-1234-1234abcd1234 client_id: 1234abcd-1234-abcd-1234-1234abcd1234 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset_type: actual error_messages: [] export_name: dd-actual-export @@ -169684,10 +170293,10 @@ paths: months: 36 scope: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 status: active - status_updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" storage_account: dd-storage-account storage_container: dd-storage-container - updated_at: "2023-01-01T12:00:00.000000" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: azure_uc_configs schema: @@ -169753,7 +170362,7 @@ paths: configs: - account_id: 1234abcd-1234-abcd-1234-1234abcd1234 client_id: 1234abcd-1234-abcd-1234-1234abcd1234 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset_type: actual error_messages: [] export_name: dd-actual-export @@ -169762,10 +170371,10 @@ paths: months: 36 scope: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 status: active - status_updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" storage_account: dd-storage-account storage_container: dd-storage-container - updated_at: "2023-01-01T12:00:00.000000" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: azure_uc_configs schema: @@ -169855,7 +170464,7 @@ paths: configs: - account_id: 1234abcd-1234-abcd-1234-1234abcd1234 client_id: 1234abcd-1234-abcd-1234-1234abcd1234 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset_type: actual error_messages: [] export_name: dd-actual-export @@ -169864,10 +170473,10 @@ paths: months: 36 scope: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 status: active - status_updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" storage_account: dd-storage-account storage_container: dd-storage-container - updated_at: "2023-01-01T12:00:00.000000" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: azure_uc_configs schema: @@ -169913,7 +170522,7 @@ paths: configs: - account_id: 1234abcd-1234-abcd-1234-1234abcd1234 client_id: 1234abcd-1234-abcd-1234-1234abcd1234 - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset_type: actual error_messages: [] export_name: dd-actual-export @@ -169922,10 +170531,10 @@ paths: months: 36 scope: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 status: active - status_updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" storage_account: dd-storage-account storage_container: dd-storage-container - updated_at: "2023-01-01T12:00:00.000000" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: azure_uc_configs schema: @@ -171317,7 +171926,7 @@ paths: - attributes: account_id: 123456_A123BC_12AB34 bucket_name: dd-cost-bucket - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset: billing error_messages: [] export_prefix: datadog_cloud_cost_usage_export @@ -171326,8 +171935,8 @@ paths: project_id: my-project-123 service_account: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: gcp_uc_config schema: @@ -171385,7 +171994,7 @@ paths: attributes: account_id: 123456_A123BC_12AB34 bucket_name: dd-cost-bucket - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset: billing error_messages: [] export_prefix: datadog_cloud_cost_usage_export @@ -171394,8 +172003,8 @@ paths: project_id: my-project-123 service_account: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: gcp_uc_config schema: @@ -171484,7 +172093,7 @@ paths: attributes: account_id: 123456_A123BC_12AB34 bucket_name: dd-cost-bucket - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset: billing error_messages: [] export_prefix: datadog_cloud_cost_usage_export @@ -171493,8 +172102,8 @@ paths: project_id: my-project-123 service_account: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: gcp_uc_config schema: @@ -171539,7 +172148,7 @@ paths: attributes: account_id: 123456_A123BC_12AB34 bucket_name: dd-cost-bucket - created_at: "2023-01-01T12:00:00.000000" + created_at: "2023-01-01T12:00:00Z" dataset: billing error_messages: [] export_prefix: datadog_cloud_cost_usage_export @@ -171548,8 +172157,8 @@ paths: project_id: my-project-123 service_account: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com status: active - status_updated_at: "2023-01-01T12:00:00.000000" - updated_at: "2023-01-01T12:00:00.000000" + status_updated_at: "2023-01-01T12:00:00Z" + updated_at: "2023-01-01T12:00:00Z" id: "123456789123" type: gcp_uc_config schema: @@ -179710,6 +180319,183 @@ paths: summary: Update the state of an issue tags: - Error Tracking + /api/v2/eudm/devices: + get: + operationId: GetEUDMDevices + parameters: + - description: |- + Filter devices to those currently associated with any of the given BSSID values. + Each value must be a MAC-48 address; repeat the parameter to pass several values. + explode: true + in: query + name: bssid + required: false + schema: + items: + example: 00:00:5e:00:53:01 + pattern: "^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$" + type: string + type: array + style: form + - description: |- + Maximum number of devices to return in one page. Must be a positive integer. + If not set, the response contains all matching devices. + in: query + name: page[limit] + required: false + schema: + example: 100 + format: int64 + minimum: 1 + type: integer + - description: |- + Opaque cursor that selects the next page. Use the `meta.page.after` value + of the previous response. Devices are ordered by ID. + in: query + name: page[cursor] + required: false + schema: + type: string + 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 + links: + next: /api/v2/eudm/devices?page%5Bcursor%5D=TEFQVE9QLURFTU8tMDAx&page%5Blimit%5D=1 + self: /api/v2/eudm/devices?page%5Blimit%5D=1 + meta: + page: + after: TEFQVE9QLURFTU8tMDAx + schema: + $ref: "#/components/schemas/DeviceBaseArray" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get all devices + tags: + - End User Device Monitoring + x-permission: + operator: OR + permissions: + - end_user_devices_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/). + /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 + cnm_enabled: true + 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 + packet_sent: 98213.0 + retransmit: 112.0 + retransmit_pct: 0.11 + serial_number: TESTDEVICE001 + status: healthy + tcp_canceled: 1.0 + tcp_established: 1482.0 + tcp_establishment_failure_pct: 0.6 + tcp_establishment_failures: 9.0 + tcp_host_unreachable: 1.0 + tcp_network_unreachable: 0.0 + tcp_refusals: 3.0 + tcp_timeouts: 4.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 + "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" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a device + tags: + - End User Device Monitoring + x-permission: + operator: OR + permissions: + - end_user_devices_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/). /api/v2/events: get: description: |- @@ -263102,7 +263888,7 @@ paths: value: data: attributes: - Query: example:query AND test:true + query: example:query AND test:true type: validate_query schema: $ref: "#/components/schemas/RulesValidateQueryRequest" @@ -263229,7 +264015,6 @@ paths: attributes: enabled: true last_version: 1 - name: Updated Ruleset rules: - enabled: true name: Add Cost Center Tag @@ -263264,6 +264049,7 @@ paths: - http_status - status_description table_name: http_status_codes + id: Updated Ruleset type: update_ruleset schema: $ref: "#/components/schemas/UpdateRulesetRequest" @@ -271993,6 +272779,10 @@ tags: description: Elastic Cloud integration. url: https://docs.datadoghq.com/integrations/elastic-cloud/ name: Elastic Cloud Integration + - 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. 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..b9e7a6d490 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMDevice.py @@ -0,0 +1,16 @@ +""" +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() +configuration.unstable_operations["get_eudm_device"] = True +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..3cec818668 --- /dev/null +++ b/examples/v2/end-user-device-monitoring/GetEUDMDevices.py @@ -0,0 +1,14 @@ +""" +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() +configuration.unstable_operations["get_eudm_devices"] = True +with ApiClient(configuration) as api_client: + api_instance = EndUserDeviceMonitoringApi(api_client) + response = api_instance.get_eudm_devices() + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 9755f40f34..5ebf267eb2 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -602,6 +602,8 @@ def __init__( "v2.trigger_deployment_gates_evaluation": False, "v2.update_deployment_gate": False, "v2.update_deployment_rule": False, + "v2.get_eudm_device": False, + "v2.get_eudm_devices": False, "v2.clone_form": False, "v2.create_and_publish_form": False, "v2.create_form": 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..973ddbec90 --- /dev/null +++ b/src/datadog_api_client/v2/api/end_user_device_monitoring_api.py @@ -0,0 +1,133 @@ +# 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, List, Union + +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 ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.device_base_array import DeviceBaseArray +from datadog_api_client.v2.model.device_details import DeviceDetails + + +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"], + "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"], + "endpoint_path": "/api/v2/eudm/devices", + "operation_id": "get_eudm_devices", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "bssid": { + "openapi_types": ([str],), + "attribute": "bssid", + "location": "query", + "collection_format": "multi", + }, + "page_limit": { + "validation": { + "inclusive_minimum": 1, + }, + "openapi_types": (int,), + "attribute": "page[limit]", + "location": "query", + }, + "page_cursor": { + "openapi_types": (str,), + "attribute": "page[cursor]", + "location": "query", + }, + }, + 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, + *, + bssid: Union[List[str], UnsetType] = unset, + page_limit: Union[int, UnsetType] = unset, + page_cursor: Union[str, UnsetType] = unset, + ) -> DeviceBaseArray: + """Get all devices. + + :param bssid: Filter devices to those currently associated with any of the given BSSID values. + Each value must be a MAC-48 address; repeat the parameter to pass several values. + :type bssid: [str], optional + :param page_limit: Maximum number of devices to return in one page. Must be a positive integer. + If not set, the response contains all matching devices. + :type page_limit: int, optional + :param page_cursor: Opaque cursor that selects the next page. Use the ``meta.page.after`` value + of the previous response. Devices are ordered by ID. + :type page_cursor: str, optional + :rtype: DeviceBaseArray + """ + kwargs: Dict[str, Any] = {} + if bssid is not unset: + kwargs["bssid"] = bssid + + if page_limit is not unset: + kwargs["page_limit"] = page_limit + + if page_cursor is not unset: + kwargs["page_cursor"] = page_cursor + + return self._get_eudm_devices_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 10452dce22..e9da816e59 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -56,6 +56,7 @@ 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.elastic_cloud_integration_api import ElasticCloudIntegrationApi +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 @@ -217,6 +218,7 @@ "DomainAllowlistApi", "DowntimesApi", "ElasticCloudIntegrationApi", + "EndUserDeviceMonitoringApi", "EntityIntegrationConfigsApi", "EntityRiskScoresApi", "ErrorTrackingApi", diff --git a/src/datadog_api_client/v2/model/arbitrary_rule_mapping_transform.py b/src/datadog_api_client/v2/model/arbitrary_rule_mapping_transform.py new file mode 100644 index 0000000000..e714a4b4dd --- /dev/null +++ b/src/datadog_api_client/v2/model/arbitrary_rule_mapping_transform.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 Any, Dict + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + UUID, +) + + +class ArbitraryRuleMappingTransform(ModelNormal): + @cached_property + def openapi_types(_): + return { + "mapping": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "synthetic_tag": (str,), + } + + attribute_map = { + "mapping": "mapping", + "synthetic_tag": "synthetic_tag", + } + + def __init__(self_, mapping: Dict[str, Any], synthetic_tag: str, **kwargs): + """ + Only supported for ``proportional_timeseries`` and ``even_timeseries`` rules. Creates a synthetic tag from timeseries input rows before ``tag_transforms`` are applied. + + :param mapping: Recursive mapping node. Each ``match_on_values`` branch contains a value and a nested node. + :type mapping: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)} + + :param synthetic_tag: The name of the synthetic tag created by the mapping. + :type synthetic_tag: str + """ + super().__init__(kwargs) + + self_.mapping = mapping + self_.synthetic_tag = synthetic_tag diff --git a/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes.py b/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes.py index 4ac0f6ae6b..5f562d93ab 100644 --- a/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes.py +++ b/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes.py @@ -18,6 +18,9 @@ from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_costs_to_allocate_items import ( ArbitraryRuleResponseDataAttributesCostsToAllocateItems, ) + from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_rule_category import ( + ArbitraryRuleResponseDataAttributesRuleCategory, + ) from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy import ( ArbitraryRuleResponseDataAttributesStrategy, ) @@ -35,6 +38,9 @@ def openapi_types(_): from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_costs_to_allocate_items import ( ArbitraryRuleResponseDataAttributesCostsToAllocateItems, ) + from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_rule_category import ( + ArbitraryRuleResponseDataAttributesRuleCategory, + ) from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy import ( ArbitraryRuleResponseDataAttributesStrategy, ) @@ -43,15 +49,19 @@ def openapi_types(_): "costs_to_allocate": ([ArbitraryRuleResponseDataAttributesCostsToAllocateItems],), "created": (datetime,), "enabled": (bool,), + "is_ootb": (bool,), "last_modified_user_uuid": (str,), "order_id": (int,), "processing_status": (str,), "provider": ([str],), "rejected": (bool,), + "rule_category": (ArbitraryRuleResponseDataAttributesRuleCategory,), "rule_name": (str,), "strategy": (ArbitraryRuleResponseDataAttributesStrategy,), "type": (str,), "updated": (datetime,), + "valid_from_date": (datetime,), + "valid_through_date": (datetime,), "version": (int,), } @@ -59,15 +69,19 @@ def openapi_types(_): "costs_to_allocate": "costs_to_allocate", "created": "created", "enabled": "enabled", + "is_ootb": "is_ootb", "last_modified_user_uuid": "last_modified_user_uuid", "order_id": "order_id", "processing_status": "processing_status", "provider": "provider", "rejected": "rejected", + "rule_category": "rule_category", "rule_name": "rule_name", "strategy": "strategy", "type": "type", "updated": "updated", + "valid_from_date": "valid_from_date", + "valid_through_date": "valid_through_date", "version": "version", } @@ -84,8 +98,12 @@ def __init__( type: str, updated: datetime, version: int, + is_ootb: Union[bool, UnsetType] = unset, processing_status: Union[str, UnsetType] = unset, rejected: Union[bool, UnsetType] = unset, + rule_category: Union[ArbitraryRuleResponseDataAttributesRuleCategory, UnsetType] = unset, + valid_from_date: Union[datetime, UnsetType] = unset, + valid_through_date: Union[datetime, UnsetType] = unset, **kwargs, ): """ @@ -100,6 +118,9 @@ def __init__( :param enabled: The ``attributes`` ``enabled``. :type enabled: bool + :param is_ootb: Whether the rule is an out-of-the-box rule provided by Datadog. Omitted when ``false``. + :type is_ootb: bool, optional + :param last_modified_user_uuid: The ``attributes`` ``last_modified_user_uuid``. :type last_modified_user_uuid: str @@ -115,6 +136,9 @@ def __init__( :param rejected: The ``attributes`` ``rejected``. :type rejected: bool, optional + :param rule_category: Rule category. Omitted for custom rules. + :type rule_category: ArbitraryRuleResponseDataAttributesRuleCategory, optional + :param rule_name: The ``attributes`` ``rule_name``. :type rule_name: str @@ -127,13 +151,27 @@ def __init__( :param updated: The ``attributes`` ``updated``. :type updated: datetime + :param valid_from_date: The first date the rule applies to. Omitted when the rule has no start date. + :type valid_from_date: datetime, optional + + :param valid_through_date: The last date the rule applies to. Omitted when the rule has no end date. + :type valid_through_date: datetime, optional + :param version: The ``attributes`` ``version``. :type version: int """ + if is_ootb is not unset: + kwargs["is_ootb"] = is_ootb if processing_status is not unset: kwargs["processing_status"] = processing_status if rejected is not unset: kwargs["rejected"] = rejected + if rule_category is not unset: + kwargs["rule_category"] = rule_category + if valid_from_date is not unset: + kwargs["valid_from_date"] = valid_from_date + if valid_through_date is not unset: + kwargs["valid_through_date"] = valid_through_date super().__init__(kwargs) self_.costs_to_allocate = costs_to_allocate diff --git a/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes_rule_category.py b/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes_rule_category.py new file mode 100644 index 0000000000..5d2ab9720a --- /dev/null +++ b/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes_rule_category.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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ArbitraryRuleResponseDataAttributesRuleCategory(ModelSimple): + """ + Rule category. Omitted for custom rules. + + :param value: Must be one of ["custom", "ai_gateway"]. + :type value: str + """ + + allowed_values = { + "custom", + "ai_gateway", + } + CUSTOM: ClassVar["ArbitraryRuleResponseDataAttributesRuleCategory"] + AI_GATEWAY: ClassVar["ArbitraryRuleResponseDataAttributesRuleCategory"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ArbitraryRuleResponseDataAttributesRuleCategory.CUSTOM = ArbitraryRuleResponseDataAttributesRuleCategory("custom") +ArbitraryRuleResponseDataAttributesRuleCategory.AI_GATEWAY = ArbitraryRuleResponseDataAttributesRuleCategory( + "ai_gateway" +) diff --git a/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes_strategy.py b/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes_strategy.py index 7ad4934514..b94bde176c 100644 --- a/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes_strategy.py +++ b/src/datadog_api_client/v2/model/arbitrary_rule_response_data_attributes_strategy.py @@ -30,6 +30,11 @@ from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items import ( ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems, ) + from datadog_api_client.v2.model.arbitrary_rule_mapping_transform import ArbitraryRuleMappingTransform + from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items import ( + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems, + ) + from datadog_api_client.v2.model.arbitrary_rule_tag_transforms import ArbitraryRuleTagTransforms class ArbitraryRuleResponseDataAttributesStrategy(ModelNormal): @@ -47,6 +52,11 @@ def openapi_types(_): from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items import ( ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems, ) + from datadog_api_client.v2.model.arbitrary_rule_mapping_transform import ArbitraryRuleMappingTransform + from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items import ( + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems, + ) + from datadog_api_client.v2.model.arbitrary_rule_tag_transforms import ArbitraryRuleTagTransforms return { "allocated_by": ([ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems],), @@ -74,7 +84,27 @@ def openapi_types(_): ), "evaluate_grouped_by_tag_keys": ([str],), "granularity": (str,), + "mapping_transform": (ArbitraryRuleMappingTransform,), "method": (str,), + "static_tags": ([ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems],), + "supporting_timeseries": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + none_type, + ), + "tag_transforms": (ArbitraryRuleTagTransforms,), } attribute_map = { @@ -86,7 +116,11 @@ def openapi_types(_): "evaluate_grouped_by_filters": "evaluate_grouped_by_filters", "evaluate_grouped_by_tag_keys": "evaluate_grouped_by_tag_keys", "granularity": "granularity", + "mapping_transform": "mapping_transform", "method": "method", + "static_tags": "static_tags", + "supporting_timeseries": "supporting_timeseries", + "tag_transforms": "tag_transforms", } def __init__( @@ -104,6 +138,12 @@ def __init__( ] = unset, evaluate_grouped_by_tag_keys: Union[List[str], UnsetType] = unset, granularity: Union[str, UnsetType] = unset, + mapping_transform: Union[ArbitraryRuleMappingTransform, UnsetType] = unset, + static_tags: Union[ + List[ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems], UnsetType + ] = unset, + supporting_timeseries: Union[Dict[str, Any], none_type, UnsetType] = unset, + tag_transforms: Union[ArbitraryRuleTagTransforms, UnsetType] = unset, **kwargs, ): """ @@ -133,8 +173,20 @@ def __init__( :param granularity: The ``strategy`` ``granularity``. :type granularity: str, optional + :param mapping_transform: Only supported for ``proportional_timeseries`` and ``even_timeseries`` rules. Creates a synthetic tag from timeseries input rows before ``tag_transforms`` are applied. + :type mapping_transform: ArbitraryRuleMappingTransform, optional + :param method: The ``strategy`` ``method``. :type method: str + + :param static_tags: Tags added to every cost row allocated by the rule. + :type static_tags: [ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems], optional + + :param supporting_timeseries: Integration metrics query used to calculate coverage. + :type supporting_timeseries: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, none_type, optional + + :param tag_transforms: Only supported for ``proportional_timeseries`` and ``even_timeseries`` rules. Applies tag key renames and tag value transforms to timeseries input rows after ``mapping_transform``. + :type tag_transforms: ArbitraryRuleTagTransforms, optional """ if allocated_by is not unset: kwargs["allocated_by"] = allocated_by @@ -152,6 +204,14 @@ def __init__( kwargs["evaluate_grouped_by_tag_keys"] = evaluate_grouped_by_tag_keys if granularity is not unset: kwargs["granularity"] = granularity + if mapping_transform is not unset: + kwargs["mapping_transform"] = mapping_transform + if static_tags is not unset: + kwargs["static_tags"] = static_tags + if supporting_timeseries is not unset: + kwargs["supporting_timeseries"] = supporting_timeseries + if tag_transforms is not unset: + kwargs["tag_transforms"] = tag_transforms super().__init__(kwargs) self_.method = method diff --git a/src/datadog_api_client/v2/model/arbitrary_rule_tag_transforms.py b/src/datadog_api_client/v2/model/arbitrary_rule_tag_transforms.py new file mode 100644 index 0000000000..648b7b9d96 --- /dev/null +++ b/src/datadog_api_client/v2/model/arbitrary_rule_tag_transforms.py @@ -0,0 +1,54 @@ +# 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 Dict, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.arbitrary_rule_tag_value_transform import ArbitraryRuleTagValueTransform + + +class ArbitraryRuleTagTransforms(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.arbitrary_rule_tag_value_transform import ArbitraryRuleTagValueTransform + + return { + "tag_key_rename": ({str: (str,)},), + "tag_value_transforms": ({str: (ArbitraryRuleTagValueTransform,)},), + } + + attribute_map = { + "tag_key_rename": "tag_key_rename", + "tag_value_transforms": "tag_value_transforms", + } + + def __init__( + self_, + tag_key_rename: Union[Dict[str, str], UnsetType] = unset, + tag_value_transforms: Union[Dict[str, ArbitraryRuleTagValueTransform], UnsetType] = unset, + **kwargs, + ): + """ + Only supported for ``proportional_timeseries`` and ``even_timeseries`` rules. Applies tag key renames and tag value transforms to timeseries input rows after ``mapping_transform``. + + :param tag_key_rename: Map of source tag key to renamed tag key. + :type tag_key_rename: {str: (str,)}, optional + + :param tag_value_transforms: Map of tag key to the transform applied to its values. + :type tag_value_transforms: {str: (ArbitraryRuleTagValueTransform,)}, optional + """ + if tag_key_rename is not unset: + kwargs["tag_key_rename"] = tag_key_rename + if tag_value_transforms is not unset: + kwargs["tag_value_transforms"] = tag_value_transforms + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/arbitrary_rule_tag_value_transform.py b/src/datadog_api_client/v2/model/arbitrary_rule_tag_value_transform.py new file mode 100644 index 0000000000..198f9f958e --- /dev/null +++ b/src/datadog_api_client/v2/model/arbitrary_rule_tag_value_transform.py @@ -0,0 +1,88 @@ +# 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 Dict, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.arbitrary_rule_tag_value_transform_type import ArbitraryRuleTagValueTransformType + + +class ArbitraryRuleTagValueTransform(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.arbitrary_rule_tag_value_transform_type import ( + ArbitraryRuleTagValueTransformType, + ) + + return { + "default": (str,), + "map": ({str: (str,)},), + "pattern": (str,), + "replacement": (str,), + "target": (str,), + "type": (ArbitraryRuleTagValueTransformType,), + } + + attribute_map = { + "default": "default", + "map": "map", + "pattern": "pattern", + "replacement": "replacement", + "target": "target", + "type": "type", + } + + def __init__( + self_, + type: ArbitraryRuleTagValueTransformType, + default: Union[str, UnsetType] = unset, + map: Union[Dict[str, str], UnsetType] = unset, + pattern: Union[str, UnsetType] = unset, + replacement: Union[str, UnsetType] = unset, + target: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A transform applied to the values of one tag key. + + :param default: The value used when no ``map`` entry matches. + :type default: str, optional + + :param map: Lookup map from input value to output value, for ``lookup_map``. + :type map: {str: (str,)}, optional + + :param pattern: The regular expression, for ``regex_extract`` and ``regex_replace``. + :type pattern: str, optional + + :param replacement: The replacement string, for ``string_replace`` and ``regex_replace``. + :type replacement: str, optional + + :param target: The substring to replace, for ``string_replace``. + :type target: str, optional + + :param type: The kind of transform. + :type type: ArbitraryRuleTagValueTransformType + """ + if default is not unset: + kwargs["default"] = default + if map is not unset: + kwargs["map"] = map + if pattern is not unset: + kwargs["pattern"] = pattern + if replacement is not unset: + kwargs["replacement"] = replacement + if target is not unset: + kwargs["target"] = target + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/arbitrary_rule_tag_value_transform_type.py b/src/datadog_api_client/v2/model/arbitrary_rule_tag_value_transform_type.py new file mode 100644 index 0000000000..4cdfb49629 --- /dev/null +++ b/src/datadog_api_client/v2/model/arbitrary_rule_tag_value_transform_type.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 ArbitraryRuleTagValueTransformType(ModelSimple): + """ + The kind of transform. + + :param value: Must be one of ["string_replace", "regex_extract", "regex_replace", "lookup_map"]. + :type value: str + """ + + allowed_values = { + "string_replace", + "regex_extract", + "regex_replace", + "lookup_map", + } + STRING_REPLACE: ClassVar["ArbitraryRuleTagValueTransformType"] + REGEX_EXTRACT: ClassVar["ArbitraryRuleTagValueTransformType"] + REGEX_REPLACE: ClassVar["ArbitraryRuleTagValueTransformType"] + LOOKUP_MAP: ClassVar["ArbitraryRuleTagValueTransformType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ArbitraryRuleTagValueTransformType.STRING_REPLACE = ArbitraryRuleTagValueTransformType("string_replace") +ArbitraryRuleTagValueTransformType.REGEX_EXTRACT = ArbitraryRuleTagValueTransformType("regex_extract") +ArbitraryRuleTagValueTransformType.REGEX_REPLACE = ArbitraryRuleTagValueTransformType("regex_replace") +ArbitraryRuleTagValueTransformType.LOOKUP_MAP = ArbitraryRuleTagValueTransformType("lookup_map") diff --git a/src/datadog_api_client/v2/model/aws_cur_config_attributes.py b/src/datadog_api_client/v2/model/aws_cur_config_attributes.py index 9c322beeb4..967c3bb14e 100644 --- a/src/datadog_api_client/v2/model/aws_cur_config_attributes.py +++ b/src/datadog_api_client/v2/model/aws_cur_config_attributes.py @@ -20,12 +20,9 @@ class AwsCURConfigAttributes(ModelNormal): validations = { - "created_at": {}, "months": { "inclusive_maximum": 36, }, - "status_updated_at": {}, - "updated_at": {}, } @cached_property diff --git a/src/datadog_api_client/v2/model/azure_uc_config.py b/src/datadog_api_client/v2/model/azure_uc_config.py index c90c31e785..99c3984757 100644 --- a/src/datadog_api_client/v2/model/azure_uc_config.py +++ b/src/datadog_api_client/v2/model/azure_uc_config.py @@ -16,12 +16,9 @@ class AzureUCConfig(ModelNormal): validations = { - "created_at": {}, "months": { "inclusive_maximum": 36, }, - "status_updated_at": {}, - "updated_at": {}, } @cached_property 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..6ebb8c145e --- /dev/null +++ b/src/datadog_api_client/v2/model/device_base_array.py @@ -0,0 +1,66 @@ +# 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.device_base_data import DeviceBaseData + from datadog_api_client.v2.model.device_base_array_links import DeviceBaseArrayLinks + from datadog_api_client.v2.model.device_base_array_meta import DeviceBaseArrayMeta + + +class DeviceBaseArray(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.device_base_data import DeviceBaseData + from datadog_api_client.v2.model.device_base_array_links import DeviceBaseArrayLinks + from datadog_api_client.v2.model.device_base_array_meta import DeviceBaseArrayMeta + + return { + "data": ([DeviceBaseData],), + "links": (DeviceBaseArrayLinks,), + "meta": (DeviceBaseArrayMeta,), + } + + attribute_map = { + "data": "data", + "links": "links", + "meta": "meta", + } + + def __init__( + self_, + data: List[DeviceBaseData], + links: Union[DeviceBaseArrayLinks, UnsetType] = unset, + meta: Union[DeviceBaseArrayMeta, UnsetType] = unset, + **kwargs, + ): + """ + Response body for the list devices endpoint. + + :param data: List of devices matching the request. + :type data: [DeviceBaseData] + + :param links: Links related to the current page of devices. + :type links: DeviceBaseArrayLinks, optional + + :param meta: Metadata about the list devices response. + :type meta: DeviceBaseArrayMeta, optional + """ + if links is not unset: + kwargs["links"] = links + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/device_base_array_links.py b/src/datadog_api_client/v2/model/device_base_array_links.py new file mode 100644 index 0000000000..bb075e81b5 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_base_array_links.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 DeviceBaseArrayLinks(ModelNormal): + @cached_property + def openapi_types(_): + return { + "next": (str,), + "self": (str,), + } + + attribute_map = { + "next": "next", + "self": "self", + } + + def __init__(self_, next: Union[str, UnsetType] = unset, self: Union[str, UnsetType] = unset, **kwargs): + """ + Links related to the current page of devices. + + :param next: URL of the next page of devices. Present only when more devices remain. + :type next: str, optional + + :param self: URL of the current request. + :type self: str, optional + """ + if next is not unset: + kwargs["next"] = next + if self is not unset: + kwargs["self"] = self + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/device_base_array_meta.py b/src/datadog_api_client/v2/model/device_base_array_meta.py new file mode 100644 index 0000000000..b81847a209 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_base_array_meta.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_base_array_meta_page import DeviceBaseArrayMetaPage + + +class DeviceBaseArrayMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.device_base_array_meta_page import DeviceBaseArrayMetaPage + + return { + "page": (DeviceBaseArrayMetaPage,), + } + + attribute_map = { + "page": "page", + } + + def __init__(self_, page: Union[DeviceBaseArrayMetaPage, UnsetType] = unset, **kwargs): + """ + Metadata about the list devices response. + + :param page: Pagination information for the list devices response. + :type page: DeviceBaseArrayMetaPage, optional + """ + if page is not unset: + kwargs["page"] = page + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/device_base_array_meta_page.py b/src/datadog_api_client/v2/model/device_base_array_meta_page.py new file mode 100644 index 0000000000..a4bbb06032 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_base_array_meta_page.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 typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class DeviceBaseArrayMetaPage(ModelNormal): + @cached_property + def openapi_types(_): + return { + "after": (str,), + } + + attribute_map = { + "after": "after", + } + + def __init__(self_, after: Union[str, UnsetType] = unset, **kwargs): + """ + Pagination information for the list devices response. + + :param after: Cursor to pass as ``page[cursor]`` to get the next page. + Present only when more devices remain. + :type after: str, optional + """ + if after is not unset: + kwargs["after"] = after + super().__init__(kwargs) 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..1d9275b4f8 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_base_data_attributes.py @@ -0,0 +1,296 @@ +# 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.device_employee import DeviceEmployee + from datadog_api_client.v2.model.device_geo_ip import DeviceGeoIP + from datadog_api_client.v2.model.device_status import DeviceStatus + + +class DeviceBaseDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.device_employee import DeviceEmployee + from datadog_api_client.v2.model.device_geo_ip import DeviceGeoIP + from datadog_api_client.v2.model.device_status import DeviceStatus + + return { + "agent_key": (str,), + "agent_version": (str,), + "battery_critical": (bool,), + "battery_max_capacity_pct": (int,), + "cpu_cores": (int,), + "cpu_logical_processors": (int,), + "cpu_model": (str,), + "cpu_usage": (float,), + "disk_usage": (float,), + "employee": (DeviceEmployee,), + "geo_ip": (DeviceGeoIP,), + "ip_address": (str,), + "issues": ([str],), + "kernel_name": (str,), + "last_reboot": (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": (DeviceStatus,), + "type": (str,), + "uptime": (float,), + "wlan_bssid": (str,), + "wlan_rssi": (float,), + "wlan_ssid": (str,), + } + + attribute_map = { + "agent_key": "agent_key", + "agent_version": "agent_version", + "battery_critical": "battery_critical", + "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", + "employee": "employee", + "geo_ip": "geo_ip", + "ip_address": "ip_address", + "issues": "issues", + "kernel_name": "kernel_name", + "last_reboot": "last_reboot", + "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_critical: Union[bool, 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, + employee: Union[DeviceEmployee, UnsetType] = unset, + geo_ip: Union[DeviceGeoIP, UnsetType] = unset, + ip_address: Union[str, UnsetType] = unset, + issues: Union[List[str], UnsetType] = unset, + kernel_name: Union[str, UnsetType] = unset, + last_reboot: 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[DeviceStatus, 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_critical: Whether the device's battery health has degraded to a critical level. + :type battery_critical: bool, 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 employee: Directory information about the employee associated with the device, + sourced from a customer reference table. + Absent when no reference table is configured or the device has no match. + :type employee: DeviceEmployee, optional + + :param geo_ip: Location derived from the device's public IP address. + Absent when no location data is available. + :type geo_ip: DeviceGeoIP, 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. + :type issues: [str], optional + + :param kernel_name: Name of the operating system kernel running on the device. + :type kernel_name: str, optional + + :param last_reboot: Timestamp of the most recent device reboot, in RFC 3339 format. + :type last_reboot: 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, as reported by the Datadog Agent + (for example, ``macOS`` , ``Windows`` , or ``linux`` ). Empty when unknown. + :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. + ``inactive`` means the device stopped reporting. ``unknown`` means no telemetry is available yet. + :type status: DeviceStatus, optional + + :param type: Hardware type of the device (for example, ``laptop`` or ``desktop`` ). ``unknown`` when the type cannot be determined. + :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_critical is not unset: + kwargs["battery_critical"] = battery_critical + 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 employee is not unset: + kwargs["employee"] = employee + if geo_ip is not unset: + kwargs["geo_ip"] = geo_ip + 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_reboot is not unset: + kwargs["last_reboot"] = last_reboot + 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..dbb0f1cc69 --- /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 Cloud Network Monitoring 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..51013afb3a --- /dev/null +++ b/src/datadog_api_client/v2/model/device_details_data_attributes.py @@ -0,0 +1,419 @@ +# 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.device_employee import DeviceEmployee + from datadog_api_client.v2.model.device_geo_ip import DeviceGeoIP + from datadog_api_client.v2.model.device_status import DeviceStatus + + +class DeviceDetailsDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.device_employee import DeviceEmployee + from datadog_api_client.v2.model.device_geo_ip import DeviceGeoIP + from datadog_api_client.v2.model.device_status import DeviceStatus + + return { + "agent_key": (str,), + "agent_version": (str,), + "battery_charge_pct": (int,), + "battery_charge_rate": (int,), + "battery_critical": (bool,), + "battery_cycle_count": (int,), + "battery_max_capacity_pct": (int,), + "cnm_enabled": (bool,), + "cpu_cores": (int,), + "cpu_logical_processors": (int,), + "cpu_model": (str,), + "cpu_usage": (float,), + "disk_usage": (float,), + "employee": (DeviceEmployee,), + "geo_ip": (DeviceGeoIP,), + "ip_address": (str,), + "issues": ([str],), + "kernel_name": (str,), + "last_reboot": (str,), + "last_seen": (str,), + "manufacturer": (str,), + "mem_usage": (float,), + "memory_total_kb": (int,), + "model_name": (str,), + "model_number": (str,), + "os": (str,), + "os_version": (str,), + "packet_sent": (float,), + "resource_id": (str,), + "retransmit": (float,), + "retransmit_pct": (float,), + "serial_number": (str,), + "status": (DeviceStatus,), + "tcp_canceled": (float,), + "tcp_established": (float,), + "tcp_establishment_failure_pct": (float,), + "tcp_establishment_failures": (float,), + "tcp_host_unreachable": (float,), + "tcp_network_unreachable": (float,), + "tcp_refusals": (float,), + "tcp_timeouts": (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_critical": "battery_critical", + "battery_cycle_count": "battery_cycle_count", + "battery_max_capacity_pct": "battery_max_capacity_pct", + "cnm_enabled": "cnm_enabled", + "cpu_cores": "cpu_cores", + "cpu_logical_processors": "cpu_logical_processors", + "cpu_model": "cpu_model", + "cpu_usage": "cpu_usage", + "disk_usage": "disk_usage", + "employee": "employee", + "geo_ip": "geo_ip", + "ip_address": "ip_address", + "issues": "issues", + "kernel_name": "kernel_name", + "last_reboot": "last_reboot", + "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", + "packet_sent": "packet_sent", + "resource_id": "resource_id", + "retransmit": "retransmit", + "retransmit_pct": "retransmit_pct", + "serial_number": "serial_number", + "status": "status", + "tcp_canceled": "tcp_canceled", + "tcp_established": "tcp_established", + "tcp_establishment_failure_pct": "tcp_establishment_failure_pct", + "tcp_establishment_failures": "tcp_establishment_failures", + "tcp_host_unreachable": "tcp_host_unreachable", + "tcp_network_unreachable": "tcp_network_unreachable", + "tcp_refusals": "tcp_refusals", + "tcp_timeouts": "tcp_timeouts", + "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_critical: Union[bool, UnsetType] = unset, + battery_cycle_count: Union[int, UnsetType] = unset, + battery_max_capacity_pct: Union[int, UnsetType] = unset, + cnm_enabled: Union[bool, 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, + employee: Union[DeviceEmployee, UnsetType] = unset, + geo_ip: Union[DeviceGeoIP, UnsetType] = unset, + ip_address: Union[str, UnsetType] = unset, + issues: Union[List[str], UnsetType] = unset, + kernel_name: Union[str, UnsetType] = unset, + last_reboot: 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, + packet_sent: Union[float, UnsetType] = unset, + resource_id: Union[str, UnsetType] = unset, + retransmit: Union[float, UnsetType] = unset, + retransmit_pct: Union[float, UnsetType] = unset, + serial_number: Union[str, UnsetType] = unset, + status: Union[DeviceStatus, UnsetType] = unset, + tcp_canceled: Union[float, UnsetType] = unset, + tcp_established: Union[float, UnsetType] = unset, + tcp_establishment_failure_pct: Union[float, UnsetType] = unset, + tcp_establishment_failures: Union[float, UnsetType] = unset, + tcp_host_unreachable: Union[float, UnsetType] = unset, + tcp_network_unreachable: Union[float, UnsetType] = unset, + tcp_refusals: Union[float, UnsetType] = unset, + tcp_timeouts: 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 Cloud Network Monitoring 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_critical: Whether the device's battery health has degraded to a critical level. + :type battery_critical: bool, 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 cnm_enabled: Whether Cloud Network Monitoring is enabled on the device. + :type cnm_enabled: bool, 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 employee: Directory information about the employee associated with the device, + sourced from a customer reference table. + Absent when no reference table is configured or the device has no match. + :type employee: DeviceEmployee, optional + + :param geo_ip: Location derived from the device's public IP address. + Absent when no location data is available. + :type geo_ip: DeviceGeoIP, 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. + :type issues: [str], optional + + :param kernel_name: Name of the operating system kernel running on the device. + :type kernel_name: str, optional + + :param last_reboot: Timestamp of the most recent device reboot, in RFC 3339 format. + :type last_reboot: 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, as reported by the Datadog Agent + (for example, ``macOS`` , ``Windows`` , or ``linux`` ). Empty when unknown. + :type os: str, optional + + :param os_version: Operating system version running on the device. + :type os_version: str, optional + + :param packet_sent: Number of TCP packets sent by the device over the query window, + as reported by Cloud Network Monitoring. + :type packet_sent: float, optional + + :param resource_id: Datadog resource identifier for the device. + :type resource_id: str, optional + + :param retransmit: Number of TCP packets retransmitted by the device over the query window. + :type retransmit: float, optional + + :param retransmit_pct: Percentage of sent TCP packets that were retransmitted, between 0 and 100. + :type retransmit_pct: float, 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. + ``inactive`` means the device stopped reporting. ``unknown`` means no telemetry is available yet. + :type status: DeviceStatus, optional + + :param tcp_canceled: Number of TCP connection attempts canceled by the device over the query window. + :type tcp_canceled: float, optional + + :param tcp_established: Number of TCP connections established by the device over the query window. + :type tcp_established: float, optional + + :param tcp_establishment_failure_pct: Percentage of TCP connection attempts that failed, between 0 and 100. + :type tcp_establishment_failure_pct: float, optional + + :param tcp_establishment_failures: Number of TCP connection attempts that failed over the query window. + :type tcp_establishment_failures: float, optional + + :param tcp_host_unreachable: Number of TCP connection attempts that failed because the host was unreachable. + :type tcp_host_unreachable: float, optional + + :param tcp_network_unreachable: Number of TCP connection attempts that failed because the network was unreachable. + :type tcp_network_unreachable: float, optional + + :param tcp_refusals: Number of TCP connection attempts refused by the remote host over the query window. + :type tcp_refusals: float, optional + + :param tcp_timeouts: Number of TCP connection attempts that timed out over the query window. + :type tcp_timeouts: float, optional + + :param type: Hardware type of the device (for example, ``laptop`` or ``desktop`` ). ``unknown`` when the type cannot be determined. + :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_critical is not unset: + kwargs["battery_critical"] = battery_critical + 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 cnm_enabled is not unset: + kwargs["cnm_enabled"] = cnm_enabled + 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 employee is not unset: + kwargs["employee"] = employee + if geo_ip is not unset: + kwargs["geo_ip"] = geo_ip + 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_reboot is not unset: + kwargs["last_reboot"] = last_reboot + 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 packet_sent is not unset: + kwargs["packet_sent"] = packet_sent + if resource_id is not unset: + kwargs["resource_id"] = resource_id + if retransmit is not unset: + kwargs["retransmit"] = retransmit + if retransmit_pct is not unset: + kwargs["retransmit_pct"] = retransmit_pct + if serial_number is not unset: + kwargs["serial_number"] = serial_number + if status is not unset: + kwargs["status"] = status + if tcp_canceled is not unset: + kwargs["tcp_canceled"] = tcp_canceled + if tcp_established is not unset: + kwargs["tcp_established"] = tcp_established + if tcp_establishment_failure_pct is not unset: + kwargs["tcp_establishment_failure_pct"] = tcp_establishment_failure_pct + if tcp_establishment_failures is not unset: + kwargs["tcp_establishment_failures"] = tcp_establishment_failures + if tcp_host_unreachable is not unset: + kwargs["tcp_host_unreachable"] = tcp_host_unreachable + if tcp_network_unreachable is not unset: + kwargs["tcp_network_unreachable"] = tcp_network_unreachable + if tcp_refusals is not unset: + kwargs["tcp_refusals"] = tcp_refusals + if tcp_timeouts is not unset: + kwargs["tcp_timeouts"] = tcp_timeouts + 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/device_employee.py b/src/datadog_api_client/v2/model/device_employee.py new file mode 100644 index 0000000000..cb689a7e51 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_employee.py @@ -0,0 +1,90 @@ +# 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 DeviceEmployee(ModelNormal): + @cached_property + def openapi_types(_): + return { + "city": (str,), + "country": (str,), + "department": (str,), + "email": (str,), + "name": (str,), + "office": (str,), + "team": (str,), + } + + attribute_map = { + "city": "city", + "country": "country", + "department": "department", + "email": "email", + "name": "name", + "office": "office", + "team": "team", + } + + def __init__( + self_, + city: Union[str, UnsetType] = unset, + country: Union[str, UnsetType] = unset, + department: Union[str, UnsetType] = unset, + email: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + office: Union[str, UnsetType] = unset, + team: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Directory information about the employee associated with the device, + sourced from a customer reference table. + Absent when no reference table is configured or the device has no match. + + :param city: City where the employee is based. + :type city: str, optional + + :param country: Country where the employee is based. + :type country: str, optional + + :param department: Department the employee belongs to. + :type department: str, optional + + :param email: Email address of the employee. + :type email: str, optional + + :param name: Full name of the employee. + :type name: str, optional + + :param office: Office the employee is assigned to. + :type office: str, optional + + :param team: Team the employee belongs to. + :type team: str, optional + """ + if city is not unset: + kwargs["city"] = city + if country is not unset: + kwargs["country"] = country + if department is not unset: + kwargs["department"] = department + if email is not unset: + kwargs["email"] = email + if name is not unset: + kwargs["name"] = name + if office is not unset: + kwargs["office"] = office + if team is not unset: + kwargs["team"] = team + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/device_geo_ip.py b/src/datadog_api_client/v2/model/device_geo_ip.py new file mode 100644 index 0000000000..7e1c4c95d4 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_geo_ip.py @@ -0,0 +1,82 @@ +# 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 DeviceGeoIP(ModelNormal): + @cached_property + def openapi_types(_): + return { + "geo_city": (str,), + "geo_country_iso_code": (str,), + "geo_latitude": (float,), + "geo_longitude": (float,), + "geo_subdivision_iso_code": (str,), + "public_ip_address": (str,), + } + + attribute_map = { + "geo_city": "geo_city", + "geo_country_iso_code": "geo_country_iso_code", + "geo_latitude": "geo_latitude", + "geo_longitude": "geo_longitude", + "geo_subdivision_iso_code": "geo_subdivision_iso_code", + "public_ip_address": "public_ip_address", + } + + def __init__( + self_, + geo_city: Union[str, UnsetType] = unset, + geo_country_iso_code: Union[str, UnsetType] = unset, + geo_latitude: Union[float, UnsetType] = unset, + geo_longitude: Union[float, UnsetType] = unset, + geo_subdivision_iso_code: Union[str, UnsetType] = unset, + public_ip_address: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Location derived from the device's public IP address. + Absent when no location data is available. + + :param geo_city: City resolved from the device's public IP address. + :type geo_city: str, optional + + :param geo_country_iso_code: ISO 3166-1 alpha-2 country code resolved from the device's public IP address. + :type geo_country_iso_code: str, optional + + :param geo_latitude: Latitude resolved from the device's public IP address. + :type geo_latitude: float, optional + + :param geo_longitude: Longitude resolved from the device's public IP address. + :type geo_longitude: float, optional + + :param geo_subdivision_iso_code: ISO 3166-2 subdivision code (for example, a state or province) + resolved from the device's public IP address. + :type geo_subdivision_iso_code: str, optional + + :param public_ip_address: Public IPv4 or IPv6 address of the device. + :type public_ip_address: str, optional + """ + if geo_city is not unset: + kwargs["geo_city"] = geo_city + if geo_country_iso_code is not unset: + kwargs["geo_country_iso_code"] = geo_country_iso_code + if geo_latitude is not unset: + kwargs["geo_latitude"] = geo_latitude + if geo_longitude is not unset: + kwargs["geo_longitude"] = geo_longitude + if geo_subdivision_iso_code is not unset: + kwargs["geo_subdivision_iso_code"] = geo_subdivision_iso_code + if public_ip_address is not unset: + kwargs["public_ip_address"] = public_ip_address + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/device_status.py b/src/datadog_api_client/v2/model/device_status.py new file mode 100644 index 0000000000..20146d4e85 --- /dev/null +++ b/src/datadog_api_client/v2/model/device_status.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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DeviceStatus(ModelSimple): + """ + Health status of the device, computed from its issues and recent telemetry. + `inactive` means the device stopped reporting. `unknown` means no telemetry is available yet. + + :param value: Must be one of ["healthy", "degraded", "critical", "inactive", "unknown"]. + :type value: str + """ + + allowed_values = { + "healthy", + "degraded", + "critical", + "inactive", + "unknown", + } + HEALTHY: ClassVar["DeviceStatus"] + DEGRADED: ClassVar["DeviceStatus"] + CRITICAL: ClassVar["DeviceStatus"] + INACTIVE: ClassVar["DeviceStatus"] + UNKNOWN: ClassVar["DeviceStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DeviceStatus.HEALTHY = DeviceStatus("healthy") +DeviceStatus.DEGRADED = DeviceStatus("degraded") +DeviceStatus.CRITICAL = DeviceStatus("critical") +DeviceStatus.INACTIVE = DeviceStatus("inactive") +DeviceStatus.UNKNOWN = DeviceStatus("unknown") diff --git a/src/datadog_api_client/v2/model/gcp_cud_metadata_config.py b/src/datadog_api_client/v2/model/gcp_cud_metadata_config.py new file mode 100644 index 0000000000..203963c238 --- /dev/null +++ b/src/datadog_api_client/v2/model/gcp_cud_metadata_config.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 GCPCudMetadataConfig(ModelNormal): + @cached_property + def openapi_types(_): + return { + "dataset_id": (str,), + "project_id": (str,), + "table_id": (str,), + } + + attribute_map = { + "dataset_id": "dataset_id", + "project_id": "project_id", + "table_id": "table_id", + } + + def __init__(self_, dataset_id: str, project_id: str, table_id: str, **kwargs): + """ + The BigQuery table the committed use discount (CUD) metadata is read from. Only returned when CUD metadata is configured for the account. + + :param dataset_id: The BigQuery dataset ID of the CUD metadata export. + :type dataset_id: str + + :param project_id: The Google Cloud project ID of the CUD metadata export. + :type project_id: str + + :param table_id: The BigQuery table ID of the CUD metadata export. + :type table_id: str + """ + super().__init__(kwargs) + + self_.dataset_id = dataset_id + self_.project_id = project_id + self_.table_id = table_id diff --git a/src/datadog_api_client/v2/model/gcp_uc_config_response_data_attributes.py b/src/datadog_api_client/v2/model/gcp_uc_config_response_data_attributes.py index bb8ff60542..10b0c96bd7 100644 --- a/src/datadog_api_client/v2/model/gcp_uc_config_response_data_attributes.py +++ b/src/datadog_api_client/v2/model/gcp_uc_config_response_data_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -14,13 +14,23 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v2.model.gcp_cud_metadata_config import GCPCudMetadataConfig + + class GcpUcConfigResponseDataAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.gcp_cud_metadata_config import GCPCudMetadataConfig + return { "account_id": (str,), "bucket_name": (str,), "created_at": (str,), + "cud_metadata_config": (GCPCudMetadataConfig,), + "cud_metadata_error_codes": ([int],), + "cud_metadata_state": (str,), + "cud_metadata_status_updated_at": (str,), "dataset": (str,), "error_messages": ([str], none_type), "export_prefix": (str,), @@ -37,6 +47,10 @@ def openapi_types(_): "account_id": "account_id", "bucket_name": "bucket_name", "created_at": "created_at", + "cud_metadata_config": "cud_metadata_config", + "cud_metadata_error_codes": "cud_metadata_error_codes", + "cud_metadata_state": "cud_metadata_state", + "cud_metadata_status_updated_at": "cud_metadata_status_updated_at", "dataset": "dataset", "error_messages": "error_messages", "export_prefix": "export_prefix", @@ -54,6 +68,10 @@ def __init__( account_id: Union[str, UnsetType] = unset, bucket_name: Union[str, UnsetType] = unset, created_at: Union[str, UnsetType] = unset, + cud_metadata_config: Union[GCPCudMetadataConfig, UnsetType] = unset, + cud_metadata_error_codes: Union[List[int], UnsetType] = unset, + cud_metadata_state: Union[str, UnsetType] = unset, + cud_metadata_status_updated_at: Union[str, UnsetType] = unset, dataset: Union[str, UnsetType] = unset, error_messages: Union[List[str], none_type, UnsetType] = unset, export_prefix: Union[str, UnsetType] = unset, @@ -78,6 +96,18 @@ def __init__( :param created_at: The ``attributes`` ``created_at``. :type created_at: str, optional + :param cud_metadata_config: The BigQuery table the committed use discount (CUD) metadata is read from. Only returned when CUD metadata is configured for the account. + :type cud_metadata_config: GCPCudMetadataConfig, optional + + :param cud_metadata_error_codes: The error codes reported for the committed use discount (CUD) metadata export. Only returned when CUD metadata is configured for the account. + :type cud_metadata_error_codes: [int], optional + + :param cud_metadata_state: The state of the Google Cloud committed use discount (CUD) metadata export. Only returned when CUD metadata is configured for the account. + :type cud_metadata_state: str, optional + + :param cud_metadata_status_updated_at: The timestamp when the committed use discount (CUD) metadata state was last updated. Only returned when CUD metadata is configured for the account. + :type cud_metadata_status_updated_at: str, optional + :param dataset: The ``attributes`` ``dataset``. :type dataset: str, optional @@ -114,6 +144,14 @@ def __init__( kwargs["bucket_name"] = bucket_name if created_at is not unset: kwargs["created_at"] = created_at + if cud_metadata_config is not unset: + kwargs["cud_metadata_config"] = cud_metadata_config + if cud_metadata_error_codes is not unset: + kwargs["cud_metadata_error_codes"] = cud_metadata_error_codes + if cud_metadata_state is not unset: + kwargs["cud_metadata_state"] = cud_metadata_state + if cud_metadata_status_updated_at is not unset: + kwargs["cud_metadata_status_updated_at"] = cud_metadata_status_updated_at if dataset is not unset: kwargs["dataset"] = dataset if error_messages is not unset: diff --git a/src/datadog_api_client/v2/model/gcp_usage_cost_config_attributes.py b/src/datadog_api_client/v2/model/gcp_usage_cost_config_attributes.py index 5014653502..dd970dd92a 100644 --- a/src/datadog_api_client/v2/model/gcp_usage_cost_config_attributes.py +++ b/src/datadog_api_client/v2/model/gcp_usage_cost_config_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -14,22 +14,29 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v2.model.gcp_cud_metadata_config import GCPCudMetadataConfig + + class GCPUsageCostConfigAttributes(ModelNormal): validations = { - "created_at": {}, "months": { "inclusive_maximum": 36, }, - "status_updated_at": {}, - "updated_at": {}, } @cached_property def openapi_types(_): + from datadog_api_client.v2.model.gcp_cud_metadata_config import GCPCudMetadataConfig + return { "account_id": (str,), "bucket_name": (str,), "created_at": (str,), + "cud_metadata_config": (GCPCudMetadataConfig,), + "cud_metadata_error_codes": ([int],), + "cud_metadata_state": (str,), + "cud_metadata_status_updated_at": (str,), "dataset": (str,), "error_messages": ([str], none_type), "export_prefix": (str,), @@ -46,6 +53,10 @@ def openapi_types(_): "account_id": "account_id", "bucket_name": "bucket_name", "created_at": "created_at", + "cud_metadata_config": "cud_metadata_config", + "cud_metadata_error_codes": "cud_metadata_error_codes", + "cud_metadata_state": "cud_metadata_state", + "cud_metadata_status_updated_at": "cud_metadata_status_updated_at", "dataset": "dataset", "error_messages": "error_messages", "export_prefix": "export_prefix", @@ -68,6 +79,10 @@ def __init__( service_account: str, status: str, created_at: Union[str, UnsetType] = unset, + cud_metadata_config: Union[GCPCudMetadataConfig, UnsetType] = unset, + cud_metadata_error_codes: Union[List[int], UnsetType] = unset, + cud_metadata_state: Union[str, UnsetType] = unset, + cud_metadata_status_updated_at: Union[str, UnsetType] = unset, error_messages: Union[List[str], none_type, UnsetType] = unset, months: Union[int, UnsetType] = unset, project_id: Union[str, UnsetType] = unset, @@ -87,6 +102,18 @@ def __init__( :param created_at: The timestamp when the Google Cloud Usage Cost config was created. :type created_at: str, optional + :param cud_metadata_config: The BigQuery table the committed use discount (CUD) metadata is read from. Only returned when CUD metadata is configured for the account. + :type cud_metadata_config: GCPCudMetadataConfig, optional + + :param cud_metadata_error_codes: The error codes reported for the committed use discount (CUD) metadata export. Only returned when CUD metadata is configured for the account. + :type cud_metadata_error_codes: [int], optional + + :param cud_metadata_state: The state of the Google Cloud committed use discount (CUD) metadata export. Only returned when CUD metadata is configured for the account. + :type cud_metadata_state: str, optional + + :param cud_metadata_status_updated_at: The timestamp when the committed use discount (CUD) metadata state was last updated. Only returned when CUD metadata is configured for the account. + :type cud_metadata_status_updated_at: str, optional + :param dataset: The export dataset name used for the Google Cloud Usage Cost Report. :type dataset: str @@ -119,6 +146,14 @@ def __init__( """ if created_at is not unset: kwargs["created_at"] = created_at + if cud_metadata_config is not unset: + kwargs["cud_metadata_config"] = cud_metadata_config + if cud_metadata_error_codes is not unset: + kwargs["cud_metadata_error_codes"] = cud_metadata_error_codes + if cud_metadata_state is not unset: + kwargs["cud_metadata_state"] = cud_metadata_state + if cud_metadata_status_updated_at is not unset: + kwargs["cud_metadata_status_updated_at"] = cud_metadata_status_updated_at if error_messages is not unset: kwargs["error_messages"] = error_messages if months is not unset: diff --git a/src/datadog_api_client/v2/model/rules_validate_query_request_data_attributes.py b/src/datadog_api_client/v2/model/rules_validate_query_request_data_attributes.py index 85e8ef7ff8..5a522ff1bd 100644 --- a/src/datadog_api_client/v2/model/rules_validate_query_request_data_attributes.py +++ b/src/datadog_api_client/v2/model/rules_validate_query_request_data_attributes.py @@ -18,14 +18,14 @@ def openapi_types(_): } attribute_map = { - "query": "Query", + "query": "query", } def __init__(self_, query: str, **kwargs): """ The definition of ``RulesValidateQueryRequestDataAttributes`` object. - :param query: The ``attributes`` ``Query``. + :param query: The tag pipeline rule query to validate, in Datadog tag query syntax: ``tag:value`` terms combined with ``AND`` , ``OR`` , and ``NOT``. :type query: str """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index b0d9271981..8dbf0f09dc 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -955,6 +955,7 @@ ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems, ) from datadog_api_client.v2.model.arbitrary_cost_upsert_request_data_type import ArbitraryCostUpsertRequestDataType +from datadog_api_client.v2.model.arbitrary_rule_mapping_transform import ArbitraryRuleMappingTransform from datadog_api_client.v2.model.arbitrary_rule_response import ArbitraryRuleResponse from datadog_api_client.v2.model.arbitrary_rule_response_array import ArbitraryRuleResponseArray from datadog_api_client.v2.model.arbitrary_rule_response_array_meta import ArbitraryRuleResponseArrayMeta @@ -963,6 +964,9 @@ from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_costs_to_allocate_items import ( ArbitraryRuleResponseDataAttributesCostsToAllocateItems, ) +from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_rule_category import ( + ArbitraryRuleResponseDataAttributesRuleCategory, +) from datadog_api_client.v2.model.arbitrary_rule_response_data_attributes_strategy import ( ArbitraryRuleResponseDataAttributesStrategy, ) @@ -988,6 +992,9 @@ ArbitraryRuleStatusResponseDataAttributes, ) from datadog_api_client.v2.model.arbitrary_rule_status_response_data_type import ArbitraryRuleStatusResponseDataType +from datadog_api_client.v2.model.arbitrary_rule_tag_transforms import ArbitraryRuleTagTransforms +from datadog_api_client.v2.model.arbitrary_rule_tag_value_transform import ArbitraryRuleTagValueTransform +from datadog_api_client.v2.model.arbitrary_rule_tag_value_transform_type import ArbitraryRuleTagValueTransformType from datadog_api_client.v2.model.archive_search_create_rehydration import ArchiveSearchCreateRehydration from datadog_api_client.v2.model.archive_search_create_request import ArchiveSearchCreateRequest from datadog_api_client.v2.model.archive_search_create_request_attributes import ArchiveSearchCreateRequestAttributes @@ -3270,6 +3277,19 @@ 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_array_links import DeviceBaseArrayLinks +from datadog_api_client.v2.model.device_base_array_meta import DeviceBaseArrayMeta +from datadog_api_client.v2.model.device_base_array_meta_page import DeviceBaseArrayMetaPage +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.device_employee import DeviceEmployee +from datadog_api_client.v2.model.device_geo_ip import DeviceGeoIP +from datadog_api_client.v2.model.device_status import DeviceStatus from datadog_api_client.v2.model.device_tags_by_source import DeviceTagsBySource from datadog_api_client.v2.model.devices_list_data import DevicesListData from datadog_api_client.v2.model.dns_metric_key import DnsMetricKey @@ -4663,6 +4683,7 @@ from datadog_api_client.v2.model.full_service_access_token_relationships import FullServiceAccessTokenRelationships from datadog_api_client.v2.model.gcp_credentials import GCPCredentials from datadog_api_client.v2.model.gcp_credentials_update import GCPCredentialsUpdate +from datadog_api_client.v2.model.gcp_cud_metadata_config import GCPCudMetadataConfig from datadog_api_client.v2.model.gcp_integration import GCPIntegration from datadog_api_client.v2.model.gcp_integration_type import GCPIntegrationType from datadog_api_client.v2.model.gcp_integration_update import GCPIntegrationUpdate @@ -14601,12 +14622,14 @@ "ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems", "ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems", "ArbitraryCostUpsertRequestDataType", + "ArbitraryRuleMappingTransform", "ArbitraryRuleResponse", "ArbitraryRuleResponseArray", "ArbitraryRuleResponseArrayMeta", "ArbitraryRuleResponseData", "ArbitraryRuleResponseDataAttributes", "ArbitraryRuleResponseDataAttributesCostsToAllocateItems", + "ArbitraryRuleResponseDataAttributesRuleCategory", "ArbitraryRuleResponseDataAttributesStrategy", "ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems", "ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems", @@ -14618,6 +14641,9 @@ "ArbitraryRuleStatusResponseData", "ArbitraryRuleStatusResponseDataAttributes", "ArbitraryRuleStatusResponseDataType", + "ArbitraryRuleTagTransforms", + "ArbitraryRuleTagValueTransform", + "ArbitraryRuleTagValueTransformType", "ArchiveSearchCreateRehydration", "ArchiveSearchCreateRequest", "ArchiveSearchCreateRequestAttributes", @@ -16282,6 +16308,19 @@ "DetailedFindingType", "DeviceAttributes", "DeviceAttributesInterfaceStatuses", + "DeviceBaseArray", + "DeviceBaseArrayLinks", + "DeviceBaseArrayMeta", + "DeviceBaseArrayMetaPage", + "DeviceBaseData", + "DeviceBaseDataAttributes", + "DeviceDetails", + "DeviceDetailsData", + "DeviceDetailsDataAttributes", + "DeviceDetailsDataType", + "DeviceEmployee", + "DeviceGeoIP", + "DeviceStatus", "DeviceTagsBySource", "DevicesListData", "DnsMetricKey", @@ -17123,6 +17162,7 @@ "FullServiceAccessTokenRelationships", "GCPCredentials", "GCPCredentialsUpdate", + "GCPCudMetadataConfig", "GCPIntegration", "GCPIntegrationType", "GCPIntegrationUpdate", diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index fe4dd6aa23..4620b31977 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/generated-test/test-runner-data/manifest.json @@ -5649,6 +5649,20 @@ "scenario": "Update a downtime returns \"OK\" response", "version": "v2" }, + { + "feature": "End User Device Monitoring", + "feature_file": "../../v2/features/end_user_device_monitoring.feature", + "file": "v2/end-user-device-monitoring/get-a-device-returns-not-found-response.json", + "scenario": "Get a device returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "End User Device Monitoring", + "feature_file": "../../v2/features/end_user_device_monitoring.feature", + "file": "v2/end-user-device-monitoring/get-all-devices-returns-ok-response.json", + "scenario": "Get all devices returns \"OK\" response", + "version": "v2" + }, { "feature": "Error Tracking", "feature_file": "../../v2/features/error_tracking.feature", diff --git a/tests/generated-test/test-runner-data/v2/cloud-cost-management/validate-query-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/cloud-cost-management/validate-query-returns-ok-response.json index bf5c346867..9085bf4375 100644 --- a/tests/generated-test/test-runner-data/v2/cloud-cost-management/validate-query-returns-ok-response.json +++ b/tests/generated-test/test-runner-data/v2/cloud-cost-management/validate-query-returns-ok-response.json @@ -15,7 +15,7 @@ "value": { "data": { "attributes": { - "Query": "example:query AND test:true" + "query": "example:query AND test:true" }, "type": "validate_query" } diff --git a/tests/generated-test/test-runner-data/v2/end-user-device-monitoring/get-a-device-returns-not-found-response.json b/tests/generated-test/test-runner-data/v2/end-user-device-monitoring/get-a-device-returns-not-found-response.json new file mode 100644 index 0000000000..81cee7568d --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/end-user-device-monitoring/get-a-device-returns-not-found-response.json @@ -0,0 +1,35 @@ +{ + "api": "EndUserDeviceMonitoring", + "expected_status": 404, + "feature": "End User Device Monitoring", + "id": "v2/End User Device Monitoring/Get a device returns \"Not Found\" response", + "operation_id": "GetEUDMDevice", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "device_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "not_found" + }, + "style": null + } + ], + "path": "/api/v2/eudm/devices/{device_id}" + }, + "scenario": "Get a device returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/end-user-device-monitoring/get-all-devices-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/end-user-device-monitoring/get-all-devices-returns-ok-response.json new file mode 100644 index 0000000000..bfb96d83cc --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/end-user-device-monitoring/get-all-devices-returns-ok-response.json @@ -0,0 +1,18 @@ +{ + "api": "EndUserDeviceMonitoring", + "expected_status": 200, + "feature": "End User Device Monitoring", + "id": "v2/End User Device Monitoring/Get all devices returns \"OK\" response", + "operation_id": "GetEUDMDevices", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/eudm/devices" + }, + "scenario": "Get all devices returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-server-data/manifest.json b/tests/generated-test/test-server-data/manifest.json index 5616419906..651d02c689 100644 --- a/tests/generated-test/test-server-data/manifest.json +++ b/tests/generated-test/test-server-data/manifest.json @@ -300,6 +300,11 @@ "file": "v2/downtimes.json", "version": "v2" }, + { + "feature": "End User Device Monitoring", + "file": "v2/end-user-device-monitoring.json", + "version": "v2" + }, { "feature": "Error Tracking", "file": "v2/error-tracking.json", diff --git a/tests/generated-test/test-server-data/v2/cloud-cost-management.json b/tests/generated-test/test-server-data/v2/cloud-cost-management.json index bd9d77e798..13b50e6149 100644 --- a/tests/generated-test/test-server-data/v2/cloud-cost-management.json +++ b/tests/generated-test/test-server-data/v2/cloud-cost-management.json @@ -2435,7 +2435,7 @@ "value": { "data": { "attributes": { - "Query": "example:query AND test:true" + "query": "example:query AND test:true" }, "type": "validate_query" } diff --git a/tests/generated-test/test-server-data/v2/end-user-device-monitoring.json b/tests/generated-test/test-server-data/v2/end-user-device-monitoring.json new file mode 100644 index 0000000000..b735ee3aad --- /dev/null +++ b/tests/generated-test/test-server-data/v2/end-user-device-monitoring.json @@ -0,0 +1,69 @@ +{ + "feature": "End User Device Monitoring", + "recordings": [ + { + "feature": "End User Device Monitoring", + "frozen_at": "2026-05-26T22:33:26.244Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/eudm/devices/not_found", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Get a device returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "End User Device Monitoring", + "frozen_at": "2026-05-26T22:33:27.236Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/eudm/devices", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"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\"}}],\"meta\":{\"page\":{}},\"links\":{\"self\":\"/api/v2/eudm/devices\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get all devices returns \"OK\" response", + "version": "v2" + } + ], + "schema_version": 1, + "version": "v2" +} diff --git a/tests/v2/features/cloud_cost_management.feature b/tests/v2/features/cloud_cost_management.feature index ab076ac3e3..fbcb675f81 100644 --- a/tests/v2/features/cloud_cost_management.feature +++ b/tests/v2/features/cloud_cost_management.feature @@ -1245,6 +1245,6 @@ Feature: Cloud Cost Management @replay-only @team:ddoghq/cloud-cost-management Scenario: Validate query returns "OK" response Given new "ValidateQuery" request - And body with value {"data": {"attributes": {"Query": "example:query AND test:true"}, "type": "validate_query"}} + And body with value {"data": {"attributes": {"query": "example:query AND test:true"}, "type": "validate_query"}} When the request is sent Then the response status is 200 OK 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..cddff39a3d --- /dev/null +++ b/tests/v2/features/end_user_device_monitoring.feature @@ -0,0 +1,48 @@ +@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:ddoghq/eudm-experiences + Scenario: Get a device returns "Bad Request" response + Given operation "GetEUDMDevice" enabled + And new "GetEUDMDevice" request + And request contains "device_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:ddoghq/eudm-experiences + Scenario: Get a device returns "Not Found" response + Given operation "GetEUDMDevice" enabled + And 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 + + @generated @skip @team:ddoghq/eudm-experiences + Scenario: Get a device returns "OK" response + Given operation "GetEUDMDevice" enabled + And 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:ddoghq/eudm-experiences + Scenario: Get all devices returns "Bad Request" response + Given operation "GetEUDMDevices" enabled + And new "GetEUDMDevices" request + When the request is sent + Then the response status is 400 Bad Request + + @team:ddoghq/eudm-experiences + Scenario: Get all devices returns "OK" response + Given operation "GetEUDMDevices" enabled + And new "GetEUDMDevices" request + 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 ecd54435b6..d92af14e39 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -2771,6 +2771,18 @@ "type": "idempotent" } }, + "GetEUDMDevices": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, + "GetEUDMDevice": { + "tag": "End User Device Monitoring", + "undo": { + "type": "safe" + } + }, "ListEvents": { "tag": "Events", "undo": {