From 97e66a713ac0ffe4d1d5a8a0dda14124a9840fcc Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 13 Apr 2026 18:35:41 +0000 Subject: [PATCH] Regenerate client from commit 3d75db3 of spec repo --- .generator/schemas/v2/openapi.yaml | 1576 ++++++++--------- ...ats-data-source-returns-OK-response.frozen | 1 + ...-stats-data-source-returns-OK-response.yml | 29 + ...e-and-span-kind-returns-OK-response.frozen | 1 + ...urce-and-span-kind-returns-OK-response.yml | 24 + ...ics-data-source-returns-OK-response.frozen | 1 + ...etrics-data-source-returns-OK-response.yml | 24 + ...ats-data-source-returns-OK-response.frozen | 1 + ...-stats-data-source-returns-OK-response.yml | 24 + ...ner-data-source-returns-OK-response.frozen | 1 + ...tainer-data-source-returns-OK-response.yml | 24 + ...ess-data-source-returns-OK-response.frozen | 1 + ...rocess-data-source-returns-OK-response.yml | 24 + ...slo-data-source-returns-OK-response.frozen | 1 + ...th-slo-data-source-returns-OK-response.yml | 24 + ...ats-data-source-returns-OK-response.frozen | 1 + ...-stats-data-source-returns-OK-response.yml | 28 + ...e-and-span-kind-returns-OK-response.frozen | 1 + ...urce-and-span-kind-returns-OK-response.yml | 26 + ...ics-data-source-returns-OK-response.frozen | 1 + ...etrics-data-source-returns-OK-response.yml | 26 + ...ats-data-source-returns-OK-response.frozen | 1 + ...-stats-data-source-returns-OK-response.yml | 26 + ...ner-data-source-returns-OK-response.frozen | 1 + ...tainer-data-source-returns-OK-response.yml | 26 + ...ess-data-source-returns-OK-response.frozen | 1 + ...rocess-data-source-returns-OK-response.yml | 26 + ...slo-data-source-returns-OK-response.frozen | 1 + ...th-slo-data-source-returns-OK-response.yml | 26 + .../CreateDashboardSecureEmbed.rb | 38 - .../DeleteDashboardSecureEmbed.rb | 8 - .../GetDashboardSecureEmbed.rb | 8 - .../UpdateDashboardSecureEmbed.rb | 38 - .../v2/metrics/QueryScalarData_1479548882.rb | 39 + .../v2/metrics/QueryScalarData_1904811219.rb | 36 + .../v2/metrics/QueryScalarData_2298288525.rb | 35 + .../v2/metrics/QueryScalarData_2533499017.rb | 37 + .../v2/metrics/QueryScalarData_4230617918.rb | 37 + .../v2/metrics/QueryScalarData_779493885.rb | 37 + .../v2/metrics/QueryScalarData_891952130.rb | 35 + .../metrics/QueryTimeseriesData_108927825.rb | 36 + .../metrics/QueryTimeseriesData_2159746306.rb | 37 + .../metrics/QueryTimeseriesData_3174309318.rb | 35 + .../metrics/QueryTimeseriesData_3535807425.rb | 38 + .../metrics/QueryTimeseriesData_4028506518.rb | 40 + .../metrics/QueryTimeseriesData_4246412951.rb | 37 + .../metrics/QueryTimeseriesData_847716941.rb | 38 + features/scenarios_model_mapping.rb | 17 - features/v2/dashboard_secure_embed.feature | 99 -- features/v2/metrics.feature | 126 ++ features/v2/undo.json | 35 - lib/datadog_api_client/configuration.rb | 4 - lib/datadog_api_client/inflector.rb | 49 +- .../v2/api/dashboard_secure_embed_api.rb | 339 ---- ...ve_span.rb => apm_dependency_stat_name.rb} | 19 +- ...rb => apm_dependency_stats_data_source.rb} | 6 +- .../v2/models/apm_dependency_stats_query.rb | 279 +++ ...are_type.rb => apm_metrics_data_source.rb} | 6 +- .../v2/models/apm_metrics_query.rb | 259 +++ .../v2/models/apm_metrics_span_kind.rb | 30 + .../v2/models/apm_metrics_stat.rb | 41 + .../v2/models/apm_resource_stat_name.rb | 37 + ...e.rb => apm_resource_stats_data_source.rb} | 6 +- .../v2/models/apm_resource_stats_query.rb | 259 +++ ...quest_type.rb => container_data_source.rb} | 6 +- .../v2/models/container_scalar_query.rb | 227 +++ .../v2/models/container_timeseries_query.rb | 217 +++ .../v2/models/events_data_source.rb | 11 + .../v2/models/events_scalar_query.rb | 2 +- .../v2/models/events_timeseries_query.rb | 2 +- .../v2/models/metrics_scalar_query.rb | 2 +- .../v2/models/metrics_timeseries_query.rb | 2 +- ...lity_pipeline_parse_grok_processor_rule.rb | 2 +- .../v2/models/process_data_source.rb | 26 + .../v2/models/process_scalar_query.rb | 227 +++ .../v2/models/process_timeseries_query.rb | 217 +++ .../v2/models/scalar_query.rb | 8 +- .../v2/models/secure_embed_create_request.rb | 123 -- .../secure_embed_create_request_attributes.rb | 230 --- .../secure_embed_create_request_data.rb | 144 -- .../v2/models/secure_embed_create_response.rb | 123 -- ...secure_embed_create_response_attributes.rb | 227 --- .../secure_embed_create_response_data.rb | 165 -- .../v2/models/secure_embed_get_response.rb | 123 -- .../secure_embed_get_response_attributes.rb | 227 --- .../models/secure_embed_get_response_data.rb | 165 -- .../v2/models/secure_embed_global_time.rb | 105 -- ...cure_embed_selectable_template_variable.rb | 139 -- .../v2/models/secure_embed_status.rb | 27 - .../v2/models/secure_embed_update_request.rb | 123 -- .../secure_embed_update_request_attributes.rb | 157 -- .../secure_embed_update_request_data.rb | 144 -- .../v2/models/secure_embed_update_response.rb | 123 -- ...secure_embed_update_response_attributes.rb | 227 --- .../secure_embed_update_response_data.rb | 165 -- .../secure_embed_update_response_type.rb | 26 - .../secure_embed_viewing_preferences.rb | 115 -- .../secure_embed_viewing_preferences_theme.rb | 28 - .../v2/models/slo_data_source.rb | 26 + lib/datadog_api_client/v2/models/slo_query.rb | 205 +++ .../v2/models/slos_group_mode.rb | 27 + .../v2/models/slos_measure.rb | 35 + ...te_response_type.rb => slos_query_type.rb} | 8 +- .../v2/models/timeseries_query.rb | 8 +- 104 files changed, 3936 insertions(+), 4395 deletions(-) create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-container-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-container-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-process-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-process-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-slo-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Scalar-cross-product-query-with-slo-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-container-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-container-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-process-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-process-data-source-returns-OK-response.yml create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-slo-data-source-returns-OK-response.frozen create mode 100644 cassettes/features/v2/metrics/Timeseries-cross-product-query-with-slo-data-source-returns-OK-response.yml delete mode 100644 examples/v2/dashboard-secure-embed/CreateDashboardSecureEmbed.rb delete mode 100644 examples/v2/dashboard-secure-embed/DeleteDashboardSecureEmbed.rb delete mode 100644 examples/v2/dashboard-secure-embed/GetDashboardSecureEmbed.rb delete mode 100644 examples/v2/dashboard-secure-embed/UpdateDashboardSecureEmbed.rb create mode 100644 examples/v2/metrics/QueryScalarData_1479548882.rb create mode 100644 examples/v2/metrics/QueryScalarData_1904811219.rb create mode 100644 examples/v2/metrics/QueryScalarData_2298288525.rb create mode 100644 examples/v2/metrics/QueryScalarData_2533499017.rb create mode 100644 examples/v2/metrics/QueryScalarData_4230617918.rb create mode 100644 examples/v2/metrics/QueryScalarData_779493885.rb create mode 100644 examples/v2/metrics/QueryScalarData_891952130.rb create mode 100644 examples/v2/metrics/QueryTimeseriesData_108927825.rb create mode 100644 examples/v2/metrics/QueryTimeseriesData_2159746306.rb create mode 100644 examples/v2/metrics/QueryTimeseriesData_3174309318.rb create mode 100644 examples/v2/metrics/QueryTimeseriesData_3535807425.rb create mode 100644 examples/v2/metrics/QueryTimeseriesData_4028506518.rb create mode 100644 examples/v2/metrics/QueryTimeseriesData_4246412951.rb create mode 100644 examples/v2/metrics/QueryTimeseriesData_847716941.rb delete mode 100644 features/v2/dashboard_secure_embed.feature delete mode 100644 lib/datadog_api_client/v2/api/dashboard_secure_embed_api.rb rename lib/datadog_api_client/v2/models/{secure_embed_global_time_live_span.rb => apm_dependency_stat_name.rb} (59%) rename lib/datadog_api_client/v2/models/{secure_embed_get_response_type.rb => apm_dependency_stats_data_source.rb} (79%) create mode 100644 lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb rename lib/datadog_api_client/v2/models/{secure_embed_share_type.rb => apm_metrics_data_source.rb} (83%) create mode 100644 lib/datadog_api_client/v2/models/apm_metrics_query.rb create mode 100644 lib/datadog_api_client/v2/models/apm_metrics_span_kind.rb create mode 100644 lib/datadog_api_client/v2/models/apm_metrics_stat.rb create mode 100644 lib/datadog_api_client/v2/models/apm_resource_stat_name.rb rename lib/datadog_api_client/v2/models/{secure_embed_update_request_type.rb => apm_resource_stats_data_source.rb} (78%) create mode 100644 lib/datadog_api_client/v2/models/apm_resource_stats_query.rb rename lib/datadog_api_client/v2/models/{secure_embed_request_type.rb => container_data_source.rb} (80%) create mode 100644 lib/datadog_api_client/v2/models/container_scalar_query.rb create mode 100644 lib/datadog_api_client/v2/models/container_timeseries_query.rb create mode 100644 lib/datadog_api_client/v2/models/process_data_source.rb create mode 100644 lib/datadog_api_client/v2/models/process_scalar_query.rb create mode 100644 lib/datadog_api_client/v2/models/process_timeseries_query.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_create_request.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_create_request_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_create_request_data.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_create_response.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_create_response_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_create_response_data.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_get_response.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_get_response_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_get_response_data.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_global_time.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_selectable_template_variable.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_status.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_update_request_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_update_request_data.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_update_response.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_update_response_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_update_response_data.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_update_response_type.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_viewing_preferences.rb delete mode 100644 lib/datadog_api_client/v2/models/secure_embed_viewing_preferences_theme.rb create mode 100644 lib/datadog_api_client/v2/models/slo_data_source.rb create mode 100644 lib/datadog_api_client/v2/models/slo_query.rb create mode 100644 lib/datadog_api_client/v2/models/slos_group_mode.rb create mode 100644 lib/datadog_api_client/v2/models/slos_measure.rb rename lib/datadog_api_client/v2/models/{secure_embed_create_response_type.rb => slos_query_type.rb} (77%) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 68924d70079a..ee63ef140850 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -347,14 +347,6 @@ components: required: true schema: type: string - DashboardIDPathParameter: - description: The ID of the dashboard. - example: "abc-def-ghi" - in: path - name: dashboard_id - required: true - schema: - type: string DatasetID: description: The ID of a defined dataset. example: "0879ce27-29a1-481f-a12e-bc2a48ec9ae1" @@ -1317,14 +1309,6 @@ components: items: $ref: "#/components/schemas/SearchIssuesIncludeQueryParameterItem" type: array - SecureEmbedTokenPathParameter: - description: The share token identifying the secure embed. - example: "s3cur3t0k3n-abcdef123456" - in: path - name: token - required: true - schema: - type: string SecurityFilterID: description: The ID of the security filter. in: path @@ -4033,6 +4017,293 @@ 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: >- + A query for APM dependency statistics between services, such as call latency and error rates. + 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: >- + A query for APM trace metrics such as hits, errors, and latency percentiles, aggregated across services. + 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: >- + A query for APM resource statistics such as latency, error rate, and hit count, grouped by resource name. + 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. @@ -14121,6 +14392,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: @@ -14532,6 +14812,82 @@ components: type: string x-enum-varnames: - CURSOR_LIMIT + ContainerScalarQuery: + description: A query for container-level metrics such as CPU and memory usage. + 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: A query for container-level metrics such as CPU and memory usage. + 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. @@ -25141,13 +25497,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. @@ -25316,7 +25694,8 @@ components: type: string type: object EventsScalarQuery: - description: An individual scalar events query. + description: >- + An individual scalar query for logs, RUM, traces, CI pipelines, security signals, and other event-based data sources. Use this query type for any data source powered by the Events Platform. See the data_source field for the full list of supported sources. properties: compute: $ref: "#/components/schemas/EventsCompute" @@ -25368,7 +25747,8 @@ components: - ALPHABETICAL - MEASURE EventsTimeseriesQuery: - description: An individual timeseries events query. + description: >- + An individual timeseries query for logs, RUM, traces, CI pipelines, security signals, and other event-based data sources. Use this query type for any data source powered by the Events Platform. See the data_source field for the full list of supported sources. properties: compute: $ref: "#/components/schemas/EventsCompute" @@ -41622,7 +42002,7 @@ components: type: string type: object MetricsScalarQuery: - description: An individual scalar metrics query. + description: A query against Datadog custom metrics or Cloud Cost data sources. properties: aggregator: $ref: "#/components/schemas/MetricsAggregator" @@ -41641,7 +42021,7 @@ components: - aggregator type: object MetricsTimeseriesQuery: - description: An individual timeseries metrics query. + description: A query against Datadog custom metrics or Cloud Cost data sources. properties: data_source: $ref: "#/components/schemas/MetricsDataSource" @@ -46626,7 +47006,7 @@ components: $ref: "#/components/schemas/ObservabilityPipelineParseGrokProcessorRuleMatchRule" type: array source: - description: The name of the field in the log event to apply the Grok rules to. + description: The value of the source field in log events to be processed by the Grok rules. example: "message" type: string support_rules: @@ -52091,6 +52471,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: A query for host-level process metrics such as CPU and memory usage. + 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: @@ -52177,6 +52605,43 @@ components: type: string x-enum-varnames: - PROCESS + ProcessTimeseriesQuery: + description: A query for host-level process metrics such as CPU and memory usage. + 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: @@ -58380,6 +58845,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: @@ -59350,469 +59821,6 @@ components: type: string x-enum-varnames: - SECRET_RULE - SecureEmbedCreateRequest: - description: Request to create a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedCreateRequestData" - required: - - data - type: object - SecureEmbedCreateRequestAttributes: - description: Attributes for creating a secure embed shared dashboard. - properties: - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Whether viewers can change the time range. - example: true - type: boolean - selectable_template_vars: - description: Template variables viewers can modify. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Display title for the shared dashboard. - example: "Q1 Metrics Dashboard" - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - required: - - status - - title - - global_time_selectable - - selectable_template_vars - - viewing_preferences - - global_time - type: object - SecureEmbedCreateRequestData: - description: Data object for creating a secure embed. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedCreateRequestAttributes" - type: - $ref: "#/components/schemas/SecureEmbedRequestType" - required: - - type - - attributes - type: object - SecureEmbedCreateResponse: - description: Response for creating a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedCreateResponseData" - required: - - data - type: object - SecureEmbedCreateResponseAttributes: - description: Attributes of a newly created secure embed shared dashboard. - properties: - created_at: - description: Creation timestamp. - example: "2026-03-11T18:30:00.000000" - readOnly: true - type: string - credential: - description: >- - The secret credential used for HMAC signing. Returned only on creation. Store securely — it cannot be retrieved again. - example: "A1b2C3d4E5f6G7h8I9j0K1l2M3n4O5p6Q7r8S9t0U1v2" - readOnly: true - type: string - dashboard_id: - description: The source dashboard ID. - example: "abc-def-ghi" - readOnly: true - type: string - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Whether time range is viewer-selectable. - example: true - type: boolean - id: - description: Internal share ID. - example: "12345" - readOnly: true - type: string - selectable_template_vars: - description: Template variables with their configuration. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - share_type: - $ref: "#/components/schemas/SecureEmbedShareType" - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Display title. - example: "Q1 Metrics Dashboard" - type: string - token: - description: Public share token. - example: "s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - url: - description: CDN URL for the shared dashboard. - example: "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - type: object - SecureEmbedCreateResponseData: - description: Data object for a secure embed create response. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedCreateResponseAttributes" - id: - description: Internal share ID. - example: "12345" - type: string - type: - $ref: "#/components/schemas/SecureEmbedCreateResponseType" - required: - - type - - id - - attributes - type: object - SecureEmbedCreateResponseType: - description: Resource type for secure embed create responses. - enum: - - secure_embed_create_response - example: "secure_embed_create_response" - type: string - x-enum-varnames: - - SECURE_EMBED_CREATE_RESPONSE - SecureEmbedGetResponse: - description: Response for getting a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedGetResponseData" - required: - - data - type: object - SecureEmbedGetResponseAttributes: - description: Attributes of an existing secure embed shared dashboard. - properties: - created_at: - description: Creation timestamp. - example: "2026-03-11T18:30:00.000000" - readOnly: true - type: string - credential_suffix: - description: Last 4 characters of the credential. Defaults to `0000` if unavailable. - example: "ab3f" - readOnly: true - type: string - dashboard_id: - description: The source dashboard ID. - example: "abc-def-ghi" - readOnly: true - type: string - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Whether time range is viewer-selectable. - example: true - type: boolean - id: - description: Internal share ID. - example: "12345" - readOnly: true - type: string - selectable_template_vars: - description: Template variables with their configuration. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - share_type: - $ref: "#/components/schemas/SecureEmbedShareType" - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Display title. - example: "Q1 Metrics Dashboard" - type: string - token: - description: Public share token. - example: "s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - url: - description: CDN URL for the shared dashboard. - example: "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - type: object - SecureEmbedGetResponseData: - description: Data object for a secure embed get response. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedGetResponseAttributes" - id: - description: Internal share ID. - example: "12345" - type: string - type: - $ref: "#/components/schemas/SecureEmbedGetResponseType" - required: - - type - - id - - attributes - type: object - SecureEmbedGetResponseType: - description: Resource type for secure embed get responses. - enum: - - secure_embed_get_response - example: "secure_embed_get_response" - type: string - x-enum-varnames: - - SECURE_EMBED_GET_RESPONSE - SecureEmbedGlobalTime: - description: Default time range configuration for the secure embed. - properties: - live_span: - $ref: "#/components/schemas/SecureEmbedGlobalTimeLiveSpan" - type: object - SecureEmbedGlobalTimeLiveSpan: - description: Dashboard global time live_span selection. - enum: - - 15m - - 1h - - 4h - - 1d - - 2d - - 1w - - 1mo - - 3mo - example: "1h" - type: string - x-enum-varnames: - - PAST_FIFTEEN_MINUTES - - PAST_ONE_HOUR - - PAST_FOUR_HOURS - - PAST_ONE_DAY - - PAST_TWO_DAYS - - PAST_ONE_WEEK - - PAST_ONE_MONTH - - PAST_THREE_MONTHS - SecureEmbedRequestType: - description: Resource type for secure embed create requests. - enum: - - secure_embed_request - example: "secure_embed_request" - type: string - x-enum-varnames: - - SECURE_EMBED_REQUEST - SecureEmbedSelectableTemplateVariable: - description: A template variable that viewers can modify on the secure embed shared dashboard. - properties: - default_values: - description: Default selected values for the variable. - example: ["1"] - items: - description: A default value for the template variable. - type: string - type: array - name: - description: Name of the template variable. Usually matches the prefix unless you want a different display name. - example: "org_id" - type: string - prefix: - description: Tag prefix for the variable (e.g., `environment`, `service`). - example: "org_id" - type: string - visible_tags: - description: Restrict which tag values are visible to the viewer. - example: ["1"] - items: - description: A visible tag value for the template variable. - type: string - type: array - type: object - SecureEmbedShareType: - description: The type of share. Always `secure_embed`. - enum: - - secure_embed - example: "secure_embed" - type: string - x-enum-varnames: - - SECURE_EMBED - SecureEmbedStatus: - description: The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - enum: - - active - - paused - example: "active" - type: string - x-enum-varnames: - - ACTIVE - - PAUSED - SecureEmbedUpdateRequest: - description: Request to update a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedUpdateRequestData" - required: - - data - type: object - SecureEmbedUpdateRequestAttributes: - description: Attributes for updating a secure embed shared dashboard. All fields are optional. - properties: - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Updated time selectability. - example: true - type: boolean - selectable_template_vars: - description: Updated template variables. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Updated title. - example: "Q1 Metrics Dashboard (Updated)" - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - type: object - SecureEmbedUpdateRequestData: - description: Data object for updating a secure embed. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedUpdateRequestAttributes" - type: - $ref: "#/components/schemas/SecureEmbedUpdateRequestType" - required: - - type - - attributes - type: object - SecureEmbedUpdateRequestType: - description: Resource type for secure embed update requests. - enum: - - secure_embed_update_request - example: "secure_embed_update_request" - type: string - x-enum-varnames: - - SECURE_EMBED_UPDATE_REQUEST - SecureEmbedUpdateResponse: - description: Response for updating a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedUpdateResponseData" - required: - - data - type: object - SecureEmbedUpdateResponseAttributes: - description: Attributes of an updated secure embed shared dashboard. - properties: - created_at: - description: Creation timestamp. - example: "2026-03-11T18:30:00.000000" - readOnly: true - type: string - credential_suffix: - description: Last 4 characters of the credential. Defaults to `0000` if unavailable. - example: "ab3f" - readOnly: true - type: string - dashboard_id: - description: The source dashboard ID. - example: "abc-def-ghi" - readOnly: true - type: string - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Whether time range is viewer-selectable. - example: true - type: boolean - id: - description: Internal share ID. - example: "12345" - readOnly: true - type: string - selectable_template_vars: - description: Template variables with their configuration. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - share_type: - $ref: "#/components/schemas/SecureEmbedShareType" - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Display title. - example: "Q1 Metrics Dashboard (Updated)" - type: string - token: - description: Public share token. - example: "s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - url: - description: CDN URL for the shared dashboard. - example: "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - type: object - SecureEmbedUpdateResponseData: - description: Data object for a secure embed update response. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedUpdateResponseAttributes" - id: - description: Internal share ID. - example: "12345" - type: string - type: - $ref: "#/components/schemas/SecureEmbedUpdateResponseType" - required: - - type - - id - - attributes - type: object - SecureEmbedUpdateResponseType: - description: Resource type for secure embed update responses. - enum: - - secure_embed_update_response - example: "secure_embed_update_response" - type: string - x-enum-varnames: - - SECURE_EMBED_UPDATE_RESPONSE - SecureEmbedViewingPreferences: - description: Display settings for the secure embed shared dashboard. - properties: - high_density: - description: Whether widgets are displayed in high density mode. - example: false - type: boolean - theme: - $ref: "#/components/schemas/SecureEmbedViewingPreferencesTheme" - type: object - SecureEmbedViewingPreferencesTheme: - description: The theme of the shared dashboard view. `system` follows the viewer's system default. - enum: - - system - - light - - dark - example: "system" - type: string - x-enum-varnames: - - SYSTEM - - LIGHT - - DARK SecurityEntityConfigRisks: description: Configuration risks associated with the entity properties: @@ -66219,6 +66227,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: A query for SLO status, error budget, and burn rate metrics. + 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: @@ -66326,6 +66379,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: @@ -73396,6 +73497,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: @@ -86394,190 +86501,29 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get all application keys owned by current user - tags: - - Key Management - "x-permission": - operator: OR - permissions: - - user_app_keys - post: - description: Create an application key for current user - operationId: CreateCurrentUserApplicationKey - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ApplicationKeyCreateRequest" - required: true - responses: - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/ApplicationKeyResponse" - description: Created - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Create an application key for current user - tags: - - Key Management - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - user_app_keys - /api/v2/current_user/application_keys/{app_key_id}: - delete: - description: Delete an application key owned by current user - operationId: DeleteCurrentUserApplicationKey - parameters: - - $ref: "#/components/parameters/ApplicationKeyID" - responses: - "204": - description: No Content - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Delete an application key owned by current user - tags: - - Key Management - "x-permission": - operator: OR - permissions: - - user_app_keys - get: - description: |- - Get an application key owned by current user. - The `key` field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode). - operationId: GetCurrentUserApplicationKey - parameters: - - $ref: "#/components/parameters/ApplicationKeyID" - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ApplicationKeyResponse" - description: OK - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get one application key owned by current user - tags: - - Key Management - "x-permission": - operator: OR - permissions: - - user_app_keys - patch: - description: |- - Edit an application key owned by current user. - The `key` field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode). - operationId: UpdateCurrentUserApplicationKey - parameters: - - $ref: "#/components/parameters/ApplicationKeyID" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ApplicationKeyUpdateRequest" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ApplicationKeyResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Edit an application key owned by current user + summary: Get all application keys owned by current user tags: - Key Management - x-codegen-request-body-name: body "x-permission": operator: OR permissions: - user_app_keys - /api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards: - delete: - description: Delete dashboards from an existing dashboard list. - operationId: DeleteDashboardListItems - parameters: - - description: ID of the dashboard list to delete items from. - in: path - name: dashboard_list_id - required: true - schema: - format: int64 - type: integer + post: + description: Create an application key for current user + operationId: CreateCurrentUserApplicationKey requestBody: content: application/json: schema: - $ref: "#/components/schemas/DashboardListDeleteItemsRequest" - description: Dashboards to delete from the dashboard list. + $ref: "#/components/schemas/ApplicationKeyCreateRequest" required: true responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/DashboardListDeleteItemsResponse" - description: OK + $ref: "#/components/schemas/ApplicationKeyResponse" + description: Created "400": content: application/json: @@ -86590,6 +86536,31 @@ paths: schema: $ref: "#/components/schemas/APIErrorResponse" description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create an application key for current user + tags: + - Key Management + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - user_app_keys + /api/v2/current_user/application_keys/{app_key_id}: + delete: + description: Delete an application key owned by current user + operationId: DeleteCurrentUserApplicationKey + parameters: + - $ref: "#/components/parameters/ApplicationKeyID" + responses: + "204": + description: No Content + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden "404": content: application/json: @@ -86598,27 +86569,26 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Delete items from a dashboard list + summary: Delete an application key owned by current user tags: - - Dashboard Lists - x-codegen-request-body-name: body + - Key Management + "x-permission": + operator: OR + permissions: + - user_app_keys get: - description: Fetch the dashboard list’s dashboard definitions. - operationId: GetDashboardListItems + description: |- + Get an application key owned by current user. + The `key` field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode). + operationId: GetCurrentUserApplicationKey parameters: - - description: ID of the dashboard list to get items from. - in: path - name: dashboard_list_id - required: true - schema: - format: int64 - type: integer + - $ref: "#/components/parameters/ApplicationKeyID" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/DashboardListItems" + $ref: "#/components/schemas/ApplicationKeyResponse" description: OK "403": content: @@ -86634,42 +86604,32 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_read - summary: Get items of a Dashboard List + summary: Get one application key owned by current user tags: - - Dashboard Lists + - Key Management "x-permission": operator: OR permissions: - - dashboards_read - post: - description: Add dashboards to an existing dashboard list. - operationId: CreateDashboardListItems + - user_app_keys + patch: + description: |- + Edit an application key owned by current user. + The `key` field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode). + operationId: UpdateCurrentUserApplicationKey parameters: - - description: ID of the dashboard list to add items to. - in: path - name: dashboard_list_id - required: true - schema: - format: int64 - type: integer + - $ref: "#/components/parameters/ApplicationKeyID" requestBody: content: application/json: schema: - $ref: "#/components/schemas/DashboardListAddItemsRequest" - description: Dashboards to add to the dashboard list. + $ref: "#/components/schemas/ApplicationKeyUpdateRequest" required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/DashboardListAddItemsResponse" + $ref: "#/components/schemas/ApplicationKeyResponse" description: OK "400": content: @@ -86691,15 +86651,20 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Add Items to a Dashboard List + summary: Edit an application key owned by current user tags: - - Dashboard Lists + - Key Management x-codegen-request-body-name: body - put: - description: Update dashboards of an existing dashboard list. - operationId: UpdateDashboardListItems + "x-permission": + operator: OR + permissions: + - user_app_keys + /api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards: + delete: + description: Delete dashboards from an existing dashboard list. + operationId: DeleteDashboardListItems parameters: - - description: ID of the dashboard list to update items from. + - description: ID of the dashboard list to delete items from. in: path name: dashboard_list_id required: true @@ -86710,15 +86675,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DashboardListUpdateItemsRequest" - description: New dashboards of the dashboard list. + $ref: "#/components/schemas/DashboardListDeleteItemsRequest" + description: Dashboards to delete from the dashboard list. required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/DashboardListUpdateItemsResponse" + $ref: "#/components/schemas/DashboardListDeleteItemsResponse" description: OK "400": content: @@ -86740,222 +86705,152 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Update items of a dashboard list + summary: Delete items from a dashboard list tags: - Dashboard Lists x-codegen-request-body-name: body - /api/v2/dashboard/{dashboard_id}/shared/secure-embed: - post: - description: >- - Create a secure embed share for a dashboard. The response includes a one-time `credential` used for HMAC-SHA256 signing. Store it securely — it cannot be retrieved again. - operationId: CreateDashboardSecureEmbed + get: + description: Fetch the dashboard list’s dashboard definitions. + operationId: GetDashboardListItems parameters: - - $ref: "#/components/parameters/DashboardIDPathParameter" - requestBody: - content: - application/json: - examples: - json-request-body: - value: - data: - attributes: - global_time: - live_span: "1h" - global_time_selectable: true - selectable_template_vars: - - default_values: ["1"] - name: "org_id" - prefix: "org_id" - visible_tags: ["1"] - status: active - title: "Q1 Metrics Dashboard" - viewing_preferences: - high_density: false - theme: "system" - type: secure_embed_request - schema: - $ref: "#/components/schemas/SecureEmbedCreateRequest" - description: Secure embed creation request body. - required: true + - description: ID of the dashboard list to get items from. + in: path + name: dashboard_list_id + required: true + schema: + format: int64 + type: integer responses: "200": content: application/json: schema: - $ref: "#/components/schemas/SecureEmbedCreateResponse" + $ref: "#/components/schemas/DashboardListItems" description: OK "403": content: application/json: schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" + $ref: "#/components/schemas/APIErrorResponse" description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Dashboard Not Found - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Conflict — max 1000 share URLs per dashboard exceeded + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - dashboards_embed_share - summary: Create a secure embed for a dashboard + - dashboards_read + summary: Get items of a Dashboard List tags: - - Dashboard Secure Embed - x-codegen-request-body-name: body + - Dashboard Lists "x-permission": operator: OR permissions: - - dashboards_embed_share - 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/dashboard/{dashboard_id}/shared/secure-embed/{token}: - delete: - description: >- - Delete a secure embed share for a dashboard. - operationId: DeleteDashboardSecureEmbed + - dashboards_read + post: + description: Add dashboards to an existing dashboard list. + operationId: CreateDashboardListItems parameters: - - $ref: "#/components/parameters/DashboardIDPathParameter" - - $ref: "#/components/parameters/SecureEmbedTokenPathParameter" + - description: ID of the dashboard list to add items to. + in: path + name: dashboard_list_id + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DashboardListAddItemsRequest" + description: Dashboards to add to the dashboard list. + required: true responses: - "204": - description: No Content - "403": + "200": content: application/json: schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": + $ref: "#/components/schemas/DashboardListAddItemsResponse" + description: OK + "400": content: application/json: schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_embed_share - summary: Delete a secure embed for a dashboard - tags: - - Dashboard Secure Embed - "x-permission": - operator: OR - permissions: - - dashboards_embed_share - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - get: - description: >- - Retrieve an existing secure embed configuration for a dashboard. - operationId: GetDashboardSecureEmbed - parameters: - - $ref: "#/components/parameters/DashboardIDPathParameter" - - $ref: "#/components/parameters/SecureEmbedTokenPathParameter" - responses: - "200": + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": content: application/json: schema: - $ref: "#/components/schemas/SecureEmbedGetResponse" - description: OK + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" + $ref: "#/components/schemas/APIErrorResponse" description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_read - summary: Get a secure embed for a dashboard + summary: Add Items to a Dashboard List tags: - - Dashboard Secure Embed - "x-permission": - operator: OR - permissions: - - dashboards_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/). - patch: - description: >- - Partially update a secure embed configuration. All fields are optional (PATCH semantics). - operationId: UpdateDashboardSecureEmbed + - Dashboard Lists + x-codegen-request-body-name: body + put: + description: Update dashboards of an existing dashboard list. + operationId: UpdateDashboardListItems parameters: - - $ref: "#/components/parameters/DashboardIDPathParameter" - - $ref: "#/components/parameters/SecureEmbedTokenPathParameter" + - description: ID of the dashboard list to update items from. + in: path + name: dashboard_list_id + required: true + schema: + format: int64 + type: integer requestBody: content: application/json: - examples: - json-request-body: - value: - data: - attributes: - status: active - title: "Q1 Metrics Dashboard (Updated)" - type: secure_embed_update_request schema: - $ref: "#/components/schemas/SecureEmbedUpdateRequest" - description: Secure embed update request body. + $ref: "#/components/schemas/DashboardListUpdateItemsRequest" + description: New dashboards of the dashboard list. required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/SecureEmbedUpdateResponse" + $ref: "#/components/schemas/DashboardListUpdateItemsResponse" description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request "403": content: application/json: schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" + $ref: "#/components/schemas/APIErrorResponse" description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" + $ref: "#/components/schemas/APIErrorResponse" description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_embed_share - summary: Update a secure embed for a dashboard + summary: Update items of a dashboard list tags: - - Dashboard Secure Embed + - Dashboard Lists x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - dashboards_embed_share - 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/datasets: get: description: Get all datasets that have been configured for an organization. @@ -120385,11 +120280,6 @@ tags: organize, find, and share all of your dashboards with your team and organization. name: Dashboard Lists - - description: >- - Manage securely embedded Datadog dashboards. Secure embeds use HMAC-SHA256 signed sessions for authentication, enabling customers to embed dashboards in their own applications with server-side auth control. Unlike public dashboards (open URL) or invite dashboards (email-based access), secure embeds provide programmatic access control. - - **Requirements:** - Org setting: SharedDashboards > Embed sharing must be enabled. - AuthN: Datadog API key and application key. - Read operations require `dashboards_read` permission. - Write operations require `dashboards_embed_share` permission. - name: Dashboard Secure Embed - description: |- The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively. name: Data Deletion diff --git a/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..a290b6c8ad4e --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..4d0953426f11 --- /dev/null +++ b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.yml @@ -0,0 +1,29 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:29 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + 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 +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.frozen b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.frozen new file mode 100644 index 000000000000..833a68b8b526 --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.yml b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.yml new file mode 100644 index 000000000000..f1ce1589695f --- /dev/null +++ b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Thu, 09 Apr 2026 18:41:04 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + 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 +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..936f63368973 --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..6e9f254e6f14 --- /dev/null +++ b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-metrics-data-source-returns-OK-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:31 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + 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 +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..35a011fa28c9 --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..109a1061c0ce --- /dev/null +++ b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:31 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + 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 +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Scalar-cross-product-query-with-container-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-container-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..5a73cccc2870 --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Scalar-cross-product-query-with-container-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-container-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..aaed1e0ba5a0 --- /dev/null +++ b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-container-data-source-returns-OK-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:31 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + 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 +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Scalar-cross-product-query-with-process-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-process-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..aeb3bb6c4b5d --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Scalar-cross-product-query-with-process-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-process-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..017baaf5affa --- /dev/null +++ b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-process-data-source-returns-OK-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:31 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + 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 +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Scalar-cross-product-query-with-slo-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-slo-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..1271a7e2cd8f --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Scalar-cross-product-query-with-slo-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-slo-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..5b00b1212c71 --- /dev/null +++ b/cassettes/features/v2/metrics/Scalar-cross-product-query-with-slo-data-source-returns-OK-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:32 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + 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 +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..8d85e07f104a --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..d666d3bc885b --- /dev/null +++ b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-dependency-stats-data-source-returns-OK-response.yml @@ -0,0 +1,28 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:32 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.frozen b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.frozen new file mode 100644 index 000000000000..c772bf9ce5e2 --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.yml b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.yml new file mode 100644 index 000000000000..873a6a784c3a --- /dev/null +++ b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-and-span-kind-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Thu, 09 Apr 2026 18:41:05 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..316785c3cfc9 --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..402fa8fc3155 --- /dev/null +++ b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-metrics-data-source-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:32 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..c4bed5aa5b3b --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..0d01b8e059d3 --- /dev/null +++ b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-apm-resource-stats-data-source-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:32 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-container-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-container-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..0b3ec0189461 --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-container-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-container-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..125307d5b69b --- /dev/null +++ b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-container-data-source-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:32 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-process-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-process-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..1ef87ffbe14c --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-process-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-process-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..d08e4d0c8512 --- /dev/null +++ b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-process-data-source-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:32 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-slo-data-source-returns-OK-response.frozen b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-slo-data-source-returns-OK-response.frozen new file mode 100644 index 000000000000..03ed54b79c27 --- /dev/null +++ b/cassettes/features/v2/metrics/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/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-slo-data-source-returns-OK-response.yml b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-slo-data-source-returns-OK-response.yml new file mode 100644 index 000000000000..f89a79616641 --- /dev/null +++ b/cassettes/features/v2/metrics/Timeseries-cross-product-query-with-slo-data-source-returns-OK-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Wed, 08 Apr 2026 15:25:33 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + encoding: UTF-8 + string: '{"data":{"id":"0","type":"timeseries_response","attributes":{"series":[],"times":[],"values":[]}}} + + ' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/dashboard-secure-embed/CreateDashboardSecureEmbed.rb b/examples/v2/dashboard-secure-embed/CreateDashboardSecureEmbed.rb deleted file mode 100644 index a40ef019cc0c..000000000000 --- a/examples/v2/dashboard-secure-embed/CreateDashboardSecureEmbed.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Create a secure embed for a dashboard returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_dashboard_secure_embed".to_sym] = true -end -api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new - -body = DatadogAPIClient::V2::SecureEmbedCreateRequest.new({ - data: DatadogAPIClient::V2::SecureEmbedCreateRequestData.new({ - attributes: DatadogAPIClient::V2::SecureEmbedCreateRequestAttributes.new({ - global_time: DatadogAPIClient::V2::SecureEmbedGlobalTime.new({ - live_span: DatadogAPIClient::V2::SecureEmbedGlobalTimeLiveSpan::PAST_ONE_HOUR, - }), - global_time_selectable: true, - selectable_template_vars: [ - DatadogAPIClient::V2::SecureEmbedSelectableTemplateVariable.new({ - default_values: [ - "1", - ], - name: "org_id", - prefix: "org_id", - visible_tags: [ - "1", - ], - }), - ], - status: DatadogAPIClient::V2::SecureEmbedStatus::ACTIVE, - title: "Q1 Metrics Dashboard", - viewing_preferences: DatadogAPIClient::V2::SecureEmbedViewingPreferences.new({ - high_density: false, - theme: DatadogAPIClient::V2::SecureEmbedViewingPreferencesTheme::SYSTEM, - }), - }), - type: DatadogAPIClient::V2::SecureEmbedRequestType::SECURE_EMBED_REQUEST, - }), -}) -p api_instance.create_dashboard_secure_embed("dashboard_id", body) diff --git a/examples/v2/dashboard-secure-embed/DeleteDashboardSecureEmbed.rb b/examples/v2/dashboard-secure-embed/DeleteDashboardSecureEmbed.rb deleted file mode 100644 index bb65183e9671..000000000000 --- a/examples/v2/dashboard-secure-embed/DeleteDashboardSecureEmbed.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a secure embed for a dashboard returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_dashboard_secure_embed".to_sym] = true -end -api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new -api_instance.delete_dashboard_secure_embed("dashboard_id", "token") diff --git a/examples/v2/dashboard-secure-embed/GetDashboardSecureEmbed.rb b/examples/v2/dashboard-secure-embed/GetDashboardSecureEmbed.rb deleted file mode 100644 index 313636bd944f..000000000000 --- a/examples/v2/dashboard-secure-embed/GetDashboardSecureEmbed.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get a secure embed for a dashboard returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_dashboard_secure_embed".to_sym] = true -end -api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new -p api_instance.get_dashboard_secure_embed("dashboard_id", "token") diff --git a/examples/v2/dashboard-secure-embed/UpdateDashboardSecureEmbed.rb b/examples/v2/dashboard-secure-embed/UpdateDashboardSecureEmbed.rb deleted file mode 100644 index 15aa31f6ae8f..000000000000 --- a/examples/v2/dashboard-secure-embed/UpdateDashboardSecureEmbed.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Update a secure embed for a dashboard returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_dashboard_secure_embed".to_sym] = true -end -api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new - -body = DatadogAPIClient::V2::SecureEmbedUpdateRequest.new({ - data: DatadogAPIClient::V2::SecureEmbedUpdateRequestData.new({ - attributes: DatadogAPIClient::V2::SecureEmbedUpdateRequestAttributes.new({ - global_time: DatadogAPIClient::V2::SecureEmbedGlobalTime.new({ - live_span: DatadogAPIClient::V2::SecureEmbedGlobalTimeLiveSpan::PAST_ONE_HOUR, - }), - global_time_selectable: true, - selectable_template_vars: [ - DatadogAPIClient::V2::SecureEmbedSelectableTemplateVariable.new({ - default_values: [ - "1", - ], - name: "org_id", - prefix: "org_id", - visible_tags: [ - "1", - ], - }), - ], - status: DatadogAPIClient::V2::SecureEmbedStatus::ACTIVE, - title: "Q1 Metrics Dashboard (Updated)", - viewing_preferences: DatadogAPIClient::V2::SecureEmbedViewingPreferences.new({ - high_density: false, - theme: DatadogAPIClient::V2::SecureEmbedViewingPreferencesTheme::SYSTEM, - }), - }), - type: DatadogAPIClient::V2::SecureEmbedUpdateRequestType::SECURE_EMBED_UPDATE_REQUEST, - }), -}) -p api_instance.update_dashboard_secure_embed("dashboard_id", "token", body) diff --git a/examples/v2/metrics/QueryScalarData_1479548882.rb b/examples/v2/metrics/QueryScalarData_1479548882.rb new file mode 100644 index 000000000000..ad75f61dd445 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_1479548882.rb @@ -0,0 +1,39 @@ +# Scalar cross product query with apm_resource_stats data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::ScalarFormulaRequest.new({ + attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + queries: [ + DatadogAPIClient::V2::ApmResourceStatsQuery.new({ + data_source: DatadogAPIClient::V2::ApmResourceStatsDataSource::APM_RESOURCE_STATS, + name: "a", + env: "staging", + service: "azure-bill-import", + stat: DatadogAPIClient::V2::ApmResourceStatName::HITS, + operation_name: "cassandra.query", + group_by: [ + "resource_name", + ], + primary_tag_name: "datacenter", + primary_tag_value: "*", + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST, + }), +}) +p api_instance.query_scalar_data(body) diff --git a/examples/v2/metrics/QueryScalarData_1904811219.rb b/examples/v2/metrics/QueryScalarData_1904811219.rb new file mode 100644 index 000000000000..a41ec8acac18 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_1904811219.rb @@ -0,0 +1,36 @@ +# Scalar cross product query with apm_metrics data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::ScalarFormulaRequest.new({ + attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + queries: [ + DatadogAPIClient::V2::ApmMetricsQuery.new({ + data_source: DatadogAPIClient::V2::ApmMetricsDataSource::APM_METRICS, + name: "a", + stat: DatadogAPIClient::V2::ApmMetricsStat::HITS, + service: "web-store", + query_filter: "env:prod", + group_by: [ + "resource_name", + ], + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST, + }), +}) +p api_instance.query_scalar_data(body) diff --git a/examples/v2/metrics/QueryScalarData_2298288525.rb b/examples/v2/metrics/QueryScalarData_2298288525.rb new file mode 100644 index 000000000000..ad17f10d82df --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_2298288525.rb @@ -0,0 +1,35 @@ +# Scalar cross product query with slo data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::ScalarFormulaRequest.new({ + attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + queries: [ + DatadogAPIClient::V2::SloQuery.new({ + data_source: DatadogAPIClient::V2::SloDataSource::SLO, + name: "a", + slo_id: "12345678910", + measure: DatadogAPIClient::V2::SlosMeasure::SLO_STATUS, + slo_query_type: DatadogAPIClient::V2::SlosQueryType::METRIC, + group_mode: DatadogAPIClient::V2::SlosGroupMode::OVERALL, + additional_query_filters: "*", + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST, + }), +}) +p api_instance.query_scalar_data(body) diff --git a/examples/v2/metrics/QueryScalarData_2533499017.rb b/examples/v2/metrics/QueryScalarData_2533499017.rb new file mode 100644 index 000000000000..fdd682c140ba --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_2533499017.rb @@ -0,0 +1,37 @@ +# Scalar cross product query with apm_dependency_stats data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::ScalarFormulaRequest.new({ + attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + queries: [ + DatadogAPIClient::V2::ApmDependencyStatsQuery.new({ + data_source: DatadogAPIClient::V2::ApmDependencyStatsDataSource::APM_DEPENDENCY_STATS, + name: "a", + env: "ci", + service: "cassandra", + stat: DatadogAPIClient::V2::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: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST, + }), +}) +p api_instance.query_scalar_data(body) diff --git a/examples/v2/metrics/QueryScalarData_4230617918.rb b/examples/v2/metrics/QueryScalarData_4230617918.rb new file mode 100644 index 000000000000..9a3a1544120b --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_4230617918.rb @@ -0,0 +1,37 @@ +# Scalar cross product query with process data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::ScalarFormulaRequest.new({ + attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + queries: [ + DatadogAPIClient::V2::ProcessScalarQuery.new({ + data_source: DatadogAPIClient::V2::ProcessDataSource::PROCESS, + name: "a", + metric: "process.stat.cpu.total_pct", + aggregator: DatadogAPIClient::V2::MetricsAggregator::AVG, + text_filter: "", + tag_filters: [], + limit: 10, + sort: DatadogAPIClient::V2::QuerySortOrder::DESC, + is_normalized_cpu: false, + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST, + }), +}) +p api_instance.query_scalar_data(body) diff --git a/examples/v2/metrics/QueryScalarData_779493885.rb b/examples/v2/metrics/QueryScalarData_779493885.rb new file mode 100644 index 000000000000..f4b555f1de4b --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_779493885.rb @@ -0,0 +1,37 @@ +# Scalar cross product query with apm_metrics data source and span_kind returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::ScalarFormulaRequest.new({ + attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + queries: [ + DatadogAPIClient::V2::ApmMetricsQuery.new({ + data_source: DatadogAPIClient::V2::ApmMetricsDataSource::APM_METRICS, + name: "a", + stat: DatadogAPIClient::V2::ApmMetricsStat::HITS, + service: "web-store", + query_filter: "env:prod", + span_kind: DatadogAPIClient::V2::ApmMetricsSpanKind::SERVER, + group_by: [ + "resource_name", + ], + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST, + }), +}) +p api_instance.query_scalar_data(body) diff --git a/examples/v2/metrics/QueryScalarData_891952130.rb b/examples/v2/metrics/QueryScalarData_891952130.rb new file mode 100644 index 000000000000..30aae1eb90c0 --- /dev/null +++ b/examples/v2/metrics/QueryScalarData_891952130.rb @@ -0,0 +1,35 @@ +# Scalar cross product query with container data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::ScalarFormulaRequest.new({ + attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + queries: [ + DatadogAPIClient::V2::ContainerScalarQuery.new({ + data_source: DatadogAPIClient::V2::ContainerDataSource::CONTAINER, + name: "a", + metric: "process.stat.container.cpu.system_pct", + aggregator: DatadogAPIClient::V2::MetricsAggregator::AVG, + tag_filters: [], + limit: 10, + sort: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST, + }), +}) +p api_instance.query_scalar_data(body) diff --git a/examples/v2/metrics/QueryTimeseriesData_108927825.rb b/examples/v2/metrics/QueryTimeseriesData_108927825.rb new file mode 100644 index 000000000000..fc3e070232f4 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_108927825.rb @@ -0,0 +1,36 @@ +# Timeseries cross product query with slo data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::TimeseriesFormulaRequest.new({ + attributes: DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + interval: 5000, + queries: [ + DatadogAPIClient::V2::SloQuery.new({ + data_source: DatadogAPIClient::V2::SloDataSource::SLO, + name: "a", + slo_id: "12345678910", + measure: DatadogAPIClient::V2::SlosMeasure::SLO_STATUS, + slo_query_type: DatadogAPIClient::V2::SlosQueryType::METRIC, + group_mode: DatadogAPIClient::V2::SlosGroupMode::OVERALL, + additional_query_filters: "*", + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST, + }), +}) +p api_instance.query_timeseries_data(body) diff --git a/examples/v2/metrics/QueryTimeseriesData_2159746306.rb b/examples/v2/metrics/QueryTimeseriesData_2159746306.rb new file mode 100644 index 000000000000..08ebb10eaa0e --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_2159746306.rb @@ -0,0 +1,37 @@ +# Timeseries cross product query with process data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::TimeseriesFormulaRequest.new({ + attributes: DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + interval: 5000, + queries: [ + DatadogAPIClient::V2::ProcessTimeseriesQuery.new({ + data_source: DatadogAPIClient::V2::ProcessDataSource::PROCESS, + name: "a", + metric: "process.stat.cpu.total_pct", + text_filter: "", + tag_filters: [], + limit: 10, + sort: DatadogAPIClient::V2::QuerySortOrder::DESC, + is_normalized_cpu: false, + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST, + }), +}) +p api_instance.query_timeseries_data(body) diff --git a/examples/v2/metrics/QueryTimeseriesData_3174309318.rb b/examples/v2/metrics/QueryTimeseriesData_3174309318.rb new file mode 100644 index 000000000000..f6bfd4897d8d --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_3174309318.rb @@ -0,0 +1,35 @@ +# Timeseries cross product query with container data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::TimeseriesFormulaRequest.new({ + attributes: DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + interval: 5000, + queries: [ + DatadogAPIClient::V2::ContainerTimeseriesQuery.new({ + data_source: DatadogAPIClient::V2::ContainerDataSource::CONTAINER, + name: "a", + metric: "process.stat.container.cpu.system_pct", + tag_filters: [], + limit: 10, + sort: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST, + }), +}) +p api_instance.query_timeseries_data(body) diff --git a/examples/v2/metrics/QueryTimeseriesData_3535807425.rb b/examples/v2/metrics/QueryTimeseriesData_3535807425.rb new file mode 100644 index 000000000000..5d9a671444b2 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_3535807425.rb @@ -0,0 +1,38 @@ +# Timeseries cross product query with apm_metrics data source and span_kind returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::TimeseriesFormulaRequest.new({ + attributes: DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + interval: 5000, + queries: [ + DatadogAPIClient::V2::ApmMetricsQuery.new({ + data_source: DatadogAPIClient::V2::ApmMetricsDataSource::APM_METRICS, + name: "a", + stat: DatadogAPIClient::V2::ApmMetricsStat::HITS, + service: "web-store", + query_filter: "env:prod", + span_kind: DatadogAPIClient::V2::ApmMetricsSpanKind::SERVER, + group_by: [ + "resource_name", + ], + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST, + }), +}) +p api_instance.query_timeseries_data(body) diff --git a/examples/v2/metrics/QueryTimeseriesData_4028506518.rb b/examples/v2/metrics/QueryTimeseriesData_4028506518.rb new file mode 100644 index 000000000000..4778273e3b47 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_4028506518.rb @@ -0,0 +1,40 @@ +# Timeseries cross product query with apm_resource_stats data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::TimeseriesFormulaRequest.new({ + attributes: DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + interval: 5000, + queries: [ + DatadogAPIClient::V2::ApmResourceStatsQuery.new({ + data_source: DatadogAPIClient::V2::ApmResourceStatsDataSource::APM_RESOURCE_STATS, + name: "a", + env: "staging", + service: "azure-bill-import", + stat: DatadogAPIClient::V2::ApmResourceStatName::HITS, + operation_name: "cassandra.query", + group_by: [ + "resource_name", + ], + primary_tag_name: "datacenter", + primary_tag_value: "*", + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST, + }), +}) +p api_instance.query_timeseries_data(body) diff --git a/examples/v2/metrics/QueryTimeseriesData_4246412951.rb b/examples/v2/metrics/QueryTimeseriesData_4246412951.rb new file mode 100644 index 000000000000..6ebd045780a1 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_4246412951.rb @@ -0,0 +1,37 @@ +# Timeseries cross product query with apm_metrics data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::TimeseriesFormulaRequest.new({ + attributes: DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + interval: 5000, + queries: [ + DatadogAPIClient::V2::ApmMetricsQuery.new({ + data_source: DatadogAPIClient::V2::ApmMetricsDataSource::APM_METRICS, + name: "a", + stat: DatadogAPIClient::V2::ApmMetricsStat::HITS, + service: "web-store", + query_filter: "env:prod", + group_by: [ + "resource_name", + ], + }), + ], + to: 1636629071000, + }), + type: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST, + }), +}) +p api_instance.query_timeseries_data(body) diff --git a/examples/v2/metrics/QueryTimeseriesData_847716941.rb b/examples/v2/metrics/QueryTimeseriesData_847716941.rb new file mode 100644 index 000000000000..0da1ab729885 --- /dev/null +++ b/examples/v2/metrics/QueryTimeseriesData_847716941.rb @@ -0,0 +1,38 @@ +# Timeseries cross product query with apm_dependency_stats data source returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::MetricsAPI.new + +body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({ + data: DatadogAPIClient::V2::TimeseriesFormulaRequest.new({ + attributes: DatadogAPIClient::V2::TimeseriesFormulaRequestAttributes.new({ + formulas: [ + DatadogAPIClient::V2::QueryFormula.new({ + formula: "a", + limit: DatadogAPIClient::V2::FormulaLimit.new({ + count: 10, + order: DatadogAPIClient::V2::QuerySortOrder::DESC, + }), + }), + ], + from: 1636625471000, + interval: 5000, + queries: [ + DatadogAPIClient::V2::ApmDependencyStatsQuery.new({ + data_source: DatadogAPIClient::V2::ApmDependencyStatsDataSource::APM_DEPENDENCY_STATS, + name: "a", + env: "ci", + service: "cassandra", + stat: DatadogAPIClient::V2::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: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST, + }), +}) +p api_instance.query_timeseries_data(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index ec581ec55b63..54d5118a0805 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2043,23 +2043,6 @@ "dashboard_list_id" => "Integer", "body" => "DashboardListUpdateItemsRequest", }, - "v2.CreateDashboardSecureEmbed" => { - "dashboard_id" => "String", - "body" => "SecureEmbedCreateRequest", - }, - "v2.DeleteDashboardSecureEmbed" => { - "dashboard_id" => "String", - "token" => "String", - }, - "v2.GetDashboardSecureEmbed" => { - "dashboard_id" => "String", - "token" => "String", - }, - "v2.UpdateDashboardSecureEmbed" => { - "dashboard_id" => "String", - "token" => "String", - "body" => "SecureEmbedUpdateRequest", - }, "v2.CreateDataset" => { "body" => "DatasetCreateRequest", }, diff --git a/features/v2/dashboard_secure_embed.feature b/features/v2/dashboard_secure_embed.feature deleted file mode 100644 index 25cb5335e322..000000000000 --- a/features/v2/dashboard_secure_embed.feature +++ /dev/null @@ -1,99 +0,0 @@ -@endpoint(dashboard-secure-embed) @endpoint(dashboard-secure-embed-v2) @endpoint(https://api.datadoghq.com) @endpoint(https://api.datadoghq.eu) @endpoint(https://api.ddog-gov.com) @endpoint(https://api.us5.datadoghq.com) -Feature: Dashboard Secure Embed - Manage securely embedded Datadog dashboards. Secure embeds use HMAC-SHA256 - signed sessions for authentication, enabling customers to embed dashboards - in their own applications with server-side auth control. Unlike public - dashboards (open URL) or invite dashboards (email-based access), secure - embeds provide programmatic access control. **Requirements:** - Org - setting: SharedDashboards > Embed sharing must be enabled. - AuthN: - Datadog API key and application key. - Read operations require - `dashboards_read` permission. - Write operations require - `dashboards_embed_share` permission. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "DashboardSecureEmbed" API - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Create a secure embed for a dashboard returns "Conflict — max 1000 share URLs per dashboard exceeded" response - Given operation "CreateDashboardSecureEmbed" enabled - And new "CreateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}} - When the request is sent - Then the response status is 409 Conflict — max 1000 share URLs per dashboard exceeded - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Create a secure embed for a dashboard returns "Dashboard Not Found" response - Given operation "CreateDashboardSecureEmbed" enabled - And new "CreateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}} - When the request is sent - Then the response status is 404 Dashboard Not Found - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Create a secure embed for a dashboard returns "OK" response - Given operation "CreateDashboardSecureEmbed" enabled - And new "CreateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Delete a secure embed for a dashboard returns "No Content" response - Given operation "DeleteDashboardSecureEmbed" enabled - And new "DeleteDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Delete a secure embed for a dashboard returns "Not Found" response - Given operation "DeleteDashboardSecureEmbed" enabled - And new "DeleteDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Get a secure embed for a dashboard returns "Not Found" response - Given operation "GetDashboardSecureEmbed" enabled - And new "GetDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Get a secure embed for a dashboard returns "OK" response - Given operation "GetDashboardSecureEmbed" enabled - And new "GetDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Update a secure embed for a dashboard returns "Not Found" response - Given operation "UpdateDashboardSecureEmbed" enabled - And new "UpdateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard (Updated)", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_update_request"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Update a secure embed for a dashboard returns "OK" response - Given operation "UpdateDashboardSecureEmbed" enabled - And new "UpdateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard (Updated)", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_update_request"}} - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/metrics.feature b/features/v2/metrics.feature index 41e753dfb3f1..99f1714d9c8e 100644 --- a/features/v2/metrics.feature +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index 21caf3f3290a..d585c531dc03 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1500,41 +1500,6 @@ "type": "safe" } }, - "CreateDashboardSecureEmbed": { - "tag": "Dashboard Secure Embed", - "undo": { - "operationId": "DeleteDashboardSecureEmbed", - "parameters": [ - { - "name": "dashboard_id", - "source": "data.attributes.dashboard_id" - }, - { - "name": "token", - "source": "data.attributes.token" - } - ], - "type": "unsafe" - } - }, - "DeleteDashboardSecureEmbed": { - "tag": "Dashboard Secure Embed", - "undo": { - "type": "idempotent" - } - }, - "GetDashboardSecureEmbed": { - "tag": "Dashboard Secure Embed", - "undo": { - "type": "safe" - } - }, - "UpdateDashboardSecureEmbed": { - "tag": "Dashboard Secure Embed", - "undo": { - "type": "idempotent" - } - }, "GetAllDatasets": { "tag": "Datasets", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 73968a285cc2..35e54918eaa1 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -259,10 +259,6 @@ def initialize "v2.search_security_monitoring_histsignals": false, "v2.get_code_coverage_branch_summary": false, "v2.get_code_coverage_commit_summary": false, - "v2.create_dashboard_secure_embed": false, - "v2.delete_dashboard_secure_embed": false, - "v2.get_dashboard_secure_embed": false, - "v2.update_dashboard_secure_embed": false, "v2.create_dataset": false, "v2.delete_dataset": false, "v2.get_all_datasets": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index f3f09955cdab..c255a11685ca 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1118,6 +1118,16 @@ def overrides "v2.api_key_update_request" => "APIKeyUpdateRequest", "v2.api_trigger" => "APITrigger", "v2.api_trigger_wrapper" => "APITriggerWrapper", + "v2.apm_dependency_stat_name" => "ApmDependencyStatName", + "v2.apm_dependency_stats_data_source" => "ApmDependencyStatsDataSource", + "v2.apm_dependency_stats_query" => "ApmDependencyStatsQuery", + "v2.apm_metrics_data_source" => "ApmMetricsDataSource", + "v2.apm_metrics_query" => "ApmMetricsQuery", + "v2.apm_metrics_span_kind" => "ApmMetricsSpanKind", + "v2.apm_metrics_stat" => "ApmMetricsStat", + "v2.apm_resource_stat_name" => "ApmResourceStatName", + "v2.apm_resource_stats_data_source" => "ApmResourceStatsDataSource", + "v2.apm_resource_stats_query" => "ApmResourceStatsQuery", "v2.apm_retention_filter_type" => "ApmRetentionFilterType", "v2.app_builder_event" => "AppBuilderEvent", "v2.app_builder_event_name" => "AppBuilderEventName", @@ -1838,6 +1848,7 @@ def overrides "v2.connections_response_meta" => "ConnectionsResponseMeta", "v2.container" => "Container", "v2.container_attributes" => "ContainerAttributes", + "v2.container_data_source" => "ContainerDataSource", "v2.container_group" => "ContainerGroup", "v2.container_group_attributes" => "ContainerGroupAttributes", "v2.container_group_relationships" => "ContainerGroupRelationships", @@ -1865,8 +1876,10 @@ def overrides "v2.container_meta" => "ContainerMeta", "v2.container_meta_page" => "ContainerMetaPage", "v2.container_meta_page_type" => "ContainerMetaPageType", + "v2.container_scalar_query" => "ContainerScalarQuery", "v2.containers_response" => "ContainersResponse", "v2.containers_response_links" => "ContainersResponseLinks", + "v2.container_timeseries_query" => "ContainerTimeseriesQuery", "v2.container_type" => "ContainerType", "v2.content_encoding" => "ContentEncoding", "v2.convert_job_results_to_signals_attributes" => "ConvertJobResultsToSignalsAttributes", @@ -4337,12 +4350,15 @@ def overrides "v2.powerpacks_response_meta_pagination" => "PowerpacksResponseMetaPagination", "v2.powerpack_template_variable" => "PowerpackTemplateVariable", "v2.preview_entity_response_data" => "PreviewEntityResponseData", + "v2.process_data_source" => "ProcessDataSource", + "v2.process_scalar_query" => "ProcessScalarQuery", "v2.process_summaries_meta" => "ProcessSummariesMeta", "v2.process_summaries_meta_page" => "ProcessSummariesMetaPage", "v2.process_summaries_response" => "ProcessSummariesResponse", "v2.process_summary" => "ProcessSummary", "v2.process_summary_attributes" => "ProcessSummaryAttributes", "v2.process_summary_type" => "ProcessSummaryType", + "v2.process_timeseries_query" => "ProcessTimeseriesQuery", "v2.product_analytics_analytics_query" => "ProductAnalyticsAnalyticsQuery", "v2.product_analytics_analytics_request" => "ProductAnalyticsAnalyticsRequest", "v2.product_analytics_analytics_request_attributes" => "ProductAnalyticsAnalyticsRequestAttributes", @@ -4844,33 +4860,6 @@ def overrides "v2.secret_rule_data_attributes_match_validation_invalid_http_status_code_items" => "SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems", "v2.secret_rule_data_attributes_match_validation_valid_http_status_code_items" => "SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems", "v2.secret_rule_data_type" => "SecretRuleDataType", - "v2.secure_embed_create_request" => "SecureEmbedCreateRequest", - "v2.secure_embed_create_request_attributes" => "SecureEmbedCreateRequestAttributes", - "v2.secure_embed_create_request_data" => "SecureEmbedCreateRequestData", - "v2.secure_embed_create_response" => "SecureEmbedCreateResponse", - "v2.secure_embed_create_response_attributes" => "SecureEmbedCreateResponseAttributes", - "v2.secure_embed_create_response_data" => "SecureEmbedCreateResponseData", - "v2.secure_embed_create_response_type" => "SecureEmbedCreateResponseType", - "v2.secure_embed_get_response" => "SecureEmbedGetResponse", - "v2.secure_embed_get_response_attributes" => "SecureEmbedGetResponseAttributes", - "v2.secure_embed_get_response_data" => "SecureEmbedGetResponseData", - "v2.secure_embed_get_response_type" => "SecureEmbedGetResponseType", - "v2.secure_embed_global_time" => "SecureEmbedGlobalTime", - "v2.secure_embed_global_time_live_span" => "SecureEmbedGlobalTimeLiveSpan", - "v2.secure_embed_request_type" => "SecureEmbedRequestType", - "v2.secure_embed_selectable_template_variable" => "SecureEmbedSelectableTemplateVariable", - "v2.secure_embed_share_type" => "SecureEmbedShareType", - "v2.secure_embed_status" => "SecureEmbedStatus", - "v2.secure_embed_update_request" => "SecureEmbedUpdateRequest", - "v2.secure_embed_update_request_attributes" => "SecureEmbedUpdateRequestAttributes", - "v2.secure_embed_update_request_data" => "SecureEmbedUpdateRequestData", - "v2.secure_embed_update_request_type" => "SecureEmbedUpdateRequestType", - "v2.secure_embed_update_response" => "SecureEmbedUpdateResponse", - "v2.secure_embed_update_response_attributes" => "SecureEmbedUpdateResponseAttributes", - "v2.secure_embed_update_response_data" => "SecureEmbedUpdateResponseData", - "v2.secure_embed_update_response_type" => "SecureEmbedUpdateResponseType", - "v2.secure_embed_viewing_preferences" => "SecureEmbedViewingPreferences", - "v2.secure_embed_viewing_preferences_theme" => "SecureEmbedViewingPreferencesTheme", "v2.security_entity_config_risks" => "SecurityEntityConfigRisks", "v2.security_entity_metadata" => "SecurityEntityMetadata", "v2.security_entity_risk_score" => "SecurityEntityRiskScore", @@ -5249,6 +5238,8 @@ def overrides "v2.slack_integration_metadata" => "SlackIntegrationMetadata", "v2.slack_integration_metadata_channel_item" => "SlackIntegrationMetadataChannelItem", "v2.slack_trigger_wrapper" => "SlackTriggerWrapper", + "v2.slo_data_source" => "SloDataSource", + "v2.slo_query" => "SloQuery", "v2.slo_report_create_request" => "SloReportCreateRequest", "v2.slo_report_create_request_attributes" => "SloReportCreateRequestAttributes", "v2.slo_report_create_request_data" => "SloReportCreateRequestData", @@ -5259,6 +5250,9 @@ def overrides "v2.slo_report_status_get_response" => "SLOReportStatusGetResponse", "v2.slo_report_status_get_response_attributes" => "SLOReportStatusGetResponseAttributes", "v2.slo_report_status_get_response_data" => "SLOReportStatusGetResponseData", + "v2.slos_group_mode" => "SlosGroupMode", + "v2.slos_measure" => "SlosMeasure", + "v2.slos_query_type" => "SlosQueryType", "v2.slo_status_data" => "SloStatusData", "v2.slo_status_data_attributes" => "SloStatusDataAttributes", "v2.slo_status_response" => "SloStatusResponse", @@ -6072,7 +6066,6 @@ def overrides "v2.csm_coverage_analysis_api" => "CSMCoverageAnalysisAPI", "v2.csm_threats_api" => "CSMThreatsAPI", "v2.dashboard_lists_api" => "DashboardListsAPI", - "v2.dashboard_secure_embed_api" => "DashboardSecureEmbedAPI", "v2.data_deletion_api" => "DataDeletionAPI", "v2.datasets_api" => "DatasetsAPI", "v2.deployment_gates_api" => "DeploymentGatesAPI", diff --git a/lib/datadog_api_client/v2/api/dashboard_secure_embed_api.rb b/lib/datadog_api_client/v2/api/dashboard_secure_embed_api.rb deleted file mode 100644 index 97f9a6225eb5..000000000000 --- a/lib/datadog_api_client/v2/api/dashboard_secure_embed_api.rb +++ /dev/null @@ -1,339 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'cgi' - -module DatadogAPIClient::V2 - class DashboardSecureEmbedAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Create a secure embed for a dashboard. - # - # @see #create_dashboard_secure_embed_with_http_info - def create_dashboard_secure_embed(dashboard_id, body, opts = {}) - data, _status_code, _headers = create_dashboard_secure_embed_with_http_info(dashboard_id, body, opts) - data - end - - # Create a secure embed for a dashboard. - # - # Create a secure embed share for a dashboard. The response includes a one-time `credential` used for HMAC-SHA256 signing. Store it securely — it cannot be retrieved again. - # - # @param dashboard_id [String] The ID of the dashboard. - # @param body [SecureEmbedCreateRequest] Secure embed creation request body. - # @param opts [Hash] the optional parameters - # @return [Array<(SecureEmbedCreateResponse, Integer, Hash)>] SecureEmbedCreateResponse data, response status code and response headers - def create_dashboard_secure_embed_with_http_info(dashboard_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_dashboard_secure_embed".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_dashboard_secure_embed") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_dashboard_secure_embed")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DashboardSecureEmbedAPI.create_dashboard_secure_embed ...' - end - # verify the required parameter 'dashboard_id' is set - if @api_client.config.client_side_validation && dashboard_id.nil? - fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling DashboardSecureEmbedAPI.create_dashboard_secure_embed" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling DashboardSecureEmbedAPI.create_dashboard_secure_embed" - end - # resource path - local_var_path = '/api/v2/dashboard/{dashboard_id}/shared/secure-embed'.sub('{dashboard_id}', CGI.escape(dashboard_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'SecureEmbedCreateResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_dashboard_secure_embed, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DashboardSecureEmbedAPI#create_dashboard_secure_embed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a secure embed for a dashboard. - # - # @see #delete_dashboard_secure_embed_with_http_info - def delete_dashboard_secure_embed(dashboard_id, token, opts = {}) - delete_dashboard_secure_embed_with_http_info(dashboard_id, token, opts) - nil - end - - # Delete a secure embed for a dashboard. - # - # Delete a secure embed share for a dashboard. - # - # @param dashboard_id [String] The ID of the dashboard. - # @param token [String] The share token identifying the secure embed. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_dashboard_secure_embed_with_http_info(dashboard_id, token, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_dashboard_secure_embed".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_dashboard_secure_embed") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_dashboard_secure_embed")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DashboardSecureEmbedAPI.delete_dashboard_secure_embed ...' - end - # verify the required parameter 'dashboard_id' is set - if @api_client.config.client_side_validation && dashboard_id.nil? - fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling DashboardSecureEmbedAPI.delete_dashboard_secure_embed" - end - # verify the required parameter 'token' is set - if @api_client.config.client_side_validation && token.nil? - fail ArgumentError, "Missing the required parameter 'token' when calling DashboardSecureEmbedAPI.delete_dashboard_secure_embed" - end - # resource path - local_var_path = '/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}'.sub('{dashboard_id}', CGI.escape(dashboard_id.to_s).gsub('%2F', '/')).sub('{token}', CGI.escape(token.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_dashboard_secure_embed, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DashboardSecureEmbedAPI#delete_dashboard_secure_embed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a secure embed for a dashboard. - # - # @see #get_dashboard_secure_embed_with_http_info - def get_dashboard_secure_embed(dashboard_id, token, opts = {}) - data, _status_code, _headers = get_dashboard_secure_embed_with_http_info(dashboard_id, token, opts) - data - end - - # Get a secure embed for a dashboard. - # - # Retrieve an existing secure embed configuration for a dashboard. - # - # @param dashboard_id [String] The ID of the dashboard. - # @param token [String] The share token identifying the secure embed. - # @param opts [Hash] the optional parameters - # @return [Array<(SecureEmbedGetResponse, Integer, Hash)>] SecureEmbedGetResponse data, response status code and response headers - def get_dashboard_secure_embed_with_http_info(dashboard_id, token, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_dashboard_secure_embed".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_dashboard_secure_embed") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_dashboard_secure_embed")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DashboardSecureEmbedAPI.get_dashboard_secure_embed ...' - end - # verify the required parameter 'dashboard_id' is set - if @api_client.config.client_side_validation && dashboard_id.nil? - fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling DashboardSecureEmbedAPI.get_dashboard_secure_embed" - end - # verify the required parameter 'token' is set - if @api_client.config.client_side_validation && token.nil? - fail ArgumentError, "Missing the required parameter 'token' when calling DashboardSecureEmbedAPI.get_dashboard_secure_embed" - end - # resource path - local_var_path = '/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}'.sub('{dashboard_id}', CGI.escape(dashboard_id.to_s).gsub('%2F', '/')).sub('{token}', CGI.escape(token.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SecureEmbedGetResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_dashboard_secure_embed, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DashboardSecureEmbedAPI#get_dashboard_secure_embed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update a secure embed for a dashboard. - # - # @see #update_dashboard_secure_embed_with_http_info - def update_dashboard_secure_embed(dashboard_id, token, body, opts = {}) - data, _status_code, _headers = update_dashboard_secure_embed_with_http_info(dashboard_id, token, body, opts) - data - end - - # Update a secure embed for a dashboard. - # - # Partially update a secure embed configuration. All fields are optional (PATCH semantics). - # - # @param dashboard_id [String] The ID of the dashboard. - # @param token [String] The share token identifying the secure embed. - # @param body [SecureEmbedUpdateRequest] Secure embed update request body. - # @param opts [Hash] the optional parameters - # @return [Array<(SecureEmbedUpdateResponse, Integer, Hash)>] SecureEmbedUpdateResponse data, response status code and response headers - def update_dashboard_secure_embed_with_http_info(dashboard_id, token, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_dashboard_secure_embed".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_dashboard_secure_embed") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_dashboard_secure_embed")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DashboardSecureEmbedAPI.update_dashboard_secure_embed ...' - end - # verify the required parameter 'dashboard_id' is set - if @api_client.config.client_side_validation && dashboard_id.nil? - fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling DashboardSecureEmbedAPI.update_dashboard_secure_embed" - end - # verify the required parameter 'token' is set - if @api_client.config.client_side_validation && token.nil? - fail ArgumentError, "Missing the required parameter 'token' when calling DashboardSecureEmbedAPI.update_dashboard_secure_embed" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling DashboardSecureEmbedAPI.update_dashboard_secure_embed" - end - # resource path - local_var_path = '/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}'.sub('{dashboard_id}', CGI.escape(dashboard_id.to_s).gsub('%2F', '/')).sub('{token}', CGI.escape(token.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'SecureEmbedUpdateResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_dashboard_secure_embed, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DashboardSecureEmbedAPI#update_dashboard_secure_embed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_global_time_live_span.rb b/lib/datadog_api_client/v2/models/apm_dependency_stat_name.rb similarity index 59% rename from lib/datadog_api_client/v2/models/secure_embed_global_time_live_span.rb rename to lib/datadog_api_client/v2/models/apm_dependency_stat_name.rb index bca9eb60b382..630184174bb8 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_global_time_live_span.rb +++ b/lib/datadog_api_client/v2/models/apm_dependency_stat_name.rb @@ -17,17 +17,16 @@ require 'time' module DatadogAPIClient::V2 - # Dashboard global time live_span selection. - class SecureEmbedGlobalTimeLiveSpan + # The APM dependency statistic to query. + class ApmDependencyStatName include BaseEnumModel - PAST_FIFTEEN_MINUTES = "15m".freeze - PAST_ONE_HOUR = "1h".freeze - PAST_FOUR_HOURS = "4h".freeze - PAST_ONE_DAY = "1d".freeze - PAST_TWO_DAYS = "2d".freeze - PAST_ONE_WEEK = "1w".freeze - PAST_ONE_MONTH = "1mo".freeze - PAST_THREE_MONTHS = "3mo".freeze + AVG_DURATION = "avg_duration".freeze + AVG_ROOT_DURATION = "avg_root_duration".freeze + AVG_SPANS_PER_TRACE = "avg_spans_per_trace".freeze + ERROR_RATE = "error_rate".freeze + PCT_EXEC_TIME = "pct_exec_time".freeze + PCT_OF_TRACES = "pct_of_traces".freeze + TOTAL_TRACES_COUNT = "total_traces_count".freeze end end diff --git a/lib/datadog_api_client/v2/models/secure_embed_get_response_type.rb b/lib/datadog_api_client/v2/models/apm_dependency_stats_data_source.rb similarity index 79% rename from lib/datadog_api_client/v2/models/secure_embed_get_response_type.rb rename to lib/datadog_api_client/v2/models/apm_dependency_stats_data_source.rb index ce2a9dcf995b..47df3186df71 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_get_response_type.rb +++ b/lib/datadog_api_client/v2/models/apm_dependency_stats_data_source.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # Resource type for secure embed get responses. - class SecureEmbedGetResponseType + # A data source for APM dependency statistics queries. + class ApmDependencyStatsDataSource include BaseEnumModel - SECURE_EMBED_GET_RESPONSE = "secure_embed_get_response".freeze + APM_DEPENDENCY_STATS = "apm_dependency_stats".freeze end end diff --git a/lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb b/lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb new file mode 100644 index 000000000000..6519659223c2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb @@ -0,0 +1,279 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A query for APM dependency statistics between services, such as call latency and error rates. + class ApmDependencyStatsQuery + include BaseGenericModel + + # A data source for APM dependency statistics queries. + attr_reader :data_source + + # The environment to query. + attr_reader :env + + # Determines whether stats for upstream or downstream dependencies should be queried. + attr_accessor :is_upstream + + # The variable name for use in formulas. + attr_reader :name + + # The APM operation name. + attr_reader :operation_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. + attr_accessor :primary_tag_name + + # Filter APM data by the second primary tag. `primary_tag_name` must also be specified. + attr_accessor :primary_tag_value + + # The resource name to filter by. + attr_reader :resource_name + + # The service name to filter by. + attr_reader :service + + # The APM dependency statistic to query. + attr_reader :stat + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'ApmDependencyStatsDataSource', + :'env' => :'String', + :'is_upstream' => :'Boolean', + :'name' => :'String', + :'operation_name' => :'String', + :'primary_tag_name' => :'String', + :'primary_tag_value' => :'String', + :'resource_name' => :'String', + :'service' => :'String', + :'stat' => :'ApmDependencyStatName' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApmDependencyStatsQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'env') + self.env = attributes[:'env'] + end + + if attributes.key?(:'is_upstream') + self.is_upstream = attributes[:'is_upstream'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'operation_name') + self.operation_name = attributes[:'operation_name'] + end + + if attributes.key?(:'primary_tag_name') + self.primary_tag_name = attributes[:'primary_tag_name'] + end + + if attributes.key?(:'primary_tag_value') + self.primary_tag_value = attributes[:'primary_tag_value'] + end + + if attributes.key?(:'resource_name') + self.resource_name = attributes[:'resource_name'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'stat') + self.stat = attributes[:'stat'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @env.nil? + return false if @name.nil? + return false if @operation_name.nil? + return false if @resource_name.nil? + return false if @service.nil? + return false if @stat.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param env [Object] Object to be assigned + # @!visibility private + def env=(env) + if env.nil? + fail ArgumentError, 'invalid value for "env", env cannot be nil.' + end + @env = env + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param operation_name [Object] Object to be assigned + # @!visibility private + def operation_name=(operation_name) + if operation_name.nil? + fail ArgumentError, 'invalid value for "operation_name", operation_name cannot be nil.' + end + @operation_name = operation_name + end + + # Custom attribute writer method with validation + # @param resource_name [Object] Object to be assigned + # @!visibility private + def resource_name=(resource_name) + if resource_name.nil? + fail ArgumentError, 'invalid value for "resource_name", resource_name cannot be nil.' + end + @resource_name = resource_name + end + + # Custom attribute writer method with validation + # @param service [Object] Object to be assigned + # @!visibility private + def service=(service) + if service.nil? + fail ArgumentError, 'invalid value for "service", service cannot be nil.' + end + @service = service + end + + # Custom attribute writer method with validation + # @param stat [Object] Object to be assigned + # @!visibility private + def stat=(stat) + if stat.nil? + fail ArgumentError, 'invalid value for "stat", stat cannot be nil.' + end + @stat = stat + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data_source == o.data_source && + env == o.env && + is_upstream == o.is_upstream && + name == o.name && + operation_name == o.operation_name && + primary_tag_name == o.primary_tag_name && + primary_tag_value == o.primary_tag_value && + resource_name == o.resource_name && + service == o.service && + stat == o.stat && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, env, is_upstream, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_share_type.rb b/lib/datadog_api_client/v2/models/apm_metrics_data_source.rb similarity index 83% rename from lib/datadog_api_client/v2/models/secure_embed_share_type.rb rename to lib/datadog_api_client/v2/models/apm_metrics_data_source.rb index 30403ea3d958..892160104e2e 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_share_type.rb +++ b/lib/datadog_api_client/v2/models/apm_metrics_data_source.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # The type of share. Always `secure_embed`. - class SecureEmbedShareType + # A data source for APM metrics queries. + class ApmMetricsDataSource include BaseEnumModel - SECURE_EMBED = "secure_embed".freeze + APM_METRICS = "apm_metrics".freeze end end diff --git a/lib/datadog_api_client/v2/models/apm_metrics_query.rb b/lib/datadog_api_client/v2/models/apm_metrics_query.rb new file mode 100644 index 000000000000..2bd2b23809de --- /dev/null +++ b/lib/datadog_api_client/v2/models/apm_metrics_query.rb @@ -0,0 +1,259 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A query for APM trace metrics such as hits, errors, and latency percentiles, aggregated across services. + class ApmMetricsQuery + include BaseGenericModel + + # A data source for APM metrics queries. + attr_reader :data_source + + # Optional fields to group the query results by. + attr_accessor :group_by + + # The variable name for use in formulas. + attr_reader :name + + # Optional operation mode to aggregate across operation names. + attr_accessor :operation_mode + + # Name of operation on service. If not provided, the primary operation name is used. + attr_accessor :operation_name + + # Tags to query for a specific downstream entity (peer.service, peer.db_instance, peer.s3, peer.s3.bucket, etc.). + attr_accessor :peer_tags + + # Additional filters for the query using metrics query syntax (e.g., env, primary_tag). + attr_accessor :query_filter + + # The resource hash for exact matching. + attr_accessor :resource_hash + + # The full name of a specific resource to filter by. + attr_accessor :resource_name + + # The service name to filter by. + attr_accessor :service + + # Describes the relationship between the span, its parents, and its children in a trace. + attr_accessor :span_kind + + # The APM metric statistic to query. + attr_reader :stat + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'ApmMetricsDataSource', + :'group_by' => :'Array', + :'name' => :'String', + :'operation_mode' => :'String', + :'operation_name' => :'String', + :'peer_tags' => :'Array', + :'query_filter' => :'String', + :'resource_hash' => :'String', + :'resource_name' => :'String', + :'service' => :'String', + :'span_kind' => :'ApmMetricsSpanKind', + :'stat' => :'ApmMetricsStat' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApmMetricsQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'operation_mode') + self.operation_mode = attributes[:'operation_mode'] + end + + if attributes.key?(:'operation_name') + self.operation_name = attributes[:'operation_name'] + end + + if attributes.key?(:'peer_tags') + if (value = attributes[:'peer_tags']).is_a?(Array) + self.peer_tags = value + end + end + + if attributes.key?(:'query_filter') + self.query_filter = attributes[:'query_filter'] + end + + if attributes.key?(:'resource_hash') + self.resource_hash = attributes[:'resource_hash'] + end + + if attributes.key?(:'resource_name') + self.resource_name = attributes[:'resource_name'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'span_kind') + self.span_kind = attributes[:'span_kind'] + end + + if attributes.key?(:'stat') + self.stat = attributes[:'stat'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @name.nil? + return false if @stat.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param stat [Object] Object to be assigned + # @!visibility private + def stat=(stat) + if stat.nil? + fail ArgumentError, 'invalid value for "stat", stat cannot be nil.' + end + @stat = stat + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data_source == o.data_source && + group_by == o.group_by && + name == o.name && + operation_mode == o.operation_mode && + operation_name == o.operation_name && + peer_tags == o.peer_tags && + query_filter == o.query_filter && + resource_hash == o.resource_hash && + resource_name == o.resource_name && + service == o.service && + span_kind == o.span_kind && + stat == o.stat && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, group_by, name, operation_mode, operation_name, peer_tags, query_filter, resource_hash, resource_name, service, span_kind, stat, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/apm_metrics_span_kind.rb b/lib/datadog_api_client/v2/models/apm_metrics_span_kind.rb new file mode 100644 index 000000000000..3750e70d1f5e --- /dev/null +++ b/lib/datadog_api_client/v2/models/apm_metrics_span_kind.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Describes the relationship between the span, its parents, and its children in a trace. + class ApmMetricsSpanKind + include BaseEnumModel + + CONSUMER = "consumer".freeze + SERVER = "server".freeze + CLIENT = "client".freeze + PRODUCER = "producer".freeze + INTERNAL = "internal".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/apm_metrics_stat.rb b/lib/datadog_api_client/v2/models/apm_metrics_stat.rb new file mode 100644 index 000000000000..0ab715b55253 --- /dev/null +++ b/lib/datadog_api_client/v2/models/apm_metrics_stat.rb @@ -0,0 +1,41 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The APM metric statistic to query. + class ApmMetricsStat + include BaseEnumModel + + ERROR_RATE = "error_rate".freeze + ERRORS = "errors".freeze + ERRORS_PER_SECOND = "errors_per_second".freeze + HITS = "hits".freeze + HITS_PER_SECOND = "hits_per_second".freeze + APDEX = "apdex".freeze + LATENCY_AVG = "latency_avg".freeze + LATENCY_MAX = "latency_max".freeze + LATENCY_P50 = "latency_p50".freeze + LATENCY_P75 = "latency_p75".freeze + LATENCY_P90 = "latency_p90".freeze + LATENCY_P95 = "latency_p95".freeze + LATENCY_P99 = "latency_p99".freeze + LATENCY_P999 = "latency_p999".freeze + LATENCY_DISTRIBUTION = "latency_distribution".freeze + TOTAL_TIME = "total_time".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/apm_resource_stat_name.rb b/lib/datadog_api_client/v2/models/apm_resource_stat_name.rb new file mode 100644 index 000000000000..cc938d033a88 --- /dev/null +++ b/lib/datadog_api_client/v2/models/apm_resource_stat_name.rb @@ -0,0 +1,37 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The APM resource statistic to query. + class ApmResourceStatName + include BaseEnumModel + + ERROR_RATE = "error_rate".freeze + ERRORS = "errors".freeze + HITS = "hits".freeze + LATENCY_AVG = "latency_avg".freeze + LATENCY_MAX = "latency_max".freeze + LATENCY_P50 = "latency_p50".freeze + LATENCY_P75 = "latency_p75".freeze + LATENCY_P90 = "latency_p90".freeze + LATENCY_P95 = "latency_p95".freeze + LATENCY_P99 = "latency_p99".freeze + LATENCY_DISTRIBUTION = "latency_distribution".freeze + TOTAL_TIME = "total_time".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_request_type.rb b/lib/datadog_api_client/v2/models/apm_resource_stats_data_source.rb similarity index 78% rename from lib/datadog_api_client/v2/models/secure_embed_update_request_type.rb rename to lib/datadog_api_client/v2/models/apm_resource_stats_data_source.rb index 5d87a8629b22..516f9e334ac5 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_update_request_type.rb +++ b/lib/datadog_api_client/v2/models/apm_resource_stats_data_source.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # Resource type for secure embed update requests. - class SecureEmbedUpdateRequestType + # A data source for APM resource statistics queries. + class ApmResourceStatsDataSource include BaseEnumModel - SECURE_EMBED_UPDATE_REQUEST = "secure_embed_update_request".freeze + APM_RESOURCE_STATS = "apm_resource_stats".freeze end end diff --git a/lib/datadog_api_client/v2/models/apm_resource_stats_query.rb b/lib/datadog_api_client/v2/models/apm_resource_stats_query.rb new file mode 100644 index 000000000000..5517bdf64bbc --- /dev/null +++ b/lib/datadog_api_client/v2/models/apm_resource_stats_query.rb @@ -0,0 +1,259 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A query for APM resource statistics such as latency, error rate, and hit count, grouped by resource name. + class ApmResourceStatsQuery + include BaseGenericModel + + # A data source for APM resource statistics queries. + attr_reader :data_source + + # The environment to query. + attr_reader :env + + # Tag keys to group results by. + attr_accessor :group_by + + # The variable name for use in formulas. + attr_reader :name + + # The APM operation name. + attr_accessor :operation_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 + attr_accessor :primary_tag_name + + # Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified. + attr_accessor :primary_tag_value + + # The resource name to filter by. + attr_accessor :resource_name + + # The service name to filter by. + attr_reader :service + + # The APM resource statistic to query. + attr_reader :stat + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'ApmResourceStatsDataSource', + :'env' => :'String', + :'group_by' => :'Array', + :'name' => :'String', + :'operation_name' => :'String', + :'primary_tag_name' => :'String', + :'primary_tag_value' => :'String', + :'resource_name' => :'String', + :'service' => :'String', + :'stat' => :'ApmResourceStatName' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ApmResourceStatsQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'env') + self.env = attributes[:'env'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'operation_name') + self.operation_name = attributes[:'operation_name'] + end + + if attributes.key?(:'primary_tag_name') + self.primary_tag_name = attributes[:'primary_tag_name'] + end + + if attributes.key?(:'primary_tag_value') + self.primary_tag_value = attributes[:'primary_tag_value'] + end + + if attributes.key?(:'resource_name') + self.resource_name = attributes[:'resource_name'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'stat') + self.stat = attributes[:'stat'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @env.nil? + return false if @name.nil? + return false if @service.nil? + return false if @stat.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param env [Object] Object to be assigned + # @!visibility private + def env=(env) + if env.nil? + fail ArgumentError, 'invalid value for "env", env cannot be nil.' + end + @env = env + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param service [Object] Object to be assigned + # @!visibility private + def service=(service) + if service.nil? + fail ArgumentError, 'invalid value for "service", service cannot be nil.' + end + @service = service + end + + # Custom attribute writer method with validation + # @param stat [Object] Object to be assigned + # @!visibility private + def stat=(stat) + if stat.nil? + fail ArgumentError, 'invalid value for "stat", stat cannot be nil.' + end + @stat = stat + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data_source == o.data_source && + env == o.env && + group_by == o.group_by && + name == o.name && + operation_name == o.operation_name && + primary_tag_name == o.primary_tag_name && + primary_tag_value == o.primary_tag_value && + resource_name == o.resource_name && + service == o.service && + stat == o.stat && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, env, group_by, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_request_type.rb b/lib/datadog_api_client/v2/models/container_data_source.rb similarity index 80% rename from lib/datadog_api_client/v2/models/secure_embed_request_type.rb rename to lib/datadog_api_client/v2/models/container_data_source.rb index 44b09eeb8ac6..dc4f286d9f3f 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_request_type.rb +++ b/lib/datadog_api_client/v2/models/container_data_source.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # Resource type for secure embed create requests. - class SecureEmbedRequestType + # A data source for container-level infrastructure metrics. + class ContainerDataSource include BaseEnumModel - SECURE_EMBED_REQUEST = "secure_embed_request".freeze + CONTAINER = "container".freeze end end diff --git a/lib/datadog_api_client/v2/models/container_scalar_query.rb b/lib/datadog_api_client/v2/models/container_scalar_query.rb new file mode 100644 index 000000000000..ed2ae98d558c --- /dev/null +++ b/lib/datadog_api_client/v2/models/container_scalar_query.rb @@ -0,0 +1,227 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A query for container-level metrics such as CPU and memory usage. + class ContainerScalarQuery + include BaseGenericModel + + # The type of aggregation that can be performed on metrics-based queries. + attr_accessor :aggregator + + # A data source for container-level infrastructure metrics. + attr_reader :data_source + + # Whether CPU metrics should be normalized by core count. + attr_accessor :is_normalized_cpu + + # Maximum number of results to return. + attr_accessor :limit + + # The container metric to query. + attr_reader :metric + + # The variable name for use in formulas. + attr_reader :name + + # Direction of sort. + attr_accessor :sort + + # Tag filters to narrow down containers. + attr_accessor :tag_filters + + # A full-text search filter to match container names. + attr_accessor :text_filter + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregator' => :'MetricsAggregator', + :'data_source' => :'ContainerDataSource', + :'is_normalized_cpu' => :'Boolean', + :'limit' => :'Integer', + :'metric' => :'String', + :'name' => :'String', + :'sort' => :'QuerySortOrder', + :'tag_filters' => :'Array', + :'text_filter' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerScalarQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'aggregator') + self.aggregator = attributes[:'aggregator'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'is_normalized_cpu') + self.is_normalized_cpu = attributes[:'is_normalized_cpu'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'tag_filters') + if (value = attributes[:'tag_filters']).is_a?(Array) + self.tag_filters = value + end + end + + if attributes.key?(:'text_filter') + self.text_filter = attributes[:'text_filter'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @metric.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + aggregator == o.aggregator && + data_source == o.data_source && + is_normalized_cpu == o.is_normalized_cpu && + limit == o.limit && + metric == o.metric && + name == o.name && + sort == o.sort && + tag_filters == o.tag_filters && + text_filter == o.text_filter && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregator, data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/container_timeseries_query.rb b/lib/datadog_api_client/v2/models/container_timeseries_query.rb new file mode 100644 index 000000000000..6444c0b1784a --- /dev/null +++ b/lib/datadog_api_client/v2/models/container_timeseries_query.rb @@ -0,0 +1,217 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A query for container-level metrics such as CPU and memory usage. + class ContainerTimeseriesQuery + include BaseGenericModel + + # A data source for container-level infrastructure metrics. + attr_reader :data_source + + # Whether CPU metrics should be normalized by core count. + attr_accessor :is_normalized_cpu + + # Maximum number of results to return. + attr_accessor :limit + + # The container metric to query. + attr_reader :metric + + # The variable name for use in formulas. + attr_reader :name + + # Direction of sort. + attr_accessor :sort + + # Tag filters to narrow down containers. + attr_accessor :tag_filters + + # A full-text search filter to match container names. + attr_accessor :text_filter + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'ContainerDataSource', + :'is_normalized_cpu' => :'Boolean', + :'limit' => :'Integer', + :'metric' => :'String', + :'name' => :'String', + :'sort' => :'QuerySortOrder', + :'tag_filters' => :'Array', + :'text_filter' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ContainerTimeseriesQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'is_normalized_cpu') + self.is_normalized_cpu = attributes[:'is_normalized_cpu'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'tag_filters') + if (value = attributes[:'tag_filters']).is_a?(Array) + self.tag_filters = value + end + end + + if attributes.key?(:'text_filter') + self.text_filter = attributes[:'text_filter'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @metric.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data_source == o.data_source && + is_normalized_cpu == o.is_normalized_cpu && + limit == o.limit && + metric == o.metric && + name == o.name && + sort == o.sort && + tag_filters == o.tag_filters && + text_filter == o.text_filter && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/events_data_source.rb b/lib/datadog_api_client/v2/models/events_data_source.rb index cbf84d1ac604..f3c5a2a573e2 100644 --- a/lib/datadog_api_client/v2/models/events_data_source.rb +++ b/lib/datadog_api_client/v2/models/events_data_source.rb @@ -22,7 +22,18 @@ class EventsDataSource include BaseEnumModel LOGS = "logs".freeze + SPANS = "spans".freeze + NETWORK = "network".freeze RUM = "rum".freeze + SECURITY_SIGNALS = "security_signals".freeze + PROFILES = "profiles".freeze + AUDIT = "audit".freeze + EVENTS = "events".freeze + CI_TESTS = "ci_tests".freeze + CI_PIPELINES = "ci_pipelines".freeze + INCIDENT_ANALYTICS = "incident_analytics".freeze + PRODUCT_ANALYTICS = "product_analytics".freeze + ON_CALL_EVENTS = "on_call_events".freeze DORA = "dora".freeze end end diff --git a/lib/datadog_api_client/v2/models/events_scalar_query.rb b/lib/datadog_api_client/v2/models/events_scalar_query.rb index 31abf84cbcb1..36d8803a514f 100644 --- a/lib/datadog_api_client/v2/models/events_scalar_query.rb +++ b/lib/datadog_api_client/v2/models/events_scalar_query.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # An individual scalar events query. + # An individual scalar query for logs, RUM, traces, CI pipelines, security signals, and other event-based data sources. Use this query type for any data source powered by the Events Platform. See the data_source field for the full list of supported sources. class EventsScalarQuery include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/events_timeseries_query.rb b/lib/datadog_api_client/v2/models/events_timeseries_query.rb index 126a3f9c494d..bf283120794d 100644 --- a/lib/datadog_api_client/v2/models/events_timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/events_timeseries_query.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # An individual timeseries events query. + # An individual timeseries query for logs, RUM, traces, CI pipelines, security signals, and other event-based data sources. Use this query type for any data source powered by the Events Platform. See the data_source field for the full list of supported sources. class EventsTimeseriesQuery include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/metrics_scalar_query.rb b/lib/datadog_api_client/v2/models/metrics_scalar_query.rb index a04a5bc27df5..e6fed22431fc 100644 --- a/lib/datadog_api_client/v2/models/metrics_scalar_query.rb +++ b/lib/datadog_api_client/v2/models/metrics_scalar_query.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # An individual scalar metrics query. + # A query against Datadog custom metrics or Cloud Cost data sources. class MetricsScalarQuery include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb b/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb index c9bfb3a2e143..1602e7e772b4 100644 --- a/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/metrics_timeseries_query.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # An individual timeseries metrics query. + # A query against Datadog custom metrics or Cloud Cost data sources. class MetricsTimeseriesQuery include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor_rule.rb b/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor_rule.rb index 6a0de832c8bc..a84449bac9f0 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor_rule.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor_rule.rb @@ -26,7 +26,7 @@ class ObservabilityPipelineParseGrokProcessorRule # Each rule must contain a name and a valid Grok pattern. attr_reader :match_rules - # The name of the field in the log event to apply the Grok rules to. + # The value of the source field in log events to be processed by the Grok rules. attr_reader :source # A list of Grok helper rules that can be referenced by the parsing rules. diff --git a/lib/datadog_api_client/v2/models/process_data_source.rb b/lib/datadog_api_client/v2/models/process_data_source.rb new file mode 100644 index 000000000000..1930d365a879 --- /dev/null +++ b/lib/datadog_api_client/v2/models/process_data_source.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A data source for process-level infrastructure metrics. + class ProcessDataSource + include BaseEnumModel + + PROCESS = "process".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/process_scalar_query.rb b/lib/datadog_api_client/v2/models/process_scalar_query.rb new file mode 100644 index 000000000000..bc81394a00cf --- /dev/null +++ b/lib/datadog_api_client/v2/models/process_scalar_query.rb @@ -0,0 +1,227 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A query for host-level process metrics such as CPU and memory usage. + class ProcessScalarQuery + include BaseGenericModel + + # The type of aggregation that can be performed on metrics-based queries. + attr_accessor :aggregator + + # A data source for process-level infrastructure metrics. + attr_reader :data_source + + # Whether CPU metrics should be normalized by core count. + attr_accessor :is_normalized_cpu + + # Maximum number of results to return. + attr_accessor :limit + + # The process metric to query. + attr_reader :metric + + # The variable name for use in formulas. + attr_reader :name + + # Direction of sort. + attr_accessor :sort + + # Tag filters to narrow down processes. + attr_accessor :tag_filters + + # A full-text search filter to match process names or commands. + attr_accessor :text_filter + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregator' => :'MetricsAggregator', + :'data_source' => :'ProcessDataSource', + :'is_normalized_cpu' => :'Boolean', + :'limit' => :'Integer', + :'metric' => :'String', + :'name' => :'String', + :'sort' => :'QuerySortOrder', + :'tag_filters' => :'Array', + :'text_filter' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProcessScalarQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'aggregator') + self.aggregator = attributes[:'aggregator'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'is_normalized_cpu') + self.is_normalized_cpu = attributes[:'is_normalized_cpu'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'tag_filters') + if (value = attributes[:'tag_filters']).is_a?(Array) + self.tag_filters = value + end + end + + if attributes.key?(:'text_filter') + self.text_filter = attributes[:'text_filter'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @metric.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + aggregator == o.aggregator && + data_source == o.data_source && + is_normalized_cpu == o.is_normalized_cpu && + limit == o.limit && + metric == o.metric && + name == o.name && + sort == o.sort && + tag_filters == o.tag_filters && + text_filter == o.text_filter && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregator, data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/process_timeseries_query.rb b/lib/datadog_api_client/v2/models/process_timeseries_query.rb new file mode 100644 index 000000000000..cf08ea931e22 --- /dev/null +++ b/lib/datadog_api_client/v2/models/process_timeseries_query.rb @@ -0,0 +1,217 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A query for host-level process metrics such as CPU and memory usage. + class ProcessTimeseriesQuery + include BaseGenericModel + + # A data source for process-level infrastructure metrics. + attr_reader :data_source + + # Whether CPU metrics should be normalized by core count. + attr_accessor :is_normalized_cpu + + # Maximum number of results to return. + attr_accessor :limit + + # The process metric to query. + attr_reader :metric + + # The variable name for use in formulas. + attr_reader :name + + # Direction of sort. + attr_accessor :sort + + # Tag filters to narrow down processes. + attr_accessor :tag_filters + + # A full-text search filter to match process names or commands. + attr_accessor :text_filter + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'ProcessDataSource', + :'is_normalized_cpu' => :'Boolean', + :'limit' => :'Integer', + :'metric' => :'String', + :'name' => :'String', + :'sort' => :'QuerySortOrder', + :'tag_filters' => :'Array', + :'text_filter' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProcessTimeseriesQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'is_normalized_cpu') + self.is_normalized_cpu = attributes[:'is_normalized_cpu'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'tag_filters') + if (value = attributes[:'tag_filters']).is_a?(Array) + self.tag_filters = value + end + end + + if attributes.key?(:'text_filter') + self.text_filter = attributes[:'text_filter'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @metric.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data_source == o.data_source && + is_normalized_cpu == o.is_normalized_cpu && + limit == o.limit && + metric == o.metric && + name == o.name && + sort == o.sort && + tag_filters == o.tag_filters && + text_filter == o.text_filter && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, is_normalized_cpu, limit, metric, name, sort, tag_filters, text_filter, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/scalar_query.rb b/lib/datadog_api_client/v2/models/scalar_query.rb index 0222ff45bc86..ef240532bc6e 100644 --- a/lib/datadog_api_client/v2/models/scalar_query.rb +++ b/lib/datadog_api_client/v2/models/scalar_query.rb @@ -27,7 +27,13 @@ class << self def openapi_one_of [ :'MetricsScalarQuery', - :'EventsScalarQuery' + :'EventsScalarQuery', + :'ApmResourceStatsQuery', + :'ApmMetricsQuery', + :'ApmDependencyStatsQuery', + :'SloQuery', + :'ProcessScalarQuery', + :'ContainerScalarQuery' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_request.rb b/lib/datadog_api_client/v2/models/secure_embed_create_request.rb deleted file mode 100644 index dfbcd1d6fc43..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_create_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request to create a secure embed shared dashboard. - class SecureEmbedCreateRequest - include BaseGenericModel - - # Data object for creating a secure embed. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'SecureEmbedCreateRequestData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_request_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_create_request_attributes.rb deleted file mode 100644 index 92abaaf854aa..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_create_request_attributes.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for creating a secure embed shared dashboard. - class SecureEmbedCreateRequestAttributes - include BaseGenericModel - - # Default time range configuration for the secure embed. - attr_reader :global_time - - # Whether viewers can change the time range. - attr_reader :global_time_selectable - - # Template variables viewers can modify. - attr_reader :selectable_template_vars - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_reader :status - - # Display title for the shared dashboard. - attr_reader :title - - # Display settings for the secure embed shared dashboard. - attr_reader :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'selectable_template_vars' => :'selectable_template_vars', - :'status' => :'status', - :'title' => :'title', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'selectable_template_vars' => :'Array', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateRequestAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @global_time.nil? - return false if @global_time_selectable.nil? - return false if @selectable_template_vars.nil? - return false if @status.nil? - return false if @title.nil? - return false if @viewing_preferences.nil? - true - end - - # Custom attribute writer method with validation - # @param global_time [Object] Object to be assigned - # @!visibility private - def global_time=(global_time) - if global_time.nil? - fail ArgumentError, 'invalid value for "global_time", global_time cannot be nil.' - end - @global_time = global_time - end - - # Custom attribute writer method with validation - # @param global_time_selectable [Object] Object to be assigned - # @!visibility private - def global_time_selectable=(global_time_selectable) - if global_time_selectable.nil? - fail ArgumentError, 'invalid value for "global_time_selectable", global_time_selectable cannot be nil.' - end - @global_time_selectable = global_time_selectable - end - - # Custom attribute writer method with validation - # @param selectable_template_vars [Object] Object to be assigned - # @!visibility private - def selectable_template_vars=(selectable_template_vars) - if selectable_template_vars.nil? - fail ArgumentError, 'invalid value for "selectable_template_vars", selectable_template_vars cannot be nil.' - end - @selectable_template_vars = selectable_template_vars - end - - # Custom attribute writer method with validation - # @param status [Object] Object to be assigned - # @!visibility private - def status=(status) - if status.nil? - fail ArgumentError, 'invalid value for "status", status cannot be nil.' - end - @status = status - end - - # Custom attribute writer method with validation - # @param title [Object] Object to be assigned - # @!visibility private - def title=(title) - if title.nil? - fail ArgumentError, 'invalid value for "title", title cannot be nil.' - end - @title = title - end - - # Custom attribute writer method with validation - # @param viewing_preferences [Object] Object to be assigned - # @!visibility private - def viewing_preferences=(viewing_preferences) - if viewing_preferences.nil? - fail ArgumentError, 'invalid value for "viewing_preferences", viewing_preferences cannot be nil.' - end - @viewing_preferences = viewing_preferences - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - selectable_template_vars == o.selectable_template_vars && - status == o.status && - title == o.title && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [global_time, global_time_selectable, selectable_template_vars, status, title, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_request_data.rb b/lib/datadog_api_client/v2/models/secure_embed_create_request_data.rb deleted file mode 100644 index 2477a8af2abc..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_create_request_data.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for creating a secure embed. - class SecureEmbedCreateRequestData - include BaseGenericModel - - # Attributes for creating a secure embed shared dashboard. - attr_reader :attributes - - # Resource type for secure embed create requests. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'SecureEmbedCreateRequestAttributes', - :'type' => :'SecureEmbedRequestType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateRequestData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_response.rb b/lib/datadog_api_client/v2/models/secure_embed_create_response.rb deleted file mode 100644 index a82a632bb170..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_create_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response for creating a secure embed shared dashboard. - class SecureEmbedCreateResponse - include BaseGenericModel - - # Data object for a secure embed create response. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'SecureEmbedCreateResponseData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_response_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_create_response_attributes.rb deleted file mode 100644 index 1399f486c91f..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_create_response_attributes.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of a newly created secure embed shared dashboard. - class SecureEmbedCreateResponseAttributes - include BaseGenericModel - - # Creation timestamp. - attr_accessor :created_at - - # The secret credential used for HMAC signing. Returned only on creation. Store securely — it cannot be retrieved again. - attr_accessor :credential - - # The source dashboard ID. - attr_accessor :dashboard_id - - # Default time range configuration for the secure embed. - attr_accessor :global_time - - # Whether time range is viewer-selectable. - attr_accessor :global_time_selectable - - # Internal share ID. - attr_accessor :id - - # Template variables with their configuration. - attr_accessor :selectable_template_vars - - # The type of share. Always `secure_embed`. - attr_accessor :share_type - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_accessor :status - - # Display title. - attr_accessor :title - - # Public share token. - attr_accessor :token - - # CDN URL for the shared dashboard. - attr_accessor :url - - # Display settings for the secure embed shared dashboard. - attr_accessor :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_at' => :'created_at', - :'credential' => :'credential', - :'dashboard_id' => :'dashboard_id', - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'id' => :'id', - :'selectable_template_vars' => :'selectable_template_vars', - :'share_type' => :'share_type', - :'status' => :'status', - :'title' => :'title', - :'token' => :'token', - :'url' => :'url', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_at' => :'String', - :'credential' => :'String', - :'dashboard_id' => :'String', - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'id' => :'String', - :'selectable_template_vars' => :'Array', - :'share_type' => :'SecureEmbedShareType', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'token' => :'String', - :'url' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateResponseAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'credential') - self.credential = attributes[:'credential'] - end - - if attributes.key?(:'dashboard_id') - self.dashboard_id = attributes[:'dashboard_id'] - end - - if attributes.key?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'share_type') - self.share_type = attributes[:'share_type'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'token') - self.token = attributes[:'token'] - end - - if attributes.key?(:'url') - self.url = attributes[:'url'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_at == o.created_at && - credential == o.credential && - dashboard_id == o.dashboard_id && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - id == o.id && - selectable_template_vars == o.selectable_template_vars && - share_type == o.share_type && - status == o.status && - title == o.title && - token == o.token && - url == o.url && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_at, credential, dashboard_id, global_time, global_time_selectable, id, selectable_template_vars, share_type, status, title, token, url, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_response_data.rb b/lib/datadog_api_client/v2/models/secure_embed_create_response_data.rb deleted file mode 100644 index b24d7f25f0e9..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_create_response_data.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for a secure embed create response. - class SecureEmbedCreateResponseData - include BaseGenericModel - - # Attributes of a newly created secure embed shared dashboard. - attr_reader :attributes - - # Internal share ID. - attr_reader :id - - # Resource type for secure embed create responses. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'SecureEmbedCreateResponseAttributes', - :'id' => :'String', - :'type' => :'SecureEmbedCreateResponseType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateResponseData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_get_response.rb b/lib/datadog_api_client/v2/models/secure_embed_get_response.rb deleted file mode 100644 index 07829667bdcd..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_get_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response for getting a secure embed shared dashboard. - class SecureEmbedGetResponse - include BaseGenericModel - - # Data object for a secure embed get response. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'SecureEmbedGetResponseData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedGetResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_get_response_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_get_response_attributes.rb deleted file mode 100644 index 15d85c82990b..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_get_response_attributes.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of an existing secure embed shared dashboard. - class SecureEmbedGetResponseAttributes - include BaseGenericModel - - # Creation timestamp. - attr_accessor :created_at - - # Last 4 characters of the credential. Defaults to `0000` if unavailable. - attr_accessor :credential_suffix - - # The source dashboard ID. - attr_accessor :dashboard_id - - # Default time range configuration for the secure embed. - attr_accessor :global_time - - # Whether time range is viewer-selectable. - attr_accessor :global_time_selectable - - # Internal share ID. - attr_accessor :id - - # Template variables with their configuration. - attr_accessor :selectable_template_vars - - # The type of share. Always `secure_embed`. - attr_accessor :share_type - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_accessor :status - - # Display title. - attr_accessor :title - - # Public share token. - attr_accessor :token - - # CDN URL for the shared dashboard. - attr_accessor :url - - # Display settings for the secure embed shared dashboard. - attr_accessor :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_at' => :'created_at', - :'credential_suffix' => :'credential_suffix', - :'dashboard_id' => :'dashboard_id', - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'id' => :'id', - :'selectable_template_vars' => :'selectable_template_vars', - :'share_type' => :'share_type', - :'status' => :'status', - :'title' => :'title', - :'token' => :'token', - :'url' => :'url', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_at' => :'String', - :'credential_suffix' => :'String', - :'dashboard_id' => :'String', - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'id' => :'String', - :'selectable_template_vars' => :'Array', - :'share_type' => :'SecureEmbedShareType', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'token' => :'String', - :'url' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedGetResponseAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'credential_suffix') - self.credential_suffix = attributes[:'credential_suffix'] - end - - if attributes.key?(:'dashboard_id') - self.dashboard_id = attributes[:'dashboard_id'] - end - - if attributes.key?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'share_type') - self.share_type = attributes[:'share_type'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'token') - self.token = attributes[:'token'] - end - - if attributes.key?(:'url') - self.url = attributes[:'url'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_at == o.created_at && - credential_suffix == o.credential_suffix && - dashboard_id == o.dashboard_id && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - id == o.id && - selectable_template_vars == o.selectable_template_vars && - share_type == o.share_type && - status == o.status && - title == o.title && - token == o.token && - url == o.url && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_at, credential_suffix, dashboard_id, global_time, global_time_selectable, id, selectable_template_vars, share_type, status, title, token, url, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_get_response_data.rb b/lib/datadog_api_client/v2/models/secure_embed_get_response_data.rb deleted file mode 100644 index 810c06f9be17..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_get_response_data.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for a secure embed get response. - class SecureEmbedGetResponseData - include BaseGenericModel - - # Attributes of an existing secure embed shared dashboard. - attr_reader :attributes - - # Internal share ID. - attr_reader :id - - # Resource type for secure embed get responses. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'SecureEmbedGetResponseAttributes', - :'id' => :'String', - :'type' => :'SecureEmbedGetResponseType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedGetResponseData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_global_time.rb b/lib/datadog_api_client/v2/models/secure_embed_global_time.rb deleted file mode 100644 index 99e9d36b4c63..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_global_time.rb +++ /dev/null @@ -1,105 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Default time range configuration for the secure embed. - class SecureEmbedGlobalTime - include BaseGenericModel - - # Dashboard global time live_span selection. - attr_accessor :live_span - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'live_span' => :'live_span' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'live_span' => :'SecureEmbedGlobalTimeLiveSpan' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedGlobalTime` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'live_span') - self.live_span = attributes[:'live_span'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - live_span == o.live_span && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [live_span, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_selectable_template_variable.rb b/lib/datadog_api_client/v2/models/secure_embed_selectable_template_variable.rb deleted file mode 100644 index bd80a51e9c49..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_selectable_template_variable.rb +++ /dev/null @@ -1,139 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A template variable that viewers can modify on the secure embed shared dashboard. - class SecureEmbedSelectableTemplateVariable - include BaseGenericModel - - # Default selected values for the variable. - attr_accessor :default_values - - # Name of the template variable. Usually matches the prefix unless you want a different display name. - attr_accessor :name - - # Tag prefix for the variable (e.g., `environment`, `service`). - attr_accessor :prefix - - # Restrict which tag values are visible to the viewer. - attr_accessor :visible_tags - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'default_values' => :'default_values', - :'name' => :'name', - :'prefix' => :'prefix', - :'visible_tags' => :'visible_tags' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'default_values' => :'Array', - :'name' => :'String', - :'prefix' => :'String', - :'visible_tags' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedSelectableTemplateVariable` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'default_values') - if (value = attributes[:'default_values']).is_a?(Array) - self.default_values = value - end - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'prefix') - self.prefix = attributes[:'prefix'] - end - - if attributes.key?(:'visible_tags') - if (value = attributes[:'visible_tags']).is_a?(Array) - self.visible_tags = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - default_values == o.default_values && - name == o.name && - prefix == o.prefix && - visible_tags == o.visible_tags && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [default_values, name, prefix, visible_tags, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_status.rb b/lib/datadog_api_client/v2/models/secure_embed_status.rb deleted file mode 100644 index b4c90b0984a6..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_status.rb +++ /dev/null @@ -1,27 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - class SecureEmbedStatus - include BaseEnumModel - - ACTIVE = "active".freeze - PAUSED = "paused".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_request.rb b/lib/datadog_api_client/v2/models/secure_embed_update_request.rb deleted file mode 100644 index 0e8932905a59..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request to update a secure embed shared dashboard. - class SecureEmbedUpdateRequest - include BaseGenericModel - - # Data object for updating a secure embed. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'SecureEmbedUpdateRequestData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_request_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_update_request_attributes.rb deleted file mode 100644 index 93f65cf8a023..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_request_attributes.rb +++ /dev/null @@ -1,157 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for updating a secure embed shared dashboard. All fields are optional. - class SecureEmbedUpdateRequestAttributes - include BaseGenericModel - - # Default time range configuration for the secure embed. - attr_accessor :global_time - - # Updated time selectability. - attr_accessor :global_time_selectable - - # Updated template variables. - attr_accessor :selectable_template_vars - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_accessor :status - - # Updated title. - attr_accessor :title - - # Display settings for the secure embed shared dashboard. - attr_accessor :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'selectable_template_vars' => :'selectable_template_vars', - :'status' => :'status', - :'title' => :'title', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'selectable_template_vars' => :'Array', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateRequestAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - selectable_template_vars == o.selectable_template_vars && - status == o.status && - title == o.title && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [global_time, global_time_selectable, selectable_template_vars, status, title, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_request_data.rb b/lib/datadog_api_client/v2/models/secure_embed_update_request_data.rb deleted file mode 100644 index f352ac2cfd03..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_request_data.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a secure embed. - class SecureEmbedUpdateRequestData - include BaseGenericModel - - # Attributes for updating a secure embed shared dashboard. All fields are optional. - attr_reader :attributes - - # Resource type for secure embed update requests. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'SecureEmbedUpdateRequestAttributes', - :'type' => :'SecureEmbedUpdateRequestType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateRequestData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_response.rb b/lib/datadog_api_client/v2/models/secure_embed_update_response.rb deleted file mode 100644 index a39fd4c047a0..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response for updating a secure embed shared dashboard. - class SecureEmbedUpdateResponse - include BaseGenericModel - - # Data object for a secure embed update response. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'SecureEmbedUpdateResponseData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_response_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_update_response_attributes.rb deleted file mode 100644 index 1e9882e81b5d..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_response_attributes.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of an updated secure embed shared dashboard. - class SecureEmbedUpdateResponseAttributes - include BaseGenericModel - - # Creation timestamp. - attr_accessor :created_at - - # Last 4 characters of the credential. Defaults to `0000` if unavailable. - attr_accessor :credential_suffix - - # The source dashboard ID. - attr_accessor :dashboard_id - - # Default time range configuration for the secure embed. - attr_accessor :global_time - - # Whether time range is viewer-selectable. - attr_accessor :global_time_selectable - - # Internal share ID. - attr_accessor :id - - # Template variables with their configuration. - attr_accessor :selectable_template_vars - - # The type of share. Always `secure_embed`. - attr_accessor :share_type - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_accessor :status - - # Display title. - attr_accessor :title - - # Public share token. - attr_accessor :token - - # CDN URL for the shared dashboard. - attr_accessor :url - - # Display settings for the secure embed shared dashboard. - attr_accessor :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_at' => :'created_at', - :'credential_suffix' => :'credential_suffix', - :'dashboard_id' => :'dashboard_id', - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'id' => :'id', - :'selectable_template_vars' => :'selectable_template_vars', - :'share_type' => :'share_type', - :'status' => :'status', - :'title' => :'title', - :'token' => :'token', - :'url' => :'url', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_at' => :'String', - :'credential_suffix' => :'String', - :'dashboard_id' => :'String', - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'id' => :'String', - :'selectable_template_vars' => :'Array', - :'share_type' => :'SecureEmbedShareType', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'token' => :'String', - :'url' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateResponseAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'credential_suffix') - self.credential_suffix = attributes[:'credential_suffix'] - end - - if attributes.key?(:'dashboard_id') - self.dashboard_id = attributes[:'dashboard_id'] - end - - if attributes.key?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'share_type') - self.share_type = attributes[:'share_type'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'token') - self.token = attributes[:'token'] - end - - if attributes.key?(:'url') - self.url = attributes[:'url'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_at == o.created_at && - credential_suffix == o.credential_suffix && - dashboard_id == o.dashboard_id && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - id == o.id && - selectable_template_vars == o.selectable_template_vars && - share_type == o.share_type && - status == o.status && - title == o.title && - token == o.token && - url == o.url && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_at, credential_suffix, dashboard_id, global_time, global_time_selectable, id, selectable_template_vars, share_type, status, title, token, url, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_response_data.rb b/lib/datadog_api_client/v2/models/secure_embed_update_response_data.rb deleted file mode 100644 index 4d4438eab9d3..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_response_data.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for a secure embed update response. - class SecureEmbedUpdateResponseData - include BaseGenericModel - - # Attributes of an updated secure embed shared dashboard. - attr_reader :attributes - - # Internal share ID. - attr_reader :id - - # Resource type for secure embed update responses. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'SecureEmbedUpdateResponseAttributes', - :'id' => :'String', - :'type' => :'SecureEmbedUpdateResponseType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateResponseData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_response_type.rb b/lib/datadog_api_client/v2/models/secure_embed_update_response_type.rb deleted file mode 100644 index 7c93bc3c4d10..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_response_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Resource type for secure embed update responses. - class SecureEmbedUpdateResponseType - include BaseEnumModel - - SECURE_EMBED_UPDATE_RESPONSE = "secure_embed_update_response".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences.rb b/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences.rb deleted file mode 100644 index 469acc8f75e0..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Display settings for the secure embed shared dashboard. - class SecureEmbedViewingPreferences - include BaseGenericModel - - # Whether widgets are displayed in high density mode. - attr_accessor :high_density - - # The theme of the shared dashboard view. `system` follows the viewer's system default. - attr_accessor :theme - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'high_density' => :'high_density', - :'theme' => :'theme' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'high_density' => :'Boolean', - :'theme' => :'SecureEmbedViewingPreferencesTheme' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedViewingPreferences` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'high_density') - self.high_density = attributes[:'high_density'] - end - - if attributes.key?(:'theme') - self.theme = attributes[:'theme'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - high_density == o.high_density && - theme == o.theme && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [high_density, theme, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences_theme.rb b/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences_theme.rb deleted file mode 100644 index cd5c9bf8625d..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences_theme.rb +++ /dev/null @@ -1,28 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The theme of the shared dashboard view. `system` follows the viewer's system default. - class SecureEmbedViewingPreferencesTheme - include BaseEnumModel - - SYSTEM = "system".freeze - LIGHT = "light".freeze - DARK = "dark".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/slo_data_source.rb b/lib/datadog_api_client/v2/models/slo_data_source.rb new file mode 100644 index 000000000000..d9a808061141 --- /dev/null +++ b/lib/datadog_api_client/v2/models/slo_data_source.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A data source for SLO queries. + class SloDataSource + include BaseEnumModel + + SLO = "slo".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/slo_query.rb b/lib/datadog_api_client/v2/models/slo_query.rb new file mode 100644 index 000000000000..0cc376bd6ce6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/slo_query.rb @@ -0,0 +1,205 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A query for SLO status, error budget, and burn rate metrics. + class SloQuery + include BaseGenericModel + + # Additional filters applied to the SLO query. + attr_accessor :additional_query_filters + + # A data source for SLO queries. + attr_reader :data_source + + # How SLO results are grouped in the response. + attr_accessor :group_mode + + # The SLO measurement to retrieve. + attr_reader :measure + + # The variable name for use in formulas. + attr_accessor :name + + # The unique identifier of the SLO to query. + attr_reader :slo_id + + # The type of SLO definition being queried. + attr_accessor :slo_query_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'additional_query_filters' => :'String', + :'data_source' => :'SloDataSource', + :'group_mode' => :'SlosGroupMode', + :'measure' => :'SlosMeasure', + :'name' => :'String', + :'slo_id' => :'String', + :'slo_query_type' => :'SlosQueryType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SloQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'additional_query_filters') + self.additional_query_filters = attributes[:'additional_query_filters'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'group_mode') + self.group_mode = attributes[:'group_mode'] + end + + if attributes.key?(:'measure') + self.measure = attributes[:'measure'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'slo_id') + self.slo_id = attributes[:'slo_id'] + end + + if attributes.key?(:'slo_query_type') + self.slo_query_type = attributes[:'slo_query_type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @measure.nil? + return false if @slo_id.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param measure [Object] Object to be assigned + # @!visibility private + def measure=(measure) + if measure.nil? + fail ArgumentError, 'invalid value for "measure", measure cannot be nil.' + end + @measure = measure + end + + # Custom attribute writer method with validation + # @param slo_id [Object] Object to be assigned + # @!visibility private + def slo_id=(slo_id) + if slo_id.nil? + fail ArgumentError, 'invalid value for "slo_id", slo_id cannot be nil.' + end + @slo_id = slo_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_query_filters == o.additional_query_filters && + data_source == o.data_source && + group_mode == o.group_mode && + measure == o.measure && + name == o.name && + slo_id == o.slo_id && + slo_query_type == o.slo_query_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [additional_query_filters, data_source, group_mode, measure, name, slo_id, slo_query_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/slos_group_mode.rb b/lib/datadog_api_client/v2/models/slos_group_mode.rb new file mode 100644 index 000000000000..24411af89a2b --- /dev/null +++ b/lib/datadog_api_client/v2/models/slos_group_mode.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # How SLO results are grouped in the response. + class SlosGroupMode + include BaseEnumModel + + OVERALL = "overall".freeze + COMPONENTS = "components".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/slos_measure.rb b/lib/datadog_api_client/v2/models/slos_measure.rb new file mode 100644 index 000000000000..dc1c9b171438 --- /dev/null +++ b/lib/datadog_api_client/v2/models/slos_measure.rb @@ -0,0 +1,35 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The SLO measurement to retrieve. + class SlosMeasure + include BaseEnumModel + + GOOD_EVENTS = "good_events".freeze + BAD_EVENTS = "bad_events".freeze + SLO_STATUS = "slo_status".freeze + ERROR_BUDGET_REMAINING = "error_budget_remaining".freeze + ERROR_BUDGET_REMAINING_HISTORY = "error_budget_remaining_history".freeze + ERROR_BUDGET_BURNDOWN = "error_budget_burndown".freeze + BURN_RATE = "burn_rate".freeze + SLO_STATUS_HISTORY = "slo_status_history".freeze + GOOD_MINUTES = "good_minutes".freeze + BAD_MINUTES = "bad_minutes".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_response_type.rb b/lib/datadog_api_client/v2/models/slos_query_type.rb similarity index 77% rename from lib/datadog_api_client/v2/models/secure_embed_create_response_type.rb rename to lib/datadog_api_client/v2/models/slos_query_type.rb index d5df6cfab066..5d46bae7d349 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_create_response_type.rb +++ b/lib/datadog_api_client/v2/models/slos_query_type.rb @@ -17,10 +17,12 @@ require 'time' module DatadogAPIClient::V2 - # Resource type for secure embed create responses. - class SecureEmbedCreateResponseType + # The type of SLO definition being queried. + class SlosQueryType include BaseEnumModel - SECURE_EMBED_CREATE_RESPONSE = "secure_embed_create_response".freeze + METRIC = "metric".freeze + TIME_SLICE = "time_slice".freeze + MONITOR = "monitor".freeze end end diff --git a/lib/datadog_api_client/v2/models/timeseries_query.rb b/lib/datadog_api_client/v2/models/timeseries_query.rb index 78b26764df33..50ba3ec801ff 100644 --- a/lib/datadog_api_client/v2/models/timeseries_query.rb +++ b/lib/datadog_api_client/v2/models/timeseries_query.rb @@ -27,7 +27,13 @@ class << self def openapi_one_of [ :'MetricsTimeseriesQuery', - :'EventsTimeseriesQuery' + :'EventsTimeseriesQuery', + :'ApmResourceStatsQuery', + :'ApmMetricsQuery', + :'ApmDependencyStatsQuery', + :'SloQuery', + :'ProcessTimeseriesQuery', + :'ContainerTimeseriesQuery' ] end # Builds the object