Skip to content

Commit c7d7413

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 583a9d1f of spec repo
1 parent 31138a0 commit c7d7413

File tree

10 files changed

+141
-8
lines changed

10 files changed

+141
-8
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-01-19 16:38:27.079385",
8-
"spec_repo_commit": "80f33fd7"
7+
"regenerated": "2024-01-19 17:40:19.182955",
8+
"spec_repo_commit": "583a9d1f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-01-19 16:38:27.098056",
13-
"spec_repo_commit": "80f33fd7"
12+
"regenerated": "2024-01-19 17:40:19.198875",
13+
"spec_repo_commit": "583a9d1f"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5193,6 +5193,21 @@ components:
51935193
type: string
51945194
x-enum-varnames:
51955195
- CATEGORY_PROCESSOR
5196+
LogsDailyLimitReset:
5197+
description: Object containing options to override the default daily limit reset
5198+
time.
5199+
properties:
5200+
reset_time:
5201+
description: String in `HH:00` format representing the time of day the daily
5202+
limit should be reset. The hours must be between 00 and 23 (inclusive).
5203+
example: '14:00'
5204+
type: string
5205+
reset_utc_offset:
5206+
description: String in `(-|+)HH:00` format representing the UTC offset to
5207+
apply to the given reset time. The hours must be between -12 and +14 (inclusive).
5208+
example: +02:00
5209+
type: string
5210+
type: object
51965211
LogsDateRemapper:
51975212
description: "As Datadog receives logs, it timestamps them using the value(s)
51985213
from any of these default attributes.\n\n - `timestamp`\n - `date`\n -
@@ -5407,6 +5422,16 @@ components:
54075422
example: 300000000
54085423
format: int64
54095424
type: integer
5425+
daily_limit_reset:
5426+
$ref: '#/components/schemas/LogsDailyLimitReset'
5427+
daily_limit_warning_threshold_percentage:
5428+
description: A percentage threshold of the daily quota at which a Datadog
5429+
warning event is generated.
5430+
example: 70
5431+
format: double
5432+
maximum: 99.99
5433+
minimum: 50
5434+
type: number
54105435
exclusion_filters:
54115436
description: 'An array of exclusion objects. The logs are tested against
54125437
the query of each filter,
@@ -5462,6 +5487,16 @@ components:
54625487
example: 300000000
54635488
format: int64
54645489
type: integer
5490+
daily_limit_reset:
5491+
$ref: '#/components/schemas/LogsDailyLimitReset'
5492+
daily_limit_warning_threshold_percentage:
5493+
description: A percentage threshold of the daily quota at which a Datadog
5494+
warning event is generated.
5495+
example: 70
5496+
format: double
5497+
maximum: 99.99
5498+
minimum: 50
5499+
type: number
54655500
disable_daily_limit:
54665501
description: 'If true, sets the `daily_limit` value to null and the index
54675502
is not limited on a daily basis (any

examples/v1/logs-indexes/CreateLogsIndex.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ const apiInstance = new v1.LogsIndexesApi(configuration);
1010
const params: v1.LogsIndexesApiCreateLogsIndexRequest = {
1111
body: {
1212
dailyLimit: 300000000,
13+
dailyLimitReset: {
14+
resetTime: "14:00",
15+
resetUtcOffset: "+02:00",
16+
},
17+
dailyLimitWarningThresholdPercentage: 70,
1318
exclusionFilters: [
1419
{
1520
filter: {

examples/v1/logs-indexes/UpdateLogsIndex.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ const apiInstance = new v1.LogsIndexesApi(configuration);
1010
const params: v1.LogsIndexesApiUpdateLogsIndexRequest = {
1111
body: {
1212
dailyLimit: 300000000,
13+
dailyLimitReset: {
14+
resetTime: "14:00",
15+
resetUtcOffset: "+02:00",
16+
},
17+
dailyLimitWarningThresholdPercentage: 70,
1318
disableDailyLimit: false,
1419
exclusionFilters: [
1520
{

features/v1/logs_indexes.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Feature: Logs Indexes
1212
@generated @skip @team:DataDog/logs-backend
1313
Scenario: Create an index returns "Invalid Parameter Error" response
1414
Given new "CreateLogsIndex" request
15-
And body with value {"daily_limit": 300000000, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_retention_days": 15}
15+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_retention_days": 15}
1616
When the request is sent
1717
Then the response status is 400 Invalid Parameter Error
1818

1919
@generated @skip @team:DataDog/logs-backend
2020
Scenario: Create an index returns "OK" response
2121
Given new "CreateLogsIndex" request
22-
And body with value {"daily_limit": 300000000, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_retention_days": 15}
22+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_retention_days": 15}
2323
When the request is sent
2424
Then the response status is 200 OK
2525

@@ -53,15 +53,15 @@ Feature: Logs Indexes
5353
Scenario: Update an index returns "Invalid Parameter Error" response
5454
Given new "UpdateLogsIndex" request
5555
And request contains "name" parameter from "REPLACE.ME"
56-
And body with value {"daily_limit": 300000000, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_retention_days": 15}
56+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_retention_days": 15}
5757
When the request is sent
5858
Then the response status is 400 Invalid Parameter Error
5959

6060
@generated @skip @team:DataDog/logs-backend
6161
Scenario: Update an index returns "OK" response
6262
Given new "UpdateLogsIndex" request
6363
And request contains "name" parameter from "REPLACE.ME"
64-
And body with value {"daily_limit": 300000000, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_retention_days": 15}
64+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_retention_days": 15}
6565
When the request is sent
6666
Then the response status is 200 OK
6767

packages/datadog-api-client-v1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ export { LogsByRetentionOrgUsage } from "./models/LogsByRetentionOrgUsage";
552552
export { LogsCategoryProcessor } from "./models/LogsCategoryProcessor";
553553
export { LogsCategoryProcessorCategory } from "./models/LogsCategoryProcessorCategory";
554554
export { LogsCategoryProcessorType } from "./models/LogsCategoryProcessorType";
555+
export { LogsDailyLimitReset } from "./models/LogsDailyLimitReset";
555556
export { LogsDateRemapper } from "./models/LogsDateRemapper";
556557
export { LogsDateRemapperType } from "./models/LogsDateRemapperType";
557558
export { LogsExclusion } from "./models/LogsExclusion";
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
7+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* Object containing options to override the default daily limit reset time.
11+
*/
12+
export class LogsDailyLimitReset {
13+
/**
14+
* String in `HH:00` format representing the time of day the daily limit should be reset. The hours must be between 00 and 23 (inclusive).
15+
*/
16+
"resetTime"?: string;
17+
/**
18+
* String in `(-|+)HH:00` format representing the UTC offset to apply to the given reset time. The hours must be between -12 and +14 (inclusive).
19+
*/
20+
"resetUtcOffset"?: string;
21+
22+
/**
23+
* @ignore
24+
*/
25+
"_unparsed"?: boolean;
26+
27+
/**
28+
* @ignore
29+
*/
30+
static readonly attributeTypeMap: AttributeTypeMap = {
31+
resetTime: {
32+
baseName: "reset_time",
33+
type: "string",
34+
},
35+
resetUtcOffset: {
36+
baseName: "reset_utc_offset",
37+
type: "string",
38+
},
39+
};
40+
41+
/**
42+
* @ignore
43+
*/
44+
static getAttributeTypeMap(): AttributeTypeMap {
45+
return LogsDailyLimitReset.attributeTypeMap;
46+
}
47+
48+
public constructor() {}
49+
}

packages/datadog-api-client-v1/models/LogsIndex.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { LogsDailyLimitReset } from "./LogsDailyLimitReset";
67
import { LogsExclusion } from "./LogsExclusion";
78
import { LogsFilter } from "./LogsFilter";
89

@@ -16,6 +17,14 @@ export class LogsIndex {
1617
* The number of log events you can send in this index per day before you are rate-limited.
1718
*/
1819
"dailyLimit"?: number;
20+
/**
21+
* Object containing options to override the default daily limit reset time.
22+
*/
23+
"dailyLimitReset"?: LogsDailyLimitReset;
24+
/**
25+
* A percentage threshold of the daily quota at which a Datadog warning event is generated.
26+
*/
27+
"dailyLimitWarningThresholdPercentage"?: number;
1928
/**
2029
* An array of exclusion objects. The logs are tested against the query of each filter,
2130
* following the order of the array. Only the first matching active exclusion matters,
@@ -55,6 +64,15 @@ export class LogsIndex {
5564
type: "number",
5665
format: "int64",
5766
},
67+
dailyLimitReset: {
68+
baseName: "daily_limit_reset",
69+
type: "LogsDailyLimitReset",
70+
},
71+
dailyLimitWarningThresholdPercentage: {
72+
baseName: "daily_limit_warning_threshold_percentage",
73+
type: "number",
74+
format: "double",
75+
},
5876
exclusionFilters: {
5977
baseName: "exclusion_filters",
6078
type: "Array<LogsExclusion>",

packages/datadog-api-client-v1/models/LogsIndexUpdateRequest.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { LogsDailyLimitReset } from "./LogsDailyLimitReset";
67
import { LogsExclusion } from "./LogsExclusion";
78
import { LogsFilter } from "./LogsFilter";
89

@@ -16,6 +17,14 @@ export class LogsIndexUpdateRequest {
1617
* The number of log events you can send in this index per day before you are rate-limited.
1718
*/
1819
"dailyLimit"?: number;
20+
/**
21+
* Object containing options to override the default daily limit reset time.
22+
*/
23+
"dailyLimitReset"?: LogsDailyLimitReset;
24+
/**
25+
* A percentage threshold of the daily quota at which a Datadog warning event is generated.
26+
*/
27+
"dailyLimitWarningThresholdPercentage"?: number;
1928
/**
2029
* If true, sets the `daily_limit` value to null and the index is not limited on a daily basis (any
2130
* specified `daily_limit` value in the request is ignored). If false or omitted, the index's current
@@ -55,6 +64,15 @@ export class LogsIndexUpdateRequest {
5564
type: "number",
5665
format: "int64",
5766
},
67+
dailyLimitReset: {
68+
baseName: "daily_limit_reset",
69+
type: "LogsDailyLimitReset",
70+
},
71+
dailyLimitWarningThresholdPercentage: {
72+
baseName: "daily_limit_warning_threshold_percentage",
73+
type: "number",
74+
format: "double",
75+
},
5876
disableDailyLimit: {
5977
baseName: "disable_daily_limit",
6078
type: "boolean",

packages/datadog-api-client-v1/models/ObjectSerializer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ import { LogsByRetentionOrgUsage } from "./LogsByRetentionOrgUsage";
161161
import { LogsByRetentionOrgs } from "./LogsByRetentionOrgs";
162162
import { LogsCategoryProcessor } from "./LogsCategoryProcessor";
163163
import { LogsCategoryProcessorCategory } from "./LogsCategoryProcessorCategory";
164+
import { LogsDailyLimitReset } from "./LogsDailyLimitReset";
164165
import { LogsDateRemapper } from "./LogsDateRemapper";
165166
import { LogsExclusion } from "./LogsExclusion";
166167
import { LogsExclusionFilter } from "./LogsExclusionFilter";
@@ -1753,6 +1754,7 @@ const typeMap: { [index: string]: any } = {
17531754
LogsByRetentionOrgs: LogsByRetentionOrgs,
17541755
LogsCategoryProcessor: LogsCategoryProcessor,
17551756
LogsCategoryProcessorCategory: LogsCategoryProcessorCategory,
1757+
LogsDailyLimitReset: LogsDailyLimitReset,
17561758
LogsDateRemapper: LogsDateRemapper,
17571759
LogsExclusion: LogsExclusion,
17581760
LogsExclusionFilter: LogsExclusionFilter,

0 commit comments

Comments
 (0)