From 321b856ca6543266a803bbf6fd4182afea242ac4 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 8 Sep 2026 17:10:20 +0000 Subject: [PATCH] Regenerate client from commit 1cd323e of spec repo --- .generator/schemas/v2/openapi.yaml | 783 ++++++++++++++++++ .../CreateTimeseriesAnomalyInvestigation.ts | 48 ++ features/support/scenarios_model_mapping.ts | 7 + .../timeseries_anomaly_investigations.feature | 32 + features/v2/undo.json | 6 + .../configuration.ts | 1 + .../TimeseriesAnomalyInvestigationsApi.ts | 232 ++++++ packages/datadog-api-client-v2/index.ts | 43 + .../models/ObjectSerializer.ts | 91 ++ .../TimeseriesAnomalyInvestigationAnomaly.ts | 123 +++ ...eriesAnomalyInvestigationAnomalyFinding.ts | 72 ++ ...sAnomalyInvestigationAnomalyFindingType.ts | 16 + ...meseriesAnomalyInvestigationAnomalyType.ts | 18 + ...eriesAnomalyInvestigationCompleteStatus.ts | 16 + ...AnomalyInvestigationConfigurationSource.ts | 18 + ...imeseriesAnomalyInvestigationDataSource.ts | 16 + ...TimeseriesAnomalyInvestigationDetection.ts | 63 ++ .../TimeseriesAnomalyInvestigationFinding.ts | 18 + ...eriesAnomalyInvestigationFindingSynonym.ts | 62 ++ ...imeseriesAnomalyInvestigationFindingTag.ts | 92 ++ .../TimeseriesAnomalyInvestigationFormula.ts | 62 ++ ...eseriesAnomalyInvestigationFormulaLimit.ts | 62 ++ ...esAnomalyInvestigationFormulaLimitOrder.ts | 18 + ...seriesAnomalyInvestigationInfluenceType.ts | 18 + ...omalyInvestigationInfluentialTagFinding.ts | 82 ++ ...yInvestigationInfluentialTagFindingType.ts | 16 + .../TimeseriesAnomalyInvestigationInterval.ts | 64 ++ ...iesAnomalyInvestigationMaximumDeviation.ts | 74 ++ .../TimeseriesAnomalyInvestigationMetaType.ts | 17 + ...meseriesAnomalyInvestigationMetricQuery.ts | 88 ++ ...nomalyInvestigationQueryExecutionStatus.ts | 18 + ...meseriesAnomalyInvestigationQueryStatus.ts | 63 ++ .../TimeseriesAnomalyInvestigationRequest.ts | 54 ++ ...esAnomalyInvestigationRequestAttributes.ts | 54 ++ ...meseriesAnomalyInvestigationRequestData.ts | 64 ++ .../TimeseriesAnomalyInvestigationResponse.ts | 64 ++ ...sAnomalyInvestigationResponseAttributes.ts | 54 ++ ...eseriesAnomalyInvestigationResponseData.ts | 74 ++ ...imeseriesAnomalyInvestigationResponseID.ts | 16 + ...eseriesAnomalyInvestigationResponseMeta.ts | 104 +++ .../TimeseriesAnomalyInvestigationResult.ts | 64 ++ ...eriesAnomalyInvestigationResultsWarning.ts | 62 ++ .../TimeseriesAnomalyInvestigationSeries.ts | 72 ++ ...meseriesAnomalyInvestigationTagAnalysis.ts | 80 ++ ...esAnomalyInvestigationTagAnalysisStatus.ts | 20 + ...esAnomalyInvestigationTimeseriesRequest.ts | 93 +++ .../TimeseriesAnomalyInvestigationType.ts | 17 + 47 files changed, 3231 insertions(+) create mode 100644 examples/v2/timeseries-anomaly-investigations/CreateTimeseriesAnomalyInvestigation.ts create mode 100644 features/v2/timeseries_anomaly_investigations.feature create mode 100644 packages/datadog-api-client-v2/apis/TimeseriesAnomalyInvestigationsApi.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomaly.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyFinding.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyFindingType.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyType.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationCompleteStatus.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationConfigurationSource.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationDataSource.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationDetection.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFinding.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFindingSynonym.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFindingTag.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormula.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormulaLimit.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormulaLimitOrder.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluenceType.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluentialTagFinding.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluentialTagFindingType.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInterval.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMaximumDeviation.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMetaType.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMetricQuery.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationQueryExecutionStatus.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationQueryStatus.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequest.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequestAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponse.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseID.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseMeta.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResult.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResultsWarning.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationSeries.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTagAnalysis.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTagAnalysisStatus.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTimeseriesRequest.ts create mode 100644 packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationType.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0cbaf7439c53..d17e8422b8ae 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -120348,6 +120348,646 @@ components: $ref: '#/components/schemas/TimelineCellResource' type: array type: object + TimeseriesAnomalyInvestigationAnomaly: + description: Most significant anomaly detected in the request. + properties: + anomaly_detection: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationDetection' + detected_interval: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInterval' + display_interval: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInterval' + findings: + description: Deterministic explanations for the anomaly, ordered by importance. + example: [] + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFinding' + maxItems: 3 + type: array + maximum_deviation: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationMaximumDeviation' + series: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationSeries' + tag_analysis: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationTagAnalysis' + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomalyType' + required: + - series + - anomaly_detection + - detected_interval + - display_interval + - type + - maximum_deviation + - tag_analysis + - findings + type: object + TimeseriesAnomalyInvestigationAnomalyFinding: + description: Finding that describes the anomaly when completed analysis produces no displayable influential tags. + properties: + description: + description: Deterministic explanation of the finding. + example: "The service:api series rose outside its expected range." + type: string + headline: + description: Concise, deterministic finding title. + example: "An anomaly was detected on service:api" + type: string + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomalyFindingType' + required: + - type + - headline + - description + type: object + TimeseriesAnomalyInvestigationAnomalyFindingType: + description: Finding category for an anomaly without a displayable influential tag. + enum: + - anomaly + example: anomaly + type: string + x-enum-varnames: + - ANOMALY + TimeseriesAnomalyInvestigationAnomalyType: + description: Direction of an anomaly relative to its expected range. + enum: + - spike + - dip + example: spike + type: string + x-enum-varnames: + - SPIKE + - DIP + TimeseriesAnomalyInvestigationCompleteStatus: + description: Status value indicating successful completion. + enum: + - complete + example: complete + type: string + x-enum-varnames: + - COMPLETE + TimeseriesAnomalyInvestigationConfigurationSource: + description: Source of the anomaly detection configuration. + enum: + - request_formula + - watchdog_explains_default + example: request_formula + type: string + x-enum-varnames: + - REQUEST_FORMULA + - WATCHDOG_EXPLAINS_DEFAULT + TimeseriesAnomalyInvestigationDataSource: + description: Data source for an anomaly investigation query. + enum: + - metrics + example: metrics + type: string + x-enum-varnames: + - METRICS + TimeseriesAnomalyInvestigationDetection: + description: Anomaly detection configuration used for the result. + properties: + configuration_source: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationConfigurationSource' + profile: + description: Applied Watchdog Explains profile, or null when the request supplied an explicit `anomalies()` formula. The current Watchdog profile is `watchdog_explains_v1`. + example: + nullable: true + type: string + required: + - configuration_source + - profile + type: object + TimeseriesAnomalyInvestigationFinding: + description: Deterministic explanation for a detected anomaly. + oneOf: + - $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInfluentialTagFinding' + - $ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomalyFinding' + TimeseriesAnomalyInvestigationFindingSynonym: + description: Tag grouped under an influential tag by synonym analysis. + properties: + key: + description: Synonymous tag key. + example: app + type: string + values: + description: Values associated with the synonymous tag. + example: + - api + items: + description: Synonymous tag value. + example: api + type: string + type: array + required: + - key + - values + type: object + TimeseriesAnomalyInvestigationFindingTag: + description: Structured tag evidence for an influential-tag finding. + properties: + influence_type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInfluenceType' + key: + description: Influential tag key. + example: service + type: string + rating: + description: Influence rating from 1 through 5. + example: 5.0 + format: double + maximum: 5 + minimum: 1 + type: number + synonyms: + description: Tags grouped with this tag by Variation of Influence synonym analysis. + example: [] + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFindingSynonym' + type: array + values: + description: Influential values for the tag key. + example: + - api + items: + description: Influential tag value. + example: api + type: string + type: array + required: + - key + - values + - influence_type + - rating + - synonyms + type: object + TimeseriesAnomalyInvestigationFormula: + description: Formula evaluated by the timeseries request. + properties: + formula: + description: Formula expression referencing one or more named queries. + example: "anomalies(query1, 'agile', 3)" + minLength: 1 + type: string + limit: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFormulaLimit' + required: + - formula + type: object + TimeseriesAnomalyInvestigationFormulaLimit: + description: Optional formula limit accepted for compatibility with Timeseries API requests. Formula limits have no effect on timeseries queries. + properties: + count: + description: Requested result limit. This field has no effect on a timeseries anomaly investigation. + example: 10 + format: int64 + minimum: 0 + type: integer + order: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFormulaLimitOrder' + type: object + TimeseriesAnomalyInvestigationFormulaLimitOrder: + description: Sort order used when applying a formula series limit. + enum: + - asc + - desc + example: desc + type: string + x-enum-varnames: + - ASC + - DESC + TimeseriesAnomalyInvestigationInfluenceType: + description: Kind of influence a tag has on a series. + enum: + - shape + - value + example: shape + type: string + x-enum-varnames: + - SHAPE + - VALUE + TimeseriesAnomalyInvestigationInfluentialTagFinding: + description: Finding that attributes an anomaly to an influential tag. + properties: + description: + description: Deterministic explanation of the finding. + example: "Filtering out service:api flattens the spike." + type: string + headline: + description: Concise, deterministic finding title. + example: "service:api is the likely cause" + type: string + tag: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFindingTag' + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInfluentialTagFindingType' + required: + - type + - headline + - description + - tag + type: object + TimeseriesAnomalyInvestigationInfluentialTagFindingType: + description: Finding category for an influential tag. + enum: + - influential_tag + example: influential_tag + type: string + x-enum-varnames: + - INFLUENTIAL_TAG + TimeseriesAnomalyInvestigationInterval: + description: Inclusive time interval in milliseconds since the Unix epoch. + properties: + end: + description: Timestamp of the final point in the interval. + example: 1754406120000 + format: int64 + type: integer + start: + description: Inclusive start of the interval. + example: 1754406060000 + format: int64 + type: integer + required: + - start + - end + type: object + TimeseriesAnomalyInvestigationMaximumDeviation: + description: Most anomalous point within the detected interval. + properties: + delta_from_boundary: + description: Absolute distance between the observed value and the nearest anomaly boundary. + example: 7.0 + format: double + minimum: 0 + type: number + timestamp: + description: Point timestamp in milliseconds since the Unix epoch. + example: 1754406090000 + format: int64 + type: integer + value: + description: Observed value at the point. + example: 42.0 + format: double + type: number + required: + - timestamp + - value + - delta_from_boundary + type: object + TimeseriesAnomalyInvestigationMetaType: + description: Response metadata type for a timeseries anomaly investigation. + enum: + - timeseries_anomaly_investigation + example: timeseries_anomaly_investigation + type: string + x-enum-varnames: + - TIMESERIES_ANOMALY_INVESTIGATION + TimeseriesAnomalyInvestigationMetricQuery: + description: Metrics query referenced by a formula. + properties: + aggregator: + description: Optional scalar aggregator accepted for request compatibility. This field is ignored for timeseries queries. + example: avg + type: string + cross_org_uuids: + description: Optional organization UUID used for a cross-organization query. Each query accepts at most one UUID; use separate queries for separate organizations. Influential-tag analysis is currently unsupported for cross-organization queries, but anomaly detection still runs. + example: + - "00000000-0000-0000-0000-000000000000" + items: + description: Organization UUID to query. + example: "00000000-0000-0000-0000-000000000000" + minLength: 1 + type: string + maxItems: 1 + type: array + data_source: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationDataSource' + name: + description: Name used to reference this query from formulas. + example: query1 + minLength: 1 + type: string + query: + description: Datadog metrics query expression. + example: "avg:system.cpu.user{env:prod} by {service}" + minLength: 1 + type: string + required: + - data_source + - name + - query + type: object + TimeseriesAnomalyInvestigationQueryExecutionStatus: + description: Current execution status for a named query. + enum: + - running + - done + example: done + type: string + x-enum-varnames: + - RUNNING + - DONE + TimeseriesAnomalyInvestigationQueryStatus: + description: Execution status for one named query. + properties: + name: + description: Query name from the request. + example: query1 + type: string + status: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationQueryExecutionStatus' + required: + - name + - status + type: object + TimeseriesAnomalyInvestigationRequest: + description: Request to investigate a metrics timeseries for anomalies. + properties: + data: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationRequestData' + required: + - data + type: object + TimeseriesAnomalyInvestigationRequestAttributes: + description: Attributes of an anomaly investigation request. + properties: + requests: + description: Timeseries requests to investigate. This API version accepts exactly one request. + example: + - formulas: + - formula: "anomalies(query1, 'agile', 3)" + from: 1754406000000 + queries: + - data_source: metrics + name: query1 + query: "avg:system.cpu.user{env:prod} by {service}" + to: 1754423940000 + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationTimeseriesRequest' + maxItems: 1 + minItems: 1 + type: array + required: + - requests + type: object + TimeseriesAnomalyInvestigationRequestData: + description: JSON:API resource containing an anomaly investigation request. + properties: + attributes: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationRequestAttributes' + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationType' + required: + - type + - attributes + type: object + TimeseriesAnomalyInvestigationResponse: + description: Response containing the anomaly investigation results and timeseries metadata. + properties: + data: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponseData' + meta: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponseMeta' + required: + - data + - meta + type: object + TimeseriesAnomalyInvestigationResponseAttributes: + description: Attributes of an anomaly investigation response. + properties: + results: + description: Results returned in the same order as the submitted requests. This API version returns exactly one result. + example: + - anomalies: [] + status: complete + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResult' + maxItems: 1 + minItems: 1 + type: array + required: + - results + type: object + TimeseriesAnomalyInvestigationResponseData: + description: JSON:API resource containing anomaly investigation results. + properties: + attributes: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponseAttributes' + id: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponseID' + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationType' + required: + - id + - type + - attributes + type: object + TimeseriesAnomalyInvestigationResponseID: + description: Stable identifier for an anomaly investigation response resource. + enum: + - "0" + example: "0" + type: string + x-enum-varnames: + - ZERO + TimeseriesAnomalyInvestigationResponseMeta: + description: Timeseries execution metadata for the single request accepted by this API version. + properties: + from_date: + description: Effective start of the timeseries query in milliseconds since the Unix epoch. + example: 1754406000000 + format: int64 + type: integer + interval: + description: Effective timeseries interval in milliseconds. + example: 60000 + format: int64 + minimum: 1 + type: integer + queries: + description: Execution status for the request's queries. + example: + - name: query1 + status: done + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationQueryStatus' + type: array + res_type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationMetaType' + results_warnings: + description: Non-fatal warnings produced while executing the investigation. + example: [] + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResultsWarning' + type: array + to_date: + description: Effective end of the timeseries query in milliseconds since the Unix epoch. + example: 1754423940000 + format: int64 + type: integer + required: + - from_date + - to_date + - interval + - queries + - results_warnings + - res_type + type: object + TimeseriesAnomalyInvestigationResult: + description: Completed result for one timeseries request. The anomalies array is empty when no qualifying anomaly is found. + properties: + anomalies: + description: Detected anomalies. This API version returns at most one anomaly. + example: [] + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomaly' + maxItems: 1 + type: array + status: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationCompleteStatus' + required: + - status + - anomalies + type: object + TimeseriesAnomalyInvestigationResultsWarning: + description: Non-fatal warning produced while executing the investigation. + properties: + message: + description: Human-readable warning message. + example: "Influential tag analysis failed for at least one detected anomaly." + type: string + name: + description: Machine-readable warning name. + example: tag_analysis_failed + type: string + required: + - name + - message + type: object + TimeseriesAnomalyInvestigationSeries: + description: Logical series on which the anomaly was detected. + properties: + group_tags: + description: Tags identifying the selected group. Empty for a query without grouping. + example: + - "service:api" + items: + description: Tag in `key:value` form. + example: "service:api" + type: string + type: array + label: + description: Display label for the selected series. + example: api + type: string + query_index: + description: Zero-based index of the caller's formula that produced the series. + example: 0 + format: int64 + minimum: 0 + type: integer + required: + - query_index + - group_tags + - label + type: object + TimeseriesAnomalyInvestigationTagAnalysis: + description: Summary of optional influential-tag enrichment. Count and key fields are present only when analysis completes; enrichment availability does not affect completion of the investigation result. + properties: + analyzed_tag_keys: + description: Tag keys analyzed. Present only when analysis completes. + example: + - service + - env + items: + description: Analyzed tag key. + example: service + type: string + type: array + status: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationTagAnalysisStatus' + tag_keys_analyzed: + description: Number of tag keys analyzed. Present only when analysis completes. + example: 2 + format: int64 + minimum: 0 + type: integer + tag_values_analyzed: + description: Number of tag values analyzed. Present only when analysis completes. + example: 4 + format: int64 + minimum: 0 + type: integer + required: + - status + type: object + TimeseriesAnomalyInvestigationTagAnalysisStatus: + description: Outcome of optional influential-tag enrichment. + enum: + - complete + - unsupported + - failed + example: complete + type: string + x-enum-varnames: + - COMPLETE + - UNSUPPORTED + - FAILED + TimeseriesAnomalyInvestigationTimeseriesRequest: + description: Metrics timeseries request to investigate. + properties: + formulas: + description: Formulas to evaluate. Each formula may contain an explicit `anomalies()` call or a supported metrics expression. + example: + - formula: "anomalies(query1, 'agile', 3)" + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFormula' + minItems: 1 + type: array + from: + description: Start of the investigation time window in milliseconds since the Unix epoch. + example: 1754406000000 + format: int64 + minimum: 1 + type: integer + interval: + description: Optional requested aggregation interval in milliseconds. + example: 60000 + format: int64 + minimum: 1 + type: integer + queries: + description: Metrics queries referenced by the formulas. + example: + - data_source: metrics + name: query1 + query: "avg:system.cpu.user{env:prod} by {service}" + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationMetricQuery' + minItems: 1 + type: array + to: + description: End of the investigation time window in milliseconds since the Unix epoch. Must be later than `from`. + example: 1754423940000 + format: int64 + minimum: 1 + type: integer + required: + - formulas + - from + - to + - queries + type: object + TimeseriesAnomalyInvestigationType: + description: Resource type for a timeseries anomaly investigation. + enum: + - timeseries_anomaly_investigation + example: timeseries_anomaly_investigation + type: string + x-enum-varnames: + - TIMESERIES_ANOMALY_INVESTIGATION TimeseriesFormulaQueryRequest: description: A request wrapper around a single timeseries query to be executed. properties: @@ -221738,6 +222378,147 @@ paths: operator: OR permissions: - test_optimization_read + /api/v2/timeseries-anomaly-investigations: + post: + description: |- + Investigates a metrics timeseries request for its most significant anomaly and returns deterministic findings. + Metrics queries with or without grouping are supported. This API version accepts exactly one request and returns at most one anomaly. + operationId: CreateTimeseriesAnomalyInvestigation + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + requests: + - formulas: + - formula: "anomalies(query1, 'agile', 3)" + from: 1754406000000 + queries: + - data_source: metrics + name: query1 + query: "avg:system.cpu.user{env:prod} by {service}" + to: 1754423940000 + type: timeseries_anomaly_investigation + schema: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationRequest' + description: Metrics timeseries request to investigate. The request body must not exceed 2 MiB. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + results: + - anomalies: + - anomaly_detection: + configuration_source: request_formula + profile: + detected_interval: + end: 1754406120000 + start: 1754406060000 + display_interval: + end: 1754406150000 + start: 1754406030000 + findings: + - description: "Filtering out service:api flattens the spike." + headline: "service:api is the likely cause" + tag: + influence_type: shape + key: service + rating: 5.0 + synonyms: [] + values: + - api + type: influential_tag + maximum_deviation: + delta_from_boundary: 7.0 + timestamp: 1754406090000 + value: 42.0 + series: + group_tags: + - "service:api" + label: api + query_index: 0 + tag_analysis: + analyzed_tag_keys: + - service + - env + status: complete + tag_keys_analyzed: 2 + tag_values_analyzed: 4 + type: spike + status: complete + id: "0" + type: timeseries_anomaly_investigation + meta: + from_date: 1754406000000 + interval: 60000 + queries: + - name: query1 + status: done + res_type: timeseries_anomaly_investigation + results_warnings: [] + to_date: 1754423940000 + schema: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponse' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + "413": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Payload Too Large + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - timeseries_query + - metrics_read + summary: Investigate a timeseries anomaly + tags: + - Timeseries Anomaly Investigations + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - timeseries_query + - metrics_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/trace/{trace_id}: get: description: |- @@ -226104,6 +226885,8 @@ tags: name: Test Optimization - description: Ingest and manage threat intelligence data for security enrichment and investigation. name: Threat Intelligence + - description: Investigate metrics timeseries anomalies and return deterministic findings. + name: Timeseries Anomaly Investigations - description: |- Manage your Datadog Twilio integration accounts directly through the Datadog API. Create, update, and delete accounts, configure authentication and settings, and diff --git a/examples/v2/timeseries-anomaly-investigations/CreateTimeseriesAnomalyInvestigation.ts b/examples/v2/timeseries-anomaly-investigations/CreateTimeseriesAnomalyInvestigation.ts new file mode 100644 index 000000000000..3143842710b3 --- /dev/null +++ b/examples/v2/timeseries-anomaly-investigations/CreateTimeseriesAnomalyInvestigation.ts @@ -0,0 +1,48 @@ +/** + * Investigate a timeseries anomaly returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createTimeseriesAnomalyInvestigation"] = + true; +const apiInstance = new v2.TimeseriesAnomalyInvestigationsApi(configuration); + +const params: v2.TimeseriesAnomalyInvestigationsApiCreateTimeseriesAnomalyInvestigationRequest = + { + body: { + data: { + attributes: { + requests: [ + { + formulas: [ + { + formula: "anomalies(query1, 'agile', 3)", + }, + ], + from: 1754406000000, + queries: [ + { + dataSource: "metrics", + name: "query1", + query: "avg:system.cpu.user{env:prod} by {service}", + }, + ], + to: 1754423940000, + }, + ], + }, + type: "timeseries_anomaly_investigation", + }, + }, + }; + +apiInstance + .createTimeseriesAnomalyInvestigation(params) + .then((data: v2.TimeseriesAnomalyInvestigationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 202f14c13f88..9358a1de00a3 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -18837,6 +18837,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "UserTeamsResponse", }, + "v2.CreateTimeseriesAnomalyInvestigation": { + "body": { + "type": "TimeseriesAnomalyInvestigationRequest", + "format": "", + }, + "operationResponseType": "TimeseriesAnomalyInvestigationResponse", + }, "v2.ListUserAuthorizedClients": { "pageSize": { "type": "number", diff --git a/features/v2/timeseries_anomaly_investigations.feature b/features/v2/timeseries_anomaly_investigations.feature new file mode 100644 index 000000000000..6803ddc44775 --- /dev/null +++ b/features/v2/timeseries_anomaly_investigations.feature @@ -0,0 +1,32 @@ +@endpoint(timeseries-anomaly-investigations) @endpoint(timeseries-anomaly-investigations-v2) +Feature: Timeseries Anomaly Investigations + Investigate metrics timeseries anomalies and return deterministic + findings. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "TimeseriesAnomalyInvestigations" API + And operation "CreateTimeseriesAnomalyInvestigation" enabled + And new "CreateTimeseriesAnomalyInvestigation" request + And body with value {"data": {"attributes": {"requests": [{"formulas": [{"formula": "anomalies(query1, 'agile', 3)"}], "from": 1754406000000, "queries": [{"data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{env:prod} by {service}"}], "to": 1754423940000}]}, "type": "timeseries_anomaly_investigation"}} + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Investigate a timeseries anomaly returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Investigate a timeseries anomaly returns "OK" response + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Investigate a timeseries anomaly returns "Payload Too Large" response + When the request is sent + Then the response status is 413 Payload Too Large + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Investigate a timeseries anomaly returns "Unprocessable Entity" response + When the request is sent + Then the response status is 422 Unprocessable Entity diff --git a/features/v2/undo.json b/features/v2/undo.json index a2d33ddd9441..22c02b5bcbd6 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -10259,6 +10259,12 @@ "type": "safe" } }, + "CreateTimeseriesAnomalyInvestigation": { + "tag": "Timeseries Anomaly Investigations", + "undo": { + "type": "safe" + } + }, "GetTraceByID": { "tag": "APM Trace", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 8769adbcbc9f..e02db641233b 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -827,6 +827,7 @@ export function createConfiguration( "v2.addMemberTeam": false, "v2.listMemberTeams": false, "v2.removeMemberTeam": false, + "v2.createTimeseriesAnomalyInvestigation": false, "v2.createWebIntegrationAccount": false, "v2.deleteWebIntegrationAccount": false, "v2.getWebIntegrationAccount": false, diff --git a/packages/datadog-api-client-v2/apis/TimeseriesAnomalyInvestigationsApi.ts b/packages/datadog-api-client-v2/apis/TimeseriesAnomalyInvestigationsApi.ts new file mode 100644 index 000000000000..15a72d2d80cf --- /dev/null +++ b/packages/datadog-api-client-v2/apis/TimeseriesAnomalyInvestigationsApi.ts @@ -0,0 +1,232 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { JSONAPIErrorResponse } from "../models/JSONAPIErrorResponse"; +import { TimeseriesAnomalyInvestigationRequest } from "../models/TimeseriesAnomalyInvestigationRequest"; +import { TimeseriesAnomalyInvestigationResponse } from "../models/TimeseriesAnomalyInvestigationResponse"; + +export class TimeseriesAnomalyInvestigationsApiRequestFactory extends BaseAPIRequestFactory { + public async createTimeseriesAnomalyInvestigation( + body: TimeseriesAnomalyInvestigationRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'createTimeseriesAnomalyInvestigation'" + ); + if ( + !_config.unstableOperations["v2.createTimeseriesAnomalyInvestigation"] + ) { + throw new Error( + "Unstable operation 'createTimeseriesAnomalyInvestigation' is disabled" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createTimeseriesAnomalyInvestigation"); + } + + // Path Params + const localVarPath = "/api/v2/timeseries-anomaly-investigations"; + + // Make Request Context + const requestContext = _config + .getServer( + "v2.TimeseriesAnomalyInvestigationsApi.createTimeseriesAnomalyInvestigation" + ) + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set IaC header + if (_config.isIaC) { + requestContext.setHeaderParam("X-Datadog-Managed-By", "iac"); + } + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "TimeseriesAnomalyInvestigationRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } +} + +export class TimeseriesAnomalyInvestigationsApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createTimeseriesAnomalyInvestigation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createTimeseriesAnomalyInvestigation( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: TimeseriesAnomalyInvestigationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TimeseriesAnomalyInvestigationResponse" + ) as TimeseriesAnomalyInvestigationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 413 || + response.httpStatusCode === 422 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TimeseriesAnomalyInvestigationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "TimeseriesAnomalyInvestigationResponse", + "" + ) as TimeseriesAnomalyInvestigationResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface TimeseriesAnomalyInvestigationsApiCreateTimeseriesAnomalyInvestigationRequest { + /** + * Metrics timeseries request to investigate. The request body must not exceed 2 MiB. + * @type TimeseriesAnomalyInvestigationRequest + */ + body: TimeseriesAnomalyInvestigationRequest; +} + +export class TimeseriesAnomalyInvestigationsApi { + private requestFactory: TimeseriesAnomalyInvestigationsApiRequestFactory; + private responseProcessor: TimeseriesAnomalyInvestigationsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: TimeseriesAnomalyInvestigationsApiRequestFactory, + responseProcessor?: TimeseriesAnomalyInvestigationsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || + new TimeseriesAnomalyInvestigationsApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || + new TimeseriesAnomalyInvestigationsApiResponseProcessor(); + } + + /** + * Investigates a metrics timeseries request for its most significant anomaly and returns deterministic findings. + * Metrics queries with or without grouping are supported. This API version accepts exactly one request and returns at most one anomaly. + * @param param The request object + */ + public createTimeseriesAnomalyInvestigation( + param: TimeseriesAnomalyInvestigationsApiCreateTimeseriesAnomalyInvestigationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createTimeseriesAnomalyInvestigation( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createTimeseriesAnomalyInvestigation( + responseContext + ); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index d0a3479d16c0..442644ed7b39 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -1934,6 +1934,11 @@ export { ThreatIntelligenceApi, } from "./apis/ThreatIntelligenceApi"; +export { + TimeseriesAnomalyInvestigationsApiCreateTimeseriesAnomalyInvestigationRequest, + TimeseriesAnomalyInvestigationsApi, +} from "./apis/TimeseriesAnomalyInvestigationsApi"; + export { TwilioIntegrationAccountsApiCreateTwilioIntegrationAccountRequest, TwilioIntegrationAccountsApiDeleteTwilioIntegrationAccountRequest, @@ -9353,6 +9358,44 @@ export { TimelineCellType } from "./models/TimelineCellType"; export { TimelineResponse } from "./models/TimelineResponse"; export { TimeRestriction } from "./models/TimeRestriction"; export { TimeRestrictions } from "./models/TimeRestrictions"; +export { TimeseriesAnomalyInvestigationAnomaly } from "./models/TimeseriesAnomalyInvestigationAnomaly"; +export { TimeseriesAnomalyInvestigationAnomalyFinding } from "./models/TimeseriesAnomalyInvestigationAnomalyFinding"; +export { TimeseriesAnomalyInvestigationAnomalyFindingType } from "./models/TimeseriesAnomalyInvestigationAnomalyFindingType"; +export { TimeseriesAnomalyInvestigationAnomalyType } from "./models/TimeseriesAnomalyInvestigationAnomalyType"; +export { TimeseriesAnomalyInvestigationCompleteStatus } from "./models/TimeseriesAnomalyInvestigationCompleteStatus"; +export { TimeseriesAnomalyInvestigationConfigurationSource } from "./models/TimeseriesAnomalyInvestigationConfigurationSource"; +export { TimeseriesAnomalyInvestigationDataSource } from "./models/TimeseriesAnomalyInvestigationDataSource"; +export { TimeseriesAnomalyInvestigationDetection } from "./models/TimeseriesAnomalyInvestigationDetection"; +export { TimeseriesAnomalyInvestigationFinding } from "./models/TimeseriesAnomalyInvestigationFinding"; +export { TimeseriesAnomalyInvestigationFindingSynonym } from "./models/TimeseriesAnomalyInvestigationFindingSynonym"; +export { TimeseriesAnomalyInvestigationFindingTag } from "./models/TimeseriesAnomalyInvestigationFindingTag"; +export { TimeseriesAnomalyInvestigationFormula } from "./models/TimeseriesAnomalyInvestigationFormula"; +export { TimeseriesAnomalyInvestigationFormulaLimit } from "./models/TimeseriesAnomalyInvestigationFormulaLimit"; +export { TimeseriesAnomalyInvestigationFormulaLimitOrder } from "./models/TimeseriesAnomalyInvestigationFormulaLimitOrder"; +export { TimeseriesAnomalyInvestigationInfluenceType } from "./models/TimeseriesAnomalyInvestigationInfluenceType"; +export { TimeseriesAnomalyInvestigationInfluentialTagFinding } from "./models/TimeseriesAnomalyInvestigationInfluentialTagFinding"; +export { TimeseriesAnomalyInvestigationInfluentialTagFindingType } from "./models/TimeseriesAnomalyInvestigationInfluentialTagFindingType"; +export { TimeseriesAnomalyInvestigationInterval } from "./models/TimeseriesAnomalyInvestigationInterval"; +export { TimeseriesAnomalyInvestigationMaximumDeviation } from "./models/TimeseriesAnomalyInvestigationMaximumDeviation"; +export { TimeseriesAnomalyInvestigationMetaType } from "./models/TimeseriesAnomalyInvestigationMetaType"; +export { TimeseriesAnomalyInvestigationMetricQuery } from "./models/TimeseriesAnomalyInvestigationMetricQuery"; +export { TimeseriesAnomalyInvestigationQueryExecutionStatus } from "./models/TimeseriesAnomalyInvestigationQueryExecutionStatus"; +export { TimeseriesAnomalyInvestigationQueryStatus } from "./models/TimeseriesAnomalyInvestigationQueryStatus"; +export { TimeseriesAnomalyInvestigationRequest } from "./models/TimeseriesAnomalyInvestigationRequest"; +export { TimeseriesAnomalyInvestigationRequestAttributes } from "./models/TimeseriesAnomalyInvestigationRequestAttributes"; +export { TimeseriesAnomalyInvestigationRequestData } from "./models/TimeseriesAnomalyInvestigationRequestData"; +export { TimeseriesAnomalyInvestigationResponse } from "./models/TimeseriesAnomalyInvestigationResponse"; +export { TimeseriesAnomalyInvestigationResponseAttributes } from "./models/TimeseriesAnomalyInvestigationResponseAttributes"; +export { TimeseriesAnomalyInvestigationResponseData } from "./models/TimeseriesAnomalyInvestigationResponseData"; +export { TimeseriesAnomalyInvestigationResponseID } from "./models/TimeseriesAnomalyInvestigationResponseID"; +export { TimeseriesAnomalyInvestigationResponseMeta } from "./models/TimeseriesAnomalyInvestigationResponseMeta"; +export { TimeseriesAnomalyInvestigationResult } from "./models/TimeseriesAnomalyInvestigationResult"; +export { TimeseriesAnomalyInvestigationResultsWarning } from "./models/TimeseriesAnomalyInvestigationResultsWarning"; +export { TimeseriesAnomalyInvestigationSeries } from "./models/TimeseriesAnomalyInvestigationSeries"; +export { TimeseriesAnomalyInvestigationTagAnalysis } from "./models/TimeseriesAnomalyInvestigationTagAnalysis"; +export { TimeseriesAnomalyInvestigationTagAnalysisStatus } from "./models/TimeseriesAnomalyInvestigationTagAnalysisStatus"; +export { TimeseriesAnomalyInvestigationTimeseriesRequest } from "./models/TimeseriesAnomalyInvestigationTimeseriesRequest"; +export { TimeseriesAnomalyInvestigationType } from "./models/TimeseriesAnomalyInvestigationType"; export { TimeseriesFormulaQueryRequest } from "./models/TimeseriesFormulaQueryRequest"; export { TimeseriesFormulaQueryResponse } from "./models/TimeseriesFormulaQueryResponse"; export { TimeseriesFormulaRequest } from "./models/TimeseriesFormulaRequest"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 28eee3602961..aab73007df9f 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -5659,6 +5659,30 @@ import { TimelineCellAuthorUserContent } from "./TimelineCellAuthorUserContent"; import { TimelineCellContentComment } from "./TimelineCellContentComment"; import { TimelineCellResource } from "./TimelineCellResource"; import { TimelineResponse } from "./TimelineResponse"; +import { TimeseriesAnomalyInvestigationAnomaly } from "./TimeseriesAnomalyInvestigationAnomaly"; +import { TimeseriesAnomalyInvestigationAnomalyFinding } from "./TimeseriesAnomalyInvestigationAnomalyFinding"; +import { TimeseriesAnomalyInvestigationDetection } from "./TimeseriesAnomalyInvestigationDetection"; +import { TimeseriesAnomalyInvestigationFindingSynonym } from "./TimeseriesAnomalyInvestigationFindingSynonym"; +import { TimeseriesAnomalyInvestigationFindingTag } from "./TimeseriesAnomalyInvestigationFindingTag"; +import { TimeseriesAnomalyInvestigationFormula } from "./TimeseriesAnomalyInvestigationFormula"; +import { TimeseriesAnomalyInvestigationFormulaLimit } from "./TimeseriesAnomalyInvestigationFormulaLimit"; +import { TimeseriesAnomalyInvestigationInfluentialTagFinding } from "./TimeseriesAnomalyInvestigationInfluentialTagFinding"; +import { TimeseriesAnomalyInvestigationInterval } from "./TimeseriesAnomalyInvestigationInterval"; +import { TimeseriesAnomalyInvestigationMaximumDeviation } from "./TimeseriesAnomalyInvestigationMaximumDeviation"; +import { TimeseriesAnomalyInvestigationMetricQuery } from "./TimeseriesAnomalyInvestigationMetricQuery"; +import { TimeseriesAnomalyInvestigationQueryStatus } from "./TimeseriesAnomalyInvestigationQueryStatus"; +import { TimeseriesAnomalyInvestigationRequest } from "./TimeseriesAnomalyInvestigationRequest"; +import { TimeseriesAnomalyInvestigationRequestAttributes } from "./TimeseriesAnomalyInvestigationRequestAttributes"; +import { TimeseriesAnomalyInvestigationRequestData } from "./TimeseriesAnomalyInvestigationRequestData"; +import { TimeseriesAnomalyInvestigationResponse } from "./TimeseriesAnomalyInvestigationResponse"; +import { TimeseriesAnomalyInvestigationResponseAttributes } from "./TimeseriesAnomalyInvestigationResponseAttributes"; +import { TimeseriesAnomalyInvestigationResponseData } from "./TimeseriesAnomalyInvestigationResponseData"; +import { TimeseriesAnomalyInvestigationResponseMeta } from "./TimeseriesAnomalyInvestigationResponseMeta"; +import { TimeseriesAnomalyInvestigationResult } from "./TimeseriesAnomalyInvestigationResult"; +import { TimeseriesAnomalyInvestigationResultsWarning } from "./TimeseriesAnomalyInvestigationResultsWarning"; +import { TimeseriesAnomalyInvestigationSeries } from "./TimeseriesAnomalyInvestigationSeries"; +import { TimeseriesAnomalyInvestigationTagAnalysis } from "./TimeseriesAnomalyInvestigationTagAnalysis"; +import { TimeseriesAnomalyInvestigationTimeseriesRequest } from "./TimeseriesAnomalyInvestigationTimeseriesRequest"; import { TimeseriesFormulaQueryRequest } from "./TimeseriesFormulaQueryRequest"; import { TimeseriesFormulaQueryResponse } from "./TimeseriesFormulaQueryResponse"; import { TimeseriesFormulaRequest } from "./TimeseriesFormulaRequest"; @@ -9099,6 +9123,26 @@ const enumsMap: { [key: string]: any[] } = { TimelineCellAuthorUserType: ["USER"], TimelineCellResourceType: ["timeline_cell"], TimelineCellType: ["COMMENT"], + TimeseriesAnomalyInvestigationAnomalyFindingType: ["anomaly"], + TimeseriesAnomalyInvestigationAnomalyType: ["spike", "dip"], + TimeseriesAnomalyInvestigationCompleteStatus: ["complete"], + TimeseriesAnomalyInvestigationConfigurationSource: [ + "request_formula", + "watchdog_explains_default", + ], + TimeseriesAnomalyInvestigationDataSource: ["metrics"], + TimeseriesAnomalyInvestigationFormulaLimitOrder: ["asc", "desc"], + TimeseriesAnomalyInvestigationInfluenceType: ["shape", "value"], + TimeseriesAnomalyInvestigationInfluentialTagFindingType: ["influential_tag"], + TimeseriesAnomalyInvestigationMetaType: ["timeseries_anomaly_investigation"], + TimeseriesAnomalyInvestigationQueryExecutionStatus: ["running", "done"], + TimeseriesAnomalyInvestigationResponseID: ["0"], + TimeseriesAnomalyInvestigationTagAnalysisStatus: [ + "complete", + "unsupported", + "failed", + ], + TimeseriesAnomalyInvestigationType: ["timeseries_anomaly_investigation"], TimeseriesFormulaRequestType: ["timeseries_request"], TimeseriesFormulaResponseType: ["timeseries_response"], TokenType: ["SECRET"], @@ -16236,6 +16280,49 @@ const typeMap: { [index: string]: any } = { TimelineCellContentComment: TimelineCellContentComment, TimelineCellResource: TimelineCellResource, TimelineResponse: TimelineResponse, + TimeseriesAnomalyInvestigationAnomaly: TimeseriesAnomalyInvestigationAnomaly, + TimeseriesAnomalyInvestigationAnomalyFinding: + TimeseriesAnomalyInvestigationAnomalyFinding, + TimeseriesAnomalyInvestigationDetection: + TimeseriesAnomalyInvestigationDetection, + TimeseriesAnomalyInvestigationFindingSynonym: + TimeseriesAnomalyInvestigationFindingSynonym, + TimeseriesAnomalyInvestigationFindingTag: + TimeseriesAnomalyInvestigationFindingTag, + TimeseriesAnomalyInvestigationFormula: TimeseriesAnomalyInvestigationFormula, + TimeseriesAnomalyInvestigationFormulaLimit: + TimeseriesAnomalyInvestigationFormulaLimit, + TimeseriesAnomalyInvestigationInfluentialTagFinding: + TimeseriesAnomalyInvestigationInfluentialTagFinding, + TimeseriesAnomalyInvestigationInterval: + TimeseriesAnomalyInvestigationInterval, + TimeseriesAnomalyInvestigationMaximumDeviation: + TimeseriesAnomalyInvestigationMaximumDeviation, + TimeseriesAnomalyInvestigationMetricQuery: + TimeseriesAnomalyInvestigationMetricQuery, + TimeseriesAnomalyInvestigationQueryStatus: + TimeseriesAnomalyInvestigationQueryStatus, + TimeseriesAnomalyInvestigationRequest: TimeseriesAnomalyInvestigationRequest, + TimeseriesAnomalyInvestigationRequestAttributes: + TimeseriesAnomalyInvestigationRequestAttributes, + TimeseriesAnomalyInvestigationRequestData: + TimeseriesAnomalyInvestigationRequestData, + TimeseriesAnomalyInvestigationResponse: + TimeseriesAnomalyInvestigationResponse, + TimeseriesAnomalyInvestigationResponseAttributes: + TimeseriesAnomalyInvestigationResponseAttributes, + TimeseriesAnomalyInvestigationResponseData: + TimeseriesAnomalyInvestigationResponseData, + TimeseriesAnomalyInvestigationResponseMeta: + TimeseriesAnomalyInvestigationResponseMeta, + TimeseriesAnomalyInvestigationResult: TimeseriesAnomalyInvestigationResult, + TimeseriesAnomalyInvestigationResultsWarning: + TimeseriesAnomalyInvestigationResultsWarning, + TimeseriesAnomalyInvestigationSeries: TimeseriesAnomalyInvestigationSeries, + TimeseriesAnomalyInvestigationTagAnalysis: + TimeseriesAnomalyInvestigationTagAnalysis, + TimeseriesAnomalyInvestigationTimeseriesRequest: + TimeseriesAnomalyInvestigationTimeseriesRequest, TimeseriesFormulaQueryRequest: TimeseriesFormulaQueryRequest, TimeseriesFormulaQueryResponse: TimeseriesFormulaQueryResponse, TimeseriesFormulaRequest: TimeseriesFormulaRequest, @@ -17429,6 +17516,10 @@ const oneOfMap: { [index: string]: string[] } = { TeamRoutingRulesIncluded: ["RoutingRule"], TimelineCellAuthor: ["TimelineCellAuthorUser"], TimelineCellContent: ["TimelineCellContentComment"], + TimeseriesAnomalyInvestigationFinding: [ + "TimeseriesAnomalyInvestigationInfluentialTagFinding", + "TimeseriesAnomalyInvestigationAnomalyFinding", + ], TimeseriesQuery: [ "MetricsTimeseriesQuery", "EventsTimeseriesQuery", diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomaly.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomaly.ts new file mode 100644 index 000000000000..62da1167a55d --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomaly.ts @@ -0,0 +1,123 @@ +/** + * 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. + */ +import { TimeseriesAnomalyInvestigationAnomalyType } from "./TimeseriesAnomalyInvestigationAnomalyType"; +import { TimeseriesAnomalyInvestigationDetection } from "./TimeseriesAnomalyInvestigationDetection"; +import { TimeseriesAnomalyInvestigationFinding } from "./TimeseriesAnomalyInvestigationFinding"; +import { TimeseriesAnomalyInvestigationInterval } from "./TimeseriesAnomalyInvestigationInterval"; +import { TimeseriesAnomalyInvestigationMaximumDeviation } from "./TimeseriesAnomalyInvestigationMaximumDeviation"; +import { TimeseriesAnomalyInvestigationSeries } from "./TimeseriesAnomalyInvestigationSeries"; +import { TimeseriesAnomalyInvestigationTagAnalysis } from "./TimeseriesAnomalyInvestigationTagAnalysis"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Most significant anomaly detected in the request. + */ +export class TimeseriesAnomalyInvestigationAnomaly { + /** + * Anomaly detection configuration used for the result. + */ + "anomalyDetection": TimeseriesAnomalyInvestigationDetection; + /** + * Inclusive time interval in milliseconds since the Unix epoch. + */ + "detectedInterval": TimeseriesAnomalyInvestigationInterval; + /** + * Inclusive time interval in milliseconds since the Unix epoch. + */ + "displayInterval": TimeseriesAnomalyInvestigationInterval; + /** + * Deterministic explanations for the anomaly, ordered by importance. + */ + "findings": Array; + /** + * Most anomalous point within the detected interval. + */ + "maximumDeviation": TimeseriesAnomalyInvestigationMaximumDeviation; + /** + * Logical series on which the anomaly was detected. + */ + "series": TimeseriesAnomalyInvestigationSeries; + /** + * Summary of optional influential-tag enrichment. Count and key fields are present only when analysis completes; enrichment availability does not affect completion of the investigation result. + */ + "tagAnalysis": TimeseriesAnomalyInvestigationTagAnalysis; + /** + * Direction of an anomaly relative to its expected range. + */ + "type": TimeseriesAnomalyInvestigationAnomalyType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + anomalyDetection: { + baseName: "anomaly_detection", + type: "TimeseriesAnomalyInvestigationDetection", + required: true, + }, + detectedInterval: { + baseName: "detected_interval", + type: "TimeseriesAnomalyInvestigationInterval", + required: true, + }, + displayInterval: { + baseName: "display_interval", + type: "TimeseriesAnomalyInvestigationInterval", + required: true, + }, + findings: { + baseName: "findings", + type: "Array", + required: true, + }, + maximumDeviation: { + baseName: "maximum_deviation", + type: "TimeseriesAnomalyInvestigationMaximumDeviation", + required: true, + }, + series: { + baseName: "series", + type: "TimeseriesAnomalyInvestigationSeries", + required: true, + }, + tagAnalysis: { + baseName: "tag_analysis", + type: "TimeseriesAnomalyInvestigationTagAnalysis", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationAnomalyType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationAnomaly.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyFinding.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyFinding.ts new file mode 100644 index 000000000000..543bed23c0a3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyFinding.ts @@ -0,0 +1,72 @@ +/** + * 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. + */ +import { TimeseriesAnomalyInvestigationAnomalyFindingType } from "./TimeseriesAnomalyInvestigationAnomalyFindingType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Finding that describes the anomaly when completed analysis produces no displayable influential tags. + */ +export class TimeseriesAnomalyInvestigationAnomalyFinding { + /** + * Deterministic explanation of the finding. + */ + "description": string; + /** + * Concise, deterministic finding title. + */ + "headline": string; + /** + * Finding category for an anomaly without a displayable influential tag. + */ + "type": TimeseriesAnomalyInvestigationAnomalyFindingType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + required: true, + }, + headline: { + baseName: "headline", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationAnomalyFindingType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationAnomalyFinding.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyFindingType.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyFindingType.ts new file mode 100644 index 000000000000..66e28f8649a2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyFindingType.ts @@ -0,0 +1,16 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Finding category for an anomaly without a displayable influential tag. + */ + +export type TimeseriesAnomalyInvestigationAnomalyFindingType = + | typeof ANOMALY + | UnparsedObject; +export const ANOMALY = "anomaly"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyType.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyType.ts new file mode 100644 index 000000000000..7caa62bd745e --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationAnomalyType.ts @@ -0,0 +1,18 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Direction of an anomaly relative to its expected range. + */ + +export type TimeseriesAnomalyInvestigationAnomalyType = + | typeof SPIKE + | typeof DIP + | UnparsedObject; +export const SPIKE = "spike"; +export const DIP = "dip"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationCompleteStatus.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationCompleteStatus.ts new file mode 100644 index 000000000000..2be51df702cc --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationCompleteStatus.ts @@ -0,0 +1,16 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Status value indicating successful completion. + */ + +export type TimeseriesAnomalyInvestigationCompleteStatus = + | typeof COMPLETE + | UnparsedObject; +export const COMPLETE = "complete"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationConfigurationSource.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationConfigurationSource.ts new file mode 100644 index 000000000000..1a2b84804d00 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationConfigurationSource.ts @@ -0,0 +1,18 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Source of the anomaly detection configuration. + */ + +export type TimeseriesAnomalyInvestigationConfigurationSource = + | typeof REQUEST_FORMULA + | typeof WATCHDOG_EXPLAINS_DEFAULT + | UnparsedObject; +export const REQUEST_FORMULA = "request_formula"; +export const WATCHDOG_EXPLAINS_DEFAULT = "watchdog_explains_default"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationDataSource.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationDataSource.ts new file mode 100644 index 000000000000..d8ff8aa1166f --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationDataSource.ts @@ -0,0 +1,16 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Data source for an anomaly investigation query. + */ + +export type TimeseriesAnomalyInvestigationDataSource = + | typeof METRICS + | UnparsedObject; +export const METRICS = "metrics"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationDetection.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationDetection.ts new file mode 100644 index 000000000000..ea604abeb3aa --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationDetection.ts @@ -0,0 +1,63 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationConfigurationSource } from "./TimeseriesAnomalyInvestigationConfigurationSource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Anomaly detection configuration used for the result. + */ +export class TimeseriesAnomalyInvestigationDetection { + /** + * Source of the anomaly detection configuration. + */ + "configurationSource": TimeseriesAnomalyInvestigationConfigurationSource; + /** + * Applied Watchdog Explains profile, or null when the request supplied an explicit `anomalies()` formula. The current Watchdog profile is `watchdog_explains_v1`. + */ + "profile": string | null; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + configurationSource: { + baseName: "configuration_source", + type: "TimeseriesAnomalyInvestigationConfigurationSource", + required: true, + }, + profile: { + baseName: "profile", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationDetection.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFinding.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFinding.ts new file mode 100644 index 000000000000..56344898ee86 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFinding.ts @@ -0,0 +1,18 @@ +/** + * 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. + */ +import { TimeseriesAnomalyInvestigationAnomalyFinding } from "./TimeseriesAnomalyInvestigationAnomalyFinding"; +import { TimeseriesAnomalyInvestigationInfluentialTagFinding } from "./TimeseriesAnomalyInvestigationInfluentialTagFinding"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Deterministic explanation for a detected anomaly. + */ + +export type TimeseriesAnomalyInvestigationFinding = + | TimeseriesAnomalyInvestigationInfluentialTagFinding + | TimeseriesAnomalyInvestigationAnomalyFinding + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFindingSynonym.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFindingSynonym.ts new file mode 100644 index 000000000000..35d68e7db794 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFindingSynonym.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Tag grouped under an influential tag by synonym analysis. + */ +export class TimeseriesAnomalyInvestigationFindingSynonym { + /** + * Synonymous tag key. + */ + "key": string; + /** + * Values associated with the synonymous tag. + */ + "values": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + key: { + baseName: "key", + type: "string", + required: true, + }, + values: { + baseName: "values", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationFindingSynonym.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFindingTag.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFindingTag.ts new file mode 100644 index 000000000000..4a566eb15203 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFindingTag.ts @@ -0,0 +1,92 @@ +/** + * 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. + */ +import { TimeseriesAnomalyInvestigationFindingSynonym } from "./TimeseriesAnomalyInvestigationFindingSynonym"; +import { TimeseriesAnomalyInvestigationInfluenceType } from "./TimeseriesAnomalyInvestigationInfluenceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Structured tag evidence for an influential-tag finding. + */ +export class TimeseriesAnomalyInvestigationFindingTag { + /** + * Kind of influence a tag has on a series. + */ + "influenceType": TimeseriesAnomalyInvestigationInfluenceType; + /** + * Influential tag key. + */ + "key": string; + /** + * Influence rating from 1 through 5. + */ + "rating": number; + /** + * Tags grouped with this tag by Variation of Influence synonym analysis. + */ + "synonyms": Array; + /** + * Influential values for the tag key. + */ + "values": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + influenceType: { + baseName: "influence_type", + type: "TimeseriesAnomalyInvestigationInfluenceType", + required: true, + }, + key: { + baseName: "key", + type: "string", + required: true, + }, + rating: { + baseName: "rating", + type: "number", + required: true, + format: "double", + }, + synonyms: { + baseName: "synonyms", + type: "Array", + required: true, + }, + values: { + baseName: "values", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationFindingTag.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormula.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormula.ts new file mode 100644 index 000000000000..8b7288c53696 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormula.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationFormulaLimit } from "./TimeseriesAnomalyInvestigationFormulaLimit"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Formula evaluated by the timeseries request. + */ +export class TimeseriesAnomalyInvestigationFormula { + /** + * Formula expression referencing one or more named queries. + */ + "formula": string; + /** + * Optional formula limit accepted for compatibility with Timeseries API requests. Formula limits have no effect on timeseries queries. + */ + "limit"?: TimeseriesAnomalyInvestigationFormulaLimit; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + formula: { + baseName: "formula", + type: "string", + required: true, + }, + limit: { + baseName: "limit", + type: "TimeseriesAnomalyInvestigationFormulaLimit", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationFormula.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormulaLimit.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormulaLimit.ts new file mode 100644 index 000000000000..70e1021b31e3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormulaLimit.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationFormulaLimitOrder } from "./TimeseriesAnomalyInvestigationFormulaLimitOrder"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Optional formula limit accepted for compatibility with Timeseries API requests. Formula limits have no effect on timeseries queries. + */ +export class TimeseriesAnomalyInvestigationFormulaLimit { + /** + * Requested result limit. This field has no effect on a timeseries anomaly investigation. + */ + "count"?: number; + /** + * Sort order used when applying a formula series limit. + */ + "order"?: TimeseriesAnomalyInvestigationFormulaLimitOrder; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + count: { + baseName: "count", + type: "number", + format: "int64", + }, + order: { + baseName: "order", + type: "TimeseriesAnomalyInvestigationFormulaLimitOrder", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationFormulaLimit.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormulaLimitOrder.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormulaLimitOrder.ts new file mode 100644 index 000000000000..1b8cfca3c876 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationFormulaLimitOrder.ts @@ -0,0 +1,18 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Sort order used when applying a formula series limit. + */ + +export type TimeseriesAnomalyInvestigationFormulaLimitOrder = + | typeof ASC + | typeof DESC + | UnparsedObject; +export const ASC = "asc"; +export const DESC = "desc"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluenceType.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluenceType.ts new file mode 100644 index 000000000000..67e2dccde20b --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluenceType.ts @@ -0,0 +1,18 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Kind of influence a tag has on a series. + */ + +export type TimeseriesAnomalyInvestigationInfluenceType = + | typeof SHAPE + | typeof VALUE + | UnparsedObject; +export const SHAPE = "shape"; +export const VALUE = "value"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluentialTagFinding.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluentialTagFinding.ts new file mode 100644 index 000000000000..446577b79619 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluentialTagFinding.ts @@ -0,0 +1,82 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationFindingTag } from "./TimeseriesAnomalyInvestigationFindingTag"; +import { TimeseriesAnomalyInvestigationInfluentialTagFindingType } from "./TimeseriesAnomalyInvestigationInfluentialTagFindingType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Finding that attributes an anomaly to an influential tag. + */ +export class TimeseriesAnomalyInvestigationInfluentialTagFinding { + /** + * Deterministic explanation of the finding. + */ + "description": string; + /** + * Concise, deterministic finding title. + */ + "headline": string; + /** + * Structured tag evidence for an influential-tag finding. + */ + "tag": TimeseriesAnomalyInvestigationFindingTag; + /** + * Finding category for an influential tag. + */ + "type": TimeseriesAnomalyInvestigationInfluentialTagFindingType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + required: true, + }, + headline: { + baseName: "headline", + type: "string", + required: true, + }, + tag: { + baseName: "tag", + type: "TimeseriesAnomalyInvestigationFindingTag", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationInfluentialTagFindingType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationInfluentialTagFinding.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluentialTagFindingType.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluentialTagFindingType.ts new file mode 100644 index 000000000000..d875f31859a5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInfluentialTagFindingType.ts @@ -0,0 +1,16 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Finding category for an influential tag. + */ + +export type TimeseriesAnomalyInvestigationInfluentialTagFindingType = + | typeof INFLUENTIAL_TAG + | UnparsedObject; +export const INFLUENTIAL_TAG = "influential_tag"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInterval.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInterval.ts new file mode 100644 index 000000000000..575425c6bbe2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationInterval.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Inclusive time interval in milliseconds since the Unix epoch. + */ +export class TimeseriesAnomalyInvestigationInterval { + /** + * Timestamp of the final point in the interval. + */ + "end": number; + /** + * Inclusive start of the interval. + */ + "start": number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + end: { + baseName: "end", + type: "number", + required: true, + format: "int64", + }, + start: { + baseName: "start", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationInterval.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMaximumDeviation.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMaximumDeviation.ts new file mode 100644 index 000000000000..2198d7e8e702 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMaximumDeviation.ts @@ -0,0 +1,74 @@ +/** + * 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. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Most anomalous point within the detected interval. + */ +export class TimeseriesAnomalyInvestigationMaximumDeviation { + /** + * Absolute distance between the observed value and the nearest anomaly boundary. + */ + "deltaFromBoundary": number; + /** + * Point timestamp in milliseconds since the Unix epoch. + */ + "timestamp": number; + /** + * Observed value at the point. + */ + "value": number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + deltaFromBoundary: { + baseName: "delta_from_boundary", + type: "number", + required: true, + format: "double", + }, + timestamp: { + baseName: "timestamp", + type: "number", + required: true, + format: "int64", + }, + value: { + baseName: "value", + type: "number", + required: true, + format: "double", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationMaximumDeviation.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMetaType.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMetaType.ts new file mode 100644 index 000000000000..241cdf48767a --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMetaType.ts @@ -0,0 +1,17 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Response metadata type for a timeseries anomaly investigation. + */ + +export type TimeseriesAnomalyInvestigationMetaType = + | typeof TIMESERIES_ANOMALY_INVESTIGATION + | UnparsedObject; +export const TIMESERIES_ANOMALY_INVESTIGATION = + "timeseries_anomaly_investigation"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMetricQuery.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMetricQuery.ts new file mode 100644 index 000000000000..2d0e491a34b9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationMetricQuery.ts @@ -0,0 +1,88 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationDataSource } from "./TimeseriesAnomalyInvestigationDataSource"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Metrics query referenced by a formula. + */ +export class TimeseriesAnomalyInvestigationMetricQuery { + /** + * Optional scalar aggregator accepted for request compatibility. This field is ignored for timeseries queries. + */ + "aggregator"?: string; + /** + * Optional organization UUID used for a cross-organization query. Each query accepts at most one UUID; use separate queries for separate organizations. Influential-tag analysis is currently unsupported for cross-organization queries, but anomaly detection still runs. + */ + "crossOrgUuids"?: Array; + /** + * Data source for an anomaly investigation query. + */ + "dataSource": TimeseriesAnomalyInvestigationDataSource; + /** + * Name used to reference this query from formulas. + */ + "name": string; + /** + * Datadog metrics query expression. + */ + "query": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + aggregator: { + baseName: "aggregator", + type: "string", + }, + crossOrgUuids: { + baseName: "cross_org_uuids", + type: "Array", + }, + dataSource: { + baseName: "data_source", + type: "TimeseriesAnomalyInvestigationDataSource", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + query: { + baseName: "query", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationMetricQuery.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationQueryExecutionStatus.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationQueryExecutionStatus.ts new file mode 100644 index 000000000000..869295665740 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationQueryExecutionStatus.ts @@ -0,0 +1,18 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Current execution status for a named query. + */ + +export type TimeseriesAnomalyInvestigationQueryExecutionStatus = + | typeof RUNNING + | typeof DONE + | UnparsedObject; +export const RUNNING = "running"; +export const DONE = "done"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationQueryStatus.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationQueryStatus.ts new file mode 100644 index 000000000000..aa2d6caaf83f --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationQueryStatus.ts @@ -0,0 +1,63 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationQueryExecutionStatus } from "./TimeseriesAnomalyInvestigationQueryExecutionStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Execution status for one named query. + */ +export class TimeseriesAnomalyInvestigationQueryStatus { + /** + * Query name from the request. + */ + "name": string; + /** + * Current execution status for a named query. + */ + "status": TimeseriesAnomalyInvestigationQueryExecutionStatus; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + status: { + baseName: "status", + type: "TimeseriesAnomalyInvestigationQueryExecutionStatus", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationQueryStatus.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequest.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequest.ts new file mode 100644 index 000000000000..4165558892cc --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationRequestData } from "./TimeseriesAnomalyInvestigationRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to investigate a metrics timeseries for anomalies. + */ +export class TimeseriesAnomalyInvestigationRequest { + /** + * JSON:API resource containing an anomaly investigation request. + */ + "data": TimeseriesAnomalyInvestigationRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "TimeseriesAnomalyInvestigationRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequestAttributes.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequestAttributes.ts new file mode 100644 index 000000000000..64f079cc5714 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequestAttributes.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationTimeseriesRequest } from "./TimeseriesAnomalyInvestigationTimeseriesRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of an anomaly investigation request. + */ +export class TimeseriesAnomalyInvestigationRequestAttributes { + /** + * Timeseries requests to investigate. This API version accepts exactly one request. + */ + "requests": [TimeseriesAnomalyInvestigationTimeseriesRequest]; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + requests: { + baseName: "requests", + type: "[TimeseriesAnomalyInvestigationTimeseriesRequest]", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequestData.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequestData.ts new file mode 100644 index 000000000000..6699ec7c7f79 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationRequestData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationRequestAttributes } from "./TimeseriesAnomalyInvestigationRequestAttributes"; +import { TimeseriesAnomalyInvestigationType } from "./TimeseriesAnomalyInvestigationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * JSON:API resource containing an anomaly investigation request. + */ +export class TimeseriesAnomalyInvestigationRequestData { + /** + * Attributes of an anomaly investigation request. + */ + "attributes": TimeseriesAnomalyInvestigationRequestAttributes; + /** + * Resource type for a timeseries anomaly investigation. + */ + "type": TimeseriesAnomalyInvestigationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "TimeseriesAnomalyInvestigationRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponse.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponse.ts new file mode 100644 index 000000000000..4fcabd1a5a95 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponse.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationResponseData } from "./TimeseriesAnomalyInvestigationResponseData"; +import { TimeseriesAnomalyInvestigationResponseMeta } from "./TimeseriesAnomalyInvestigationResponseMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing the anomaly investigation results and timeseries metadata. + */ +export class TimeseriesAnomalyInvestigationResponse { + /** + * JSON:API resource containing anomaly investigation results. + */ + "data": TimeseriesAnomalyInvestigationResponseData; + /** + * Timeseries execution metadata for the single request accepted by this API version. + */ + "meta": TimeseriesAnomalyInvestigationResponseMeta; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "TimeseriesAnomalyInvestigationResponseData", + required: true, + }, + meta: { + baseName: "meta", + type: "TimeseriesAnomalyInvestigationResponseMeta", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseAttributes.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseAttributes.ts new file mode 100644 index 000000000000..e64575e23fc6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseAttributes.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationResult } from "./TimeseriesAnomalyInvestigationResult"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of an anomaly investigation response. + */ +export class TimeseriesAnomalyInvestigationResponseAttributes { + /** + * Results returned in the same order as the submitted requests. This API version returns exactly one result. + */ + "results": [TimeseriesAnomalyInvestigationResult]; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + results: { + baseName: "results", + type: "[TimeseriesAnomalyInvestigationResult]", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseData.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseData.ts new file mode 100644 index 000000000000..42c3006fbd72 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseData.ts @@ -0,0 +1,74 @@ +/** + * 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. + */ +import { TimeseriesAnomalyInvestigationResponseAttributes } from "./TimeseriesAnomalyInvestigationResponseAttributes"; +import { TimeseriesAnomalyInvestigationResponseID } from "./TimeseriesAnomalyInvestigationResponseID"; +import { TimeseriesAnomalyInvestigationType } from "./TimeseriesAnomalyInvestigationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * JSON:API resource containing anomaly investigation results. + */ +export class TimeseriesAnomalyInvestigationResponseData { + /** + * Attributes of an anomaly investigation response. + */ + "attributes": TimeseriesAnomalyInvestigationResponseAttributes; + /** + * Stable identifier for an anomaly investigation response resource. + */ + "id": TimeseriesAnomalyInvestigationResponseID; + /** + * Resource type for a timeseries anomaly investigation. + */ + "type": TimeseriesAnomalyInvestigationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "TimeseriesAnomalyInvestigationResponseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "TimeseriesAnomalyInvestigationResponseID", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseID.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseID.ts new file mode 100644 index 000000000000..e3e1681812a1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseID.ts @@ -0,0 +1,16 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Stable identifier for an anomaly investigation response resource. + */ + +export type TimeseriesAnomalyInvestigationResponseID = + | typeof ZERO + | UnparsedObject; +export const ZERO = "0"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseMeta.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseMeta.ts new file mode 100644 index 000000000000..9cc70af14ab4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResponseMeta.ts @@ -0,0 +1,104 @@ +/** + * 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. + */ +import { TimeseriesAnomalyInvestigationMetaType } from "./TimeseriesAnomalyInvestigationMetaType"; +import { TimeseriesAnomalyInvestigationQueryStatus } from "./TimeseriesAnomalyInvestigationQueryStatus"; +import { TimeseriesAnomalyInvestigationResultsWarning } from "./TimeseriesAnomalyInvestigationResultsWarning"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Timeseries execution metadata for the single request accepted by this API version. + */ +export class TimeseriesAnomalyInvestigationResponseMeta { + /** + * Effective start of the timeseries query in milliseconds since the Unix epoch. + */ + "fromDate": number; + /** + * Effective timeseries interval in milliseconds. + */ + "interval": number; + /** + * Execution status for the request's queries. + */ + "queries": Array; + /** + * Response metadata type for a timeseries anomaly investigation. + */ + "resType": TimeseriesAnomalyInvestigationMetaType; + /** + * Non-fatal warnings produced while executing the investigation. + */ + "resultsWarnings": Array; + /** + * Effective end of the timeseries query in milliseconds since the Unix epoch. + */ + "toDate": number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + fromDate: { + baseName: "from_date", + type: "number", + required: true, + format: "int64", + }, + interval: { + baseName: "interval", + type: "number", + required: true, + format: "int64", + }, + queries: { + baseName: "queries", + type: "Array", + required: true, + }, + resType: { + baseName: "res_type", + type: "TimeseriesAnomalyInvestigationMetaType", + required: true, + }, + resultsWarnings: { + baseName: "results_warnings", + type: "Array", + required: true, + }, + toDate: { + baseName: "to_date", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResponseMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResult.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResult.ts new file mode 100644 index 000000000000..b2676a990a33 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResult.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationAnomaly } from "./TimeseriesAnomalyInvestigationAnomaly"; +import { TimeseriesAnomalyInvestigationCompleteStatus } from "./TimeseriesAnomalyInvestigationCompleteStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Completed result for one timeseries request. The anomalies array is empty when no qualifying anomaly is found. + */ +export class TimeseriesAnomalyInvestigationResult { + /** + * Detected anomalies. This API version returns at most one anomaly. + */ + "anomalies": Array; + /** + * Status value indicating successful completion. + */ + "status": TimeseriesAnomalyInvestigationCompleteStatus; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + anomalies: { + baseName: "anomalies", + type: "Array", + required: true, + }, + status: { + baseName: "status", + type: "TimeseriesAnomalyInvestigationCompleteStatus", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResult.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResultsWarning.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResultsWarning.ts new file mode 100644 index 000000000000..b912466a96ab --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationResultsWarning.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Non-fatal warning produced while executing the investigation. + */ +export class TimeseriesAnomalyInvestigationResultsWarning { + /** + * Human-readable warning message. + */ + "message": string; + /** + * Machine-readable warning name. + */ + "name": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + message: { + baseName: "message", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResultsWarning.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationSeries.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationSeries.ts new file mode 100644 index 000000000000..454c8bccffd7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationSeries.ts @@ -0,0 +1,72 @@ +/** + * 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. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Logical series on which the anomaly was detected. + */ +export class TimeseriesAnomalyInvestigationSeries { + /** + * Tags identifying the selected group. Empty for a query without grouping. + */ + "groupTags": Array; + /** + * Display label for the selected series. + */ + "label": string; + /** + * Zero-based index of the caller's formula that produced the series. + */ + "queryIndex": number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + groupTags: { + baseName: "group_tags", + type: "Array", + required: true, + }, + label: { + baseName: "label", + type: "string", + required: true, + }, + queryIndex: { + baseName: "query_index", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationSeries.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTagAnalysis.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTagAnalysis.ts new file mode 100644 index 000000000000..6c3eb97a0404 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTagAnalysis.ts @@ -0,0 +1,80 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationTagAnalysisStatus } from "./TimeseriesAnomalyInvestigationTagAnalysisStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Summary of optional influential-tag enrichment. Count and key fields are present only when analysis completes; enrichment availability does not affect completion of the investigation result. + */ +export class TimeseriesAnomalyInvestigationTagAnalysis { + /** + * Tag keys analyzed. Present only when analysis completes. + */ + "analyzedTagKeys"?: Array; + /** + * Outcome of optional influential-tag enrichment. + */ + "status": TimeseriesAnomalyInvestigationTagAnalysisStatus; + /** + * Number of tag keys analyzed. Present only when analysis completes. + */ + "tagKeysAnalyzed"?: number; + /** + * Number of tag values analyzed. Present only when analysis completes. + */ + "tagValuesAnalyzed"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + analyzedTagKeys: { + baseName: "analyzed_tag_keys", + type: "Array", + }, + status: { + baseName: "status", + type: "TimeseriesAnomalyInvestigationTagAnalysisStatus", + required: true, + }, + tagKeysAnalyzed: { + baseName: "tag_keys_analyzed", + type: "number", + format: "int64", + }, + tagValuesAnalyzed: { + baseName: "tag_values_analyzed", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationTagAnalysis.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTagAnalysisStatus.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTagAnalysisStatus.ts new file mode 100644 index 000000000000..3e21e2098791 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTagAnalysisStatus.ts @@ -0,0 +1,20 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Outcome of optional influential-tag enrichment. + */ + +export type TimeseriesAnomalyInvestigationTagAnalysisStatus = + | typeof COMPLETE + | typeof UNSUPPORTED + | typeof FAILED + | UnparsedObject; +export const COMPLETE = "complete"; +export const UNSUPPORTED = "unsupported"; +export const FAILED = "failed"; diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTimeseriesRequest.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTimeseriesRequest.ts new file mode 100644 index 000000000000..1a2b1c24fa39 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationTimeseriesRequest.ts @@ -0,0 +1,93 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { TimeseriesAnomalyInvestigationFormula } from "./TimeseriesAnomalyInvestigationFormula"; +import { TimeseriesAnomalyInvestigationMetricQuery } from "./TimeseriesAnomalyInvestigationMetricQuery"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Metrics timeseries request to investigate. + */ +export class TimeseriesAnomalyInvestigationTimeseriesRequest { + /** + * Formulas to evaluate. Each formula may contain an explicit `anomalies()` call or a supported metrics expression. + */ + "formulas": Array; + /** + * Start of the investigation time window in milliseconds since the Unix epoch. + */ + "from": number; + /** + * Optional requested aggregation interval in milliseconds. + */ + "interval"?: number; + /** + * Metrics queries referenced by the formulas. + */ + "queries": Array; + /** + * End of the investigation time window in milliseconds since the Unix epoch. Must be later than `from`. + */ + "to": number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + formulas: { + baseName: "formulas", + type: "Array", + required: true, + }, + from: { + baseName: "from", + type: "number", + required: true, + format: "int64", + }, + interval: { + baseName: "interval", + type: "number", + format: "int64", + }, + queries: { + baseName: "queries", + type: "Array", + required: true, + }, + to: { + baseName: "to", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationTimeseriesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationType.ts b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationType.ts new file mode 100644 index 000000000000..f37253a4d559 --- /dev/null +++ b/packages/datadog-api-client-v2/models/TimeseriesAnomalyInvestigationType.ts @@ -0,0 +1,17 @@ +/** + * 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. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Resource type for a timeseries anomaly investigation. + */ + +export type TimeseriesAnomalyInvestigationType = + | typeof TIMESERIES_ANOMALY_INVESTIGATION + | UnparsedObject; +export const TIMESERIES_ANOMALY_INVESTIGATION = + "timeseries_anomaly_investigation";