From cb94ea332b68dcfb83bb0b62fea64b666c581037 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 10 Apr 2026 18:13:19 +0000 Subject: [PATCH] Regenerate client from commit 0f22611 of spec repo --- .generator/schemas/v2/openapi.yaml | 1476 +++++++++++------ docs/datadog_api_client.v2.api.rst | 7 - docs/datadog_api_client.v2.model.rst | 455 +++-- examples/v2/bits-ai/GetInvestigation.py | 16 - examples/v2/bits-ai/ListInvestigations.py | 14 - .../bits-ai/ListInvestigations_130750454.py | 14 - examples/v2/bits-ai/TriggerInvestigation.py | 39 - .../v2/metrics/QueryScalarData_1479548882.py | 60 + .../v2/metrics/QueryScalarData_1904811219.py | 57 + .../v2/metrics/QueryScalarData_2298288525.py | 58 + .../v2/metrics/QueryScalarData_2533499017.py | 58 + .../v2/metrics/QueryScalarData_4230617918.py | 58 + .../v2/metrics/QueryScalarData_779493885.py | 59 + .../v2/metrics/QueryScalarData_891952130.py | 56 + .../metrics/QueryTimeseriesData_108927825.py | 59 + .../metrics/QueryTimeseriesData_2159746306.py | 57 + .../metrics/QueryTimeseriesData_3174309318.py | 55 + .../metrics/QueryTimeseriesData_3535807425.py | 60 + .../metrics/QueryTimeseriesData_4028506518.py | 61 + .../metrics/QueryTimeseriesData_4246412951.py | 58 + .../metrics/QueryTimeseriesData_847716941.py | 59 + .../GetFlakyTestsManagementPolicies.py | 35 + .../UpdateFlakyTestsManagementPolicies.py | 111 ++ src/datadog_api_client/configuration.py | 5 +- src/datadog_api_client/v2/api/bits_ai_api.py | 218 --- .../v2/api/test_optimization_api.py | 82 + src/datadog_api_client/v2/apis/__init__.py | 2 - .../v2/model/apm_dependency_stat_name.py | 53 + ...py => apm_dependency_stats_data_source.py} | 14 +- .../v2/model/apm_dependency_stats_query.py | 114 ++ ...ger_type.py => apm_metrics_data_source.py} | 12 +- .../v2/model/apm_metrics_query.py | 136 ++ .../v2/model/apm_metrics_span_kind.py | 47 + .../v2/model/apm_metrics_stat.py | 80 + .../v2/model/apm_resource_stat_name.py | 68 + ...e.py => apm_resource_stats_data_source.py} | 14 +- .../v2/model/apm_resource_stats_query.py | 116 ++ .../v2/model/container_data_source.py | 35 + .../v2/model/container_scalar_query.py | 112 ++ .../v2/model/container_timeseries_query.py | 102 ++ .../v2/model/events_data_source.py | 35 +- .../v2/model/get_investigation_response.py | 48 - .../model/get_investigation_response_data.py | 58 - ..._investigation_response_data_attributes.py | 52 - .../model/get_investigation_response_links.py | 33 - .../v2/model/investigation_conclusion.py | 45 - .../v2/model/list_investigations_response.py | 62 - .../list_investigations_response_data.py | 60 - .../list_investigations_response_links.py | 71 - .../list_investigations_response_meta.py | 42 - .../list_investigations_response_meta_page.py | 45 - .../model/monitor_alert_trigger_attributes.py | 45 - ...igation_type.py => process_data_source.py} | 12 +- .../v2/model/process_scalar_query.py | 112 ++ .../v2/model/process_timeseries_query.py | 102 ++ .../v2/model/scalar_query.py | 84 + .../v2/model/slo_data_source.py | 35 + src/datadog_api_client/v2/model/slo_query.py | 98 ++ .../v2/model/slos_group_mode.py | 38 + .../v2/model/slos_measure.py | 62 + .../v2/model/slos_query_type.py | 41 + ...ests_management_policies_attempt_to_fix.py | 36 + ...ky_tests_management_policies_attributes.py | 86 + ...s_management_policies_auto_disable_rule.py | 67 + ...anagement_policies_auto_quarantine_rule.py | 45 + ...y_tests_management_policies_branch_rule.py | 64 + ...on_flaky_tests_management_policies_data.py | 73 + ...laky_tests_management_policies_disabled.py | 88 + ...ent_policies_disabled_failure_rate_rule.py | 83 + ...sts_management_policies_disabled_status.py | 43 + ...y_tests_management_policies_get_request.py | 44 + ...gement_policies_get_request_attributes.py} | 28 +- ...ts_management_policies_get_request_data.py | 62 + ...y_tests_management_policies_quarantined.py | 88 + ..._policies_quarantined_failure_rate_rule.py | 64 + ...laky_tests_management_policies_response.py | 46 + ...on_flaky_tests_management_policies_type.py | 38 + ...ests_management_policies_update_request.py | 44 + ...ment_policies_update_request_attributes.py | 93 ++ ...management_policies_update_request_data.py | 63 + ...s_management_policies_request_data_type.py | 40 + ...s_management_policies_request_data_type.py | 40 + .../v2/model/timeseries_query.py | 84 + .../v2/model/trigger_attributes.py | 48 - .../v2/model/trigger_investigation_request.py | 40 - .../trigger_investigation_request_data.py | 54 - ...r_investigation_request_data_attributes.py | 40 - .../model/trigger_investigation_response.py | 40 - .../trigger_investigation_response_data.py | 64 - ..._investigation_response_data_attributes.py | 33 - src/datadog_api_client/v2/models/__init__.py | 180 +- ...ats_data_source_returns_ok_response.frozen | 1 + ...stats_data_source_returns_ok_response.yaml | 25 + ...e_and_span_kind_returns_ok_response.frozen | 1 + ...rce_and_span_kind_returns_ok_response.yaml | 20 + ...ics_data_source_returns_ok_response.frozen | 1 + ...trics_data_source_returns_ok_response.yaml | 20 + ...ats_data_source_returns_ok_response.frozen | 1 + ...stats_data_source_returns_ok_response.yaml | 20 + ...ner_data_source_returns_ok_response.frozen | 1 + ...ainer_data_source_returns_ok_response.yaml | 20 + ...ess_data_source_returns_ok_response.frozen | 1 + ...ocess_data_source_returns_ok_response.yaml | 20 + ...slo_data_source_returns_ok_response.frozen | 1 + ...h_slo_data_source_returns_ok_response.yaml | 20 + ...ats_data_source_returns_ok_response.frozen | 1 + ...stats_data_source_returns_ok_response.yaml | 24 + ...e_and_span_kind_returns_ok_response.frozen | 1 + ...rce_and_span_kind_returns_ok_response.yaml | 22 + ...ics_data_source_returns_ok_response.frozen | 1 + ...trics_data_source_returns_ok_response.yaml | 22 + ...ats_data_source_returns_ok_response.frozen | 1 + ...stats_data_source_returns_ok_response.yaml | 22 + ...ner_data_source_returns_ok_response.frozen | 1 + ...ainer_data_source_returns_ok_response.yaml | 22 + ...ess_data_source_returns_ok_response.frozen | 1 + ...ocess_data_source_returns_ok_response.yaml | 22 + ...slo_data_source_returns_ok_response.frozen | 1 + ...h_slo_data_source_returns_ok_response.yaml | 22 + tests/v2/features/bits_ai.feature | 69 - tests/v2/features/metrics.feature | 126 ++ tests/v2/features/test_optimization.feature | 64 + tests/v2/features/undo.json | 30 +- 123 files changed, 5733 insertions(+), 2061 deletions(-) delete mode 100644 examples/v2/bits-ai/GetInvestigation.py delete mode 100644 examples/v2/bits-ai/ListInvestigations.py delete mode 100644 examples/v2/bits-ai/ListInvestigations_130750454.py delete mode 100644 examples/v2/bits-ai/TriggerInvestigation.py create mode 100644 examples/v2/metrics/QueryScalarData_1479548882.py create mode 100644 examples/v2/metrics/QueryScalarData_1904811219.py create mode 100644 examples/v2/metrics/QueryScalarData_2298288525.py create mode 100644 examples/v2/metrics/QueryScalarData_2533499017.py create mode 100644 examples/v2/metrics/QueryScalarData_4230617918.py create mode 100644 examples/v2/metrics/QueryScalarData_779493885.py create mode 100644 examples/v2/metrics/QueryScalarData_891952130.py create mode 100644 examples/v2/metrics/QueryTimeseriesData_108927825.py create mode 100644 examples/v2/metrics/QueryTimeseriesData_2159746306.py create mode 100644 examples/v2/metrics/QueryTimeseriesData_3174309318.py create mode 100644 examples/v2/metrics/QueryTimeseriesData_3535807425.py create mode 100644 examples/v2/metrics/QueryTimeseriesData_4028506518.py create mode 100644 examples/v2/metrics/QueryTimeseriesData_4246412951.py create mode 100644 examples/v2/metrics/QueryTimeseriesData_847716941.py create mode 100644 examples/v2/test-optimization/GetFlakyTestsManagementPolicies.py create mode 100644 examples/v2/test-optimization/UpdateFlakyTestsManagementPolicies.py delete mode 100644 src/datadog_api_client/v2/api/bits_ai_api.py create mode 100644 src/datadog_api_client/v2/model/apm_dependency_stat_name.py rename src/datadog_api_client/v2/model/{trigger_investigation_request_type.py => apm_dependency_stats_data_source.py} (53%) create mode 100644 src/datadog_api_client/v2/model/apm_dependency_stats_query.py rename src/datadog_api_client/v2/model/{trigger_type.py => apm_metrics_data_source.py} (61%) create mode 100644 src/datadog_api_client/v2/model/apm_metrics_query.py create mode 100644 src/datadog_api_client/v2/model/apm_metrics_span_kind.py create mode 100644 src/datadog_api_client/v2/model/apm_metrics_stat.py create mode 100644 src/datadog_api_client/v2/model/apm_resource_stat_name.py rename src/datadog_api_client/v2/model/{trigger_investigation_response_type.py => apm_resource_stats_data_source.py} (52%) create mode 100644 src/datadog_api_client/v2/model/apm_resource_stats_query.py create mode 100644 src/datadog_api_client/v2/model/container_data_source.py create mode 100644 src/datadog_api_client/v2/model/container_scalar_query.py create mode 100644 src/datadog_api_client/v2/model/container_timeseries_query.py delete mode 100644 src/datadog_api_client/v2/model/get_investigation_response.py delete mode 100644 src/datadog_api_client/v2/model/get_investigation_response_data.py delete mode 100644 src/datadog_api_client/v2/model/get_investigation_response_data_attributes.py delete mode 100644 src/datadog_api_client/v2/model/get_investigation_response_links.py delete mode 100644 src/datadog_api_client/v2/model/investigation_conclusion.py delete mode 100644 src/datadog_api_client/v2/model/list_investigations_response.py delete mode 100644 src/datadog_api_client/v2/model/list_investigations_response_data.py delete mode 100644 src/datadog_api_client/v2/model/list_investigations_response_links.py delete mode 100644 src/datadog_api_client/v2/model/list_investigations_response_meta.py delete mode 100644 src/datadog_api_client/v2/model/list_investigations_response_meta_page.py delete mode 100644 src/datadog_api_client/v2/model/monitor_alert_trigger_attributes.py rename src/datadog_api_client/v2/model/{investigation_type.py => process_data_source.py} (63%) create mode 100644 src/datadog_api_client/v2/model/process_scalar_query.py create mode 100644 src/datadog_api_client/v2/model/process_timeseries_query.py create mode 100644 src/datadog_api_client/v2/model/slo_data_source.py create mode 100644 src/datadog_api_client/v2/model/slo_query.py create mode 100644 src/datadog_api_client/v2/model/slos_group_mode.py create mode 100644 src/datadog_api_client/v2/model/slos_measure.py create mode 100644 src/datadog_api_client/v2/model/slos_query_type.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_attempt_to_fix.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_attributes.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_auto_disable_rule.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_auto_quarantine_rule.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_branch_rule.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_data.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled_status.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request.py rename src/datadog_api_client/v2/model/{list_investigations_response_data_attributes.py => test_optimization_flaky_tests_management_policies_get_request_attributes.py} (50%) create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request_data.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_quarantined.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_response.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_type.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request_attributes.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request_data.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_get_flaky_tests_management_policies_request_data_type.py create mode 100644 src/datadog_api_client/v2/model/test_optimization_update_flaky_tests_management_policies_request_data_type.py delete mode 100644 src/datadog_api_client/v2/model/trigger_attributes.py delete mode 100644 src/datadog_api_client/v2/model/trigger_investigation_request.py delete mode 100644 src/datadog_api_client/v2/model/trigger_investigation_request_data.py delete mode 100644 src/datadog_api_client/v2/model/trigger_investigation_request_data_attributes.py delete mode 100644 src/datadog_api_client/v2/model/trigger_investigation_response.py delete mode 100644 src/datadog_api_client/v2/model/trigger_investigation_response_data.py delete mode 100644 src/datadog_api_client/v2/model/trigger_investigation_response_data_attributes.py create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_container_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_container_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_process_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_process_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_slo_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_slo_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_container_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_container_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_process_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_process_data_source_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_slo_data_source_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_slo_data_source_returns_ok_response.yaml delete mode 100644 tests/v2/features/bits_ai.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3ad27aedca..4058873cf4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -3859,6 +3859,290 @@ components: example: "90646597-5fdb-4a17-a240-647003f8c028" format: uuid type: string + ApmDependencyStatName: + description: The APM dependency statistic to query. + enum: + - avg_duration + - avg_root_duration + - avg_spans_per_trace + - error_rate + - pct_exec_time + - pct_of_traces + - total_traces_count + example: avg_duration + type: string + x-enum-varnames: + - AVG_DURATION + - AVG_ROOT_DURATION + - AVG_SPANS_PER_TRACE + - ERROR_RATE + - PCT_EXEC_TIME + - PCT_OF_TRACES + - TOTAL_TRACES_COUNT + ApmDependencyStatsDataSource: + default: apm_dependency_stats + description: A data source for APM dependency statistics queries. + enum: + - apm_dependency_stats + example: apm_dependency_stats + type: string + x-enum-varnames: + - APM_DEPENDENCY_STATS + ApmDependencyStatsQuery: + description: An individual APM dependency stats query. + properties: + data_source: + $ref: "#/components/schemas/ApmDependencyStatsDataSource" + env: + description: The environment to query. + example: prod + type: string + is_upstream: + description: Determines whether stats for upstream or downstream dependencies should be queried. + example: true + type: boolean + name: + description: The variable name for use in formulas. + example: query1 + type: string + operation_name: + description: The APM operation name. + example: web.request + type: string + primary_tag_name: + description: The name of the second primary tag used within APM; required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog. + example: datacenter + type: string + primary_tag_value: + description: Filter APM data by the second primary tag. `primary_tag_name` must also be specified. + example: us-east-1 + type: string + resource_name: + description: The resource name to filter by. + example: "GET /api/v2/users" + type: string + service: + description: The service name to filter by. + example: web-store + type: string + stat: + $ref: "#/components/schemas/ApmDependencyStatName" + required: + - data_source + - name + - env + - operation_name + - resource_name + - service + - stat + type: object + ApmMetricsDataSource: + default: apm_metrics + description: A data source for APM metrics queries. + enum: + - apm_metrics + example: apm_metrics + type: string + x-enum-varnames: + - APM_METRICS + ApmMetricsQuery: + description: An individual APM metrics query. + properties: + data_source: + $ref: "#/components/schemas/ApmMetricsDataSource" + group_by: + description: Optional fields to group the query results by. + items: + description: A field to group results by. + example: service + type: string + type: array + name: + description: The variable name for use in formulas. + example: query1 + type: string + operation_mode: + description: Optional operation mode to aggregate across operation names. + example: "primary" + type: string + operation_name: + description: Name of operation on service. If not provided, the primary operation name is used. + example: web.request + type: string + peer_tags: + description: Tags to query for a specific downstream entity (peer.service, peer.db_instance, peer.s3, peer.s3.bucket, etc.). + items: + description: A peer tag value. + example: "peer.service:my-service" + type: string + type: array + query_filter: + description: Additional filters for the query using metrics query syntax (e.g., env, primary_tag). + example: "env:prod" + type: string + resource_hash: + description: The resource hash for exact matching. + example: "abc123" + type: string + resource_name: + description: The full name of a specific resource to filter by. + example: "GET /api/v1/users" + type: string + service: + description: The service name to filter by. + example: web-store + type: string + span_kind: + $ref: "#/components/schemas/ApmMetricsSpanKind" + stat: + $ref: "#/components/schemas/ApmMetricsStat" + required: + - data_source + - name + - stat + type: object + ApmMetricsSpanKind: + description: Describes the relationship between the span, its parents, and its children in a trace. + enum: + - consumer + - server + - client + - producer + - internal + example: server + type: string + x-enum-varnames: + - CONSUMER + - SERVER + - CLIENT + - PRODUCER + - INTERNAL + ApmMetricsStat: + description: The APM metric statistic to query. + enum: + - error_rate + - errors + - errors_per_second + - hits + - hits_per_second + - apdex + - latency_avg + - latency_max + - latency_p50 + - latency_p75 + - latency_p90 + - latency_p95 + - latency_p99 + - latency_p999 + - latency_distribution + - total_time + example: latency_p99 + type: string + x-enum-varnames: + - ERROR_RATE + - ERRORS + - ERRORS_PER_SECOND + - HITS + - HITS_PER_SECOND + - APDEX + - LATENCY_AVG + - LATENCY_MAX + - LATENCY_P50 + - LATENCY_P75 + - LATENCY_P90 + - LATENCY_P95 + - LATENCY_P99 + - LATENCY_P999 + - LATENCY_DISTRIBUTION + - TOTAL_TIME + ApmResourceStatName: + description: The APM resource statistic to query. + enum: + - error_rate + - errors + - hits + - latency_avg + - latency_max + - latency_p50 + - latency_p75 + - latency_p90 + - latency_p95 + - latency_p99 + - latency_distribution + - total_time + example: latency_p95 + type: string + x-enum-varnames: + - ERROR_RATE + - ERRORS + - HITS + - LATENCY_AVG + - LATENCY_MAX + - LATENCY_P50 + - LATENCY_P75 + - LATENCY_P90 + - LATENCY_P95 + - LATENCY_P99 + - LATENCY_DISTRIBUTION + - TOTAL_TIME + ApmResourceStatsDataSource: + default: apm_resource_stats + description: A data source for APM resource statistics queries. + enum: + - apm_resource_stats + example: apm_resource_stats + type: string + x-enum-varnames: + - APM_RESOURCE_STATS + ApmResourceStatsQuery: + description: An individual APM resource stats query. + properties: + data_source: + $ref: "#/components/schemas/ApmResourceStatsDataSource" + env: + description: The environment to query. + example: prod + type: string + group_by: + description: Tag keys to group results by. + items: + description: A tag key to group by. + example: resource_name + type: string + type: array + name: + description: The variable name for use in formulas. + example: query1 + type: string + operation_name: + description: The APM operation name. + example: web.request + type: string + primary_tag_name: + description: Name of the second primary tag used within APM. Required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog + example: datacenter + type: string + primary_tag_value: + description: Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified. + example: us-east-1 + type: string + resource_name: + description: The resource name to filter by. + example: "Admin::ProductsController#create" + type: string + service: + description: The service name to filter by. + example: web-store + type: string + stat: + $ref: "#/components/schemas/ApmResourceStatName" + required: + - data_source + - name + - env + - service + - stat + type: object ApmRetentionFilterType: default: apm_retention_filter description: The type of the resource. @@ -13947,6 +14231,15 @@ components: type: string type: array type: object + ContainerDataSource: + default: container + description: A data source for container-level infrastructure metrics. + enum: + - container + example: container + type: string + x-enum-varnames: + - CONTAINER ContainerGroup: description: Container group object. properties: @@ -14358,6 +14651,82 @@ components: type: string x-enum-varnames: - CURSOR_LIMIT + ContainerScalarQuery: + description: An individual scalar container query. + properties: + aggregator: + $ref: "#/components/schemas/MetricsAggregator" + data_source: + $ref: "#/components/schemas/ContainerDataSource" + is_normalized_cpu: + description: Whether CPU metrics should be normalized by core count. + type: boolean + limit: + description: Maximum number of results to return. + format: int64 + type: integer + metric: + description: The container metric to query. + example: process.stat.container.cpu.total_pct + type: string + name: + description: The variable name for use in formulas. + example: query1 + type: string + sort: + $ref: "#/components/schemas/QuerySortOrder" + tag_filters: + description: Tag filters to narrow down containers. + items: + description: A tag filter value. + example: "env:prod" + type: string + type: array + text_filter: + description: A full-text search filter to match container names. + type: string + required: + - data_source + - name + - metric + type: object + ContainerTimeseriesQuery: + description: An individual timeseries container query. + properties: + data_source: + $ref: "#/components/schemas/ContainerDataSource" + is_normalized_cpu: + description: Whether CPU metrics should be normalized by core count. + type: boolean + limit: + description: Maximum number of results to return. + format: int64 + type: integer + metric: + description: The container metric to query. + example: process.stat.container.cpu.total_pct + type: string + name: + description: The variable name for use in formulas. + example: query1 + type: string + sort: + $ref: "#/components/schemas/QuerySortOrder" + tag_filters: + description: Tag filters to narrow down containers. + items: + description: A tag filter value. + example: "env:prod" + type: string + type: array + text_filter: + description: A full-text search filter to match container names. + type: string + required: + - data_source + - name + - metric + type: object ContainerType: default: container description: Type of container. @@ -24967,13 +25336,35 @@ components: description: A data source that is powered by the Events Platform. enum: - logs + - spans + - network - rum + - security_signals + - profiles + - audit + - events + - ci_tests + - ci_pipelines + - incident_analytics + - product_analytics + - on_call_events - dora example: logs type: string x-enum-varnames: - LOGS + - SPANS + - NETWORK - RUM + - SECURITY_SIGNALS + - PROFILES + - AUDIT + - EVENTS + - CI_TESTS + - CI_PIPELINES + - INCIDENT_ANALYTICS + - PRODUCT_ANALYTICS + - ON_CALL_EVENTS - DORA EventsGroupBy: description: A dimension on which to split a query's results. @@ -29047,64 +29438,6 @@ components: $ref: "#/components/schemas/GetInterfacesData" type: array type: object - GetInvestigationResponse: - description: Response for a single Bits AI investigation. - properties: - data: - $ref: "#/components/schemas/GetInvestigationResponseData" - links: - $ref: "#/components/schemas/GetInvestigationResponseLinks" - required: - - data - - links - type: object - GetInvestigationResponseData: - description: Data for the get investigation response. - properties: - attributes: - $ref: "#/components/schemas/GetInvestigationResponseDataAttributes" - id: - description: The unique identifier of the investigation. - example: "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - type: string - type: - $ref: "#/components/schemas/InvestigationType" - required: - - id - - type - - attributes - type: object - GetInvestigationResponseDataAttributes: - description: Attributes of the investigation. - properties: - conclusions: - description: The conclusions drawn from the investigation. - items: - $ref: "#/components/schemas/InvestigationConclusion" - type: array - status: - description: The current status of the investigation. - example: "conclusive" - type: string - title: - description: The title of the investigation. - example: "Monitor alert investigation for web-server-01" - type: string - required: - - title - - status - - conclusions - type: object - GetInvestigationResponseLinks: - description: Links related to the investigation. - properties: - self: - description: The URL to the investigation in the Datadog app. - example: "https://app.datadoghq.com/bits-ai/investigations/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - type: string - required: - - self - type: object GetIssueIncludeQueryParameterItem: description: Relationship object that should be included in the response. enum: @@ -34568,34 +34901,6 @@ components: - DOWN - WARNING - "OFF" - InvestigationConclusion: - description: A full explanation of the finding, including root cause analysis and supporting evidence. - properties: - description: - description: A full explanation of the finding, including root cause analysis and supporting evidence. - example: "The investigation found that a memory leak in payments-service caused CPU usage to spike above 95% starting at 14:32 UTC." - type: string - summary: - description: A summary of the finding, including affected components and timeframe. - example: "CPU usage exceeded 95% for over 10 minutes on web-server-01." - type: string - title: - description: The title of the conclusion. - example: "High CPU usage detected on web-server-01" - type: string - required: - - title - - summary - - description - type: object - InvestigationType: - description: The resource type for investigations. - enum: - - investigation - example: investigation - type: string - x-enum-varnames: - - INVESTIGATION Issue: description: The issue matching the request. properties: @@ -38442,113 +38747,6 @@ components: description: The type of the resource. The value should always be tags. type: string type: object - ListInvestigationsResponse: - description: Response for listing investigations. - properties: - data: - description: List of investigations. - items: - $ref: "#/components/schemas/ListInvestigationsResponseData" - type: array - links: - $ref: "#/components/schemas/ListInvestigationsResponseLinks" - meta: - $ref: "#/components/schemas/ListInvestigationsResponseMeta" - required: - - data - - meta - - links - type: object - ListInvestigationsResponseData: - description: Data for an investigation list item. - properties: - attributes: - $ref: "#/components/schemas/ListInvestigationsResponseDataAttributes" - id: - description: The unique identifier of the investigation. - example: "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - type: string - type: - $ref: "#/components/schemas/InvestigationType" - required: - - id - - type - - attributes - type: object - ListInvestigationsResponseDataAttributes: - description: Attributes of an investigation list item. - properties: - status: - description: The current status of the investigation. - example: "conclusive" - type: string - title: - description: The title of the investigation. - example: "Monitor alert investigation for web-server-01" - type: string - required: - - status - - title - type: object - ListInvestigationsResponseLinks: - description: Pagination links for the list investigations response. - properties: - first: - description: Link to the first page. - example: "https://api.datadoghq.com/api/v2/bits-ai/investigations?page[offset]=0&page[limit]=10" - type: string - last: - description: Link to the last page. - nullable: true - type: string - next: - description: Link to the next page. - example: "https://api.datadoghq.com/api/v2/bits-ai/investigations?page[offset]=10&page[limit]=10" - type: string - prev: - description: Link to the previous page. - nullable: true - type: string - self: - description: Link to the current page. - example: "https://api.datadoghq.com/api/v2/bits-ai/investigations?page[offset]=0&page[limit]=10" - type: string - required: - - first - - next - - self - type: object - ListInvestigationsResponseMeta: - description: Metadata for the list investigations response. - properties: - page: - $ref: "#/components/schemas/ListInvestigationsResponseMetaPage" - required: - - page - type: object - ListInvestigationsResponseMetaPage: - description: Pagination metadata. - properties: - limit: - description: Maximum number of results per page. - example: 10 - format: int64 - type: integer - offset: - description: Offset of the current page. - example: 0 - format: int64 - type: integer - total: - description: Total number of investigations. - example: 50 - format: int64 - type: integer - required: - - total - - limit - - offset - type: object ListKindCatalogResponse: description: List kind response. properties: @@ -41920,28 +42118,6 @@ components: maxLength: 255 type: string type: object - MonitorAlertTriggerAttributes: - description: Attributes for a monitor alert trigger. - properties: - event_id: - description: The event ID associated with the monitor alert. - example: "1234567890123456789" - type: string - event_ts: - description: The timestamp of the event in Unix milliseconds. - example: 1700000000000 - format: int64 - type: integer - monitor_id: - description: The monitor ID that triggered the alert. - example: 12345678 - format: int64 - type: integer - required: - - monitor_id - - event_id - - event_ts - type: object MonitorConfigPolicyAttributeCreateRequest: description: Policy and policy type for a monitor configuration policy. properties: @@ -51009,6 +51185,54 @@ components: required: - type type: object + ProcessDataSource: + default: process + description: A data source for process-level infrastructure metrics. + enum: + - process + example: process + type: string + x-enum-varnames: + - PROCESS + ProcessScalarQuery: + description: An individual scalar process query. + properties: + aggregator: + $ref: "#/components/schemas/MetricsAggregator" + data_source: + $ref: "#/components/schemas/ProcessDataSource" + is_normalized_cpu: + description: Whether CPU metrics should be normalized by core count. + type: boolean + limit: + description: Maximum number of results to return. + format: int64 + type: integer + metric: + description: The process metric to query. + example: process.stat.cpu.total_pct + type: string + name: + description: The variable name for use in formulas. + example: query1 + type: string + sort: + $ref: "#/components/schemas/QuerySortOrder" + tag_filters: + description: Tag filters to narrow down processes. + items: + description: A tag filter value. + example: "env:prod" + type: string + type: array + text_filter: + description: A full-text search filter to match process names or commands. + type: string + required: + - data_source + - name + - metric + type: object ProcessSummariesMeta: description: Response metadata object. properties: @@ -51095,6 +51319,43 @@ components: type: string x-enum-varnames: - PROCESS + ProcessTimeseriesQuery: + description: An individual timeseries process query. + properties: + data_source: + $ref: "#/components/schemas/ProcessDataSource" + is_normalized_cpu: + description: Whether CPU metrics should be normalized by core count. + type: boolean + limit: + description: Maximum number of results to return. + format: int64 + type: integer + metric: + description: The process metric to query. + example: process.stat.cpu.total_pct + type: string + name: + description: The variable name for use in formulas. + example: query1 + type: string + sort: + $ref: "#/components/schemas/QuerySortOrder" + tag_filters: + description: Tag filters to narrow down processes. + items: + description: A tag filter value. + example: "env:prod" + type: string + type: array + text_filter: + description: A full-text search filter to match process names or commands. + type: string + required: + - data_source + - name + - metric + type: object ProductAnalyticsAnalyticsQuery: description: The analytics query definition containing a base query, compute rule, and optional grouping. properties: @@ -57298,6 +57559,12 @@ components: oneOf: - $ref: "#/components/schemas/MetricsScalarQuery" - $ref: "#/components/schemas/EventsScalarQuery" + - $ref: "#/components/schemas/ApmResourceStatsQuery" + - $ref: "#/components/schemas/ApmMetricsQuery" + - $ref: "#/components/schemas/ApmDependencyStatsQuery" + - $ref: "#/components/schemas/SloQuery" + - $ref: "#/components/schemas/ProcessScalarQuery" + - $ref: "#/components/schemas/ContainerScalarQuery" ScalarResponse: description: A message containing the response to a scalar query. properties: @@ -64672,6 +64939,51 @@ components: required: - slackTrigger type: object + SloDataSource: + default: slo + description: A data source for SLO queries. + enum: + - slo + example: slo + type: string + x-enum-varnames: + - SLO + SloQuery: + description: An individual SLO query. + example: + additional_query_filters: "*" + data_source: "slo" + group_mode: "overall" + measure: "good_events" + name: "my_slo" + slo_id: "12345678910" + slo_query_type: "metric" + properties: + additional_query_filters: + description: Additional filters applied to the SLO query. + example: "host:host_a,env:prod" + type: string + data_source: + $ref: "#/components/schemas/SloDataSource" + group_mode: + $ref: "#/components/schemas/SlosGroupMode" + measure: + $ref: "#/components/schemas/SlosMeasure" + name: + description: The variable name for use in formulas. + example: query1 + type: string + slo_id: + description: The unique identifier of the SLO to query. + example: "a]b123c45de6f78g90h" + type: string + slo_query_type: + $ref: "#/components/schemas/SlosQueryType" + required: + - data_source + - slo_id + - measure + type: object SloReportCreateRequest: description: The SLO report request body. properties: @@ -64779,6 +65091,54 @@ components: type: string x-enum-varnames: - SLO_STATUS + SlosGroupMode: + description: How SLO results are grouped in the response. + enum: + - overall + - components + example: overall + type: string + x-enum-varnames: + - OVERALL + - COMPONENTS + SlosMeasure: + description: The SLO measurement to retrieve. + enum: + - good_events + - bad_events + - slo_status + - error_budget_remaining + - error_budget_remaining_history + - error_budget_burndown + - burn_rate + - slo_status_history + - good_minutes + - bad_minutes + example: slo_status + type: string + x-enum-varnames: + - GOOD_EVENTS + - BAD_EVENTS + - SLO_STATUS + - ERROR_BUDGET_REMAINING + - ERROR_BUDGET_REMAINING_HISTORY + - ERROR_BUDGET_BURNDOWN + - BURN_RATE + - SLO_STATUS_HISTORY + - GOOD_MINUTES + - BAD_MINUTES + SlosQueryType: + description: The type of SLO definition being queried. + enum: + - metric + - time_slice + - monitor + example: metric + type: string + x-enum-varnames: + - METRIC + - TIME_SLICE + - MONITOR Snapshot: description: A single heatmap snapshot resource returned by create or update operations. properties: @@ -70996,6 +71356,286 @@ components: type: string x-enum-varnames: - TEST_OPTIMIZATION_DELETE_SERVICE_SETTINGS_REQUEST + TestOptimizationFlakyTestsManagementPoliciesAttemptToFix: + description: Configuration for the attempt-to-fix Flaky Tests Management policy. + properties: + retries: + description: Number of retries when attempting to fix a flaky test. Must be greater than 0. + example: 3 + format: int64 + type: integer + type: object + TestOptimizationFlakyTestsManagementPoliciesAttributes: + description: Attributes of the Flaky Tests Management policies for a repository. + properties: + attempt_to_fix: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesAttemptToFix" + disabled: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesDisabled" + quarantined: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesQuarantined" + repository_id: + description: The repository identifier. + example: github.com/datadog/shopist + type: string + type: object + TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule: + description: Automatic disable triggering rule based on a time window and test status. + properties: + enabled: + description: Whether this auto-disable rule is enabled. + example: false + type: boolean + status: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesDisabledStatus" + window_seconds: + description: Time window in seconds over which flakiness is evaluated. Must be greater than 0. + example: 3600 + format: int64 + type: integer + type: object + TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule: + description: Automatic quarantine triggering rule based on a time window. + properties: + enabled: + description: Whether this auto-quarantine rule is enabled. + example: true + type: boolean + window_seconds: + description: Time window in seconds over which flakiness is evaluated. Must be greater than 0. + example: 3600 + format: int64 + type: integer + type: object + TestOptimizationFlakyTestsManagementPoliciesBranchRule: + description: Branch filtering rule for a Flaky Tests Management policy. + properties: + branches: + description: List of branches to which the policy applies. + example: + - main + items: + description: A branch name. + type: string + type: array + enabled: + description: Whether this branch rule is enabled. + example: true + type: boolean + excluded_branches: + description: List of branches excluded from the policy. + example: [] + items: + description: A branch name. + type: string + type: array + excluded_test_services: + description: List of test services excluded from the policy. + example: [] + items: + description: A test service name. + type: string + type: array + type: object + TestOptimizationFlakyTestsManagementPoliciesData: + description: Data object for Flaky Tests Management policies response. + properties: + attributes: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesAttributes" + id: + description: The repository identifier used as the resource ID. + example: github.com/datadog/shopist + type: string + type: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesType" + type: object + TestOptimizationFlakyTestsManagementPoliciesDisabled: + description: Configuration for the disabled Flaky Tests Management policy. + properties: + auto_disable_rule: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule" + branch_rule: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesBranchRule" + enabled: + description: Whether the disabled policy is enabled. + example: false + type: boolean + failure_rate_rule: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule" + type: object + TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule: + description: Failure-rate-based rule for the disabled policy. + properties: + branches: + description: List of branches to which this rule applies. + example: [] + items: + description: A branch name. + type: string + type: array + enabled: + description: Whether this failure rate rule is enabled. + example: false + type: boolean + min_runs: + description: Minimum number of runs required before the rule is evaluated. Must be greater than or equal to 0. + example: 10 + format: int64 + type: integer + status: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesDisabledStatus" + threshold: + description: Failure rate threshold (0.0–1.0) above which the rule triggers. + example: 0.5 + format: double + type: number + type: object + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus: + description: |- + Test status that the disable policy applies to. + Must be either `active` or `quarantined`. + enum: + - active + - quarantined + example: active + type: string + x-enum-varnames: + - ACTIVE + - QUARANTINED + TestOptimizationFlakyTestsManagementPoliciesGetRequest: + description: Request object for getting Flaky Tests Management policies. + properties: + data: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesGetRequestData" + required: + - data + type: object + TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes: + description: Attributes for requesting Flaky Tests Management policies. + properties: + repository_id: + description: The repository identifier. + example: github.com/datadog/shopist + minLength: 1 + type: string + required: + - repository_id + type: object + TestOptimizationFlakyTestsManagementPoliciesGetRequestData: + description: Data object for get Flaky Tests Management policies request. + properties: + attributes: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes" + type: + $ref: "#/components/schemas/TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType" + required: + - type + - attributes + type: object + TestOptimizationFlakyTestsManagementPoliciesQuarantined: + description: Configuration for the quarantined Flaky Tests Management policy. + properties: + auto_quarantine_rule: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule" + branch_rule: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesBranchRule" + enabled: + description: Whether the quarantined policy is enabled. + example: true + type: boolean + failure_rate_rule: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule" + type: object + TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule: + description: Failure-rate-based rule for the quarantined policy. + properties: + branches: + description: List of branches to which this rule applies. + example: + - main + items: + description: A branch name. + type: string + type: array + enabled: + description: Whether this failure rate rule is enabled. + example: true + type: boolean + min_runs: + description: Minimum number of runs required before the rule is evaluated. Must be greater than or equal to 0. + example: 10 + format: int64 + type: integer + threshold: + description: Failure rate threshold (0.0–1.0) above which the rule triggers. + example: 0.5 + format: double + type: number + type: object + TestOptimizationFlakyTestsManagementPoliciesResponse: + description: Response object containing Flaky Tests Management policies for a repository. + properties: + data: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesData" + type: object + TestOptimizationFlakyTestsManagementPoliciesType: + description: |- + JSON:API type for Flaky Tests Management policies response. + The value must always be `test_optimization_flaky_tests_management_policies`. + enum: + - test_optimization_flaky_tests_management_policies + example: test_optimization_flaky_tests_management_policies + type: string + x-enum-varnames: + - TEST_OPTIMIZATION_FLAKY_TESTS_MANAGEMENT_POLICIES + TestOptimizationFlakyTestsManagementPoliciesUpdateRequest: + description: Request object for updating Flaky Tests Management policies. + properties: + data: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData" + required: + - data + type: object + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes: + description: |- + Attributes for updating Flaky Tests Management policies. + Only provided policy blocks are updated; omitted blocks are left unchanged. + properties: + attempt_to_fix: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesAttemptToFix" + disabled: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesDisabled" + quarantined: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesQuarantined" + repository_id: + description: The repository identifier. + example: github.com/datadog/shopist + minLength: 1 + type: string + required: + - repository_id + type: object + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData: + description: Data object for update Flaky Tests Management policies request. + properties: + attributes: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes" + type: + $ref: "#/components/schemas/TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType" + required: + - type + - attributes + type: object + TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType: + description: |- + JSON:API type for get Flaky Tests Management policies request. + The value must always be `test_optimization_get_flaky_tests_management_policies_request`. + enum: + - test_optimization_get_flaky_tests_management_policies_request + example: test_optimization_get_flaky_tests_management_policies_request + type: string + x-enum-varnames: + - TEST_OPTIMIZATION_GET_FLAKY_TESTS_MANAGEMENT_POLICIES_REQUEST TestOptimizationGetServiceSettingsRequest: description: Request object for getting Test Optimization service settings. properties: @@ -71114,6 +71754,16 @@ components: type: string x-enum-varnames: - TEST_OPTIMIZATION_SERVICE_SETTINGS + TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType: + description: |- + JSON:API type for update Flaky Tests Management policies request. + The value must always be `test_optimization_update_flaky_tests_management_policies_request`. + enum: + - test_optimization_update_flaky_tests_management_policies_request + example: test_optimization_update_flaky_tests_management_policies_request + type: string + x-enum-varnames: + - TEST_OPTIMIZATION_UPDATE_FLAKY_TESTS_MANAGEMENT_POLICIES_REQUEST TestOptimizationUpdateServiceSettingsRequest: description: Request object for updating Test Optimization service settings. properties: @@ -71559,6 +72209,12 @@ components: oneOf: - $ref: "#/components/schemas/MetricsTimeseriesQuery" - $ref: "#/components/schemas/EventsTimeseriesQuery" + - $ref: "#/components/schemas/ApmResourceStatsQuery" + - $ref: "#/components/schemas/ApmMetricsQuery" + - $ref: "#/components/schemas/ApmDependencyStatsQuery" + - $ref: "#/components/schemas/SloQuery" + - $ref: "#/components/schemas/ProcessTimeseriesQuery" + - $ref: "#/components/schemas/ContainerTimeseriesQuery" TimeseriesResponse: description: A message containing the response to a timeseries query. properties: @@ -71661,94 +72317,6 @@ components: - $ref: "#/components/schemas/SlackTriggerWrapper" - $ref: "#/components/schemas/SoftwareCatalogTriggerWrapper" - $ref: "#/components/schemas/WorkflowTriggerWrapper" - TriggerAttributes: - description: The trigger definition for starting an investigation. - properties: - monitor_alert_trigger: - $ref: "#/components/schemas/MonitorAlertTriggerAttributes" - type: - $ref: "#/components/schemas/TriggerType" - required: - - type - - monitor_alert_trigger - type: object - TriggerInvestigationRequest: - description: Request to trigger a new investigation. - properties: - data: - $ref: "#/components/schemas/TriggerInvestigationRequestData" - required: - - data - type: object - TriggerInvestigationRequestData: - description: Data for the trigger investigation request. - properties: - attributes: - $ref: "#/components/schemas/TriggerInvestigationRequestDataAttributes" - type: - $ref: "#/components/schemas/TriggerInvestigationRequestType" - required: - - type - - attributes - type: object - TriggerInvestigationRequestDataAttributes: - description: Attributes for the trigger investigation request. - properties: - trigger: - $ref: "#/components/schemas/TriggerAttributes" - required: - - trigger - type: object - TriggerInvestigationRequestType: - description: The resource type for trigger investigation requests. - enum: - - trigger_investigation_request - example: trigger_investigation_request - type: string - x-enum-varnames: - - TRIGGER_INVESTIGATION_REQUEST - TriggerInvestigationResponse: - description: Response after triggering an investigation. - properties: - data: - $ref: "#/components/schemas/TriggerInvestigationResponseData" - required: - - data - type: object - TriggerInvestigationResponseData: - description: Data for the trigger investigation response. - properties: - attributes: - $ref: "#/components/schemas/TriggerInvestigationResponseDataAttributes" - id: - description: Unique identifier for the trigger response. - example: "f5e6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b" - type: string - type: - $ref: "#/components/schemas/TriggerInvestigationResponseType" - required: - - id - - type - - attributes - type: object - TriggerInvestigationResponseDataAttributes: - description: Attributes for the trigger investigation response. - properties: - investigation_id: - description: The ID of the investigation that was created. - example: "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - type: string - required: - - investigation_id - type: object - TriggerInvestigationResponseType: - description: The resource type for trigger investigation responses. - enum: - - trigger_investigation_response - example: trigger_investigation_response - type: string - x-enum-varnames: - - TRIGGER_INVESTIGATION_RESPONSE TriggerRateLimit: description: Defines a rate limit for a trigger. properties: @@ -71772,14 +72340,6 @@ components: x-enum-varnames: - SECURITY_FINDINGS - SECURITY_SIGNALS - TriggerType: - description: The type of trigger for the investigation. - enum: - - monitor_alert_trigger - example: monitor_alert_trigger - type: string - x-enum-varnames: - - MONITOR_ALERT_TRIGGER UCConfigPair: description: The definition of `UCConfigPair` object. example: @@ -75657,8 +76217,6 @@ components: apm_service_catalog_write: Add, modify, and delete service catalog definitions when those definitions are maintained by Datadog. appsec_vm_read: View infrastructure, application code, and library vulnerability findings. billing_read: View your organization's billing information. - bits_investigations_read: View Bits AI investigations. - bits_investigations_write: Create and manage Bits AI investigations. cases_read: View Cases. cases_write: Create and update cases. ci_visibility_pipelines_write: Create CI Visibility pipeline spans using the API. @@ -79749,213 +80307,6 @@ paths: operator: OR permissions: - user_access_manage - /api/v2/bits-ai/investigations: - get: - description: List all Bits AI investigations for the organization. - operationId: ListInvestigations - parameters: - - description: Offset for pagination. - example: 0 - in: query - name: page[offset] - required: false - schema: - format: int64 - type: integer - - description: Maximum number of investigations to return. - example: 25 - in: query - name: page[limit] - required: false - schema: - default: 25 - format: int64 - maximum: 100 - type: integer - - description: Filter investigations by monitor ID. - example: 12345678 - in: query - name: filter[monitor_id] - required: false - schema: - format: int64 - type: integer - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - status: "conclusive" - title: "Monitor alert investigation for web-server-01" - id: "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - type: investigation - links: - first: "https://api.datadoghq.com/api/v2/bits-ai/investigations?page[offset]=0&page[limit]=10" - next: "https://api.datadoghq.com/api/v2/bits-ai/investigations?page[offset]=10&page[limit]=10" - self: "https://api.datadoghq.com/api/v2/bits-ai/investigations?page[offset]=0&page[limit]=10" - meta: - page: - limit: 10 - offset: 0 - total: 50 - schema: - $ref: "#/components/schemas/ListInvestigationsResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - bits_investigations_read - summary: List Bits AI investigations - tags: - - Bits AI - x-pagination: - limitParam: page[limit] - pageOffsetParam: page[offset] - resultsPath: data - "x-permission": - operator: OR - permissions: - - bits_investigations_read - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Trigger a new Bits AI investigation based on a monitor alert. - operationId: TriggerInvestigation - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - trigger: - monitor_alert_trigger: - event_id: "1234567890123456789" - event_ts: 1700000000000 - monitor_id: 12345678 - type: monitor_alert_trigger - type: trigger_investigation_request - schema: - $ref: "#/components/schemas/TriggerInvestigationRequest" - description: Trigger investigation request body. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - investigation_id: "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - id: "f5e6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b" - type: trigger_investigation_response - schema: - $ref: "#/components/schemas/TriggerInvestigationResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - bits_investigations_write - summary: Trigger a Bits AI investigation - tags: - - Bits AI - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - bits_investigations_write - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/bits-ai/investigations/{id}: - get: - description: Get a specific Bits AI investigation by ID. - operationId: GetInvestigation - parameters: - - description: The ID of the investigation. - example: "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - in: path - name: id - required: true - schema: - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - conclusions: - - description: "The investigation found that a memory leak in payments-service caused CPU usage to spike above 95% starting at 14:32 UTC." - summary: "CPU usage exceeded 95% for over 10 minutes on web-server-01." - title: "High CPU usage detected on web-server-01" - status: "conclusive" - title: "Monitor alert investigation for web-server-01" - id: "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - type: investigation - links: - self: "https://app.datadoghq.com/bits-ai/investigations/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" - schema: - $ref: "#/components/schemas/GetInvestigationResponse" - 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: [] - - AuthZ: - - bits_investigations_read - summary: Get a Bits AI investigation - tags: - - Bits AI - "x-permission": - operator: OR - permissions: - - bits_investigations_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/cases: get: description: >- @@ -82177,6 +82528,88 @@ paths: operator: OR permissions: - ci_visibility_read + /api/v2/ci/test-optimization/settings/policies: + patch: + description: |- + Partially update Flaky Tests Management repository-level policies for the given repository. + Only provided policy blocks are updated; omitted blocks are left unchanged. + operationId: UpdateFlakyTestsManagementPolicies + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesUpdateRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - test_optimization_settings_write + summary: Update Flaky Tests Management policies + tags: ["Test Optimization"] + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - test_optimization_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Retrieve Flaky Tests Management repository-level policies for the given repository. + operationId: GetFlakyTestsManagementPolicies + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesGetRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TestOptimizationFlakyTestsManagementPoliciesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - test_optimization_read + summary: Get Flaky Tests Management policies + tags: ["Test Optimization"] + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - test_optimization_read + x-unstable: |- + **Note**: This endpoint is in preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/ci/test-optimization/settings/service: delete: description: |- @@ -116975,9 +117408,6 @@ tags: is used to automatically map groups of users to roles in Datadog using attributes sent from Identity Providers. Use these endpoints to manage your AuthN Mappings. name: AuthN Mappings - - description: |- - Use the Bits AI endpoints to retrieve AI-powered investigations. - name: Bits AI - description: |- Search or aggregate your CI Visibility pipeline events and send them to your Datadog site over HTTP. See the [CI Pipeline Visibility in Datadog page](https://docs.datadoghq.com/continuous_integration/pipelines/) for more information. name: CI Visibility Pipelines diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index d69f24913f..1b149a7a4e 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -88,13 +88,6 @@ datadog\_api\_client.v2.api.aws\_logs\_integration\_api module :members: :show-inheritance: -datadog\_api\_client.v2.api.bits\_ai\_api module ------------------------------------------------- - -.. automodule:: datadog_api_client.v2.api.bits_ai_api - :members: - :show-inheritance: - datadog\_api\_client.v2.api.case\_management\_api module -------------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index d791fd6578..4d5fa2f489 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -606,6 +606,76 @@ datadog\_api\_client.v2.model.api\_trigger\_wrapper module :members: :show-inheritance: +datadog\_api\_client.v2.model.apm\_dependency\_stat\_name module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_dependency_stat_name + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_dependency\_stats\_data\_source module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_dependency_stats_data_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_dependency\_stats\_query module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.apm_dependency_stats_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_metrics\_data\_source module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_metrics_data_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_metrics\_query module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_metrics_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_metrics\_span\_kind module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_metrics_span_kind + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_metrics\_stat module +------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_metrics_stat + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_resource\_stat\_name module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_resource_stat_name + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_resource\_stats\_data\_source module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_resource_stats_data_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.apm\_resource\_stats\_query module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.apm_resource_stats_query + :members: + :show-inheritance: + datadog\_api\_client.v2.model.apm\_retention\_filter\_type module ----------------------------------------------------------------- @@ -5667,6 +5737,13 @@ datadog\_api\_client.v2.model.container\_attributes module :members: :show-inheritance: +datadog\_api\_client.v2.model.container\_data\_source module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.container_data_source + :members: + :show-inheritance: + datadog\_api\_client.v2.model.container\_group module ----------------------------------------------------- @@ -5856,6 +5933,20 @@ datadog\_api\_client.v2.model.container\_meta\_page\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.container\_scalar\_query module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.container_scalar_query + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.container\_timeseries\_query module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.container_timeseries_query + :members: + :show-inheritance: + datadog\_api\_client.v2.model.container\_type module ---------------------------------------------------- @@ -12324,34 +12415,6 @@ datadog\_api\_client.v2.model.get\_interfaces\_response module :members: :show-inheritance: -datadog\_api\_client.v2.model.get\_investigation\_response module ------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.get_investigation_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.get\_investigation\_response\_data module ------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.get_investigation_response_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.get\_investigation\_response\_data\_attributes module ------------------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.get_investigation_response_data_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.get\_investigation\_response\_links module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.get_investigation_response_links - :members: - :show-inheritance: - datadog\_api\_client.v2.model.get\_issue\_include\_query\_parameter\_item module -------------------------------------------------------------------------------- @@ -14879,20 +14942,6 @@ datadog\_api\_client.v2.model.interface\_attributes\_status module :members: :show-inheritance: -datadog\_api\_client.v2.model.investigation\_conclusion module --------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.investigation_conclusion - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.investigation\_type module --------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.investigation_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.ip\_allowlist\_attributes module -------------------------------------------------------------- @@ -16125,48 +16174,6 @@ datadog\_api\_client.v2.model.list\_interface\_tags\_response\_data module :members: :show-inheritance: -datadog\_api\_client.v2.model.list\_investigations\_response module -------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_investigations_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_investigations\_response\_data module -------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_investigations_response_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_investigations\_response\_data\_attributes module -------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_investigations_response_data_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_investigations\_response\_links module --------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_investigations_response_links - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_investigations\_response\_meta module -------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_investigations_response_meta - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.list\_investigations\_response\_meta\_page module -------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.list_investigations_response_meta_page - :members: - :show-inheritance: - datadog\_api\_client.v2.model.list\_kind\_catalog\_response module ------------------------------------------------------------------ @@ -18596,13 +18603,6 @@ datadog\_api\_client.v2.model.microsoft\_teams\_workflows\_webhook\_response\_at :members: :show-inheritance: -datadog\_api\_client.v2.model.monitor\_alert\_trigger\_attributes module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.monitor_alert_trigger_attributes - :members: - :show-inheritance: - datadog\_api\_client.v2.model.monitor\_config\_policy\_attribute\_create\_request module ---------------------------------------------------------------------------------------- @@ -22754,6 +22754,20 @@ datadog\_api\_client.v2.model.preview\_entity\_response\_data module :members: :show-inheritance: +datadog\_api\_client.v2.model.process\_data\_source module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.process_data_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.process\_scalar\_query module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.process_scalar_query + :members: + :show-inheritance: + datadog\_api\_client.v2.model.process\_summaries\_meta module ------------------------------------------------------------- @@ -22796,6 +22810,13 @@ datadog\_api\_client.v2.model.process\_summary\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.process\_timeseries\_query module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.process_timeseries_query + :members: + :show-inheritance: + datadog\_api\_client.v2.model.product\_analytics\_analytics\_query module ------------------------------------------------------------------------- @@ -28970,6 +28991,20 @@ datadog\_api\_client.v2.model.slack\_trigger\_wrapper module :members: :show-inheritance: +datadog\_api\_client.v2.model.slo\_data\_source module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.slo_data_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.slo\_query module +----------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.slo_query + :members: + :show-inheritance: + datadog\_api\_client.v2.model.slo\_report\_create\_request module ----------------------------------------------------------------- @@ -29068,6 +29103,27 @@ datadog\_api\_client.v2.model.slo\_status\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.slos\_group\_mode module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.slos_group_mode + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.slos\_measure module +-------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.slos_measure + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.slos\_query\_type module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.slos_query_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.snapshot module --------------------------------------------- @@ -31994,6 +32050,146 @@ datadog\_api\_client.v2.model.test\_optimization\_delete\_service\_settings\_req :members: :show-inheritance: +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_attempt\_to\_fix module +------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_attempt_to_fix + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_attributes module +------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_auto\_disable\_rule module +---------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_disable_rule + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_auto\_quarantine\_rule module +------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_quarantine_rule + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_branch\_rule module +--------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_branch_rule + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_data module +------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_disabled module +----------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_disabled\_failure\_rate\_rule module +-------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_disabled\_status module +------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_get\_request module +--------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_get\_request\_attributes module +--------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_get\_request\_data module +--------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_quarantined module +-------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_quarantined\_failure\_rate\_rule module +----------------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_response module +----------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_type module +------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_update\_request module +------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_update\_request\_attributes module +------------------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_flaky\_tests\_management\_policies\_update\_request\_data module +------------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.test\_optimization\_get\_flaky\_tests\_management\_policies\_request\_data\_type module +--------------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.test_optimization_get_flaky_tests_management_policies_request_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.test\_optimization\_get\_service\_settings\_request module ---------------------------------------------------------------------------------------- @@ -32050,6 +32246,13 @@ datadog\_api\_client.v2.model.test\_optimization\_service\_settings\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.test\_optimization\_update\_flaky\_tests\_management\_policies\_request\_data\_type module +------------------------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.test_optimization_update_flaky_tests_management_policies_request_data_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.test\_optimization\_update\_service\_settings\_request module ------------------------------------------------------------------------------------------- @@ -32337,69 +32540,6 @@ datadog\_api\_client.v2.model.trigger module :members: :show-inheritance: -datadog\_api\_client.v2.model.trigger\_attributes module --------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.trigger\_investigation\_request module --------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_investigation_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.trigger\_investigation\_request\_data module --------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_investigation_request_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.trigger\_investigation\_request\_data\_attributes module --------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_investigation_request_data_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.trigger\_investigation\_request\_type module --------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_investigation_request_type - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.trigger\_investigation\_response module ---------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_investigation_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.trigger\_investigation\_response\_data module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_investigation_response_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.trigger\_investigation\_response\_data\_attributes module ---------------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_investigation_response_data_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.trigger\_investigation\_response\_type module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_investigation_response_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.trigger\_rate\_limit module --------------------------------------------------------- @@ -32414,13 +32554,6 @@ datadog\_api\_client.v2.model.trigger\_source module :members: :show-inheritance: -datadog\_api\_client.v2.model.trigger\_type module --------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.trigger_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.uc\_config\_pair module ----------------------------------------------------- diff --git a/examples/v2/bits-ai/GetInvestigation.py b/examples/v2/bits-ai/GetInvestigation.py deleted file mode 100644 index bee2825441..0000000000 --- a/examples/v2/bits-ai/GetInvestigation.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Get a Bits AI investigation returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.bits_ai_api import BitsAIApi - -configuration = Configuration() -configuration.unstable_operations["get_investigation"] = True -with ApiClient(configuration) as api_client: - api_instance = BitsAIApi(api_client) - response = api_instance.get_investigation( - id="id", - ) - - print(response) diff --git a/examples/v2/bits-ai/ListInvestigations.py b/examples/v2/bits-ai/ListInvestigations.py deleted file mode 100644 index b44c9606ca..0000000000 --- a/examples/v2/bits-ai/ListInvestigations.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -List Bits AI investigations returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.bits_ai_api import BitsAIApi - -configuration = Configuration() -configuration.unstable_operations["list_investigations"] = True -with ApiClient(configuration) as api_client: - api_instance = BitsAIApi(api_client) - response = api_instance.list_investigations() - - print(response) diff --git a/examples/v2/bits-ai/ListInvestigations_130750454.py b/examples/v2/bits-ai/ListInvestigations_130750454.py deleted file mode 100644 index f874dba113..0000000000 --- a/examples/v2/bits-ai/ListInvestigations_130750454.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -List Bits AI investigations returns "OK" response with pagination -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.bits_ai_api import BitsAIApi - -configuration = Configuration() -configuration.unstable_operations["list_investigations"] = True -with ApiClient(configuration) as api_client: - api_instance = BitsAIApi(api_client) - items = api_instance.list_investigations_with_pagination() - for item in items: - print(item) diff --git a/examples/v2/bits-ai/TriggerInvestigation.py b/examples/v2/bits-ai/TriggerInvestigation.py deleted file mode 100644 index 77a3e92275..0000000000 --- a/examples/v2/bits-ai/TriggerInvestigation.py +++ /dev/null @@ -1,39 +0,0 @@ -""" -Trigger a Bits AI investigation returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.bits_ai_api import BitsAIApi -from datadog_api_client.v2.model.monitor_alert_trigger_attributes import MonitorAlertTriggerAttributes -from datadog_api_client.v2.model.trigger_attributes import TriggerAttributes -from datadog_api_client.v2.model.trigger_investigation_request import TriggerInvestigationRequest -from datadog_api_client.v2.model.trigger_investigation_request_data import TriggerInvestigationRequestData -from datadog_api_client.v2.model.trigger_investigation_request_data_attributes import ( - TriggerInvestigationRequestDataAttributes, -) -from datadog_api_client.v2.model.trigger_investigation_request_type import TriggerInvestigationRequestType -from datadog_api_client.v2.model.trigger_type import TriggerType - -body = TriggerInvestigationRequest( - data=TriggerInvestigationRequestData( - attributes=TriggerInvestigationRequestDataAttributes( - trigger=TriggerAttributes( - monitor_alert_trigger=MonitorAlertTriggerAttributes( - event_id="1234567890123456789", - event_ts=1700000000000, - monitor_id=12345678, - ), - type=TriggerType.MONITOR_ALERT_TRIGGER, - ), - ), - type=TriggerInvestigationRequestType.TRIGGER_INVESTIGATION_REQUEST, - ), -) - -configuration = Configuration() -configuration.unstable_operations["trigger_investigation"] = True -with ApiClient(configuration) as api_client: - api_instance = BitsAIApi(api_client) - response = api_instance.trigger_investigation(body=body) - - print(response) diff --git a/examples/v2/metrics/QueryScalarData_1479548882.py b/examples/v2/metrics/QueryScalarData_1479548882.py new file mode 100644 index 0000000000..de7bb9fb67 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_1479548882.py @@ -0,0 +1,60 @@ +""" +Scalar cross product query with apm_resource_stats data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.apm_resource_stat_name import ApmResourceStatName +from datadog_api_client.v2.model.apm_resource_stats_data_source import ApmResourceStatsDataSource +from datadog_api_client.v2.model.apm_resource_stats_query import ApmResourceStatsQuery +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.scalar_formula_query_request import ScalarFormulaQueryRequest +from datadog_api_client.v2.model.scalar_formula_request import ScalarFormulaRequest +from datadog_api_client.v2.model.scalar_formula_request_attributes import ScalarFormulaRequestAttributes +from datadog_api_client.v2.model.scalar_formula_request_queries import ScalarFormulaRequestQueries +from datadog_api_client.v2.model.scalar_formula_request_type import ScalarFormulaRequestType + +body = ScalarFormulaQueryRequest( + data=ScalarFormulaRequest( + attributes=ScalarFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + queries=ScalarFormulaRequestQueries( + [ + ApmResourceStatsQuery( + data_source=ApmResourceStatsDataSource.APM_RESOURCE_STATS, + name="a", + env="staging", + service="azure-bill-import", + stat=ApmResourceStatName.HITS, + operation_name="cassandra.query", + group_by=[ + "resource_name", + ], + primary_tag_name="datacenter", + primary_tag_value="*", + ), + ] + ), + to=1636629071000, + ), + type=ScalarFormulaRequestType.SCALAR_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_scalar_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryScalarData_1904811219.py b/examples/v2/metrics/QueryScalarData_1904811219.py new file mode 100644 index 0000000000..bc43c598d8 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_1904811219.py @@ -0,0 +1,57 @@ +""" +Scalar cross product query with apm_metrics data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.apm_metrics_data_source import ApmMetricsDataSource +from datadog_api_client.v2.model.apm_metrics_query import ApmMetricsQuery +from datadog_api_client.v2.model.apm_metrics_stat import ApmMetricsStat +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.scalar_formula_query_request import ScalarFormulaQueryRequest +from datadog_api_client.v2.model.scalar_formula_request import ScalarFormulaRequest +from datadog_api_client.v2.model.scalar_formula_request_attributes import ScalarFormulaRequestAttributes +from datadog_api_client.v2.model.scalar_formula_request_queries import ScalarFormulaRequestQueries +from datadog_api_client.v2.model.scalar_formula_request_type import ScalarFormulaRequestType + +body = ScalarFormulaQueryRequest( + data=ScalarFormulaRequest( + attributes=ScalarFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + queries=ScalarFormulaRequestQueries( + [ + ApmMetricsQuery( + data_source=ApmMetricsDataSource.APM_METRICS, + name="a", + stat=ApmMetricsStat.HITS, + service="web-store", + query_filter="env:prod", + group_by=[ + "resource_name", + ], + ), + ] + ), + to=1636629071000, + ), + type=ScalarFormulaRequestType.SCALAR_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_scalar_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryScalarData_2298288525.py b/examples/v2/metrics/QueryScalarData_2298288525.py new file mode 100644 index 0000000000..97339cce71 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_2298288525.py @@ -0,0 +1,58 @@ +""" +Scalar cross product query with slo data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.scalar_formula_query_request import ScalarFormulaQueryRequest +from datadog_api_client.v2.model.scalar_formula_request import ScalarFormulaRequest +from datadog_api_client.v2.model.scalar_formula_request_attributes import ScalarFormulaRequestAttributes +from datadog_api_client.v2.model.scalar_formula_request_queries import ScalarFormulaRequestQueries +from datadog_api_client.v2.model.scalar_formula_request_type import ScalarFormulaRequestType +from datadog_api_client.v2.model.slo_data_source import SloDataSource +from datadog_api_client.v2.model.slo_query import SloQuery +from datadog_api_client.v2.model.slos_group_mode import SlosGroupMode +from datadog_api_client.v2.model.slos_measure import SlosMeasure +from datadog_api_client.v2.model.slos_query_type import SlosQueryType + +body = ScalarFormulaQueryRequest( + data=ScalarFormulaRequest( + attributes=ScalarFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + queries=ScalarFormulaRequestQueries( + [ + SloQuery( + data_source=SloDataSource.SLO, + name="a", + slo_id="12345678910", + measure=SlosMeasure.SLO_STATUS, + slo_query_type=SlosQueryType.METRIC, + group_mode=SlosGroupMode.OVERALL, + additional_query_filters="*", + ), + ] + ), + to=1636629071000, + ), + type=ScalarFormulaRequestType.SCALAR_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_scalar_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryScalarData_2533499017.py b/examples/v2/metrics/QueryScalarData_2533499017.py new file mode 100644 index 0000000000..60b7b9f7f5 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_2533499017.py @@ -0,0 +1,58 @@ +""" +Scalar cross product query with apm_dependency_stats data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.apm_dependency_stat_name import ApmDependencyStatName +from datadog_api_client.v2.model.apm_dependency_stats_data_source import ApmDependencyStatsDataSource +from datadog_api_client.v2.model.apm_dependency_stats_query import ApmDependencyStatsQuery +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.scalar_formula_query_request import ScalarFormulaQueryRequest +from datadog_api_client.v2.model.scalar_formula_request import ScalarFormulaRequest +from datadog_api_client.v2.model.scalar_formula_request_attributes import ScalarFormulaRequestAttributes +from datadog_api_client.v2.model.scalar_formula_request_queries import ScalarFormulaRequestQueries +from datadog_api_client.v2.model.scalar_formula_request_type import ScalarFormulaRequestType + +body = ScalarFormulaQueryRequest( + data=ScalarFormulaRequest( + attributes=ScalarFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + queries=ScalarFormulaRequestQueries( + [ + ApmDependencyStatsQuery( + data_source=ApmDependencyStatsDataSource.APM_DEPENDENCY_STATS, + name="a", + env="ci", + service="cassandra", + stat=ApmDependencyStatName.AVG_DURATION, + operation_name="cassandra.query", + resource_name="DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?", + primary_tag_name="datacenter", + primary_tag_value="edge-eu1.prod.dog", + ), + ] + ), + to=1636629071000, + ), + type=ScalarFormulaRequestType.SCALAR_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_scalar_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryScalarData_4230617918.py b/examples/v2/metrics/QueryScalarData_4230617918.py new file mode 100644 index 0000000000..66356dbf28 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_4230617918.py @@ -0,0 +1,58 @@ +""" +Scalar cross product query with process data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.metrics_aggregator import MetricsAggregator +from datadog_api_client.v2.model.process_data_source import ProcessDataSource +from datadog_api_client.v2.model.process_scalar_query import ProcessScalarQuery +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.scalar_formula_query_request import ScalarFormulaQueryRequest +from datadog_api_client.v2.model.scalar_formula_request import ScalarFormulaRequest +from datadog_api_client.v2.model.scalar_formula_request_attributes import ScalarFormulaRequestAttributes +from datadog_api_client.v2.model.scalar_formula_request_queries import ScalarFormulaRequestQueries +from datadog_api_client.v2.model.scalar_formula_request_type import ScalarFormulaRequestType + +body = ScalarFormulaQueryRequest( + data=ScalarFormulaRequest( + attributes=ScalarFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + queries=ScalarFormulaRequestQueries( + [ + ProcessScalarQuery( + data_source=ProcessDataSource.PROCESS, + name="a", + metric="process.stat.cpu.total_pct", + aggregator=MetricsAggregator.AVG, + text_filter="", + tag_filters=[], + limit=10, + sort=QuerySortOrder.DESC, + is_normalized_cpu=False, + ), + ] + ), + to=1636629071000, + ), + type=ScalarFormulaRequestType.SCALAR_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_scalar_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryScalarData_779493885.py b/examples/v2/metrics/QueryScalarData_779493885.py new file mode 100644 index 0000000000..b266bb2af9 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_779493885.py @@ -0,0 +1,59 @@ +""" +Scalar cross product query with apm_metrics data source and span_kind returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.apm_metrics_data_source import ApmMetricsDataSource +from datadog_api_client.v2.model.apm_metrics_query import ApmMetricsQuery +from datadog_api_client.v2.model.apm_metrics_span_kind import ApmMetricsSpanKind +from datadog_api_client.v2.model.apm_metrics_stat import ApmMetricsStat +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.scalar_formula_query_request import ScalarFormulaQueryRequest +from datadog_api_client.v2.model.scalar_formula_request import ScalarFormulaRequest +from datadog_api_client.v2.model.scalar_formula_request_attributes import ScalarFormulaRequestAttributes +from datadog_api_client.v2.model.scalar_formula_request_queries import ScalarFormulaRequestQueries +from datadog_api_client.v2.model.scalar_formula_request_type import ScalarFormulaRequestType + +body = ScalarFormulaQueryRequest( + data=ScalarFormulaRequest( + attributes=ScalarFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + queries=ScalarFormulaRequestQueries( + [ + ApmMetricsQuery( + data_source=ApmMetricsDataSource.APM_METRICS, + name="a", + stat=ApmMetricsStat.HITS, + service="web-store", + query_filter="env:prod", + span_kind=ApmMetricsSpanKind.SERVER, + group_by=[ + "resource_name", + ], + ), + ] + ), + to=1636629071000, + ), + type=ScalarFormulaRequestType.SCALAR_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_scalar_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryScalarData_891952130.py b/examples/v2/metrics/QueryScalarData_891952130.py new file mode 100644 index 0000000000..5734bfb21e --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_891952130.py @@ -0,0 +1,56 @@ +""" +Scalar cross product query with container data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.container_data_source import ContainerDataSource +from datadog_api_client.v2.model.container_scalar_query import ContainerScalarQuery +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.metrics_aggregator import MetricsAggregator +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.scalar_formula_query_request import ScalarFormulaQueryRequest +from datadog_api_client.v2.model.scalar_formula_request import ScalarFormulaRequest +from datadog_api_client.v2.model.scalar_formula_request_attributes import ScalarFormulaRequestAttributes +from datadog_api_client.v2.model.scalar_formula_request_queries import ScalarFormulaRequestQueries +from datadog_api_client.v2.model.scalar_formula_request_type import ScalarFormulaRequestType + +body = ScalarFormulaQueryRequest( + data=ScalarFormulaRequest( + attributes=ScalarFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + queries=ScalarFormulaRequestQueries( + [ + ContainerScalarQuery( + data_source=ContainerDataSource.CONTAINER, + name="a", + metric="process.stat.container.cpu.system_pct", + aggregator=MetricsAggregator.AVG, + tag_filters=[], + limit=10, + sort=QuerySortOrder.DESC, + ), + ] + ), + to=1636629071000, + ), + type=ScalarFormulaRequestType.SCALAR_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_scalar_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryTimeseriesData_108927825.py b/examples/v2/metrics/QueryTimeseriesData_108927825.py new file mode 100644 index 0000000000..393f204a83 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_108927825.py @@ -0,0 +1,59 @@ +""" +Timeseries cross product query with slo data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.slo_data_source import SloDataSource +from datadog_api_client.v2.model.slo_query import SloQuery +from datadog_api_client.v2.model.slos_group_mode import SlosGroupMode +from datadog_api_client.v2.model.slos_measure import SlosMeasure +from datadog_api_client.v2.model.slos_query_type import SlosQueryType +from datadog_api_client.v2.model.timeseries_formula_query_request import TimeseriesFormulaQueryRequest +from datadog_api_client.v2.model.timeseries_formula_request import TimeseriesFormulaRequest +from datadog_api_client.v2.model.timeseries_formula_request_attributes import TimeseriesFormulaRequestAttributes +from datadog_api_client.v2.model.timeseries_formula_request_queries import TimeseriesFormulaRequestQueries +from datadog_api_client.v2.model.timeseries_formula_request_type import TimeseriesFormulaRequestType + +body = TimeseriesFormulaQueryRequest( + data=TimeseriesFormulaRequest( + attributes=TimeseriesFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + interval=5000, + queries=TimeseriesFormulaRequestQueries( + [ + SloQuery( + data_source=SloDataSource.SLO, + name="a", + slo_id="12345678910", + measure=SlosMeasure.SLO_STATUS, + slo_query_type=SlosQueryType.METRIC, + group_mode=SlosGroupMode.OVERALL, + additional_query_filters="*", + ), + ] + ), + to=1636629071000, + ), + type=TimeseriesFormulaRequestType.TIMESERIES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_timeseries_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryTimeseriesData_2159746306.py b/examples/v2/metrics/QueryTimeseriesData_2159746306.py new file mode 100644 index 0000000000..9d99f22178 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_2159746306.py @@ -0,0 +1,57 @@ +""" +Timeseries cross product query with process data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.process_data_source import ProcessDataSource +from datadog_api_client.v2.model.process_timeseries_query import ProcessTimeseriesQuery +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.timeseries_formula_query_request import TimeseriesFormulaQueryRequest +from datadog_api_client.v2.model.timeseries_formula_request import TimeseriesFormulaRequest +from datadog_api_client.v2.model.timeseries_formula_request_attributes import TimeseriesFormulaRequestAttributes +from datadog_api_client.v2.model.timeseries_formula_request_queries import TimeseriesFormulaRequestQueries +from datadog_api_client.v2.model.timeseries_formula_request_type import TimeseriesFormulaRequestType + +body = TimeseriesFormulaQueryRequest( + data=TimeseriesFormulaRequest( + attributes=TimeseriesFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + interval=5000, + queries=TimeseriesFormulaRequestQueries( + [ + ProcessTimeseriesQuery( + data_source=ProcessDataSource.PROCESS, + name="a", + metric="process.stat.cpu.total_pct", + text_filter="", + tag_filters=[], + limit=10, + sort=QuerySortOrder.DESC, + is_normalized_cpu=False, + ), + ] + ), + to=1636629071000, + ), + type=TimeseriesFormulaRequestType.TIMESERIES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_timeseries_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryTimeseriesData_3174309318.py b/examples/v2/metrics/QueryTimeseriesData_3174309318.py new file mode 100644 index 0000000000..ac0cc7189f --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_3174309318.py @@ -0,0 +1,55 @@ +""" +Timeseries cross product query with container data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.container_data_source import ContainerDataSource +from datadog_api_client.v2.model.container_timeseries_query import ContainerTimeseriesQuery +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.timeseries_formula_query_request import TimeseriesFormulaQueryRequest +from datadog_api_client.v2.model.timeseries_formula_request import TimeseriesFormulaRequest +from datadog_api_client.v2.model.timeseries_formula_request_attributes import TimeseriesFormulaRequestAttributes +from datadog_api_client.v2.model.timeseries_formula_request_queries import TimeseriesFormulaRequestQueries +from datadog_api_client.v2.model.timeseries_formula_request_type import TimeseriesFormulaRequestType + +body = TimeseriesFormulaQueryRequest( + data=TimeseriesFormulaRequest( + attributes=TimeseriesFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + interval=5000, + queries=TimeseriesFormulaRequestQueries( + [ + ContainerTimeseriesQuery( + data_source=ContainerDataSource.CONTAINER, + name="a", + metric="process.stat.container.cpu.system_pct", + tag_filters=[], + limit=10, + sort=QuerySortOrder.DESC, + ), + ] + ), + to=1636629071000, + ), + type=TimeseriesFormulaRequestType.TIMESERIES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_timeseries_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryTimeseriesData_3535807425.py b/examples/v2/metrics/QueryTimeseriesData_3535807425.py new file mode 100644 index 0000000000..b2d1765a0d --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_3535807425.py @@ -0,0 +1,60 @@ +""" +Timeseries cross product query with apm_metrics data source and span_kind returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.apm_metrics_data_source import ApmMetricsDataSource +from datadog_api_client.v2.model.apm_metrics_query import ApmMetricsQuery +from datadog_api_client.v2.model.apm_metrics_span_kind import ApmMetricsSpanKind +from datadog_api_client.v2.model.apm_metrics_stat import ApmMetricsStat +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.timeseries_formula_query_request import TimeseriesFormulaQueryRequest +from datadog_api_client.v2.model.timeseries_formula_request import TimeseriesFormulaRequest +from datadog_api_client.v2.model.timeseries_formula_request_attributes import TimeseriesFormulaRequestAttributes +from datadog_api_client.v2.model.timeseries_formula_request_queries import TimeseriesFormulaRequestQueries +from datadog_api_client.v2.model.timeseries_formula_request_type import TimeseriesFormulaRequestType + +body = TimeseriesFormulaQueryRequest( + data=TimeseriesFormulaRequest( + attributes=TimeseriesFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + interval=5000, + queries=TimeseriesFormulaRequestQueries( + [ + ApmMetricsQuery( + data_source=ApmMetricsDataSource.APM_METRICS, + name="a", + stat=ApmMetricsStat.HITS, + service="web-store", + query_filter="env:prod", + span_kind=ApmMetricsSpanKind.SERVER, + group_by=[ + "resource_name", + ], + ), + ] + ), + to=1636629071000, + ), + type=TimeseriesFormulaRequestType.TIMESERIES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_timeseries_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryTimeseriesData_4028506518.py b/examples/v2/metrics/QueryTimeseriesData_4028506518.py new file mode 100644 index 0000000000..a9541707e5 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_4028506518.py @@ -0,0 +1,61 @@ +""" +Timeseries cross product query with apm_resource_stats data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.apm_resource_stat_name import ApmResourceStatName +from datadog_api_client.v2.model.apm_resource_stats_data_source import ApmResourceStatsDataSource +from datadog_api_client.v2.model.apm_resource_stats_query import ApmResourceStatsQuery +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.timeseries_formula_query_request import TimeseriesFormulaQueryRequest +from datadog_api_client.v2.model.timeseries_formula_request import TimeseriesFormulaRequest +from datadog_api_client.v2.model.timeseries_formula_request_attributes import TimeseriesFormulaRequestAttributes +from datadog_api_client.v2.model.timeseries_formula_request_queries import TimeseriesFormulaRequestQueries +from datadog_api_client.v2.model.timeseries_formula_request_type import TimeseriesFormulaRequestType + +body = TimeseriesFormulaQueryRequest( + data=TimeseriesFormulaRequest( + attributes=TimeseriesFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + interval=5000, + queries=TimeseriesFormulaRequestQueries( + [ + ApmResourceStatsQuery( + data_source=ApmResourceStatsDataSource.APM_RESOURCE_STATS, + name="a", + env="staging", + service="azure-bill-import", + stat=ApmResourceStatName.HITS, + operation_name="cassandra.query", + group_by=[ + "resource_name", + ], + primary_tag_name="datacenter", + primary_tag_value="*", + ), + ] + ), + to=1636629071000, + ), + type=TimeseriesFormulaRequestType.TIMESERIES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_timeseries_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryTimeseriesData_4246412951.py b/examples/v2/metrics/QueryTimeseriesData_4246412951.py new file mode 100644 index 0000000000..b21021af22 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_4246412951.py @@ -0,0 +1,58 @@ +""" +Timeseries cross product query with apm_metrics data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.apm_metrics_data_source import ApmMetricsDataSource +from datadog_api_client.v2.model.apm_metrics_query import ApmMetricsQuery +from datadog_api_client.v2.model.apm_metrics_stat import ApmMetricsStat +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.timeseries_formula_query_request import TimeseriesFormulaQueryRequest +from datadog_api_client.v2.model.timeseries_formula_request import TimeseriesFormulaRequest +from datadog_api_client.v2.model.timeseries_formula_request_attributes import TimeseriesFormulaRequestAttributes +from datadog_api_client.v2.model.timeseries_formula_request_queries import TimeseriesFormulaRequestQueries +from datadog_api_client.v2.model.timeseries_formula_request_type import TimeseriesFormulaRequestType + +body = TimeseriesFormulaQueryRequest( + data=TimeseriesFormulaRequest( + attributes=TimeseriesFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + interval=5000, + queries=TimeseriesFormulaRequestQueries( + [ + ApmMetricsQuery( + data_source=ApmMetricsDataSource.APM_METRICS, + name="a", + stat=ApmMetricsStat.HITS, + service="web-store", + query_filter="env:prod", + group_by=[ + "resource_name", + ], + ), + ] + ), + to=1636629071000, + ), + type=TimeseriesFormulaRequestType.TIMESERIES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_timeseries_data(body=body) + + print(response) diff --git a/examples/v2/metrics/QueryTimeseriesData_847716941.py b/examples/v2/metrics/QueryTimeseriesData_847716941.py new file mode 100644 index 0000000000..a90bea00f2 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_847716941.py @@ -0,0 +1,59 @@ +""" +Timeseries cross product query with apm_dependency_stats data source returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.metrics_api import MetricsApi +from datadog_api_client.v2.model.apm_dependency_stat_name import ApmDependencyStatName +from datadog_api_client.v2.model.apm_dependency_stats_data_source import ApmDependencyStatsDataSource +from datadog_api_client.v2.model.apm_dependency_stats_query import ApmDependencyStatsQuery +from datadog_api_client.v2.model.formula_limit import FormulaLimit +from datadog_api_client.v2.model.query_formula import QueryFormula +from datadog_api_client.v2.model.query_sort_order import QuerySortOrder +from datadog_api_client.v2.model.timeseries_formula_query_request import TimeseriesFormulaQueryRequest +from datadog_api_client.v2.model.timeseries_formula_request import TimeseriesFormulaRequest +from datadog_api_client.v2.model.timeseries_formula_request_attributes import TimeseriesFormulaRequestAttributes +from datadog_api_client.v2.model.timeseries_formula_request_queries import TimeseriesFormulaRequestQueries +from datadog_api_client.v2.model.timeseries_formula_request_type import TimeseriesFormulaRequestType + +body = TimeseriesFormulaQueryRequest( + data=TimeseriesFormulaRequest( + attributes=TimeseriesFormulaRequestAttributes( + formulas=[ + QueryFormula( + formula="a", + limit=FormulaLimit( + count=10, + order=QuerySortOrder.DESC, + ), + ), + ], + _from=1636625471000, + interval=5000, + queries=TimeseriesFormulaRequestQueries( + [ + ApmDependencyStatsQuery( + data_source=ApmDependencyStatsDataSource.APM_DEPENDENCY_STATS, + name="a", + env="ci", + service="cassandra", + stat=ApmDependencyStatName.AVG_DURATION, + operation_name="cassandra.query", + resource_name="DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?", + primary_tag_name="datacenter", + primary_tag_value="edge-eu1.prod.dog", + ), + ] + ), + to=1636629071000, + ), + type=TimeseriesFormulaRequestType.TIMESERIES_REQUEST, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = MetricsApi(api_client) + response = api_instance.query_timeseries_data(body=body) + + print(response) diff --git a/examples/v2/test-optimization/GetFlakyTestsManagementPolicies.py b/examples/v2/test-optimization/GetFlakyTestsManagementPolicies.py new file mode 100644 index 0000000000..e210e31dde --- /dev/null +++ b/examples/v2/test-optimization/GetFlakyTestsManagementPolicies.py @@ -0,0 +1,35 @@ +""" +Get Flaky Tests Management policies returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequest, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_data import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequestData, +) +from datadog_api_client.v2.model.test_optimization_get_flaky_tests_management_policies_request_data_type import ( + TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType, +) + +body = TestOptimizationFlakyTestsManagementPoliciesGetRequest( + data=TestOptimizationFlakyTestsManagementPoliciesGetRequestData( + attributes=TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes( + repository_id="github.com/datadog/shopist", + ), + type=TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType.TEST_OPTIMIZATION_GET_FLAKY_TESTS_MANAGEMENT_POLICIES_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["get_flaky_tests_management_policies"] = True +with ApiClient(configuration) as api_client: + api_instance = TestOptimizationApi(api_client) + response = api_instance.get_flaky_tests_management_policies(body=body) + + print(response) diff --git a/examples/v2/test-optimization/UpdateFlakyTestsManagementPolicies.py b/examples/v2/test-optimization/UpdateFlakyTestsManagementPolicies.py new file mode 100644 index 0000000000..1e8312f982 --- /dev/null +++ b/examples/v2/test-optimization/UpdateFlakyTestsManagementPolicies.py @@ -0,0 +1,111 @@ +""" +Update Flaky Tests Management policies returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.test_optimization_api import TestOptimizationApi +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_attempt_to_fix import ( + TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_disable_rule import ( + TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_quarantine_rule import ( + TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_branch_rule import ( + TestOptimizationFlakyTestsManagementPoliciesBranchRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled import ( + TestOptimizationFlakyTestsManagementPoliciesDisabled, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_status import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantined, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequest, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_data import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData, +) +from datadog_api_client.v2.model.test_optimization_update_flaky_tests_management_policies_request_data_type import ( + TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType, +) + +body = TestOptimizationFlakyTestsManagementPoliciesUpdateRequest( + data=TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData( + attributes=TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes( + attempt_to_fix=TestOptimizationFlakyTestsManagementPoliciesAttemptToFix( + retries=3, + ), + disabled=TestOptimizationFlakyTestsManagementPoliciesDisabled( + auto_disable_rule=TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule( + enabled=False, + status=TestOptimizationFlakyTestsManagementPoliciesDisabledStatus.ACTIVE, + window_seconds=3600, + ), + branch_rule=TestOptimizationFlakyTestsManagementPoliciesBranchRule( + branches=[ + "main", + ], + enabled=True, + excluded_branches=[], + excluded_test_services=[], + ), + enabled=False, + failure_rate_rule=TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule( + branches=[], + enabled=False, + min_runs=10, + status=TestOptimizationFlakyTestsManagementPoliciesDisabledStatus.ACTIVE, + threshold=0.5, + ), + ), + quarantined=TestOptimizationFlakyTestsManagementPoliciesQuarantined( + auto_quarantine_rule=TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule( + enabled=True, + window_seconds=3600, + ), + branch_rule=TestOptimizationFlakyTestsManagementPoliciesBranchRule( + branches=[ + "main", + ], + enabled=True, + excluded_branches=[], + excluded_test_services=[], + ), + enabled=True, + failure_rate_rule=TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule( + branches=[ + "main", + ], + enabled=True, + min_runs=10, + threshold=0.5, + ), + ), + repository_id="github.com/datadog/shopist", + ), + type=TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType.TEST_OPTIMIZATION_UPDATE_FLAKY_TESTS_MANAGEMENT_POLICIES_REQUEST, + ), +) + +configuration = Configuration() +configuration.unstable_operations["update_flaky_tests_management_policies"] = True +with ApiClient(configuration) as api_client: + api_instance = TestOptimizationApi(api_client) + response = api_instance.update_flaky_tests_management_policies(body=body) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index dd23033b40..55e2955834 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -266,9 +266,6 @@ def __init__( "v2.get_open_api": False, "v2.list_apis": False, "v2.update_open_api": False, - "v2.get_investigation": False, - "v2.list_investigations": False, - "v2.trigger_investigation": False, "v2.create_case_jira_issue": False, "v2.create_case_notebook": False, "v2.create_case_service_now_ticket": False, @@ -283,9 +280,11 @@ def __init__( "v2.update_change_request": False, "v2.update_change_request_decision": False, "v2.delete_test_optimization_service_settings": False, + "v2.get_flaky_tests_management_policies": False, "v2.get_test_optimization_service_settings": False, "v2.search_flaky_tests": False, "v2.update_flaky_tests": False, + "v2.update_flaky_tests_management_policies": False, "v2.update_test_optimization_service_settings": False, "v2.create_aws_cloud_auth_persona_mapping": False, "v2.delete_aws_cloud_auth_persona_mapping": False, diff --git a/src/datadog_api_client/v2/api/bits_ai_api.py b/src/datadog_api_client/v2/api/bits_ai_api.py deleted file mode 100644 index d087080048..0000000000 --- a/src/datadog_api_client/v2/api/bits_ai_api.py +++ /dev/null @@ -1,218 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -import collections -from typing import Any, Dict, 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 ( - set_attribute_from_path, - get_attribute_from_path, - UnsetType, - unset, -) -from datadog_api_client.v2.model.list_investigations_response import ListInvestigationsResponse -from datadog_api_client.v2.model.list_investigations_response_data import ListInvestigationsResponseData -from datadog_api_client.v2.model.trigger_investigation_response import TriggerInvestigationResponse -from datadog_api_client.v2.model.trigger_investigation_request import TriggerInvestigationRequest -from datadog_api_client.v2.model.get_investigation_response import GetInvestigationResponse - - -class BitsAIApi: - """ - Use the Bits AI endpoints to retrieve AI-powered investigations. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient(Configuration()) - self.api_client = api_client - - self._get_investigation_endpoint = _Endpoint( - settings={ - "response_type": (GetInvestigationResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/bits-ai/investigations/{id}", - "operation_id": "get_investigation", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "id": { - "required": True, - "openapi_types": (str,), - "attribute": "id", - "location": "path", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._list_investigations_endpoint = _Endpoint( - settings={ - "response_type": (ListInvestigationsResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/bits-ai/investigations", - "operation_id": "list_investigations", - "http_method": "GET", - "version": "v2", - }, - params_map={ - "page_offset": { - "openapi_types": (int,), - "attribute": "page[offset]", - "location": "query", - }, - "page_limit": { - "validation": { - "inclusive_maximum": 100, - }, - "openapi_types": (int,), - "attribute": "page[limit]", - "location": "query", - }, - "filter_monitor_id": { - "openapi_types": (int,), - "attribute": "filter[monitor_id]", - "location": "query", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._trigger_investigation_endpoint = _Endpoint( - settings={ - "response_type": (TriggerInvestigationResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/bits-ai/investigations", - "operation_id": "trigger_investigation", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "body": { - "required": True, - "openapi_types": (TriggerInvestigationRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - def get_investigation( - self, - id: str, - ) -> GetInvestigationResponse: - """Get a Bits AI investigation. - - Get a specific Bits AI investigation by ID. - - :param id: The ID of the investigation. - :type id: str - :rtype: GetInvestigationResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["id"] = id - - return self._get_investigation_endpoint.call_with_http_info(**kwargs) - - def list_investigations( - self, - *, - page_offset: Union[int, UnsetType] = unset, - page_limit: Union[int, UnsetType] = unset, - filter_monitor_id: Union[int, UnsetType] = unset, - ) -> ListInvestigationsResponse: - """List Bits AI investigations. - - List all Bits AI investigations for the organization. - - :param page_offset: Offset for pagination. - :type page_offset: int, optional - :param page_limit: Maximum number of investigations to return. - :type page_limit: int, optional - :param filter_monitor_id: Filter investigations by monitor ID. - :type filter_monitor_id: int, optional - :rtype: ListInvestigationsResponse - """ - kwargs: Dict[str, Any] = {} - if page_offset is not unset: - kwargs["page_offset"] = page_offset - - if page_limit is not unset: - kwargs["page_limit"] = page_limit - - if filter_monitor_id is not unset: - kwargs["filter_monitor_id"] = filter_monitor_id - - return self._list_investigations_endpoint.call_with_http_info(**kwargs) - - def list_investigations_with_pagination( - self, - *, - page_offset: Union[int, UnsetType] = unset, - page_limit: Union[int, UnsetType] = unset, - filter_monitor_id: Union[int, UnsetType] = unset, - ) -> collections.abc.Iterable[ListInvestigationsResponseData]: - """List Bits AI investigations. - - Provide a paginated version of :meth:`list_investigations`, returning all items. - - :param page_offset: Offset for pagination. - :type page_offset: int, optional - :param page_limit: Maximum number of investigations to return. - :type page_limit: int, optional - :param filter_monitor_id: Filter investigations by monitor ID. - :type filter_monitor_id: int, optional - - :return: A generator of paginated results. - :rtype: collections.abc.Iterable[ListInvestigationsResponseData] - """ - kwargs: Dict[str, Any] = {} - if page_offset is not unset: - kwargs["page_offset"] = page_offset - - if page_limit is not unset: - kwargs["page_limit"] = page_limit - - if filter_monitor_id is not unset: - kwargs["filter_monitor_id"] = filter_monitor_id - - local_page_size = get_attribute_from_path(kwargs, "page_limit", 25) - endpoint = self._list_investigations_endpoint - set_attribute_from_path(kwargs, "page_limit", local_page_size, endpoint.params_map) - pagination = { - "limit_value": local_page_size, - "results_path": "data", - "page_offset_param": "page_offset", - "endpoint": endpoint, - "kwargs": kwargs, - } - return endpoint.call_with_http_info_paginated(pagination) - - def trigger_investigation( - self, - body: TriggerInvestigationRequest, - ) -> TriggerInvestigationResponse: - """Trigger a Bits AI investigation. - - Trigger a new Bits AI investigation based on a monitor alert. - - :param body: Trigger investigation request body. - :type body: TriggerInvestigationRequest - :rtype: TriggerInvestigationResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["body"] = body - - return self._trigger_investigation_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/api/test_optimization_api.py b/src/datadog_api_client/v2/api/test_optimization_api.py index 83066a261f..045a0bea22 100644 --- a/src/datadog_api_client/v2/api/test_optimization_api.py +++ b/src/datadog_api_client/v2/api/test_optimization_api.py @@ -14,6 +14,15 @@ UnsetType, unset, ) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_response import ( + TestOptimizationFlakyTestsManagementPoliciesResponse, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequest, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequest, +) from datadog_api_client.v2.model.test_optimization_delete_service_settings_request import ( TestOptimizationDeleteServiceSettingsRequest, ) @@ -63,6 +72,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_flaky_tests_management_policies_endpoint = _Endpoint( + settings={ + "response_type": (TestOptimizationFlakyTestsManagementPoliciesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/ci/test-optimization/settings/policies", + "operation_id": "get_flaky_tests_management_policies", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (TestOptimizationFlakyTestsManagementPoliciesGetRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._get_test_optimization_service_settings_endpoint = _Endpoint( settings={ "response_type": (TestOptimizationServiceSettingsResponse,), @@ -122,6 +151,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._update_flaky_tests_management_policies_endpoint = _Endpoint( + settings={ + "response_type": (TestOptimizationFlakyTestsManagementPoliciesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/ci/test-optimization/settings/policies", + "operation_id": "update_flaky_tests_management_policies", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (TestOptimizationFlakyTestsManagementPoliciesUpdateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._update_test_optimization_service_settings_endpoint = _Endpoint( settings={ "response_type": (TestOptimizationServiceSettingsResponse,), @@ -158,6 +207,22 @@ def delete_test_optimization_service_settings( return self._delete_test_optimization_service_settings_endpoint.call_with_http_info(**kwargs) + def get_flaky_tests_management_policies( + self, + body: TestOptimizationFlakyTestsManagementPoliciesGetRequest, + ) -> TestOptimizationFlakyTestsManagementPoliciesResponse: + """Get Flaky Tests Management policies. + + Retrieve Flaky Tests Management repository-level policies for the given repository. + + :type body: TestOptimizationFlakyTestsManagementPoliciesGetRequest + :rtype: TestOptimizationFlakyTestsManagementPoliciesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._get_flaky_tests_management_policies_endpoint.call_with_http_info(**kwargs) + def get_test_optimization_service_settings( self, body: TestOptimizationGetServiceSettingsRequest, @@ -253,6 +318,23 @@ def update_flaky_tests( return self._update_flaky_tests_endpoint.call_with_http_info(**kwargs) + def update_flaky_tests_management_policies( + self, + body: TestOptimizationFlakyTestsManagementPoliciesUpdateRequest, + ) -> TestOptimizationFlakyTestsManagementPoliciesResponse: + """Update Flaky Tests Management policies. + + Partially update Flaky Tests Management repository-level policies for the given repository. + Only provided policy blocks are updated; omitted blocks are left unchanged. + + :type body: TestOptimizationFlakyTestsManagementPoliciesUpdateRequest + :rtype: TestOptimizationFlakyTestsManagementPoliciesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._update_flaky_tests_management_policies_endpoint.call_with_http_info(**kwargs) + def update_test_optimization_service_settings( self, body: TestOptimizationUpdateServiceSettingsRequest, diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 436c5d4aaf..a25c3dd13c 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -10,7 +10,6 @@ from datadog_api_client.v2.api.application_security_api import ApplicationSecurityApi from datadog_api_client.v2.api.audit_api import AuditApi from datadog_api_client.v2.api.authn_mappings_api import AuthNMappingsApi -from datadog_api_client.v2.api.bits_ai_api import BitsAIApi from datadog_api_client.v2.api.ci_visibility_pipelines_api import CIVisibilityPipelinesApi from datadog_api_client.v2.api.ci_visibility_tests_api import CIVisibilityTestsApi from datadog_api_client.v2.api.csm_agents_api import CSMAgentsApi @@ -119,7 +118,6 @@ "ApplicationSecurityApi", "AuditApi", "AuthNMappingsApi", - "BitsAIApi", "CIVisibilityPipelinesApi", "CIVisibilityTestsApi", "CSMAgentsApi", diff --git a/src/datadog_api_client/v2/model/apm_dependency_stat_name.py b/src/datadog_api_client/v2/model/apm_dependency_stat_name.py new file mode 100644 index 0000000000..e18e51a383 --- /dev/null +++ b/src/datadog_api_client/v2/model/apm_dependency_stat_name.py @@ -0,0 +1,53 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ApmDependencyStatName(ModelSimple): + """ + The APM dependency statistic to query. + + :param value: Must be one of ["avg_duration", "avg_root_duration", "avg_spans_per_trace", "error_rate", "pct_exec_time", "pct_of_traces", "total_traces_count"]. + :type value: str + """ + + allowed_values = { + "avg_duration", + "avg_root_duration", + "avg_spans_per_trace", + "error_rate", + "pct_exec_time", + "pct_of_traces", + "total_traces_count", + } + AVG_DURATION: ClassVar["ApmDependencyStatName"] + AVG_ROOT_DURATION: ClassVar["ApmDependencyStatName"] + AVG_SPANS_PER_TRACE: ClassVar["ApmDependencyStatName"] + ERROR_RATE: ClassVar["ApmDependencyStatName"] + PCT_EXEC_TIME: ClassVar["ApmDependencyStatName"] + PCT_OF_TRACES: ClassVar["ApmDependencyStatName"] + TOTAL_TRACES_COUNT: ClassVar["ApmDependencyStatName"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ApmDependencyStatName.AVG_DURATION = ApmDependencyStatName("avg_duration") +ApmDependencyStatName.AVG_ROOT_DURATION = ApmDependencyStatName("avg_root_duration") +ApmDependencyStatName.AVG_SPANS_PER_TRACE = ApmDependencyStatName("avg_spans_per_trace") +ApmDependencyStatName.ERROR_RATE = ApmDependencyStatName("error_rate") +ApmDependencyStatName.PCT_EXEC_TIME = ApmDependencyStatName("pct_exec_time") +ApmDependencyStatName.PCT_OF_TRACES = ApmDependencyStatName("pct_of_traces") +ApmDependencyStatName.TOTAL_TRACES_COUNT = ApmDependencyStatName("total_traces_count") diff --git a/src/datadog_api_client/v2/model/trigger_investigation_request_type.py b/src/datadog_api_client/v2/model/apm_dependency_stats_data_source.py similarity index 53% rename from src/datadog_api_client/v2/model/trigger_investigation_request_type.py rename to src/datadog_api_client/v2/model/apm_dependency_stats_data_source.py index e1dee13498..76102aae96 100644 --- a/src/datadog_api_client/v2/model/trigger_investigation_request_type.py +++ b/src/datadog_api_client/v2/model/apm_dependency_stats_data_source.py @@ -12,18 +12,18 @@ from typing import ClassVar -class TriggerInvestigationRequestType(ModelSimple): +class ApmDependencyStatsDataSource(ModelSimple): """ - The resource type for trigger investigation requests. + A data source for APM dependency statistics queries. - :param value: If omitted defaults to "trigger_investigation_request". Must be one of ["trigger_investigation_request"]. + :param value: If omitted defaults to "apm_dependency_stats". Must be one of ["apm_dependency_stats"]. :type value: str """ allowed_values = { - "trigger_investigation_request", + "apm_dependency_stats", } - TRIGGER_INVESTIGATION_REQUEST: ClassVar["TriggerInvestigationRequestType"] + APM_DEPENDENCY_STATS: ClassVar["ApmDependencyStatsDataSource"] @cached_property def openapi_types(_): @@ -32,6 +32,4 @@ def openapi_types(_): } -TriggerInvestigationRequestType.TRIGGER_INVESTIGATION_REQUEST = TriggerInvestigationRequestType( - "trigger_investigation_request" -) +ApmDependencyStatsDataSource.APM_DEPENDENCY_STATS = ApmDependencyStatsDataSource("apm_dependency_stats") diff --git a/src/datadog_api_client/v2/model/apm_dependency_stats_query.py b/src/datadog_api_client/v2/model/apm_dependency_stats_query.py new file mode 100644 index 0000000000..b7b51be0d8 --- /dev/null +++ b/src/datadog_api_client/v2/model/apm_dependency_stats_query.py @@ -0,0 +1,114 @@ +# 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.apm_dependency_stats_data_source import ApmDependencyStatsDataSource + from datadog_api_client.v2.model.apm_dependency_stat_name import ApmDependencyStatName + + +class ApmDependencyStatsQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.apm_dependency_stats_data_source import ApmDependencyStatsDataSource + from datadog_api_client.v2.model.apm_dependency_stat_name import ApmDependencyStatName + + return { + "data_source": (ApmDependencyStatsDataSource,), + "env": (str,), + "is_upstream": (bool,), + "name": (str,), + "operation_name": (str,), + "primary_tag_name": (str,), + "primary_tag_value": (str,), + "resource_name": (str,), + "service": (str,), + "stat": (ApmDependencyStatName,), + } + + attribute_map = { + "data_source": "data_source", + "env": "env", + "is_upstream": "is_upstream", + "name": "name", + "operation_name": "operation_name", + "primary_tag_name": "primary_tag_name", + "primary_tag_value": "primary_tag_value", + "resource_name": "resource_name", + "service": "service", + "stat": "stat", + } + + def __init__( + self_, + data_source: ApmDependencyStatsDataSource, + env: str, + name: str, + operation_name: str, + resource_name: str, + service: str, + stat: ApmDependencyStatName, + is_upstream: Union[bool, UnsetType] = unset, + primary_tag_name: Union[str, UnsetType] = unset, + primary_tag_value: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + An individual APM dependency stats query. + + :param data_source: A data source for APM dependency statistics queries. + :type data_source: ApmDependencyStatsDataSource + + :param env: The environment to query. + :type env: str + + :param is_upstream: Determines whether stats for upstream or downstream dependencies should be queried. + :type is_upstream: bool, optional + + :param name: The variable name for use in formulas. + :type name: str + + :param operation_name: The APM operation name. + :type operation_name: str + + :param primary_tag_name: The name of the second primary tag used within APM; required when ``primary_tag_value`` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog. + :type primary_tag_name: str, optional + + :param primary_tag_value: Filter APM data by the second primary tag. ``primary_tag_name`` must also be specified. + :type primary_tag_value: str, optional + + :param resource_name: The resource name to filter by. + :type resource_name: str + + :param service: The service name to filter by. + :type service: str + + :param stat: The APM dependency statistic to query. + :type stat: ApmDependencyStatName + """ + if is_upstream is not unset: + kwargs["is_upstream"] = is_upstream + if primary_tag_name is not unset: + kwargs["primary_tag_name"] = primary_tag_name + if primary_tag_value is not unset: + kwargs["primary_tag_value"] = primary_tag_value + super().__init__(kwargs) + + self_.data_source = data_source + self_.env = env + self_.name = name + self_.operation_name = operation_name + self_.resource_name = resource_name + self_.service = service + self_.stat = stat diff --git a/src/datadog_api_client/v2/model/trigger_type.py b/src/datadog_api_client/v2/model/apm_metrics_data_source.py similarity index 61% rename from src/datadog_api_client/v2/model/trigger_type.py rename to src/datadog_api_client/v2/model/apm_metrics_data_source.py index 6e0885aaa5..d9c47a9f7b 100644 --- a/src/datadog_api_client/v2/model/trigger_type.py +++ b/src/datadog_api_client/v2/model/apm_metrics_data_source.py @@ -12,18 +12,18 @@ from typing import ClassVar -class TriggerType(ModelSimple): +class ApmMetricsDataSource(ModelSimple): """ - The type of trigger for the investigation. + A data source for APM metrics queries. - :param value: If omitted defaults to "monitor_alert_trigger". Must be one of ["monitor_alert_trigger"]. + :param value: If omitted defaults to "apm_metrics". Must be one of ["apm_metrics"]. :type value: str """ allowed_values = { - "monitor_alert_trigger", + "apm_metrics", } - MONITOR_ALERT_TRIGGER: ClassVar["TriggerType"] + APM_METRICS: ClassVar["ApmMetricsDataSource"] @cached_property def openapi_types(_): @@ -32,4 +32,4 @@ def openapi_types(_): } -TriggerType.MONITOR_ALERT_TRIGGER = TriggerType("monitor_alert_trigger") +ApmMetricsDataSource.APM_METRICS = ApmMetricsDataSource("apm_metrics") diff --git a/src/datadog_api_client/v2/model/apm_metrics_query.py b/src/datadog_api_client/v2/model/apm_metrics_query.py new file mode 100644 index 0000000000..fe5cc06f9d --- /dev/null +++ b/src/datadog_api_client/v2/model/apm_metrics_query.py @@ -0,0 +1,136 @@ +# 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.apm_metrics_data_source import ApmMetricsDataSource + from datadog_api_client.v2.model.apm_metrics_span_kind import ApmMetricsSpanKind + from datadog_api_client.v2.model.apm_metrics_stat import ApmMetricsStat + + +class ApmMetricsQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.apm_metrics_data_source import ApmMetricsDataSource + from datadog_api_client.v2.model.apm_metrics_span_kind import ApmMetricsSpanKind + from datadog_api_client.v2.model.apm_metrics_stat import ApmMetricsStat + + return { + "data_source": (ApmMetricsDataSource,), + "group_by": ([str],), + "name": (str,), + "operation_mode": (str,), + "operation_name": (str,), + "peer_tags": ([str],), + "query_filter": (str,), + "resource_hash": (str,), + "resource_name": (str,), + "service": (str,), + "span_kind": (ApmMetricsSpanKind,), + "stat": (ApmMetricsStat,), + } + + attribute_map = { + "data_source": "data_source", + "group_by": "group_by", + "name": "name", + "operation_mode": "operation_mode", + "operation_name": "operation_name", + "peer_tags": "peer_tags", + "query_filter": "query_filter", + "resource_hash": "resource_hash", + "resource_name": "resource_name", + "service": "service", + "span_kind": "span_kind", + "stat": "stat", + } + + def __init__( + self_, + data_source: ApmMetricsDataSource, + name: str, + stat: ApmMetricsStat, + group_by: Union[List[str], UnsetType] = unset, + operation_mode: Union[str, UnsetType] = unset, + operation_name: Union[str, UnsetType] = unset, + peer_tags: Union[List[str], UnsetType] = unset, + query_filter: Union[str, UnsetType] = unset, + resource_hash: Union[str, UnsetType] = unset, + resource_name: Union[str, UnsetType] = unset, + service: Union[str, UnsetType] = unset, + span_kind: Union[ApmMetricsSpanKind, UnsetType] = unset, + **kwargs, + ): + """ + An individual APM metrics query. + + :param data_source: A data source for APM metrics queries. + :type data_source: ApmMetricsDataSource + + :param group_by: Optional fields to group the query results by. + :type group_by: [str], optional + + :param name: The variable name for use in formulas. + :type name: str + + :param operation_mode: Optional operation mode to aggregate across operation names. + :type operation_mode: str, optional + + :param operation_name: Name of operation on service. If not provided, the primary operation name is used. + :type operation_name: str, optional + + :param peer_tags: Tags to query for a specific downstream entity (peer.service, peer.db_instance, peer.s3, peer.s3.bucket, etc.). + :type peer_tags: [str], optional + + :param query_filter: Additional filters for the query using metrics query syntax (e.g., env, primary_tag). + :type query_filter: str, optional + + :param resource_hash: The resource hash for exact matching. + :type resource_hash: str, optional + + :param resource_name: The full name of a specific resource to filter by. + :type resource_name: str, optional + + :param service: The service name to filter by. + :type service: str, optional + + :param span_kind: Describes the relationship between the span, its parents, and its children in a trace. + :type span_kind: ApmMetricsSpanKind, optional + + :param stat: The APM metric statistic to query. + :type stat: ApmMetricsStat + """ + if group_by is not unset: + kwargs["group_by"] = group_by + if operation_mode is not unset: + kwargs["operation_mode"] = operation_mode + if operation_name is not unset: + kwargs["operation_name"] = operation_name + if peer_tags is not unset: + kwargs["peer_tags"] = peer_tags + if query_filter is not unset: + kwargs["query_filter"] = query_filter + if resource_hash is not unset: + kwargs["resource_hash"] = resource_hash + if resource_name is not unset: + kwargs["resource_name"] = resource_name + if service is not unset: + kwargs["service"] = service + if span_kind is not unset: + kwargs["span_kind"] = span_kind + super().__init__(kwargs) + + self_.data_source = data_source + self_.name = name + self_.stat = stat diff --git a/src/datadog_api_client/v2/model/apm_metrics_span_kind.py b/src/datadog_api_client/v2/model/apm_metrics_span_kind.py new file mode 100644 index 0000000000..5205ada8c6 --- /dev/null +++ b/src/datadog_api_client/v2/model/apm_metrics_span_kind.py @@ -0,0 +1,47 @@ +# 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 ApmMetricsSpanKind(ModelSimple): + """ + Describes the relationship between the span, its parents, and its children in a trace. + + :param value: Must be one of ["consumer", "server", "client", "producer", "internal"]. + :type value: str + """ + + allowed_values = { + "consumer", + "server", + "client", + "producer", + "internal", + } + CONSUMER: ClassVar["ApmMetricsSpanKind"] + SERVER: ClassVar["ApmMetricsSpanKind"] + CLIENT: ClassVar["ApmMetricsSpanKind"] + PRODUCER: ClassVar["ApmMetricsSpanKind"] + INTERNAL: ClassVar["ApmMetricsSpanKind"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ApmMetricsSpanKind.CONSUMER = ApmMetricsSpanKind("consumer") +ApmMetricsSpanKind.SERVER = ApmMetricsSpanKind("server") +ApmMetricsSpanKind.CLIENT = ApmMetricsSpanKind("client") +ApmMetricsSpanKind.PRODUCER = ApmMetricsSpanKind("producer") +ApmMetricsSpanKind.INTERNAL = ApmMetricsSpanKind("internal") diff --git a/src/datadog_api_client/v2/model/apm_metrics_stat.py b/src/datadog_api_client/v2/model/apm_metrics_stat.py new file mode 100644 index 0000000000..3f66cf1c25 --- /dev/null +++ b/src/datadog_api_client/v2/model/apm_metrics_stat.py @@ -0,0 +1,80 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ApmMetricsStat(ModelSimple): + """ + The APM metric statistic to query. + + :param value: Must be one of ["error_rate", "errors", "errors_per_second", "hits", "hits_per_second", "apdex", "latency_avg", "latency_max", "latency_p50", "latency_p75", "latency_p90", "latency_p95", "latency_p99", "latency_p999", "latency_distribution", "total_time"]. + :type value: str + """ + + allowed_values = { + "error_rate", + "errors", + "errors_per_second", + "hits", + "hits_per_second", + "apdex", + "latency_avg", + "latency_max", + "latency_p50", + "latency_p75", + "latency_p90", + "latency_p95", + "latency_p99", + "latency_p999", + "latency_distribution", + "total_time", + } + ERROR_RATE: ClassVar["ApmMetricsStat"] + ERRORS: ClassVar["ApmMetricsStat"] + ERRORS_PER_SECOND: ClassVar["ApmMetricsStat"] + HITS: ClassVar["ApmMetricsStat"] + HITS_PER_SECOND: ClassVar["ApmMetricsStat"] + APDEX: ClassVar["ApmMetricsStat"] + LATENCY_AVG: ClassVar["ApmMetricsStat"] + LATENCY_MAX: ClassVar["ApmMetricsStat"] + LATENCY_P50: ClassVar["ApmMetricsStat"] + LATENCY_P75: ClassVar["ApmMetricsStat"] + LATENCY_P90: ClassVar["ApmMetricsStat"] + LATENCY_P95: ClassVar["ApmMetricsStat"] + LATENCY_P99: ClassVar["ApmMetricsStat"] + LATENCY_P999: ClassVar["ApmMetricsStat"] + LATENCY_DISTRIBUTION: ClassVar["ApmMetricsStat"] + TOTAL_TIME: ClassVar["ApmMetricsStat"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ApmMetricsStat.ERROR_RATE = ApmMetricsStat("error_rate") +ApmMetricsStat.ERRORS = ApmMetricsStat("errors") +ApmMetricsStat.ERRORS_PER_SECOND = ApmMetricsStat("errors_per_second") +ApmMetricsStat.HITS = ApmMetricsStat("hits") +ApmMetricsStat.HITS_PER_SECOND = ApmMetricsStat("hits_per_second") +ApmMetricsStat.APDEX = ApmMetricsStat("apdex") +ApmMetricsStat.LATENCY_AVG = ApmMetricsStat("latency_avg") +ApmMetricsStat.LATENCY_MAX = ApmMetricsStat("latency_max") +ApmMetricsStat.LATENCY_P50 = ApmMetricsStat("latency_p50") +ApmMetricsStat.LATENCY_P75 = ApmMetricsStat("latency_p75") +ApmMetricsStat.LATENCY_P90 = ApmMetricsStat("latency_p90") +ApmMetricsStat.LATENCY_P95 = ApmMetricsStat("latency_p95") +ApmMetricsStat.LATENCY_P99 = ApmMetricsStat("latency_p99") +ApmMetricsStat.LATENCY_P999 = ApmMetricsStat("latency_p999") +ApmMetricsStat.LATENCY_DISTRIBUTION = ApmMetricsStat("latency_distribution") +ApmMetricsStat.TOTAL_TIME = ApmMetricsStat("total_time") diff --git a/src/datadog_api_client/v2/model/apm_resource_stat_name.py b/src/datadog_api_client/v2/model/apm_resource_stat_name.py new file mode 100644 index 0000000000..4cef419cf2 --- /dev/null +++ b/src/datadog_api_client/v2/model/apm_resource_stat_name.py @@ -0,0 +1,68 @@ +# 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 ApmResourceStatName(ModelSimple): + """ + The APM resource statistic to query. + + :param value: Must be one of ["error_rate", "errors", "hits", "latency_avg", "latency_max", "latency_p50", "latency_p75", "latency_p90", "latency_p95", "latency_p99", "latency_distribution", "total_time"]. + :type value: str + """ + + allowed_values = { + "error_rate", + "errors", + "hits", + "latency_avg", + "latency_max", + "latency_p50", + "latency_p75", + "latency_p90", + "latency_p95", + "latency_p99", + "latency_distribution", + "total_time", + } + ERROR_RATE: ClassVar["ApmResourceStatName"] + ERRORS: ClassVar["ApmResourceStatName"] + HITS: ClassVar["ApmResourceStatName"] + LATENCY_AVG: ClassVar["ApmResourceStatName"] + LATENCY_MAX: ClassVar["ApmResourceStatName"] + LATENCY_P50: ClassVar["ApmResourceStatName"] + LATENCY_P75: ClassVar["ApmResourceStatName"] + LATENCY_P90: ClassVar["ApmResourceStatName"] + LATENCY_P95: ClassVar["ApmResourceStatName"] + LATENCY_P99: ClassVar["ApmResourceStatName"] + LATENCY_DISTRIBUTION: ClassVar["ApmResourceStatName"] + TOTAL_TIME: ClassVar["ApmResourceStatName"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ApmResourceStatName.ERROR_RATE = ApmResourceStatName("error_rate") +ApmResourceStatName.ERRORS = ApmResourceStatName("errors") +ApmResourceStatName.HITS = ApmResourceStatName("hits") +ApmResourceStatName.LATENCY_AVG = ApmResourceStatName("latency_avg") +ApmResourceStatName.LATENCY_MAX = ApmResourceStatName("latency_max") +ApmResourceStatName.LATENCY_P50 = ApmResourceStatName("latency_p50") +ApmResourceStatName.LATENCY_P75 = ApmResourceStatName("latency_p75") +ApmResourceStatName.LATENCY_P90 = ApmResourceStatName("latency_p90") +ApmResourceStatName.LATENCY_P95 = ApmResourceStatName("latency_p95") +ApmResourceStatName.LATENCY_P99 = ApmResourceStatName("latency_p99") +ApmResourceStatName.LATENCY_DISTRIBUTION = ApmResourceStatName("latency_distribution") +ApmResourceStatName.TOTAL_TIME = ApmResourceStatName("total_time") diff --git a/src/datadog_api_client/v2/model/trigger_investigation_response_type.py b/src/datadog_api_client/v2/model/apm_resource_stats_data_source.py similarity index 52% rename from src/datadog_api_client/v2/model/trigger_investigation_response_type.py rename to src/datadog_api_client/v2/model/apm_resource_stats_data_source.py index 0071c37689..769f736bd5 100644 --- a/src/datadog_api_client/v2/model/trigger_investigation_response_type.py +++ b/src/datadog_api_client/v2/model/apm_resource_stats_data_source.py @@ -12,18 +12,18 @@ from typing import ClassVar -class TriggerInvestigationResponseType(ModelSimple): +class ApmResourceStatsDataSource(ModelSimple): """ - The resource type for trigger investigation responses. + A data source for APM resource statistics queries. - :param value: If omitted defaults to "trigger_investigation_response". Must be one of ["trigger_investigation_response"]. + :param value: If omitted defaults to "apm_resource_stats". Must be one of ["apm_resource_stats"]. :type value: str """ allowed_values = { - "trigger_investigation_response", + "apm_resource_stats", } - TRIGGER_INVESTIGATION_RESPONSE: ClassVar["TriggerInvestigationResponseType"] + APM_RESOURCE_STATS: ClassVar["ApmResourceStatsDataSource"] @cached_property def openapi_types(_): @@ -32,6 +32,4 @@ def openapi_types(_): } -TriggerInvestigationResponseType.TRIGGER_INVESTIGATION_RESPONSE = TriggerInvestigationResponseType( - "trigger_investigation_response" -) +ApmResourceStatsDataSource.APM_RESOURCE_STATS = ApmResourceStatsDataSource("apm_resource_stats") diff --git a/src/datadog_api_client/v2/model/apm_resource_stats_query.py b/src/datadog_api_client/v2/model/apm_resource_stats_query.py new file mode 100644 index 0000000000..4fec9e07e7 --- /dev/null +++ b/src/datadog_api_client/v2/model/apm_resource_stats_query.py @@ -0,0 +1,116 @@ +# 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.apm_resource_stats_data_source import ApmResourceStatsDataSource + from datadog_api_client.v2.model.apm_resource_stat_name import ApmResourceStatName + + +class ApmResourceStatsQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.apm_resource_stats_data_source import ApmResourceStatsDataSource + from datadog_api_client.v2.model.apm_resource_stat_name import ApmResourceStatName + + return { + "data_source": (ApmResourceStatsDataSource,), + "env": (str,), + "group_by": ([str],), + "name": (str,), + "operation_name": (str,), + "primary_tag_name": (str,), + "primary_tag_value": (str,), + "resource_name": (str,), + "service": (str,), + "stat": (ApmResourceStatName,), + } + + attribute_map = { + "data_source": "data_source", + "env": "env", + "group_by": "group_by", + "name": "name", + "operation_name": "operation_name", + "primary_tag_name": "primary_tag_name", + "primary_tag_value": "primary_tag_value", + "resource_name": "resource_name", + "service": "service", + "stat": "stat", + } + + def __init__( + self_, + data_source: ApmResourceStatsDataSource, + env: str, + name: str, + service: str, + stat: ApmResourceStatName, + group_by: Union[List[str], UnsetType] = unset, + operation_name: Union[str, UnsetType] = unset, + primary_tag_name: Union[str, UnsetType] = unset, + primary_tag_value: Union[str, UnsetType] = unset, + resource_name: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + An individual APM resource stats query. + + :param data_source: A data source for APM resource statistics queries. + :type data_source: ApmResourceStatsDataSource + + :param env: The environment to query. + :type env: str + + :param group_by: Tag keys to group results by. + :type group_by: [str], optional + + :param name: The variable name for use in formulas. + :type name: str + + :param operation_name: The APM operation name. + :type operation_name: str, optional + + :param primary_tag_name: Name of the second primary tag used within APM. Required when ``primary_tag_value`` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog + :type primary_tag_name: str, optional + + :param primary_tag_value: Value of the second primary tag by which to filter APM data. ``primary_tag_name`` must also be specified. + :type primary_tag_value: str, optional + + :param resource_name: The resource name to filter by. + :type resource_name: str, optional + + :param service: The service name to filter by. + :type service: str + + :param stat: The APM resource statistic to query. + :type stat: ApmResourceStatName + """ + if group_by is not unset: + kwargs["group_by"] = group_by + if operation_name is not unset: + kwargs["operation_name"] = operation_name + if primary_tag_name is not unset: + kwargs["primary_tag_name"] = primary_tag_name + if primary_tag_value is not unset: + kwargs["primary_tag_value"] = primary_tag_value + if resource_name is not unset: + kwargs["resource_name"] = resource_name + super().__init__(kwargs) + + self_.data_source = data_source + self_.env = env + self_.name = name + self_.service = service + self_.stat = stat diff --git a/src/datadog_api_client/v2/model/container_data_source.py b/src/datadog_api_client/v2/model/container_data_source.py new file mode 100644 index 0000000000..2dd596d2fa --- /dev/null +++ b/src/datadog_api_client/v2/model/container_data_source.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 ContainerDataSource(ModelSimple): + """ + A data source for container-level infrastructure metrics. + + :param value: If omitted defaults to "container". Must be one of ["container"]. + :type value: str + """ + + allowed_values = { + "container", + } + CONTAINER: ClassVar["ContainerDataSource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ContainerDataSource.CONTAINER = ContainerDataSource("container") diff --git a/src/datadog_api_client/v2/model/container_scalar_query.py b/src/datadog_api_client/v2/model/container_scalar_query.py new file mode 100644 index 0000000000..523e082cf3 --- /dev/null +++ b/src/datadog_api_client/v2/model/container_scalar_query.py @@ -0,0 +1,112 @@ +# 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.metrics_aggregator import MetricsAggregator + from datadog_api_client.v2.model.container_data_source import ContainerDataSource + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + +class ContainerScalarQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.metrics_aggregator import MetricsAggregator + from datadog_api_client.v2.model.container_data_source import ContainerDataSource + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + return { + "aggregator": (MetricsAggregator,), + "data_source": (ContainerDataSource,), + "is_normalized_cpu": (bool,), + "limit": (int,), + "metric": (str,), + "name": (str,), + "sort": (QuerySortOrder,), + "tag_filters": ([str],), + "text_filter": (str,), + } + + attribute_map = { + "aggregator": "aggregator", + "data_source": "data_source", + "is_normalized_cpu": "is_normalized_cpu", + "limit": "limit", + "metric": "metric", + "name": "name", + "sort": "sort", + "tag_filters": "tag_filters", + "text_filter": "text_filter", + } + + def __init__( + self_, + data_source: ContainerDataSource, + metric: str, + name: str, + aggregator: Union[MetricsAggregator, UnsetType] = unset, + is_normalized_cpu: Union[bool, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + sort: Union[QuerySortOrder, UnsetType] = unset, + tag_filters: Union[List[str], UnsetType] = unset, + text_filter: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + An individual scalar container query. + + :param aggregator: The type of aggregation that can be performed on metrics-based queries. + :type aggregator: MetricsAggregator, optional + + :param data_source: A data source for container-level infrastructure metrics. + :type data_source: ContainerDataSource + + :param is_normalized_cpu: Whether CPU metrics should be normalized by core count. + :type is_normalized_cpu: bool, optional + + :param limit: Maximum number of results to return. + :type limit: int, optional + + :param metric: The container metric to query. + :type metric: str + + :param name: The variable name for use in formulas. + :type name: str + + :param sort: Direction of sort. + :type sort: QuerySortOrder, optional + + :param tag_filters: Tag filters to narrow down containers. + :type tag_filters: [str], optional + + :param text_filter: A full-text search filter to match container names. + :type text_filter: str, optional + """ + if aggregator is not unset: + kwargs["aggregator"] = aggregator + if is_normalized_cpu is not unset: + kwargs["is_normalized_cpu"] = is_normalized_cpu + if limit is not unset: + kwargs["limit"] = limit + if sort is not unset: + kwargs["sort"] = sort + if tag_filters is not unset: + kwargs["tag_filters"] = tag_filters + if text_filter is not unset: + kwargs["text_filter"] = text_filter + super().__init__(kwargs) + + self_.data_source = data_source + self_.metric = metric + self_.name = name diff --git a/src/datadog_api_client/v2/model/container_timeseries_query.py b/src/datadog_api_client/v2/model/container_timeseries_query.py new file mode 100644 index 0000000000..b03e46cb36 --- /dev/null +++ b/src/datadog_api_client/v2/model/container_timeseries_query.py @@ -0,0 +1,102 @@ +# 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.container_data_source import ContainerDataSource + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + +class ContainerTimeseriesQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.container_data_source import ContainerDataSource + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + return { + "data_source": (ContainerDataSource,), + "is_normalized_cpu": (bool,), + "limit": (int,), + "metric": (str,), + "name": (str,), + "sort": (QuerySortOrder,), + "tag_filters": ([str],), + "text_filter": (str,), + } + + attribute_map = { + "data_source": "data_source", + "is_normalized_cpu": "is_normalized_cpu", + "limit": "limit", + "metric": "metric", + "name": "name", + "sort": "sort", + "tag_filters": "tag_filters", + "text_filter": "text_filter", + } + + def __init__( + self_, + data_source: ContainerDataSource, + metric: str, + name: str, + is_normalized_cpu: Union[bool, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + sort: Union[QuerySortOrder, UnsetType] = unset, + tag_filters: Union[List[str], UnsetType] = unset, + text_filter: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + An individual timeseries container query. + + :param data_source: A data source for container-level infrastructure metrics. + :type data_source: ContainerDataSource + + :param is_normalized_cpu: Whether CPU metrics should be normalized by core count. + :type is_normalized_cpu: bool, optional + + :param limit: Maximum number of results to return. + :type limit: int, optional + + :param metric: The container metric to query. + :type metric: str + + :param name: The variable name for use in formulas. + :type name: str + + :param sort: Direction of sort. + :type sort: QuerySortOrder, optional + + :param tag_filters: Tag filters to narrow down containers. + :type tag_filters: [str], optional + + :param text_filter: A full-text search filter to match container names. + :type text_filter: str, optional + """ + if is_normalized_cpu is not unset: + kwargs["is_normalized_cpu"] = is_normalized_cpu + if limit is not unset: + kwargs["limit"] = limit + if sort is not unset: + kwargs["sort"] = sort + if tag_filters is not unset: + kwargs["tag_filters"] = tag_filters + if text_filter is not unset: + kwargs["text_filter"] = text_filter + super().__init__(kwargs) + + self_.data_source = data_source + self_.metric = metric + self_.name = name diff --git a/src/datadog_api_client/v2/model/events_data_source.py b/src/datadog_api_client/v2/model/events_data_source.py index 19cbce4093..132b2f61ee 100644 --- a/src/datadog_api_client/v2/model/events_data_source.py +++ b/src/datadog_api_client/v2/model/events_data_source.py @@ -16,17 +16,39 @@ class EventsDataSource(ModelSimple): """ A data source that is powered by the Events Platform. - :param value: If omitted defaults to "logs". Must be one of ["logs", "rum", "dora"]. + :param value: If omitted defaults to "logs". Must be one of ["logs", "spans", "network", "rum", "security_signals", "profiles", "audit", "events", "ci_tests", "ci_pipelines", "incident_analytics", "product_analytics", "on_call_events", "dora"]. :type value: str """ allowed_values = { "logs", + "spans", + "network", "rum", + "security_signals", + "profiles", + "audit", + "events", + "ci_tests", + "ci_pipelines", + "incident_analytics", + "product_analytics", + "on_call_events", "dora", } LOGS: ClassVar["EventsDataSource"] + SPANS: ClassVar["EventsDataSource"] + NETWORK: ClassVar["EventsDataSource"] RUM: ClassVar["EventsDataSource"] + SECURITY_SIGNALS: ClassVar["EventsDataSource"] + PROFILES: ClassVar["EventsDataSource"] + AUDIT: ClassVar["EventsDataSource"] + EVENTS: ClassVar["EventsDataSource"] + CI_TESTS: ClassVar["EventsDataSource"] + CI_PIPELINES: ClassVar["EventsDataSource"] + INCIDENT_ANALYTICS: ClassVar["EventsDataSource"] + PRODUCT_ANALYTICS: ClassVar["EventsDataSource"] + ON_CALL_EVENTS: ClassVar["EventsDataSource"] DORA: ClassVar["EventsDataSource"] @cached_property @@ -37,5 +59,16 @@ def openapi_types(_): EventsDataSource.LOGS = EventsDataSource("logs") +EventsDataSource.SPANS = EventsDataSource("spans") +EventsDataSource.NETWORK = EventsDataSource("network") EventsDataSource.RUM = EventsDataSource("rum") +EventsDataSource.SECURITY_SIGNALS = EventsDataSource("security_signals") +EventsDataSource.PROFILES = EventsDataSource("profiles") +EventsDataSource.AUDIT = EventsDataSource("audit") +EventsDataSource.EVENTS = EventsDataSource("events") +EventsDataSource.CI_TESTS = EventsDataSource("ci_tests") +EventsDataSource.CI_PIPELINES = EventsDataSource("ci_pipelines") +EventsDataSource.INCIDENT_ANALYTICS = EventsDataSource("incident_analytics") +EventsDataSource.PRODUCT_ANALYTICS = EventsDataSource("product_analytics") +EventsDataSource.ON_CALL_EVENTS = EventsDataSource("on_call_events") EventsDataSource.DORA = EventsDataSource("dora") diff --git a/src/datadog_api_client/v2/model/get_investigation_response.py b/src/datadog_api_client/v2/model/get_investigation_response.py deleted file mode 100644 index 8a78ae1878..0000000000 --- a/src/datadog_api_client/v2/model/get_investigation_response.py +++ /dev/null @@ -1,48 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.get_investigation_response_data import GetInvestigationResponseData - from datadog_api_client.v2.model.get_investigation_response_links import GetInvestigationResponseLinks - - -class GetInvestigationResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.get_investigation_response_data import GetInvestigationResponseData - from datadog_api_client.v2.model.get_investigation_response_links import GetInvestigationResponseLinks - - return { - "data": (GetInvestigationResponseData,), - "links": (GetInvestigationResponseLinks,), - } - - attribute_map = { - "data": "data", - "links": "links", - } - - def __init__(self_, data: GetInvestigationResponseData, links: GetInvestigationResponseLinks, **kwargs): - """ - Response for a single Bits AI investigation. - - :param data: Data for the get investigation response. - :type data: GetInvestigationResponseData - - :param links: Links related to the investigation. - :type links: GetInvestigationResponseLinks - """ - super().__init__(kwargs) - - self_.data = data - self_.links = links diff --git a/src/datadog_api_client/v2/model/get_investigation_response_data.py b/src/datadog_api_client/v2/model/get_investigation_response_data.py deleted file mode 100644 index 86fa193f81..0000000000 --- a/src/datadog_api_client/v2/model/get_investigation_response_data.py +++ /dev/null @@ -1,58 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.get_investigation_response_data_attributes import ( - GetInvestigationResponseDataAttributes, - ) - from datadog_api_client.v2.model.investigation_type import InvestigationType - - -class GetInvestigationResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.get_investigation_response_data_attributes import ( - GetInvestigationResponseDataAttributes, - ) - from datadog_api_client.v2.model.investigation_type import InvestigationType - - return { - "attributes": (GetInvestigationResponseDataAttributes,), - "id": (str,), - "type": (InvestigationType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__(self_, attributes: GetInvestigationResponseDataAttributes, id: str, type: InvestigationType, **kwargs): - """ - Data for the get investigation response. - - :param attributes: Attributes of the investigation. - :type attributes: GetInvestigationResponseDataAttributes - - :param id: The unique identifier of the investigation. - :type id: str - - :param type: The resource type for investigations. - :type type: InvestigationType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/get_investigation_response_data_attributes.py b/src/datadog_api_client/v2/model/get_investigation_response_data_attributes.py deleted file mode 100644 index c66210f6db..0000000000 --- a/src/datadog_api_client/v2/model/get_investigation_response_data_attributes.py +++ /dev/null @@ -1,52 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.investigation_conclusion import InvestigationConclusion - - -class GetInvestigationResponseDataAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.investigation_conclusion import InvestigationConclusion - - return { - "conclusions": ([InvestigationConclusion],), - "status": (str,), - "title": (str,), - } - - attribute_map = { - "conclusions": "conclusions", - "status": "status", - "title": "title", - } - - def __init__(self_, conclusions: List[InvestigationConclusion], status: str, title: str, **kwargs): - """ - Attributes of the investigation. - - :param conclusions: The conclusions drawn from the investigation. - :type conclusions: [InvestigationConclusion] - - :param status: The current status of the investigation. - :type status: str - - :param title: The title of the investigation. - :type title: str - """ - super().__init__(kwargs) - - self_.conclusions = conclusions - self_.status = status - self_.title = title diff --git a/src/datadog_api_client/v2/model/get_investigation_response_links.py b/src/datadog_api_client/v2/model/get_investigation_response_links.py deleted file mode 100644 index a99dfb4803..0000000000 --- a/src/datadog_api_client/v2/model/get_investigation_response_links.py +++ /dev/null @@ -1,33 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class GetInvestigationResponseLinks(ModelNormal): - @cached_property - def openapi_types(_): - return { - "self": (str,), - } - - attribute_map = { - "self": "self", - } - - def __init__(self_, self: str, **kwargs): - """ - Links related to the investigation. - - :param self: The URL to the investigation in the Datadog app. - :type self: str - """ - super().__init__(kwargs) - - self_.self = self diff --git a/src/datadog_api_client/v2/model/investigation_conclusion.py b/src/datadog_api_client/v2/model/investigation_conclusion.py deleted file mode 100644 index 5a9026cbc5..0000000000 --- a/src/datadog_api_client/v2/model/investigation_conclusion.py +++ /dev/null @@ -1,45 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class InvestigationConclusion(ModelNormal): - @cached_property - def openapi_types(_): - return { - "description": (str,), - "summary": (str,), - "title": (str,), - } - - attribute_map = { - "description": "description", - "summary": "summary", - "title": "title", - } - - def __init__(self_, description: str, summary: str, title: str, **kwargs): - """ - A full explanation of the finding, including root cause analysis and supporting evidence. - - :param description: A full explanation of the finding, including root cause analysis and supporting evidence. - :type description: str - - :param summary: A summary of the finding, including affected components and timeframe. - :type summary: str - - :param title: The title of the conclusion. - :type title: str - """ - super().__init__(kwargs) - - self_.description = description - self_.summary = summary - self_.title = title diff --git a/src/datadog_api_client/v2/model/list_investigations_response.py b/src/datadog_api_client/v2/model/list_investigations_response.py deleted file mode 100644 index a98c9bc1f6..0000000000 --- a/src/datadog_api_client/v2/model/list_investigations_response.py +++ /dev/null @@ -1,62 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.list_investigations_response_data import ListInvestigationsResponseData - from datadog_api_client.v2.model.list_investigations_response_links import ListInvestigationsResponseLinks - from datadog_api_client.v2.model.list_investigations_response_meta import ListInvestigationsResponseMeta - - -class ListInvestigationsResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.list_investigations_response_data import ListInvestigationsResponseData - from datadog_api_client.v2.model.list_investigations_response_links import ListInvestigationsResponseLinks - from datadog_api_client.v2.model.list_investigations_response_meta import ListInvestigationsResponseMeta - - return { - "data": ([ListInvestigationsResponseData],), - "links": (ListInvestigationsResponseLinks,), - "meta": (ListInvestigationsResponseMeta,), - } - - attribute_map = { - "data": "data", - "links": "links", - "meta": "meta", - } - - def __init__( - self_, - data: List[ListInvestigationsResponseData], - links: ListInvestigationsResponseLinks, - meta: ListInvestigationsResponseMeta, - **kwargs, - ): - """ - Response for listing investigations. - - :param data: List of investigations. - :type data: [ListInvestigationsResponseData] - - :param links: Pagination links for the list investigations response. - :type links: ListInvestigationsResponseLinks - - :param meta: Metadata for the list investigations response. - :type meta: ListInvestigationsResponseMeta - """ - super().__init__(kwargs) - - self_.data = data - self_.links = links - self_.meta = meta diff --git a/src/datadog_api_client/v2/model/list_investigations_response_data.py b/src/datadog_api_client/v2/model/list_investigations_response_data.py deleted file mode 100644 index 8c18664f9f..0000000000 --- a/src/datadog_api_client/v2/model/list_investigations_response_data.py +++ /dev/null @@ -1,60 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.list_investigations_response_data_attributes import ( - ListInvestigationsResponseDataAttributes, - ) - from datadog_api_client.v2.model.investigation_type import InvestigationType - - -class ListInvestigationsResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.list_investigations_response_data_attributes import ( - ListInvestigationsResponseDataAttributes, - ) - from datadog_api_client.v2.model.investigation_type import InvestigationType - - return { - "attributes": (ListInvestigationsResponseDataAttributes,), - "id": (str,), - "type": (InvestigationType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__( - self_, attributes: ListInvestigationsResponseDataAttributes, id: str, type: InvestigationType, **kwargs - ): - """ - Data for an investigation list item. - - :param attributes: Attributes of an investigation list item. - :type attributes: ListInvestigationsResponseDataAttributes - - :param id: The unique identifier of the investigation. - :type id: str - - :param type: The resource type for investigations. - :type type: InvestigationType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/list_investigations_response_links.py b/src/datadog_api_client/v2/model/list_investigations_response_links.py deleted file mode 100644 index fbaef14567..0000000000 --- a/src/datadog_api_client/v2/model/list_investigations_response_links.py +++ /dev/null @@ -1,71 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - none_type, - unset, - UnsetType, -) - - -class ListInvestigationsResponseLinks(ModelNormal): - @cached_property - def openapi_types(_): - return { - "first": (str,), - "last": (str, none_type), - "next": (str,), - "prev": (str, none_type), - "self": (str,), - } - - attribute_map = { - "first": "first", - "last": "last", - "next": "next", - "prev": "prev", - "self": "self", - } - - def __init__( - self_, - first: str, - next: str, - self: str, - last: Union[str, none_type, UnsetType] = unset, - prev: Union[str, none_type, UnsetType] = unset, - **kwargs, - ): - """ - Pagination links for the list investigations response. - - :param first: Link to the first page. - :type first: str - - :param last: Link to the last page. - :type last: str, none_type, optional - - :param next: Link to the next page. - :type next: str - - :param prev: Link to the previous page. - :type prev: str, none_type, optional - - :param self: Link to the current page. - :type self: str - """ - if last is not unset: - kwargs["last"] = last - if prev is not unset: - kwargs["prev"] = prev - super().__init__(kwargs) - - self_.first = first - self_.next = next - self_.self = self diff --git a/src/datadog_api_client/v2/model/list_investigations_response_meta.py b/src/datadog_api_client/v2/model/list_investigations_response_meta.py deleted file mode 100644 index cf6a19f70e..0000000000 --- a/src/datadog_api_client/v2/model/list_investigations_response_meta.py +++ /dev/null @@ -1,42 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.list_investigations_response_meta_page import ListInvestigationsResponseMetaPage - - -class ListInvestigationsResponseMeta(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.list_investigations_response_meta_page import ( - ListInvestigationsResponseMetaPage, - ) - - return { - "page": (ListInvestigationsResponseMetaPage,), - } - - attribute_map = { - "page": "page", - } - - def __init__(self_, page: ListInvestigationsResponseMetaPage, **kwargs): - """ - Metadata for the list investigations response. - - :param page: Pagination metadata. - :type page: ListInvestigationsResponseMetaPage - """ - super().__init__(kwargs) - - self_.page = page diff --git a/src/datadog_api_client/v2/model/list_investigations_response_meta_page.py b/src/datadog_api_client/v2/model/list_investigations_response_meta_page.py deleted file mode 100644 index 8a70a9664d..0000000000 --- a/src/datadog_api_client/v2/model/list_investigations_response_meta_page.py +++ /dev/null @@ -1,45 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class ListInvestigationsResponseMetaPage(ModelNormal): - @cached_property - def openapi_types(_): - return { - "limit": (int,), - "offset": (int,), - "total": (int,), - } - - attribute_map = { - "limit": "limit", - "offset": "offset", - "total": "total", - } - - def __init__(self_, limit: int, offset: int, total: int, **kwargs): - """ - Pagination metadata. - - :param limit: Maximum number of results per page. - :type limit: int - - :param offset: Offset of the current page. - :type offset: int - - :param total: Total number of investigations. - :type total: int - """ - super().__init__(kwargs) - - self_.limit = limit - self_.offset = offset - self_.total = total diff --git a/src/datadog_api_client/v2/model/monitor_alert_trigger_attributes.py b/src/datadog_api_client/v2/model/monitor_alert_trigger_attributes.py deleted file mode 100644 index 59a2412307..0000000000 --- a/src/datadog_api_client/v2/model/monitor_alert_trigger_attributes.py +++ /dev/null @@ -1,45 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class MonitorAlertTriggerAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "event_id": (str,), - "event_ts": (int,), - "monitor_id": (int,), - } - - attribute_map = { - "event_id": "event_id", - "event_ts": "event_ts", - "monitor_id": "monitor_id", - } - - def __init__(self_, event_id: str, event_ts: int, monitor_id: int, **kwargs): - """ - Attributes for a monitor alert trigger. - - :param event_id: The event ID associated with the monitor alert. - :type event_id: str - - :param event_ts: The timestamp of the event in Unix milliseconds. - :type event_ts: int - - :param monitor_id: The monitor ID that triggered the alert. - :type monitor_id: int - """ - super().__init__(kwargs) - - self_.event_id = event_id - self_.event_ts = event_ts - self_.monitor_id = monitor_id diff --git a/src/datadog_api_client/v2/model/investigation_type.py b/src/datadog_api_client/v2/model/process_data_source.py similarity index 63% rename from src/datadog_api_client/v2/model/investigation_type.py rename to src/datadog_api_client/v2/model/process_data_source.py index bf6df6d698..252a42dc4e 100644 --- a/src/datadog_api_client/v2/model/investigation_type.py +++ b/src/datadog_api_client/v2/model/process_data_source.py @@ -12,18 +12,18 @@ from typing import ClassVar -class InvestigationType(ModelSimple): +class ProcessDataSource(ModelSimple): """ - The resource type for investigations. + A data source for process-level infrastructure metrics. - :param value: If omitted defaults to "investigation". Must be one of ["investigation"]. + :param value: If omitted defaults to "process". Must be one of ["process"]. :type value: str """ allowed_values = { - "investigation", + "process", } - INVESTIGATION: ClassVar["InvestigationType"] + PROCESS: ClassVar["ProcessDataSource"] @cached_property def openapi_types(_): @@ -32,4 +32,4 @@ def openapi_types(_): } -InvestigationType.INVESTIGATION = InvestigationType("investigation") +ProcessDataSource.PROCESS = ProcessDataSource("process") diff --git a/src/datadog_api_client/v2/model/process_scalar_query.py b/src/datadog_api_client/v2/model/process_scalar_query.py new file mode 100644 index 0000000000..89e34f8bcb --- /dev/null +++ b/src/datadog_api_client/v2/model/process_scalar_query.py @@ -0,0 +1,112 @@ +# 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.metrics_aggregator import MetricsAggregator + from datadog_api_client.v2.model.process_data_source import ProcessDataSource + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + +class ProcessScalarQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.metrics_aggregator import MetricsAggregator + from datadog_api_client.v2.model.process_data_source import ProcessDataSource + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + return { + "aggregator": (MetricsAggregator,), + "data_source": (ProcessDataSource,), + "is_normalized_cpu": (bool,), + "limit": (int,), + "metric": (str,), + "name": (str,), + "sort": (QuerySortOrder,), + "tag_filters": ([str],), + "text_filter": (str,), + } + + attribute_map = { + "aggregator": "aggregator", + "data_source": "data_source", + "is_normalized_cpu": "is_normalized_cpu", + "limit": "limit", + "metric": "metric", + "name": "name", + "sort": "sort", + "tag_filters": "tag_filters", + "text_filter": "text_filter", + } + + def __init__( + self_, + data_source: ProcessDataSource, + metric: str, + name: str, + aggregator: Union[MetricsAggregator, UnsetType] = unset, + is_normalized_cpu: Union[bool, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + sort: Union[QuerySortOrder, UnsetType] = unset, + tag_filters: Union[List[str], UnsetType] = unset, + text_filter: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + An individual scalar process query. + + :param aggregator: The type of aggregation that can be performed on metrics-based queries. + :type aggregator: MetricsAggregator, optional + + :param data_source: A data source for process-level infrastructure metrics. + :type data_source: ProcessDataSource + + :param is_normalized_cpu: Whether CPU metrics should be normalized by core count. + :type is_normalized_cpu: bool, optional + + :param limit: Maximum number of results to return. + :type limit: int, optional + + :param metric: The process metric to query. + :type metric: str + + :param name: The variable name for use in formulas. + :type name: str + + :param sort: Direction of sort. + :type sort: QuerySortOrder, optional + + :param tag_filters: Tag filters to narrow down processes. + :type tag_filters: [str], optional + + :param text_filter: A full-text search filter to match process names or commands. + :type text_filter: str, optional + """ + if aggregator is not unset: + kwargs["aggregator"] = aggregator + if is_normalized_cpu is not unset: + kwargs["is_normalized_cpu"] = is_normalized_cpu + if limit is not unset: + kwargs["limit"] = limit + if sort is not unset: + kwargs["sort"] = sort + if tag_filters is not unset: + kwargs["tag_filters"] = tag_filters + if text_filter is not unset: + kwargs["text_filter"] = text_filter + super().__init__(kwargs) + + self_.data_source = data_source + self_.metric = metric + self_.name = name diff --git a/src/datadog_api_client/v2/model/process_timeseries_query.py b/src/datadog_api_client/v2/model/process_timeseries_query.py new file mode 100644 index 0000000000..12faa5bac2 --- /dev/null +++ b/src/datadog_api_client/v2/model/process_timeseries_query.py @@ -0,0 +1,102 @@ +# 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.process_data_source import ProcessDataSource + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + +class ProcessTimeseriesQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.process_data_source import ProcessDataSource + from datadog_api_client.v2.model.query_sort_order import QuerySortOrder + + return { + "data_source": (ProcessDataSource,), + "is_normalized_cpu": (bool,), + "limit": (int,), + "metric": (str,), + "name": (str,), + "sort": (QuerySortOrder,), + "tag_filters": ([str],), + "text_filter": (str,), + } + + attribute_map = { + "data_source": "data_source", + "is_normalized_cpu": "is_normalized_cpu", + "limit": "limit", + "metric": "metric", + "name": "name", + "sort": "sort", + "tag_filters": "tag_filters", + "text_filter": "text_filter", + } + + def __init__( + self_, + data_source: ProcessDataSource, + metric: str, + name: str, + is_normalized_cpu: Union[bool, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + sort: Union[QuerySortOrder, UnsetType] = unset, + tag_filters: Union[List[str], UnsetType] = unset, + text_filter: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + An individual timeseries process query. + + :param data_source: A data source for process-level infrastructure metrics. + :type data_source: ProcessDataSource + + :param is_normalized_cpu: Whether CPU metrics should be normalized by core count. + :type is_normalized_cpu: bool, optional + + :param limit: Maximum number of results to return. + :type limit: int, optional + + :param metric: The process metric to query. + :type metric: str + + :param name: The variable name for use in formulas. + :type name: str + + :param sort: Direction of sort. + :type sort: QuerySortOrder, optional + + :param tag_filters: Tag filters to narrow down processes. + :type tag_filters: [str], optional + + :param text_filter: A full-text search filter to match process names or commands. + :type text_filter: str, optional + """ + if is_normalized_cpu is not unset: + kwargs["is_normalized_cpu"] = is_normalized_cpu + if limit is not unset: + kwargs["limit"] = limit + if sort is not unset: + kwargs["sort"] = sort + if tag_filters is not unset: + kwargs["tag_filters"] = tag_filters + if text_filter is not unset: + kwargs["text_filter"] = text_filter + super().__init__(kwargs) + + self_.data_source = data_source + self_.metric = metric + self_.name = name diff --git a/src/datadog_api_client/v2/model/scalar_query.py b/src/datadog_api_client/v2/model/scalar_query.py index 7fe6386d10..923e20099e 100644 --- a/src/datadog_api_client/v2/model/scalar_query.py +++ b/src/datadog_api_client/v2/model/scalar_query.py @@ -38,6 +38,78 @@ def __init__(self, **kwargs): :param search: Configuration of the search/filter for an events query. :type search: EventsSearch, optional + + :param env: The environment to query. + :type env: str + + :param operation_name: The APM operation name. + :type operation_name: str, optional + + :param primary_tag_name: Name of the second primary tag used within APM. Required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog + :type primary_tag_name: str, optional + + :param primary_tag_value: Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified. + :type primary_tag_value: str, optional + + :param resource_name: The resource name to filter by. + :type resource_name: str, optional + + :param service: The service name to filter by. + :type service: str + + :param stat: The APM resource statistic to query. + :type stat: ApmResourceStatName + + :param operation_mode: Optional operation mode to aggregate across operation names. + :type operation_mode: str, optional + + :param peer_tags: Tags to query for a specific downstream entity (peer.service, peer.db_instance, peer.s3, peer.s3.bucket, etc.). + :type peer_tags: [str], optional + + :param query_filter: Additional filters for the query using metrics query syntax (e.g., env, primary_tag). + :type query_filter: str, optional + + :param resource_hash: The resource hash for exact matching. + :type resource_hash: str, optional + + :param span_kind: Describes the relationship between the span, its parents, and its children in a trace. + :type span_kind: ApmMetricsSpanKind, optional + + :param is_upstream: Determines whether stats for upstream or downstream dependencies should be queried. + :type is_upstream: bool, optional + + :param additional_query_filters: Additional filters applied to the SLO query. + :type additional_query_filters: str, optional + + :param group_mode: How SLO results are grouped in the response. + :type group_mode: SlosGroupMode, optional + + :param measure: The SLO measurement to retrieve. + :type measure: SlosMeasure + + :param slo_id: The unique identifier of the SLO to query. + :type slo_id: str + + :param slo_query_type: The type of SLO definition being queried. + :type slo_query_type: SlosQueryType, optional + + :param is_normalized_cpu: Whether CPU metrics should be normalized by core count. + :type is_normalized_cpu: bool, optional + + :param limit: Maximum number of results to return. + :type limit: int, optional + + :param metric: The process metric to query. + :type metric: str + + :param sort: Direction of sort. + :type sort: QuerySortOrder, optional + + :param tag_filters: Tag filters to narrow down processes. + :type tag_filters: [str], optional + + :param text_filter: A full-text search filter to match process names or commands. + :type text_filter: str, optional """ super().__init__(kwargs) @@ -52,10 +124,22 @@ def _composed_schemas(_): # loading from datadog_api_client.v2.model.metrics_scalar_query import MetricsScalarQuery from datadog_api_client.v2.model.events_scalar_query import EventsScalarQuery + from datadog_api_client.v2.model.apm_resource_stats_query import ApmResourceStatsQuery + from datadog_api_client.v2.model.apm_metrics_query import ApmMetricsQuery + from datadog_api_client.v2.model.apm_dependency_stats_query import ApmDependencyStatsQuery + from datadog_api_client.v2.model.slo_query import SloQuery + from datadog_api_client.v2.model.process_scalar_query import ProcessScalarQuery + from datadog_api_client.v2.model.container_scalar_query import ContainerScalarQuery return { "oneOf": [ MetricsScalarQuery, EventsScalarQuery, + ApmResourceStatsQuery, + ApmMetricsQuery, + ApmDependencyStatsQuery, + SloQuery, + ProcessScalarQuery, + ContainerScalarQuery, ], } diff --git a/src/datadog_api_client/v2/model/slo_data_source.py b/src/datadog_api_client/v2/model/slo_data_source.py new file mode 100644 index 0000000000..1f2bb6a054 --- /dev/null +++ b/src/datadog_api_client/v2/model/slo_data_source.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 SloDataSource(ModelSimple): + """ + A data source for SLO queries. + + :param value: If omitted defaults to "slo". Must be one of ["slo"]. + :type value: str + """ + + allowed_values = { + "slo", + } + SLO: ClassVar["SloDataSource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SloDataSource.SLO = SloDataSource("slo") diff --git a/src/datadog_api_client/v2/model/slo_query.py b/src/datadog_api_client/v2/model/slo_query.py new file mode 100644 index 0000000000..d41072f524 --- /dev/null +++ b/src/datadog_api_client/v2/model/slo_query.py @@ -0,0 +1,98 @@ +# 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.slo_data_source import SloDataSource + from datadog_api_client.v2.model.slos_group_mode import SlosGroupMode + from datadog_api_client.v2.model.slos_measure import SlosMeasure + from datadog_api_client.v2.model.slos_query_type import SlosQueryType + + +class SloQuery(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.slo_data_source import SloDataSource + from datadog_api_client.v2.model.slos_group_mode import SlosGroupMode + from datadog_api_client.v2.model.slos_measure import SlosMeasure + from datadog_api_client.v2.model.slos_query_type import SlosQueryType + + return { + "additional_query_filters": (str,), + "data_source": (SloDataSource,), + "group_mode": (SlosGroupMode,), + "measure": (SlosMeasure,), + "name": (str,), + "slo_id": (str,), + "slo_query_type": (SlosQueryType,), + } + + attribute_map = { + "additional_query_filters": "additional_query_filters", + "data_source": "data_source", + "group_mode": "group_mode", + "measure": "measure", + "name": "name", + "slo_id": "slo_id", + "slo_query_type": "slo_query_type", + } + + def __init__( + self_, + data_source: SloDataSource, + measure: SlosMeasure, + slo_id: str, + additional_query_filters: Union[str, UnsetType] = unset, + group_mode: Union[SlosGroupMode, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + slo_query_type: Union[SlosQueryType, UnsetType] = unset, + **kwargs, + ): + """ + An individual SLO query. + + :param additional_query_filters: Additional filters applied to the SLO query. + :type additional_query_filters: str, optional + + :param data_source: A data source for SLO queries. + :type data_source: SloDataSource + + :param group_mode: How SLO results are grouped in the response. + :type group_mode: SlosGroupMode, optional + + :param measure: The SLO measurement to retrieve. + :type measure: SlosMeasure + + :param name: The variable name for use in formulas. + :type name: str, optional + + :param slo_id: The unique identifier of the SLO to query. + :type slo_id: str + + :param slo_query_type: The type of SLO definition being queried. + :type slo_query_type: SlosQueryType, optional + """ + if additional_query_filters is not unset: + kwargs["additional_query_filters"] = additional_query_filters + if group_mode is not unset: + kwargs["group_mode"] = group_mode + if name is not unset: + kwargs["name"] = name + if slo_query_type is not unset: + kwargs["slo_query_type"] = slo_query_type + super().__init__(kwargs) + + self_.data_source = data_source + self_.measure = measure + self_.slo_id = slo_id diff --git a/src/datadog_api_client/v2/model/slos_group_mode.py b/src/datadog_api_client/v2/model/slos_group_mode.py new file mode 100644 index 0000000000..b9d20949d2 --- /dev/null +++ b/src/datadog_api_client/v2/model/slos_group_mode.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SlosGroupMode(ModelSimple): + """ + How SLO results are grouped in the response. + + :param value: Must be one of ["overall", "components"]. + :type value: str + """ + + allowed_values = { + "overall", + "components", + } + OVERALL: ClassVar["SlosGroupMode"] + COMPONENTS: ClassVar["SlosGroupMode"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SlosGroupMode.OVERALL = SlosGroupMode("overall") +SlosGroupMode.COMPONENTS = SlosGroupMode("components") diff --git a/src/datadog_api_client/v2/model/slos_measure.py b/src/datadog_api_client/v2/model/slos_measure.py new file mode 100644 index 0000000000..3ad4118381 --- /dev/null +++ b/src/datadog_api_client/v2/model/slos_measure.py @@ -0,0 +1,62 @@ +# 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 SlosMeasure(ModelSimple): + """ + The SLO measurement to retrieve. + + :param value: Must be one of ["good_events", "bad_events", "slo_status", "error_budget_remaining", "error_budget_remaining_history", "error_budget_burndown", "burn_rate", "slo_status_history", "good_minutes", "bad_minutes"]. + :type value: str + """ + + allowed_values = { + "good_events", + "bad_events", + "slo_status", + "error_budget_remaining", + "error_budget_remaining_history", + "error_budget_burndown", + "burn_rate", + "slo_status_history", + "good_minutes", + "bad_minutes", + } + GOOD_EVENTS: ClassVar["SlosMeasure"] + BAD_EVENTS: ClassVar["SlosMeasure"] + SLO_STATUS: ClassVar["SlosMeasure"] + ERROR_BUDGET_REMAINING: ClassVar["SlosMeasure"] + ERROR_BUDGET_REMAINING_HISTORY: ClassVar["SlosMeasure"] + ERROR_BUDGET_BURNDOWN: ClassVar["SlosMeasure"] + BURN_RATE: ClassVar["SlosMeasure"] + SLO_STATUS_HISTORY: ClassVar["SlosMeasure"] + GOOD_MINUTES: ClassVar["SlosMeasure"] + BAD_MINUTES: ClassVar["SlosMeasure"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SlosMeasure.GOOD_EVENTS = SlosMeasure("good_events") +SlosMeasure.BAD_EVENTS = SlosMeasure("bad_events") +SlosMeasure.SLO_STATUS = SlosMeasure("slo_status") +SlosMeasure.ERROR_BUDGET_REMAINING = SlosMeasure("error_budget_remaining") +SlosMeasure.ERROR_BUDGET_REMAINING_HISTORY = SlosMeasure("error_budget_remaining_history") +SlosMeasure.ERROR_BUDGET_BURNDOWN = SlosMeasure("error_budget_burndown") +SlosMeasure.BURN_RATE = SlosMeasure("burn_rate") +SlosMeasure.SLO_STATUS_HISTORY = SlosMeasure("slo_status_history") +SlosMeasure.GOOD_MINUTES = SlosMeasure("good_minutes") +SlosMeasure.BAD_MINUTES = SlosMeasure("bad_minutes") diff --git a/src/datadog_api_client/v2/model/slos_query_type.py b/src/datadog_api_client/v2/model/slos_query_type.py new file mode 100644 index 0000000000..02b747c797 --- /dev/null +++ b/src/datadog_api_client/v2/model/slos_query_type.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SlosQueryType(ModelSimple): + """ + The type of SLO definition being queried. + + :param value: Must be one of ["metric", "time_slice", "monitor"]. + :type value: str + """ + + allowed_values = { + "metric", + "time_slice", + "monitor", + } + METRIC: ClassVar["SlosQueryType"] + TIME_SLICE: ClassVar["SlosQueryType"] + MONITOR: ClassVar["SlosQueryType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SlosQueryType.METRIC = SlosQueryType("metric") +SlosQueryType.TIME_SLICE = SlosQueryType("time_slice") +SlosQueryType.MONITOR = SlosQueryType("monitor") diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_attempt_to_fix.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_attempt_to_fix.py new file mode 100644 index 0000000000..99bd7ea7e9 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_attempt_to_fix.py @@ -0,0 +1,36 @@ +# 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 TestOptimizationFlakyTestsManagementPoliciesAttemptToFix(ModelNormal): + @cached_property + def openapi_types(_): + return { + "retries": (int,), + } + + attribute_map = { + "retries": "retries", + } + + def __init__(self_, retries: Union[int, UnsetType] = unset, **kwargs): + """ + Configuration for the attempt-to-fix Flaky Tests Management policy. + + :param retries: Number of retries when attempting to fix a flaky test. Must be greater than 0. + :type retries: int, optional + """ + if retries is not unset: + kwargs["retries"] = retries + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_attributes.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_attributes.py new file mode 100644 index 0000000000..46994dc4fe --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_attributes.py @@ -0,0 +1,86 @@ +# 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.test_optimization_flaky_tests_management_policies_attempt_to_fix import ( + TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled import ( + TestOptimizationFlakyTestsManagementPoliciesDisabled, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantined, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_attempt_to_fix import ( + TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled import ( + TestOptimizationFlakyTestsManagementPoliciesDisabled, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantined, + ) + + return { + "attempt_to_fix": (TestOptimizationFlakyTestsManagementPoliciesAttemptToFix,), + "disabled": (TestOptimizationFlakyTestsManagementPoliciesDisabled,), + "quarantined": (TestOptimizationFlakyTestsManagementPoliciesQuarantined,), + "repository_id": (str,), + } + + attribute_map = { + "attempt_to_fix": "attempt_to_fix", + "disabled": "disabled", + "quarantined": "quarantined", + "repository_id": "repository_id", + } + + def __init__( + self_, + attempt_to_fix: Union[TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, UnsetType] = unset, + disabled: Union[TestOptimizationFlakyTestsManagementPoliciesDisabled, UnsetType] = unset, + quarantined: Union[TestOptimizationFlakyTestsManagementPoliciesQuarantined, UnsetType] = unset, + repository_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of the Flaky Tests Management policies for a repository. + + :param attempt_to_fix: Configuration for the attempt-to-fix Flaky Tests Management policy. + :type attempt_to_fix: TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, optional + + :param disabled: Configuration for the disabled Flaky Tests Management policy. + :type disabled: TestOptimizationFlakyTestsManagementPoliciesDisabled, optional + + :param quarantined: Configuration for the quarantined Flaky Tests Management policy. + :type quarantined: TestOptimizationFlakyTestsManagementPoliciesQuarantined, optional + + :param repository_id: The repository identifier. + :type repository_id: str, optional + """ + if attempt_to_fix is not unset: + kwargs["attempt_to_fix"] = attempt_to_fix + if disabled is not unset: + kwargs["disabled"] = disabled + if quarantined is not unset: + kwargs["quarantined"] = quarantined + if repository_id is not unset: + kwargs["repository_id"] = repository_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_auto_disable_rule.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_auto_disable_rule.py new file mode 100644 index 0000000000..2fcb659952 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_auto_disable_rule.py @@ -0,0 +1,67 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_status import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_status import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, + ) + + return { + "enabled": (bool,), + "status": (TestOptimizationFlakyTestsManagementPoliciesDisabledStatus,), + "window_seconds": (int,), + } + + attribute_map = { + "enabled": "enabled", + "status": "status", + "window_seconds": "window_seconds", + } + + def __init__( + self_, + enabled: Union[bool, UnsetType] = unset, + status: Union[TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, UnsetType] = unset, + window_seconds: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Automatic disable triggering rule based on a time window and test status. + + :param enabled: Whether this auto-disable rule is enabled. + :type enabled: bool, optional + + :param status: Test status that the disable policy applies to. + Must be either ``active`` or ``quarantined``. + :type status: TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, optional + + :param window_seconds: Time window in seconds over which flakiness is evaluated. Must be greater than 0. + :type window_seconds: int, optional + """ + if enabled is not unset: + kwargs["enabled"] = enabled + if status is not unset: + kwargs["status"] = status + if window_seconds is not unset: + kwargs["window_seconds"] = window_seconds + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_auto_quarantine_rule.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_auto_quarantine_rule.py new file mode 100644 index 0000000000..a8df32bb1c --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_auto_quarantine_rule.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 typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule(ModelNormal): + @cached_property + def openapi_types(_): + return { + "enabled": (bool,), + "window_seconds": (int,), + } + + attribute_map = { + "enabled": "enabled", + "window_seconds": "window_seconds", + } + + def __init__( + self_, enabled: Union[bool, UnsetType] = unset, window_seconds: Union[int, UnsetType] = unset, **kwargs + ): + """ + Automatic quarantine triggering rule based on a time window. + + :param enabled: Whether this auto-quarantine rule is enabled. + :type enabled: bool, optional + + :param window_seconds: Time window in seconds over which flakiness is evaluated. Must be greater than 0. + :type window_seconds: int, optional + """ + if enabled is not unset: + kwargs["enabled"] = enabled + if window_seconds is not unset: + kwargs["window_seconds"] = window_seconds + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_branch_rule.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_branch_rule.py new file mode 100644 index 0000000000..d4a9455e44 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_branch_rule.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 List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TestOptimizationFlakyTestsManagementPoliciesBranchRule(ModelNormal): + @cached_property + def openapi_types(_): + return { + "branches": ([str],), + "enabled": (bool,), + "excluded_branches": ([str],), + "excluded_test_services": ([str],), + } + + attribute_map = { + "branches": "branches", + "enabled": "enabled", + "excluded_branches": "excluded_branches", + "excluded_test_services": "excluded_test_services", + } + + def __init__( + self_, + branches: Union[List[str], UnsetType] = unset, + enabled: Union[bool, UnsetType] = unset, + excluded_branches: Union[List[str], UnsetType] = unset, + excluded_test_services: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Branch filtering rule for a Flaky Tests Management policy. + + :param branches: List of branches to which the policy applies. + :type branches: [str], optional + + :param enabled: Whether this branch rule is enabled. + :type enabled: bool, optional + + :param excluded_branches: List of branches excluded from the policy. + :type excluded_branches: [str], optional + + :param excluded_test_services: List of test services excluded from the policy. + :type excluded_test_services: [str], optional + """ + if branches is not unset: + kwargs["branches"] = branches + if enabled is not unset: + kwargs["enabled"] = enabled + if excluded_branches is not unset: + kwargs["excluded_branches"] = excluded_branches + if excluded_test_services is not unset: + kwargs["excluded_test_services"] = excluded_test_services + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_data.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_data.py new file mode 100644 index 0000000000..b24b751fb4 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_data.py @@ -0,0 +1,73 @@ +# 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.test_optimization_flaky_tests_management_policies_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesAttributes, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_type import ( + TestOptimizationFlakyTestsManagementPoliciesType, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesAttributes, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_type import ( + TestOptimizationFlakyTestsManagementPoliciesType, + ) + + return { + "attributes": (TestOptimizationFlakyTestsManagementPoliciesAttributes,), + "id": (str,), + "type": (TestOptimizationFlakyTestsManagementPoliciesType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[TestOptimizationFlakyTestsManagementPoliciesAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[TestOptimizationFlakyTestsManagementPoliciesType, UnsetType] = unset, + **kwargs, + ): + """ + Data object for Flaky Tests Management policies response. + + :param attributes: Attributes of the Flaky Tests Management policies for a repository. + :type attributes: TestOptimizationFlakyTestsManagementPoliciesAttributes, optional + + :param id: The repository identifier used as the resource ID. + :type id: str, optional + + :param type: JSON:API type for Flaky Tests Management policies response. + The value must always be ``test_optimization_flaky_tests_management_policies``. + :type type: TestOptimizationFlakyTestsManagementPoliciesType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled.py new file mode 100644 index 0000000000..3040d67796 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled.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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_disable_rule import ( + TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_branch_rule import ( + TestOptimizationFlakyTestsManagementPoliciesBranchRule, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesDisabled(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_disable_rule import ( + TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_branch_rule import ( + TestOptimizationFlakyTestsManagementPoliciesBranchRule, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule, + ) + + return { + "auto_disable_rule": (TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule,), + "branch_rule": (TestOptimizationFlakyTestsManagementPoliciesBranchRule,), + "enabled": (bool,), + "failure_rate_rule": (TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule,), + } + + attribute_map = { + "auto_disable_rule": "auto_disable_rule", + "branch_rule": "branch_rule", + "enabled": "enabled", + "failure_rate_rule": "failure_rate_rule", + } + + def __init__( + self_, + auto_disable_rule: Union[TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule, UnsetType] = unset, + branch_rule: Union[TestOptimizationFlakyTestsManagementPoliciesBranchRule, UnsetType] = unset, + enabled: Union[bool, UnsetType] = unset, + failure_rate_rule: Union[ + TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule, UnsetType + ] = unset, + **kwargs, + ): + """ + Configuration for the disabled Flaky Tests Management policy. + + :param auto_disable_rule: Automatic disable triggering rule based on a time window and test status. + :type auto_disable_rule: TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule, optional + + :param branch_rule: Branch filtering rule for a Flaky Tests Management policy. + :type branch_rule: TestOptimizationFlakyTestsManagementPoliciesBranchRule, optional + + :param enabled: Whether the disabled policy is enabled. + :type enabled: bool, optional + + :param failure_rate_rule: Failure-rate-based rule for the disabled policy. + :type failure_rate_rule: TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule, optional + """ + if auto_disable_rule is not unset: + kwargs["auto_disable_rule"] = auto_disable_rule + if branch_rule is not unset: + kwargs["branch_rule"] = branch_rule + if enabled is not unset: + kwargs["enabled"] = enabled + if failure_rate_rule is not unset: + kwargs["failure_rate_rule"] = failure_rate_rule + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule.py new file mode 100644 index 0000000000..a9f78349d3 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule.py @@ -0,0 +1,83 @@ +# 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.test_optimization_flaky_tests_management_policies_disabled_status import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_status import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, + ) + + return { + "branches": ([str],), + "enabled": (bool,), + "min_runs": (int,), + "status": (TestOptimizationFlakyTestsManagementPoliciesDisabledStatus,), + "threshold": (float,), + } + + attribute_map = { + "branches": "branches", + "enabled": "enabled", + "min_runs": "min_runs", + "status": "status", + "threshold": "threshold", + } + + def __init__( + self_, + branches: Union[List[str], UnsetType] = unset, + enabled: Union[bool, UnsetType] = unset, + min_runs: Union[int, UnsetType] = unset, + status: Union[TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, UnsetType] = unset, + threshold: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + Failure-rate-based rule for the disabled policy. + + :param branches: List of branches to which this rule applies. + :type branches: [str], optional + + :param enabled: Whether this failure rate rule is enabled. + :type enabled: bool, optional + + :param min_runs: Minimum number of runs required before the rule is evaluated. Must be greater than or equal to 0. + :type min_runs: int, optional + + :param status: Test status that the disable policy applies to. + Must be either ``active`` or ``quarantined``. + :type status: TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, optional + + :param threshold: Failure rate threshold (0.0–1.0) above which the rule triggers. + :type threshold: float, optional + """ + if branches is not unset: + kwargs["branches"] = branches + if enabled is not unset: + kwargs["enabled"] = enabled + if min_runs is not unset: + kwargs["min_runs"] = min_runs + if status is not unset: + kwargs["status"] = status + if threshold is not unset: + kwargs["threshold"] = threshold + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled_status.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled_status.py new file mode 100644 index 0000000000..4e40f69b1f --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_disabled_status.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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TestOptimizationFlakyTestsManagementPoliciesDisabledStatus(ModelSimple): + """ + Test status that the disable policy applies to. + Must be either `active` or `quarantined`. + + :param value: Must be one of ["active", "quarantined"]. + :type value: str + """ + + allowed_values = { + "active", + "quarantined", + } + ACTIVE: ClassVar["TestOptimizationFlakyTestsManagementPoliciesDisabledStatus"] + QUARANTINED: ClassVar["TestOptimizationFlakyTestsManagementPoliciesDisabledStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TestOptimizationFlakyTestsManagementPoliciesDisabledStatus.ACTIVE = ( + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus("active") +) +TestOptimizationFlakyTestsManagementPoliciesDisabledStatus.QUARANTINED = ( + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus("quarantined") +) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request.py new file mode 100644 index 0000000000..b7b93f61d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_data import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequestData, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesGetRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_data import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequestData, + ) + + return { + "data": (TestOptimizationFlakyTestsManagementPoliciesGetRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: TestOptimizationFlakyTestsManagementPoliciesGetRequestData, **kwargs): + """ + Request object for getting Flaky Tests Management policies. + + :param data: Data object for get Flaky Tests Management policies request. + :type data: TestOptimizationFlakyTestsManagementPoliciesGetRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/list_investigations_response_data_attributes.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request_attributes.py similarity index 50% rename from src/datadog_api_client/v2/model/list_investigations_response_data_attributes.py rename to src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request_attributes.py index 9a704bc7e3..6d702f9566 100644 --- a/src/datadog_api_client/v2/model/list_investigations_response_data_attributes.py +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request_attributes.py @@ -10,30 +10,30 @@ ) -class ListInvestigationsResponseDataAttributes(ModelNormal): +class TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes(ModelNormal): + validations = { + "repository_id": { + "min_length": 1, + }, + } + @cached_property def openapi_types(_): return { - "status": (str,), - "title": (str,), + "repository_id": (str,), } attribute_map = { - "status": "status", - "title": "title", + "repository_id": "repository_id", } - def __init__(self_, status: str, title: str, **kwargs): + def __init__(self_, repository_id: str, **kwargs): """ - Attributes of an investigation list item. - - :param status: The current status of the investigation. - :type status: str + Attributes for requesting Flaky Tests Management policies. - :param title: The title of the investigation. - :type title: str + :param repository_id: The repository identifier. + :type repository_id: str """ super().__init__(kwargs) - self_.status = status - self_.title = title + self_.repository_id = repository_id diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request_data.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request_data.py new file mode 100644 index 0000000000..30c9b31cda --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_get_request_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes, + ) + from datadog_api_client.v2.model.test_optimization_get_flaky_tests_management_policies_request_data_type import ( + TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesGetRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes, + ) + from datadog_api_client.v2.model.test_optimization_get_flaky_tests_management_policies_request_data_type import ( + TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType, + ) + + return { + "attributes": (TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes,), + "type": (TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes, + type: TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType, + **kwargs, + ): + """ + Data object for get Flaky Tests Management policies request. + + :param attributes: Attributes for requesting Flaky Tests Management policies. + :type attributes: TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes + + :param type: JSON:API type for get Flaky Tests Management policies request. + The value must always be ``test_optimization_get_flaky_tests_management_policies_request``. + :type type: TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_quarantined.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_quarantined.py new file mode 100644 index 0000000000..7aeb7a34cb --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_quarantined.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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_quarantine_rule import ( + TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_branch_rule import ( + TestOptimizationFlakyTestsManagementPoliciesBranchRule, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesQuarantined(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_quarantine_rule import ( + TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_branch_rule import ( + TestOptimizationFlakyTestsManagementPoliciesBranchRule, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule, + ) + + return { + "auto_quarantine_rule": (TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule,), + "branch_rule": (TestOptimizationFlakyTestsManagementPoliciesBranchRule,), + "enabled": (bool,), + "failure_rate_rule": (TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule,), + } + + attribute_map = { + "auto_quarantine_rule": "auto_quarantine_rule", + "branch_rule": "branch_rule", + "enabled": "enabled", + "failure_rate_rule": "failure_rate_rule", + } + + def __init__( + self_, + auto_quarantine_rule: Union[TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule, UnsetType] = unset, + branch_rule: Union[TestOptimizationFlakyTestsManagementPoliciesBranchRule, UnsetType] = unset, + enabled: Union[bool, UnsetType] = unset, + failure_rate_rule: Union[ + TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule, UnsetType + ] = unset, + **kwargs, + ): + """ + Configuration for the quarantined Flaky Tests Management policy. + + :param auto_quarantine_rule: Automatic quarantine triggering rule based on a time window. + :type auto_quarantine_rule: TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule, optional + + :param branch_rule: Branch filtering rule for a Flaky Tests Management policy. + :type branch_rule: TestOptimizationFlakyTestsManagementPoliciesBranchRule, optional + + :param enabled: Whether the quarantined policy is enabled. + :type enabled: bool, optional + + :param failure_rate_rule: Failure-rate-based rule for the quarantined policy. + :type failure_rate_rule: TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule, optional + """ + if auto_quarantine_rule is not unset: + kwargs["auto_quarantine_rule"] = auto_quarantine_rule + if branch_rule is not unset: + kwargs["branch_rule"] = branch_rule + if enabled is not unset: + kwargs["enabled"] = enabled + if failure_rate_rule is not unset: + kwargs["failure_rate_rule"] = failure_rate_rule + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule.py new file mode 100644 index 0000000000..45f5793e65 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule.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 List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule(ModelNormal): + @cached_property + def openapi_types(_): + return { + "branches": ([str],), + "enabled": (bool,), + "min_runs": (int,), + "threshold": (float,), + } + + attribute_map = { + "branches": "branches", + "enabled": "enabled", + "min_runs": "min_runs", + "threshold": "threshold", + } + + def __init__( + self_, + branches: Union[List[str], UnsetType] = unset, + enabled: Union[bool, UnsetType] = unset, + min_runs: Union[int, UnsetType] = unset, + threshold: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + Failure-rate-based rule for the quarantined policy. + + :param branches: List of branches to which this rule applies. + :type branches: [str], optional + + :param enabled: Whether this failure rate rule is enabled. + :type enabled: bool, optional + + :param min_runs: Minimum number of runs required before the rule is evaluated. Must be greater than or equal to 0. + :type min_runs: int, optional + + :param threshold: Failure rate threshold (0.0–1.0) above which the rule triggers. + :type threshold: float, optional + """ + if branches is not unset: + kwargs["branches"] = branches + if enabled is not unset: + kwargs["enabled"] = enabled + if min_runs is not unset: + kwargs["min_runs"] = min_runs + if threshold is not unset: + kwargs["threshold"] = threshold + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_response.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_response.py new file mode 100644 index 0000000000..4f017d52a7 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_response.py @@ -0,0 +1,46 @@ +# 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.test_optimization_flaky_tests_management_policies_data import ( + TestOptimizationFlakyTestsManagementPoliciesData, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_data import ( + TestOptimizationFlakyTestsManagementPoliciesData, + ) + + return { + "data": (TestOptimizationFlakyTestsManagementPoliciesData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[TestOptimizationFlakyTestsManagementPoliciesData, UnsetType] = unset, **kwargs): + """ + Response object containing Flaky Tests Management policies for a repository. + + :param data: Data object for Flaky Tests Management policies response. + :type data: TestOptimizationFlakyTestsManagementPoliciesData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_type.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_type.py new file mode 100644 index 0000000000..edaa1b5ac3 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_type.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TestOptimizationFlakyTestsManagementPoliciesType(ModelSimple): + """ + JSON:API type for Flaky Tests Management policies response. + The value must always be `test_optimization_flaky_tests_management_policies`. + + :param value: If omitted defaults to "test_optimization_flaky_tests_management_policies". Must be one of ["test_optimization_flaky_tests_management_policies"]. + :type value: str + """ + + allowed_values = { + "test_optimization_flaky_tests_management_policies", + } + TEST_OPTIMIZATION_FLAKY_TESTS_MANAGEMENT_POLICIES: ClassVar["TestOptimizationFlakyTestsManagementPoliciesType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TestOptimizationFlakyTestsManagementPoliciesType.TEST_OPTIMIZATION_FLAKY_TESTS_MANAGEMENT_POLICIES = ( + TestOptimizationFlakyTestsManagementPoliciesType("test_optimization_flaky_tests_management_policies") +) diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request.py new file mode 100644 index 0000000000..dabd3c742c --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_data import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesUpdateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_data import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData, + ) + + return { + "data": (TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData, **kwargs): + """ + Request object for updating Flaky Tests Management policies. + + :param data: Data object for update Flaky Tests Management policies request. + :type data: TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request_attributes.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request_attributes.py new file mode 100644 index 0000000000..cd3d1944a3 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request_attributes.py @@ -0,0 +1,93 @@ +# 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.test_optimization_flaky_tests_management_policies_attempt_to_fix import ( + TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled import ( + TestOptimizationFlakyTestsManagementPoliciesDisabled, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantined, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes(ModelNormal): + validations = { + "repository_id": { + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_attempt_to_fix import ( + TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled import ( + TestOptimizationFlakyTestsManagementPoliciesDisabled, + ) + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantined, + ) + + return { + "attempt_to_fix": (TestOptimizationFlakyTestsManagementPoliciesAttemptToFix,), + "disabled": (TestOptimizationFlakyTestsManagementPoliciesDisabled,), + "quarantined": (TestOptimizationFlakyTestsManagementPoliciesQuarantined,), + "repository_id": (str,), + } + + attribute_map = { + "attempt_to_fix": "attempt_to_fix", + "disabled": "disabled", + "quarantined": "quarantined", + "repository_id": "repository_id", + } + + def __init__( + self_, + repository_id: str, + attempt_to_fix: Union[TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, UnsetType] = unset, + disabled: Union[TestOptimizationFlakyTestsManagementPoliciesDisabled, UnsetType] = unset, + quarantined: Union[TestOptimizationFlakyTestsManagementPoliciesQuarantined, UnsetType] = unset, + **kwargs, + ): + """ + Attributes for updating Flaky Tests Management policies. + Only provided policy blocks are updated; omitted blocks are left unchanged. + + :param attempt_to_fix: Configuration for the attempt-to-fix Flaky Tests Management policy. + :type attempt_to_fix: TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, optional + + :param disabled: Configuration for the disabled Flaky Tests Management policy. + :type disabled: TestOptimizationFlakyTestsManagementPoliciesDisabled, optional + + :param quarantined: Configuration for the quarantined Flaky Tests Management policy. + :type quarantined: TestOptimizationFlakyTestsManagementPoliciesQuarantined, optional + + :param repository_id: The repository identifier. + :type repository_id: str + """ + if attempt_to_fix is not unset: + kwargs["attempt_to_fix"] = attempt_to_fix + if disabled is not unset: + kwargs["disabled"] = disabled + if quarantined is not unset: + kwargs["quarantined"] = quarantined + super().__init__(kwargs) + + self_.repository_id = repository_id diff --git a/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request_data.py b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request_data.py new file mode 100644 index 0000000000..91d21b3810 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_flaky_tests_management_policies_update_request_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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes, + ) + from datadog_api_client.v2.model.test_optimization_update_flaky_tests_management_policies_request_data_type import ( + TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType, + ) + + +class TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes, + ) + from datadog_api_client.v2.model.test_optimization_update_flaky_tests_management_policies_request_data_type import ( + TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType, + ) + + return { + "attributes": (TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes,), + "type": (TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes, + type: TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType, + **kwargs, + ): + """ + Data object for update Flaky Tests Management policies request. + + :param attributes: Attributes for updating Flaky Tests Management policies. + Only provided policy blocks are updated; omitted blocks are left unchanged. + :type attributes: TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes + + :param type: JSON:API type for update Flaky Tests Management policies request. + The value must always be ``test_optimization_update_flaky_tests_management_policies_request``. + :type type: TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/test_optimization_get_flaky_tests_management_policies_request_data_type.py b/src/datadog_api_client/v2/model/test_optimization_get_flaky_tests_management_policies_request_data_type.py new file mode 100644 index 0000000000..c57b6d066f --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_get_flaky_tests_management_policies_request_data_type.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 TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType(ModelSimple): + """ + JSON:API type for get Flaky Tests Management policies request. + The value must always be `test_optimization_get_flaky_tests_management_policies_request`. + + :param value: If omitted defaults to "test_optimization_get_flaky_tests_management_policies_request". Must be one of ["test_optimization_get_flaky_tests_management_policies_request"]. + :type value: str + """ + + allowed_values = { + "test_optimization_get_flaky_tests_management_policies_request", + } + TEST_OPTIMIZATION_GET_FLAKY_TESTS_MANAGEMENT_POLICIES_REQUEST: ClassVar[ + "TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType" + ] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType.TEST_OPTIMIZATION_GET_FLAKY_TESTS_MANAGEMENT_POLICIES_REQUEST = TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType( + "test_optimization_get_flaky_tests_management_policies_request" +) diff --git a/src/datadog_api_client/v2/model/test_optimization_update_flaky_tests_management_policies_request_data_type.py b/src/datadog_api_client/v2/model/test_optimization_update_flaky_tests_management_policies_request_data_type.py new file mode 100644 index 0000000000..ee163449f4 --- /dev/null +++ b/src/datadog_api_client/v2/model/test_optimization_update_flaky_tests_management_policies_request_data_type.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 TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType(ModelSimple): + """ + JSON:API type for update Flaky Tests Management policies request. + The value must always be `test_optimization_update_flaky_tests_management_policies_request`. + + :param value: If omitted defaults to "test_optimization_update_flaky_tests_management_policies_request". Must be one of ["test_optimization_update_flaky_tests_management_policies_request"]. + :type value: str + """ + + allowed_values = { + "test_optimization_update_flaky_tests_management_policies_request", + } + TEST_OPTIMIZATION_UPDATE_FLAKY_TESTS_MANAGEMENT_POLICIES_REQUEST: ClassVar[ + "TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType" + ] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType.TEST_OPTIMIZATION_UPDATE_FLAKY_TESTS_MANAGEMENT_POLICIES_REQUEST = TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType( + "test_optimization_update_flaky_tests_management_policies_request" +) diff --git a/src/datadog_api_client/v2/model/timeseries_query.py b/src/datadog_api_client/v2/model/timeseries_query.py index 4ffaab2191..9183a7e641 100644 --- a/src/datadog_api_client/v2/model/timeseries_query.py +++ b/src/datadog_api_client/v2/model/timeseries_query.py @@ -35,6 +35,78 @@ def __init__(self, **kwargs): :param search: Configuration of the search/filter for an events query. :type search: EventsSearch, optional + + :param env: The environment to query. + :type env: str + + :param operation_name: The APM operation name. + :type operation_name: str, optional + + :param primary_tag_name: Name of the second primary tag used within APM. Required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog + :type primary_tag_name: str, optional + + :param primary_tag_value: Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified. + :type primary_tag_value: str, optional + + :param resource_name: The resource name to filter by. + :type resource_name: str, optional + + :param service: The service name to filter by. + :type service: str + + :param stat: The APM resource statistic to query. + :type stat: ApmResourceStatName + + :param operation_mode: Optional operation mode to aggregate across operation names. + :type operation_mode: str, optional + + :param peer_tags: Tags to query for a specific downstream entity (peer.service, peer.db_instance, peer.s3, peer.s3.bucket, etc.). + :type peer_tags: [str], optional + + :param query_filter: Additional filters for the query using metrics query syntax (e.g., env, primary_tag). + :type query_filter: str, optional + + :param resource_hash: The resource hash for exact matching. + :type resource_hash: str, optional + + :param span_kind: Describes the relationship between the span, its parents, and its children in a trace. + :type span_kind: ApmMetricsSpanKind, optional + + :param is_upstream: Determines whether stats for upstream or downstream dependencies should be queried. + :type is_upstream: bool, optional + + :param additional_query_filters: Additional filters applied to the SLO query. + :type additional_query_filters: str, optional + + :param group_mode: How SLO results are grouped in the response. + :type group_mode: SlosGroupMode, optional + + :param measure: The SLO measurement to retrieve. + :type measure: SlosMeasure + + :param slo_id: The unique identifier of the SLO to query. + :type slo_id: str + + :param slo_query_type: The type of SLO definition being queried. + :type slo_query_type: SlosQueryType, optional + + :param is_normalized_cpu: Whether CPU metrics should be normalized by core count. + :type is_normalized_cpu: bool, optional + + :param limit: Maximum number of results to return. + :type limit: int, optional + + :param metric: The process metric to query. + :type metric: str + + :param sort: Direction of sort. + :type sort: QuerySortOrder, optional + + :param tag_filters: Tag filters to narrow down processes. + :type tag_filters: [str], optional + + :param text_filter: A full-text search filter to match process names or commands. + :type text_filter: str, optional """ super().__init__(kwargs) @@ -49,10 +121,22 @@ def _composed_schemas(_): # loading from datadog_api_client.v2.model.metrics_timeseries_query import MetricsTimeseriesQuery from datadog_api_client.v2.model.events_timeseries_query import EventsTimeseriesQuery + from datadog_api_client.v2.model.apm_resource_stats_query import ApmResourceStatsQuery + from datadog_api_client.v2.model.apm_metrics_query import ApmMetricsQuery + from datadog_api_client.v2.model.apm_dependency_stats_query import ApmDependencyStatsQuery + from datadog_api_client.v2.model.slo_query import SloQuery + from datadog_api_client.v2.model.process_timeseries_query import ProcessTimeseriesQuery + from datadog_api_client.v2.model.container_timeseries_query import ContainerTimeseriesQuery return { "oneOf": [ MetricsTimeseriesQuery, EventsTimeseriesQuery, + ApmResourceStatsQuery, + ApmMetricsQuery, + ApmDependencyStatsQuery, + SloQuery, + ProcessTimeseriesQuery, + ContainerTimeseriesQuery, ], } diff --git a/src/datadog_api_client/v2/model/trigger_attributes.py b/src/datadog_api_client/v2/model/trigger_attributes.py deleted file mode 100644 index 9fee09f879..0000000000 --- a/src/datadog_api_client/v2/model/trigger_attributes.py +++ /dev/null @@ -1,48 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.monitor_alert_trigger_attributes import MonitorAlertTriggerAttributes - from datadog_api_client.v2.model.trigger_type import TriggerType - - -class TriggerAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.monitor_alert_trigger_attributes import MonitorAlertTriggerAttributes - from datadog_api_client.v2.model.trigger_type import TriggerType - - return { - "monitor_alert_trigger": (MonitorAlertTriggerAttributes,), - "type": (TriggerType,), - } - - attribute_map = { - "monitor_alert_trigger": "monitor_alert_trigger", - "type": "type", - } - - def __init__(self_, monitor_alert_trigger: MonitorAlertTriggerAttributes, type: TriggerType, **kwargs): - """ - The trigger definition for starting an investigation. - - :param monitor_alert_trigger: Attributes for a monitor alert trigger. - :type monitor_alert_trigger: MonitorAlertTriggerAttributes - - :param type: The type of trigger for the investigation. - :type type: TriggerType - """ - super().__init__(kwargs) - - self_.monitor_alert_trigger = monitor_alert_trigger - self_.type = type diff --git a/src/datadog_api_client/v2/model/trigger_investigation_request.py b/src/datadog_api_client/v2/model/trigger_investigation_request.py deleted file mode 100644 index 0e3d343897..0000000000 --- a/src/datadog_api_client/v2/model/trigger_investigation_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.trigger_investigation_request_data import TriggerInvestigationRequestData - - -class TriggerInvestigationRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.trigger_investigation_request_data import TriggerInvestigationRequestData - - return { - "data": (TriggerInvestigationRequestData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: TriggerInvestigationRequestData, **kwargs): - """ - Request to trigger a new investigation. - - :param data: Data for the trigger investigation request. - :type data: TriggerInvestigationRequestData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/trigger_investigation_request_data.py b/src/datadog_api_client/v2/model/trigger_investigation_request_data.py deleted file mode 100644 index de267eb21c..0000000000 --- a/src/datadog_api_client/v2/model/trigger_investigation_request_data.py +++ /dev/null @@ -1,54 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.trigger_investigation_request_data_attributes import ( - TriggerInvestigationRequestDataAttributes, - ) - from datadog_api_client.v2.model.trigger_investigation_request_type import TriggerInvestigationRequestType - - -class TriggerInvestigationRequestData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.trigger_investigation_request_data_attributes import ( - TriggerInvestigationRequestDataAttributes, - ) - from datadog_api_client.v2.model.trigger_investigation_request_type import TriggerInvestigationRequestType - - return { - "attributes": (TriggerInvestigationRequestDataAttributes,), - "type": (TriggerInvestigationRequestType,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__( - self_, attributes: TriggerInvestigationRequestDataAttributes, type: TriggerInvestigationRequestType, **kwargs - ): - """ - Data for the trigger investigation request. - - :param attributes: Attributes for the trigger investigation request. - :type attributes: TriggerInvestigationRequestDataAttributes - - :param type: The resource type for trigger investigation requests. - :type type: TriggerInvestigationRequestType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.type = type diff --git a/src/datadog_api_client/v2/model/trigger_investigation_request_data_attributes.py b/src/datadog_api_client/v2/model/trigger_investigation_request_data_attributes.py deleted file mode 100644 index e0c5c0729c..0000000000 --- a/src/datadog_api_client/v2/model/trigger_investigation_request_data_attributes.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.trigger_attributes import TriggerAttributes - - -class TriggerInvestigationRequestDataAttributes(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.trigger_attributes import TriggerAttributes - - return { - "trigger": (TriggerAttributes,), - } - - attribute_map = { - "trigger": "trigger", - } - - def __init__(self_, trigger: TriggerAttributes, **kwargs): - """ - Attributes for the trigger investigation request. - - :param trigger: The trigger definition for starting an investigation. - :type trigger: TriggerAttributes - """ - super().__init__(kwargs) - - self_.trigger = trigger diff --git a/src/datadog_api_client/v2/model/trigger_investigation_response.py b/src/datadog_api_client/v2/model/trigger_investigation_response.py deleted file mode 100644 index 4d6276c915..0000000000 --- a/src/datadog_api_client/v2/model/trigger_investigation_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.trigger_investigation_response_data import TriggerInvestigationResponseData - - -class TriggerInvestigationResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.trigger_investigation_response_data import TriggerInvestigationResponseData - - return { - "data": (TriggerInvestigationResponseData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: TriggerInvestigationResponseData, **kwargs): - """ - Response after triggering an investigation. - - :param data: Data for the trigger investigation response. - :type data: TriggerInvestigationResponseData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/trigger_investigation_response_data.py b/src/datadog_api_client/v2/model/trigger_investigation_response_data.py deleted file mode 100644 index 19603c9714..0000000000 --- a/src/datadog_api_client/v2/model/trigger_investigation_response_data.py +++ /dev/null @@ -1,64 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.trigger_investigation_response_data_attributes import ( - TriggerInvestigationResponseDataAttributes, - ) - from datadog_api_client.v2.model.trigger_investigation_response_type import TriggerInvestigationResponseType - - -class TriggerInvestigationResponseData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.trigger_investigation_response_data_attributes import ( - TriggerInvestigationResponseDataAttributes, - ) - from datadog_api_client.v2.model.trigger_investigation_response_type import TriggerInvestigationResponseType - - return { - "attributes": (TriggerInvestigationResponseDataAttributes,), - "id": (str,), - "type": (TriggerInvestigationResponseType,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__( - self_, - attributes: TriggerInvestigationResponseDataAttributes, - id: str, - type: TriggerInvestigationResponseType, - **kwargs, - ): - """ - Data for the trigger investigation response. - - :param attributes: Attributes for the trigger investigation response. - :type attributes: TriggerInvestigationResponseDataAttributes - - :param id: Unique identifier for the trigger response. - :type id: str - - :param type: The resource type for trigger investigation responses. - :type type: TriggerInvestigationResponseType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/trigger_investigation_response_data_attributes.py b/src/datadog_api_client/v2/model/trigger_investigation_response_data_attributes.py deleted file mode 100644 index 4575718680..0000000000 --- a/src/datadog_api_client/v2/model/trigger_investigation_response_data_attributes.py +++ /dev/null @@ -1,33 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class TriggerInvestigationResponseDataAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "investigation_id": (str,), - } - - attribute_map = { - "investigation_id": "investigation_id", - } - - def __init__(self_, investigation_id: str, **kwargs): - """ - Attributes for the trigger investigation response. - - :param investigation_id: The ID of the investigation that was created. - :type investigation_id: str - """ - super().__init__(kwargs) - - self_.investigation_id = investigation_id diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index a0ed252eed..d46ef35c6c 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -195,6 +195,16 @@ from datadog_api_client.v2.model.any_value import AnyValue from datadog_api_client.v2.model.any_value_item import AnyValueItem from datadog_api_client.v2.model.any_value_object import AnyValueObject +from datadog_api_client.v2.model.apm_dependency_stat_name import ApmDependencyStatName +from datadog_api_client.v2.model.apm_dependency_stats_data_source import ApmDependencyStatsDataSource +from datadog_api_client.v2.model.apm_dependency_stats_query import ApmDependencyStatsQuery +from datadog_api_client.v2.model.apm_metrics_data_source import ApmMetricsDataSource +from datadog_api_client.v2.model.apm_metrics_query import ApmMetricsQuery +from datadog_api_client.v2.model.apm_metrics_span_kind import ApmMetricsSpanKind +from datadog_api_client.v2.model.apm_metrics_stat import ApmMetricsStat +from datadog_api_client.v2.model.apm_resource_stat_name import ApmResourceStatName +from datadog_api_client.v2.model.apm_resource_stats_data_source import ApmResourceStatsDataSource +from datadog_api_client.v2.model.apm_resource_stats_query import ApmResourceStatsQuery from datadog_api_client.v2.model.apm_retention_filter_type import ApmRetentionFilterType from datadog_api_client.v2.model.app_builder_event import AppBuilderEvent from datadog_api_client.v2.model.app_builder_event_name import AppBuilderEventName @@ -1078,6 +1088,7 @@ from datadog_api_client.v2.model.connections_response_meta import ConnectionsResponseMeta from datadog_api_client.v2.model.container import Container from datadog_api_client.v2.model.container_attributes import ContainerAttributes +from datadog_api_client.v2.model.container_data_source import ContainerDataSource from datadog_api_client.v2.model.container_group import ContainerGroup from datadog_api_client.v2.model.container_group_attributes import ContainerGroupAttributes from datadog_api_client.v2.model.container_group_relationships import ContainerGroupRelationships @@ -1107,6 +1118,8 @@ from datadog_api_client.v2.model.container_meta import ContainerMeta from datadog_api_client.v2.model.container_meta_page import ContainerMetaPage from datadog_api_client.v2.model.container_meta_page_type import ContainerMetaPageType +from datadog_api_client.v2.model.container_scalar_query import ContainerScalarQuery +from datadog_api_client.v2.model.container_timeseries_query import ContainerTimeseriesQuery from datadog_api_client.v2.model.container_type import ContainerType from datadog_api_client.v2.model.containers_response import ContainersResponse from datadog_api_client.v2.model.containers_response_links import ContainersResponseLinks @@ -2351,12 +2364,6 @@ from datadog_api_client.v2.model.get_finding_response import GetFindingResponse from datadog_api_client.v2.model.get_interfaces_data import GetInterfacesData from datadog_api_client.v2.model.get_interfaces_response import GetInterfacesResponse -from datadog_api_client.v2.model.get_investigation_response import GetInvestigationResponse -from datadog_api_client.v2.model.get_investigation_response_data import GetInvestigationResponseData -from datadog_api_client.v2.model.get_investigation_response_data_attributes import ( - GetInvestigationResponseDataAttributes, -) -from datadog_api_client.v2.model.get_investigation_response_links import GetInvestigationResponseLinks from datadog_api_client.v2.model.get_issue_include_query_parameter_item import GetIssueIncludeQueryParameterItem from datadog_api_client.v2.model.get_mapping_response import GetMappingResponse from datadog_api_client.v2.model.get_mapping_response_data import GetMappingResponseData @@ -2849,8 +2856,6 @@ from datadog_api_client.v2.model.integration_type import IntegrationType from datadog_api_client.v2.model.interface_attributes import InterfaceAttributes from datadog_api_client.v2.model.interface_attributes_status import InterfaceAttributesStatus -from datadog_api_client.v2.model.investigation_conclusion import InvestigationConclusion -from datadog_api_client.v2.model.investigation_type import InvestigationType from datadog_api_client.v2.model.issue import Issue from datadog_api_client.v2.model.issue_assignee_relationship import IssueAssigneeRelationship from datadog_api_client.v2.model.issue_attributes import IssueAttributes @@ -3199,14 +3204,6 @@ from datadog_api_client.v2.model.list_integrations_response import ListIntegrationsResponse from datadog_api_client.v2.model.list_interface_tags_response import ListInterfaceTagsResponse from datadog_api_client.v2.model.list_interface_tags_response_data import ListInterfaceTagsResponseData -from datadog_api_client.v2.model.list_investigations_response import ListInvestigationsResponse -from datadog_api_client.v2.model.list_investigations_response_data import ListInvestigationsResponseData -from datadog_api_client.v2.model.list_investigations_response_data_attributes import ( - ListInvestigationsResponseDataAttributes, -) -from datadog_api_client.v2.model.list_investigations_response_links import ListInvestigationsResponseLinks -from datadog_api_client.v2.model.list_investigations_response_meta import ListInvestigationsResponseMeta -from datadog_api_client.v2.model.list_investigations_response_meta_page import ListInvestigationsResponseMetaPage from datadog_api_client.v2.model.list_kind_catalog_response import ListKindCatalogResponse from datadog_api_client.v2.model.list_notification_channels_response import ListNotificationChannelsResponse from datadog_api_client.v2.model.list_on_call_notification_rules_response import ListOnCallNotificationRulesResponse @@ -3537,7 +3534,6 @@ from datadog_api_client.v2.model.microsoft_teams_workflows_webhook_response_attributes import ( MicrosoftTeamsWorkflowsWebhookResponseAttributes, ) -from datadog_api_client.v2.model.monitor_alert_trigger_attributes import MonitorAlertTriggerAttributes from datadog_api_client.v2.model.monitor_config_policy_attribute_create_request import ( MonitorConfigPolicyAttributeCreateRequest, ) @@ -4692,12 +4688,15 @@ from datadog_api_client.v2.model.powerpacks_response_meta import PowerpacksResponseMeta from datadog_api_client.v2.model.powerpacks_response_meta_pagination import PowerpacksResponseMetaPagination from datadog_api_client.v2.model.preview_entity_response_data import PreviewEntityResponseData +from datadog_api_client.v2.model.process_data_source import ProcessDataSource +from datadog_api_client.v2.model.process_scalar_query import ProcessScalarQuery from datadog_api_client.v2.model.process_summaries_meta import ProcessSummariesMeta from datadog_api_client.v2.model.process_summaries_meta_page import ProcessSummariesMetaPage from datadog_api_client.v2.model.process_summaries_response import ProcessSummariesResponse from datadog_api_client.v2.model.process_summary import ProcessSummary from datadog_api_client.v2.model.process_summary_attributes import ProcessSummaryAttributes from datadog_api_client.v2.model.process_summary_type import ProcessSummaryType +from datadog_api_client.v2.model.process_timeseries_query import ProcessTimeseriesQuery from datadog_api_client.v2.model.product_analytics_analytics_query import ProductAnalyticsAnalyticsQuery from datadog_api_client.v2.model.product_analytics_analytics_request import ProductAnalyticsAnalyticsRequest from datadog_api_client.v2.model.product_analytics_analytics_request_attributes import ( @@ -5961,6 +5960,8 @@ from datadog_api_client.v2.model.slack_integration_metadata import SlackIntegrationMetadata from datadog_api_client.v2.model.slack_integration_metadata_channel_item import SlackIntegrationMetadataChannelItem from datadog_api_client.v2.model.slack_trigger_wrapper import SlackTriggerWrapper +from datadog_api_client.v2.model.slo_data_source import SloDataSource +from datadog_api_client.v2.model.slo_query import SloQuery from datadog_api_client.v2.model.slo_report_create_request import SloReportCreateRequest from datadog_api_client.v2.model.slo_report_create_request_attributes import SloReportCreateRequestAttributes from datadog_api_client.v2.model.slo_report_create_request_data import SloReportCreateRequestData @@ -5968,6 +5969,9 @@ from datadog_api_client.v2.model.slo_status_data_attributes import SloStatusDataAttributes from datadog_api_client.v2.model.slo_status_response import SloStatusResponse from datadog_api_client.v2.model.slo_status_type import SloStatusType +from datadog_api_client.v2.model.slos_group_mode import SlosGroupMode +from datadog_api_client.v2.model.slos_measure import SlosMeasure +from datadog_api_client.v2.model.slos_query_type import SlosQueryType from datadog_api_client.v2.model.snapshot import Snapshot from datadog_api_client.v2.model.snapshot_array import SnapshotArray from datadog_api_client.v2.model.snapshot_create_request import SnapshotCreateRequest @@ -6555,6 +6559,66 @@ from datadog_api_client.v2.model.test_optimization_delete_service_settings_request_data_type import ( TestOptimizationDeleteServiceSettingsRequestDataType, ) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_attempt_to_fix import ( + TestOptimizationFlakyTestsManagementPoliciesAttemptToFix, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesAttributes, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_disable_rule import ( + TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_auto_quarantine_rule import ( + TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_branch_rule import ( + TestOptimizationFlakyTestsManagementPoliciesBranchRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_data import ( + TestOptimizationFlakyTestsManagementPoliciesData, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled import ( + TestOptimizationFlakyTestsManagementPoliciesDisabled, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_failure_rate_rule import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_disabled_status import ( + TestOptimizationFlakyTestsManagementPoliciesDisabledStatus, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequest, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_get_request_data import ( + TestOptimizationFlakyTestsManagementPoliciesGetRequestData, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantined, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_quarantined_failure_rate_rule import ( + TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_response import ( + TestOptimizationFlakyTestsManagementPoliciesResponse, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_type import ( + TestOptimizationFlakyTestsManagementPoliciesType, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequest, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_attributes import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes, +) +from datadog_api_client.v2.model.test_optimization_flaky_tests_management_policies_update_request_data import ( + TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData, +) +from datadog_api_client.v2.model.test_optimization_get_flaky_tests_management_policies_request_data_type import ( + TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType, +) from datadog_api_client.v2.model.test_optimization_get_service_settings_request import ( TestOptimizationGetServiceSettingsRequest, ) @@ -6575,6 +6639,9 @@ TestOptimizationServiceSettingsResponse, ) from datadog_api_client.v2.model.test_optimization_service_settings_type import TestOptimizationServiceSettingsType +from datadog_api_client.v2.model.test_optimization_update_flaky_tests_management_policies_request_data_type import ( + TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType, +) from datadog_api_client.v2.model.test_optimization_update_service_settings_request import ( TestOptimizationUpdateServiceSettingsRequest, ) @@ -6624,22 +6691,8 @@ from datadog_api_client.v2.model.timeseries_response_values_list import TimeseriesResponseValuesList from datadog_api_client.v2.model.token_type import TokenType from datadog_api_client.v2.model.trigger import Trigger -from datadog_api_client.v2.model.trigger_attributes import TriggerAttributes -from datadog_api_client.v2.model.trigger_investigation_request import TriggerInvestigationRequest -from datadog_api_client.v2.model.trigger_investigation_request_data import TriggerInvestigationRequestData -from datadog_api_client.v2.model.trigger_investigation_request_data_attributes import ( - TriggerInvestigationRequestDataAttributes, -) -from datadog_api_client.v2.model.trigger_investigation_request_type import TriggerInvestigationRequestType -from datadog_api_client.v2.model.trigger_investigation_response import TriggerInvestigationResponse -from datadog_api_client.v2.model.trigger_investigation_response_data import TriggerInvestigationResponseData -from datadog_api_client.v2.model.trigger_investigation_response_data_attributes import ( - TriggerInvestigationResponseDataAttributes, -) -from datadog_api_client.v2.model.trigger_investigation_response_type import TriggerInvestigationResponseType from datadog_api_client.v2.model.trigger_rate_limit import TriggerRateLimit from datadog_api_client.v2.model.trigger_source import TriggerSource -from datadog_api_client.v2.model.trigger_type import TriggerType from datadog_api_client.v2.model.uc_config_pair import UCConfigPair from datadog_api_client.v2.model.uc_config_pair_data import UCConfigPairData from datadog_api_client.v2.model.uc_config_pair_data_attributes import UCConfigPairDataAttributes @@ -7128,6 +7181,16 @@ "AnyValue", "AnyValueItem", "AnyValueObject", + "ApmDependencyStatName", + "ApmDependencyStatsDataSource", + "ApmDependencyStatsQuery", + "ApmMetricsDataSource", + "ApmMetricsQuery", + "ApmMetricsSpanKind", + "ApmMetricsStat", + "ApmResourceStatName", + "ApmResourceStatsDataSource", + "ApmResourceStatsQuery", "ApmRetentionFilterType", "AppBuilderEvent", "AppBuilderEventName", @@ -7767,6 +7830,7 @@ "ConnectionsResponseMeta", "Container", "ContainerAttributes", + "ContainerDataSource", "ContainerGroup", "ContainerGroupAttributes", "ContainerGroupRelationships", @@ -7794,6 +7858,8 @@ "ContainerMeta", "ContainerMetaPage", "ContainerMetaPageType", + "ContainerScalarQuery", + "ContainerTimeseriesQuery", "ContainerType", "ContainersResponse", "ContainersResponseLinks", @@ -8718,10 +8784,6 @@ "GetFindingResponse", "GetInterfacesData", "GetInterfacesResponse", - "GetInvestigationResponse", - "GetInvestigationResponseData", - "GetInvestigationResponseDataAttributes", - "GetInvestigationResponseLinks", "GetIssueIncludeQueryParameterItem", "GetMappingResponse", "GetMappingResponseData", @@ -9092,8 +9154,6 @@ "IntegrationType", "InterfaceAttributes", "InterfaceAttributesStatus", - "InvestigationConclusion", - "InvestigationType", "Issue", "IssueAssigneeRelationship", "IssueAttributes", @@ -9362,12 +9422,6 @@ "ListIntegrationsResponse", "ListInterfaceTagsResponse", "ListInterfaceTagsResponseData", - "ListInvestigationsResponse", - "ListInvestigationsResponseData", - "ListInvestigationsResponseDataAttributes", - "ListInvestigationsResponseLinks", - "ListInvestigationsResponseMeta", - "ListInvestigationsResponseMetaPage", "ListKindCatalogResponse", "ListNotificationChannelsResponse", "ListOnCallNotificationRulesResponse", @@ -9616,7 +9670,6 @@ "MicrosoftTeamsWorkflowsWebhookHandleType", "MicrosoftTeamsWorkflowsWebhookHandlesResponse", "MicrosoftTeamsWorkflowsWebhookResponseAttributes", - "MonitorAlertTriggerAttributes", "MonitorConfigPolicyAttributeCreateRequest", "MonitorConfigPolicyAttributeEditRequest", "MonitorConfigPolicyAttributeResponse", @@ -10209,12 +10262,15 @@ "PowerpacksResponseMeta", "PowerpacksResponseMetaPagination", "PreviewEntityResponseData", + "ProcessDataSource", + "ProcessScalarQuery", "ProcessSummariesMeta", "ProcessSummariesMetaPage", "ProcessSummariesResponse", "ProcessSummary", "ProcessSummaryAttributes", "ProcessSummaryType", + "ProcessTimeseriesQuery", "ProductAnalyticsAnalyticsQuery", "ProductAnalyticsAnalyticsRequest", "ProductAnalyticsAnalyticsRequestAttributes", @@ -11108,6 +11164,8 @@ "SlackIntegrationMetadata", "SlackIntegrationMetadataChannelItem", "SlackTriggerWrapper", + "SloDataSource", + "SloQuery", "SloReportCreateRequest", "SloReportCreateRequestAttributes", "SloReportCreateRequestData", @@ -11115,6 +11173,9 @@ "SloStatusDataAttributes", "SloStatusResponse", "SloStatusType", + "SlosGroupMode", + "SlosMeasure", + "SlosQueryType", "Snapshot", "SnapshotArray", "SnapshotCreateRequest", @@ -11534,6 +11595,26 @@ "TestOptimizationDeleteServiceSettingsRequestAttributes", "TestOptimizationDeleteServiceSettingsRequestData", "TestOptimizationDeleteServiceSettingsRequestDataType", + "TestOptimizationFlakyTestsManagementPoliciesAttemptToFix", + "TestOptimizationFlakyTestsManagementPoliciesAttributes", + "TestOptimizationFlakyTestsManagementPoliciesAutoDisableRule", + "TestOptimizationFlakyTestsManagementPoliciesAutoQuarantineRule", + "TestOptimizationFlakyTestsManagementPoliciesBranchRule", + "TestOptimizationFlakyTestsManagementPoliciesData", + "TestOptimizationFlakyTestsManagementPoliciesDisabled", + "TestOptimizationFlakyTestsManagementPoliciesDisabledFailureRateRule", + "TestOptimizationFlakyTestsManagementPoliciesDisabledStatus", + "TestOptimizationFlakyTestsManagementPoliciesGetRequest", + "TestOptimizationFlakyTestsManagementPoliciesGetRequestAttributes", + "TestOptimizationFlakyTestsManagementPoliciesGetRequestData", + "TestOptimizationFlakyTestsManagementPoliciesQuarantined", + "TestOptimizationFlakyTestsManagementPoliciesQuarantinedFailureRateRule", + "TestOptimizationFlakyTestsManagementPoliciesResponse", + "TestOptimizationFlakyTestsManagementPoliciesType", + "TestOptimizationFlakyTestsManagementPoliciesUpdateRequest", + "TestOptimizationFlakyTestsManagementPoliciesUpdateRequestAttributes", + "TestOptimizationFlakyTestsManagementPoliciesUpdateRequestData", + "TestOptimizationGetFlakyTestsManagementPoliciesRequestDataType", "TestOptimizationGetServiceSettingsRequest", "TestOptimizationGetServiceSettingsRequestAttributes", "TestOptimizationGetServiceSettingsRequestData", @@ -11542,6 +11623,7 @@ "TestOptimizationServiceSettingsData", "TestOptimizationServiceSettingsResponse", "TestOptimizationServiceSettingsType", + "TestOptimizationUpdateFlakyTestsManagementPoliciesRequestDataType", "TestOptimizationUpdateServiceSettingsRequest", "TestOptimizationUpdateServiceSettingsRequestAttributes", "TestOptimizationUpdateServiceSettingsRequestData", @@ -11583,18 +11665,8 @@ "TimeseriesResponseValuesList", "TokenType", "Trigger", - "TriggerAttributes", - "TriggerInvestigationRequest", - "TriggerInvestigationRequestData", - "TriggerInvestigationRequestDataAttributes", - "TriggerInvestigationRequestType", - "TriggerInvestigationResponse", - "TriggerInvestigationResponseData", - "TriggerInvestigationResponseDataAttributes", - "TriggerInvestigationResponseType", "TriggerRateLimit", "TriggerSource", - "TriggerType", "UCConfigPair", "UCConfigPairData", "UCConfigPairDataAttributes", diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..a290b6c8ad --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:29.994Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..9a936323ee --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.yaml @@ -0,0 +1,25 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658329000,"queries":[{"data_source":"apm_dependency_stats","env":"ci","name":"a","operation_name":"cassandra.query","primary_tag_name":"datacenter","primary_tag_value":"edge-eu1.prod.dog","resource_name":"DELETE + FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id + IN ? AND group = ?","service":"cassandra","stat":"avg_duration"}],"to":1775661929000},"type":"scalar_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/scalar + response: + body: + string: "{\"data\":{\"id\":\"0\",\"type\":\"scalar_response\",\"attributes\"\ + :{\"columns\":[{\"name\":\"a\",\"values\":[],\"type\":\"number\",\"meta\"\ + :{\"unit\":[{\"family\":\"time\",\"name\":\"microsecond\",\"plural\":\"microseconds\"\ + ,\"scale_factor\":0.000001,\"short_name\":\"\u03BCs\",\"id\":9},null]}}]}}}" + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.frozen new file mode 100644 index 0000000000..833a68b8b5 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-09T18:41:04.011Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.yaml new file mode 100644 index 0000000000..e6bce30053 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775756464000,"queries":[{"data_source":"apm_metrics","group_by":["resource_name"],"name":"a","query_filter":"env:prod","service":"web-store","span_kind":"server","stat":"hits"}],"to":1775760064000},"type":"scalar_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/scalar + response: + body: + string: '{"data":{"id":"0","type":"scalar_response","attributes":{"columns":[{"name":"a","values":[],"type":"number","meta":{"unit":null}}]}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..936f633689 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:31.055Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..5d8f76d712 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_metrics_data_source_returns_ok_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658331000,"queries":[{"data_source":"apm_metrics","group_by":["resource_name"],"name":"a","query_filter":"env:prod","service":"web-store","stat":"hits"}],"to":1775661931000},"type":"scalar_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/scalar + response: + body: + string: '{"data":{"id":"0","type":"scalar_response","attributes":{"columns":[{"name":"a","values":[],"type":"number","meta":{"unit":null}}]}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..35a011fa28 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:31.243Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..3c5ab50bfc --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658331000,"queries":[{"data_source":"apm_resource_stats","env":"staging","group_by":["resource_name"],"name":"a","operation_name":"cassandra.query","primary_tag_name":"datacenter","primary_tag_value":"*","service":"azure-bill-import","stat":"hits"}],"to":1775661931000},"type":"scalar_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/scalar + response: + body: + string: '{"data":{"id":"0","type":"scalar_response","attributes":{"columns":[{"name":"a","values":[],"type":"number","meta":{"unit":null}}]}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_container_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_container_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..5a73cccc28 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_container_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:31.666Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_container_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_container_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..48c2eaefc2 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_container_data_source_returns_ok_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658331000,"queries":[{"aggregator":"avg","data_source":"container","limit":10,"metric":"process.stat.container.cpu.system_pct","name":"a","sort":"desc","tag_filters":[]}],"to":1775661931000},"type":"scalar_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/scalar + response: + body: + string: '{"data":{"id":"0","type":"scalar_response","attributes":{"columns":[{"name":"a","values":[],"type":"number","meta":{"unit":[{"family":"percentage","name":"percent","plural":"percent","scale_factor":1.0,"short_name":"%","id":17},null]}}]}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_process_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_process_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..aeb3bb6c4b --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_process_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:31.838Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_process_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_process_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..723b150c8f --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_process_data_source_returns_ok_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658331000,"queries":[{"aggregator":"avg","data_source":"process","is_normalized_cpu":false,"limit":10,"metric":"process.stat.cpu.total_pct","name":"a","sort":"desc","tag_filters":[],"text_filter":""}],"to":1775661931000},"type":"scalar_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/scalar + response: + body: + string: '{"data":{"id":"0","type":"scalar_response","attributes":{"columns":[{"name":"a","values":[],"type":"number","meta":{"unit":[{"family":"percentage","name":"percent","plural":"percent","scale_factor":1.0,"short_name":"%","id":17},null]}}]}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_slo_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_slo_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..1271a7e2cd --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_slo_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:32.018Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_slo_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_slo_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..3a3dbe8126 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_scalar_cross_product_query_with_slo_data_source_returns_ok_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658332000,"queries":[{"additional_query_filters":"*","data_source":"slo","group_mode":"overall","measure":"slo_status","name":"a","slo_id":"12345678910","slo_query_type":"metric"}],"to":1775661932000},"type":"scalar_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/scalar + response: + body: + string: '{"data":{"id":"0","type":"scalar_response","attributes":{"columns":[{"name":"a","values":[],"type":"number","meta":{"unit":[{"family":"percentage","name":"percent","plural":"percent","scale_factor":1.0,"short_name":"%","id":17},null]}}]}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..8d85e07f10 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:32.147Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..63802e9378 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_dependency_stats_data_source_returns_ok_response.yaml @@ -0,0 +1,24 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658332000,"interval":5000,"queries":[{"data_source":"apm_dependency_stats","env":"ci","name":"a","operation_name":"cassandra.query","primary_tag_name":"datacenter","primary_tag_value":"edge-eu1.prod.dog","resource_name":"DELETE + FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id + IN ? AND group = ?","service":"cassandra","stat":"avg_duration"}],"to":1775661932000},"type":"timeseries_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/timeseries + response: + body: + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.frozen new file mode 100644 index 0000000000..c772bf9ce5 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-09T18:41:05.084Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.yaml new file mode 100644 index 0000000000..c342b783fb --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_and_span_kind_returns_ok_response.yaml @@ -0,0 +1,22 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775756465000,"interval":5000,"queries":[{"data_source":"apm_metrics","group_by":["resource_name"],"name":"a","query_filter":"env:prod","service":"web-store","span_kind":"server","stat":"hits"}],"to":1775760065000},"type":"timeseries_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/timeseries + response: + body: + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..316785c3cf --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:32.363Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..afa117bc1b --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_metrics_data_source_returns_ok_response.yaml @@ -0,0 +1,22 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658332000,"interval":5000,"queries":[{"data_source":"apm_metrics","group_by":["resource_name"],"name":"a","query_filter":"env:prod","service":"web-store","stat":"hits"}],"to":1775661932000},"type":"timeseries_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/timeseries + response: + body: + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..c4bed5aa5b --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:32.570Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..ba5864b377 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_apm_resource_stats_data_source_returns_ok_response.yaml @@ -0,0 +1,22 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658332000,"interval":5000,"queries":[{"data_source":"apm_resource_stats","env":"staging","group_by":["resource_name"],"name":"a","operation_name":"cassandra.query","primary_tag_name":"datacenter","primary_tag_value":"*","service":"azure-bill-import","stat":"hits"}],"to":1775661932000},"type":"timeseries_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/timeseries + response: + body: + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_container_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_container_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..0b3ec01894 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_container_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:32.715Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_container_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_container_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..5b12acecff --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_container_data_source_returns_ok_response.yaml @@ -0,0 +1,22 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658332000,"interval":5000,"queries":[{"data_source":"container","limit":10,"metric":"process.stat.container.cpu.system_pct","name":"a","sort":"desc","tag_filters":[]}],"to":1775661932000},"type":"timeseries_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/timeseries + response: + body: + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_process_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_process_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..1ef87ffbe1 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_process_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:32.912Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_process_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_process_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..e90e6776fa --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_process_data_source_returns_ok_response.yaml @@ -0,0 +1,22 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658332000,"interval":5000,"queries":[{"data_source":"process","is_normalized_cpu":false,"limit":10,"metric":"process.stat.cpu.total_pct","name":"a","sort":"desc","tag_filters":[],"text_filter":""}],"to":1775661932000},"type":"timeseries_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/timeseries + response: + body: + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_slo_data_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_slo_data_source_returns_ok_response.frozen new file mode 100644 index 0000000000..03ed54b79c --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_slo_data_source_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-04-08T15:25:33.123Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_slo_data_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_slo_data_source_returns_ok_response.yaml new file mode 100644 index 0000000000..232ae9b5f7 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_timeseries_cross_product_query_with_slo_data_source_returns_ok_response.yaml @@ -0,0 +1,22 @@ +interactions: +- request: + body: '{"data":{"attributes":{"formulas":[{"formula":"a","limit":{"count":10,"order":"desc"}}],"from":1775658333000,"interval":5000,"queries":[{"additional_query_filters":"*","data_source":"slo","group_mode":"overall","measure":"slo_status","name":"a","slo_id":"12345678910","slo_query_type":"metric"}],"to":1775661933000},"type":"timeseries_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/query/timeseries + response: + body: + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/features/bits_ai.feature b/tests/v2/features/bits_ai.feature deleted file mode 100644 index bc5ec941d8..0000000000 --- a/tests/v2/features/bits_ai.feature +++ /dev/null @@ -1,69 +0,0 @@ -@endpoint(bits-ai) @endpoint(bits-ai-v2) -Feature: Bits AI - Use the Bits AI endpoints to retrieve AI-powered investigations. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "BitsAI" API - - @generated @skip @team:DataDog/bits-ai - Scenario: Get a Bits AI investigation returns "Bad Request" response - Given operation "GetInvestigation" enabled - And new "GetInvestigation" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/bits-ai - Scenario: Get a Bits AI investigation returns "Not Found" response - Given operation "GetInvestigation" enabled - And new "GetInvestigation" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/bits-ai - Scenario: Get a Bits AI investigation returns "OK" response - Given operation "GetInvestigation" enabled - And new "GetInvestigation" request - And request contains "id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/bits-ai - Scenario: List Bits AI investigations returns "Bad Request" response - Given operation "ListInvestigations" enabled - And new "ListInvestigations" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/bits-ai - Scenario: List Bits AI investigations returns "OK" response - Given operation "ListInvestigations" enabled - And new "ListInvestigations" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/bits-ai @with-pagination - Scenario: List Bits AI investigations returns "OK" response with pagination - Given operation "ListInvestigations" enabled - And new "ListInvestigations" request - When the request with pagination is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/bits-ai - Scenario: Trigger a Bits AI investigation returns "Bad Request" response - Given operation "TriggerInvestigation" enabled - And new "TriggerInvestigation" request - And body with value {"data": {"attributes": {"trigger": {"monitor_alert_trigger": {"event_id": "1234567890123456789", "event_ts": 1700000000000, "monitor_id": 12345678}, "type": "monitor_alert_trigger"}}, "type": "trigger_investigation_request"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/bits-ai - Scenario: Trigger a Bits AI investigation returns "OK" response - Given operation "TriggerInvestigation" enabled - And new "TriggerInvestigation" request - And body with value {"data": {"attributes": {"trigger": {"monitor_alert_trigger": {"event_id": "1234567890123456789", "event_ts": 1700000000000, "monitor_id": 12345678}, "type": "monitor_alert_trigger"}}, "type": "trigger_investigation_request"}} - When the request is sent - Then the response status is 200 OK diff --git a/tests/v2/features/metrics.feature b/tests/v2/features/metrics.feature index 41e753dfb3..99f1714d9c 100644 --- a/tests/v2/features/metrics.feature +++ b/tests/v2/features/metrics.feature @@ -344,6 +344,69 @@ Feature: Metrics And the response "data.type" is equal to "scalar_response" And the response "data.attributes.columns[0].name" is equal to "a" + @skip-validation @team:Datadog/timeseries-query + Scenario: Scalar cross product query with apm_dependency_stats data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryScalarData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "apm_dependency_stats", "name": "a", "env": "ci", "service": "cassandra", "stat": "avg_duration", "operation_name": "cassandra.query", "resource_name": "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?", "primary_tag_name": "datacenter", "primary_tag_value": "edge-eu1.prod.dog"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "scalar_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Scalar cross product query with apm_metrics data source and span_kind returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryScalarData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "apm_metrics", "name": "a", "stat": "hits", "service": "web-store", "query_filter": "env:prod", "span_kind": "server", "group_by": ["resource_name"]}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "scalar_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Scalar cross product query with apm_metrics data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryScalarData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "apm_metrics", "name": "a", "stat": "hits", "service": "web-store", "query_filter": "env:prod", "group_by": ["resource_name"]}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "scalar_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Scalar cross product query with apm_resource_stats data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryScalarData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "apm_resource_stats", "name": "a", "env": "staging", "service": "azure-bill-import", "stat": "hits", "operation_name": "cassandra.query", "group_by": ["resource_name"], "primary_tag_name": "datacenter", "primary_tag_value": "*"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "scalar_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Scalar cross product query with container data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryScalarData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "container", "name": "a", "metric": "process.stat.container.cpu.system_pct", "aggregator": "avg", "tag_filters": [], "limit": 10, "sort": "desc"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "scalar_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Scalar cross product query with process data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryScalarData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "process", "name": "a", "metric": "process.stat.cpu.total_pct", "aggregator": "avg", "text_filter": "", "tag_filters": [], "limit": 10, "sort": "desc", "is_normalized_cpu": false}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "scalar_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Scalar cross product query with slo data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryScalarData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "slo", "name": "a", "slo_id": "12345678910", "measure": "slo_status", "slo_query_type": "metric", "group_mode": "overall", "additional_query_filters": "*"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "scalar_response" + @generated @skip @team:DataDog/metrics-intake Scenario: Submit metrics returns "Bad Request" response Given new "SubmitMetrics" request @@ -415,6 +478,69 @@ Feature: Metrics Then the response status is 200 OK And the response "data.type" is equal to "timeseries_response" + @skip-validation @team:Datadog/timeseries-query + Scenario: Timeseries cross product query with apm_dependency_stats data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryTimeseriesData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "apm_dependency_stats", "name": "a", "env": "ci", "service": "cassandra", "stat": "avg_duration", "operation_name": "cassandra.query", "resource_name": "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?", "primary_tag_name": "datacenter", "primary_tag_value": "edge-eu1.prod.dog"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "timeseries_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Timeseries cross product query with apm_metrics data source and span_kind returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryTimeseriesData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "apm_metrics", "name": "a", "stat": "hits", "service": "web-store", "query_filter": "env:prod", "span_kind": "server", "group_by": ["resource_name"]}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "timeseries_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Timeseries cross product query with apm_metrics data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryTimeseriesData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "apm_metrics", "name": "a", "stat": "hits", "service": "web-store", "query_filter": "env:prod", "group_by": ["resource_name"]}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "timeseries_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Timeseries cross product query with apm_resource_stats data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryTimeseriesData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "apm_resource_stats", "name": "a", "env": "staging", "service": "azure-bill-import", "stat": "hits", "operation_name": "cassandra.query", "group_by": ["resource_name"], "primary_tag_name": "datacenter", "primary_tag_value": "*"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "timeseries_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Timeseries cross product query with container data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryTimeseriesData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "container", "name": "a", "metric": "process.stat.container.cpu.system_pct", "tag_filters": [], "limit": 10, "sort": "desc"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "timeseries_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Timeseries cross product query with process data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryTimeseriesData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "process", "name": "a", "metric": "process.stat.cpu.total_pct", "text_filter": "", "tag_filters": [], "limit": 10, "sort": "desc", "is_normalized_cpu": false}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "timeseries_response" + + @skip-validation @team:Datadog/timeseries-query + Scenario: Timeseries cross product query with slo data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryTimeseriesData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "slo", "name": "a", "slo_id": "12345678910", "measure": "slo_status", "slo_query_type": "metric", "group_mode": "overall", "additional_query_filters": "*"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "timeseries_response" + @generated @skip @team:DataDog/metrics-experience Scenario: Update a tag configuration returns "Bad Request" response Given a valid "appKeyAuth" key in the system diff --git a/tests/v2/features/test_optimization.feature b/tests/v2/features/test_optimization.feature index 427db05baf..eeeec1dd34 100644 --- a/tests/v2/features/test_optimization.feature +++ b/tests/v2/features/test_optimization.feature @@ -33,6 +33,38 @@ Feature: Test Optimization When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get Flaky Tests Management policies returns "Bad Request" response + Given operation "GetFlakyTestsManagementPolicies" enabled + And new "GetFlakyTestsManagementPolicies" request + And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get Flaky Tests Management policies returns "Not Found" response + Given operation "GetFlakyTestsManagementPolicies" enabled + And new "GetFlakyTestsManagementPolicies" request + And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get Flaky Tests Management policies returns "OK" response + Given operation "GetFlakyTestsManagementPolicies" enabled + And new "GetFlakyTestsManagementPolicies" request + And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}} + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/ci-app-backend + Scenario: Get Flaky Tests Management policies with empty repository_id returns bad request + Given operation "GetFlakyTestsManagementPolicies" enabled + And new "GetFlakyTestsManagementPolicies" request + And body with value {"data": {"attributes": {"repository_id": ""}, "type": "test_optimization_get_flaky_tests_management_policies_request"}} + When the request is sent + Then the response status is 400 Bad Request + @generated @skip @team:DataDog/ci-app-backend Scenario: Get Test Optimization service settings returns "Bad Request" response Given operation "GetTestOptimizationServiceSettings" enabled @@ -133,6 +165,38 @@ Feature: Test Optimization When the request with pagination is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend + Scenario: Update Flaky Tests Management policies returns "Bad Request" response + Given operation "UpdateFlakyTestsManagementPolicies" enabled + And new "UpdateFlakyTestsManagementPolicies" request + And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Update Flaky Tests Management policies returns "Not Found" response + Given operation "UpdateFlakyTestsManagementPolicies" enabled + And new "UpdateFlakyTestsManagementPolicies" request + And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Update Flaky Tests Management policies returns "OK" response + Given operation "UpdateFlakyTestsManagementPolicies" enabled + And new "UpdateFlakyTestsManagementPolicies" request + And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}} + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/ci-app-backend + Scenario: Update Flaky Tests Management policies with empty repository_id returns bad request + Given operation "UpdateFlakyTestsManagementPolicies" enabled + And new "UpdateFlakyTestsManagementPolicies" request + And body with value {"data": {"attributes": {"repository_id": ""}, "type": "test_optimization_update_flaky_tests_management_policies_request"}} + When the request is sent + Then the response status is 400 Bad Request + @generated @skip @team:DataDog/ci-app-backend Scenario: Update Test Optimization service settings returns "Bad Request" response Given operation "UpdateTestOptimizationServiceSettings" enabled diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index db3aeec910..4245804e18 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -650,24 +650,6 @@ "type": "idempotent" } }, - "ListInvestigations": { - "tag": "Bits AI", - "undo": { - "type": "safe" - } - }, - "TriggerInvestigation": { - "tag": "Bits AI", - "undo": { - "type": "unsafe" - } - }, - "GetInvestigation": { - "tag": "Bits AI", - "undo": { - "type": "safe" - } - }, "SearchCases": { "tag": "Case Management", "undo": { @@ -1054,6 +1036,18 @@ "type": "safe" } }, + "UpdateFlakyTestsManagementPolicies": { + "tag": "Test Optimization", + "undo": { + "type": "unsafe" + } + }, + "GetFlakyTestsManagementPolicies": { + "tag": "Test Optimization", + "undo": { + "type": "safe" + } + }, "DeleteTestOptimizationServiceSettings": { "tag": "Test Optimization", "undo": {