Skip to content

Commit ed54b40

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 12fe77b of spec repo (DataDog#3432)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 7a520a2 commit ed54b40

31 files changed

Lines changed: 3882 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 648 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Create a report schedule returns "CREATED" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_report_schedule".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::ReportSchedulesAPI.new
8+
9+
body = DatadogAPIClient::V2::ReportScheduleCreateRequest.new({
10+
data: DatadogAPIClient::V2::ReportScheduleCreateRequestData.new({
11+
attributes: DatadogAPIClient::V2::ReportScheduleCreateRequestAttributes.new({
12+
delivery_format: DatadogAPIClient::V2::ReportScheduleDeliveryFormat::PDF,
13+
description: "Weekly summary of infrastructure health.",
14+
recipients: [
15+
"user@example.com",
16+
"slack:T01234567.C01234567.alerts",
17+
"teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2",
18+
],
19+
resource_id: "abc-def-ghi",
20+
resource_type: DatadogAPIClient::V2::ReportScheduleResourceType::DASHBOARD,
21+
rrule: 'DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0',
22+
tab_id: "66666666-7777-8888-9999-000000000000",
23+
template_variables: [
24+
DatadogAPIClient::V2::ReportScheduleTemplateVariable.new({
25+
name: "env",
26+
values: [
27+
"prod",
28+
],
29+
}),
30+
],
31+
timeframe: "calendar_month",
32+
timezone: "America/New_York",
33+
title: "Weekly Infrastructure Report",
34+
}),
35+
type: DatadogAPIClient::V2::ReportScheduleType::SCHEDULE,
36+
}),
37+
})
38+
p api_instance.create_report_schedule(body)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Update a report schedule returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.patch_report_schedule".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::ReportSchedulesAPI.new
8+
9+
body = DatadogAPIClient::V2::ReportSchedulePatchRequest.new({
10+
data: DatadogAPIClient::V2::ReportSchedulePatchRequestData.new({
11+
attributes: DatadogAPIClient::V2::ReportSchedulePatchRequestAttributes.new({
12+
delivery_format: DatadogAPIClient::V2::ReportScheduleDeliveryFormat::PDF,
13+
description: "Updated weekly summary of infrastructure health.",
14+
recipients: [
15+
"user@example.com",
16+
"slack:T01234567.C01234567.alerts",
17+
"teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2",
18+
],
19+
rrule: 'DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0',
20+
tab_id: "66666666-7777-8888-9999-000000000000",
21+
template_variables: [
22+
DatadogAPIClient::V2::ReportScheduleTemplateVariable.new({
23+
name: "env",
24+
values: [
25+
"prod",
26+
],
27+
}),
28+
],
29+
timeframe: "calendar_month",
30+
timezone: "America/New_York",
31+
title: "Weekly Infrastructure Report",
32+
}),
33+
type: DatadogAPIClient::V2::ReportScheduleType::SCHEDULE,
34+
}),
35+
})
36+
p api_instance.patch_report_schedule("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)

features/scenarios_model_mapping.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4653,6 +4653,13 @@
46534653
"snapshot_id" => "String",
46544654
"body" => "SnapshotUpdateRequest",
46554655
},
4656+
"v2.CreateReportSchedule" => {
4657+
"body" => "ReportScheduleCreateRequest",
4658+
},
4659+
"v2.PatchReportSchedule" => {
4660+
"schedule_uuid" => "UUID",
4661+
"body" => "ReportSchedulePatchRequest",
4662+
},
46564663
"v2.DeleteRestrictionPolicy" => {
46574664
"resource_id" => "String",
46584665
},
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
@endpoint(report-schedules) @endpoint(report-schedules-v2)
2+
Feature: Report Schedules
3+
Create and manage scheduled reports. A scheduled report renders a
4+
dashboard or integration dashboard on a recurring cadence and delivers it
5+
to a set of recipients over email, Slack, or Microsoft Teams.
6+
7+
Background:
8+
Given a valid "apiKeyAuth" key in the system
9+
And a valid "appKeyAuth" key in the system
10+
And an instance of "ReportSchedules" API
11+
12+
@generated @skip @team:DataDog/reporting-and-sharing
13+
Scenario: Create a report schedule returns "Bad Request" response
14+
Given operation "CreateReportSchedule" enabled
15+
And new "CreateReportSchedule" request
16+
And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
17+
When the request is sent
18+
Then the response status is 400 Bad Request
19+
20+
@generated @skip @team:DataDog/reporting-and-sharing
21+
Scenario: Create a report schedule returns "CREATED" response
22+
Given operation "CreateReportSchedule" enabled
23+
And new "CreateReportSchedule" request
24+
And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
25+
When the request is sent
26+
Then the response status is 201 CREATED
27+
28+
@generated @skip @team:DataDog/reporting-and-sharing
29+
Scenario: Create a report schedule returns "Not Found" response
30+
Given operation "CreateReportSchedule" enabled
31+
And new "CreateReportSchedule" request
32+
And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
33+
When the request is sent
34+
Then the response status is 404 Not Found
35+
36+
@generated @skip @team:DataDog/reporting-and-sharing
37+
Scenario: Update a report schedule returns "Bad Request" response
38+
Given operation "PatchReportSchedule" enabled
39+
And new "PatchReportSchedule" request
40+
And request contains "schedule_uuid" parameter from "REPLACE.ME"
41+
And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
42+
When the request is sent
43+
Then the response status is 400 Bad Request
44+
45+
@generated @skip @team:DataDog/reporting-and-sharing
46+
Scenario: Update a report schedule returns "Not Found" response
47+
Given operation "PatchReportSchedule" enabled
48+
And new "PatchReportSchedule" request
49+
And request contains "schedule_uuid" parameter from "REPLACE.ME"
50+
And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
51+
When the request is sent
52+
Then the response status is 404 Not Found
53+
54+
@generated @skip @team:DataDog/reporting-and-sharing
55+
Scenario: Update a report schedule returns "OK" response
56+
Given operation "PatchReportSchedule" enabled
57+
And new "PatchReportSchedule" request
58+
And request contains "schedule_uuid" parameter from "REPLACE.ME"
59+
And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}}
60+
When the request is sent
61+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6126,6 +6126,19 @@
61266126
"type": "idempotent"
61276127
}
61286128
},
6129+
"CreateReportSchedule": {
6130+
"tag": "Report Schedules",
6131+
"undo": {
6132+
"type": "unsafe"
6133+
}
6134+
},
6135+
"PatchReportSchedule": {
6136+
"tag": "Report Schedules",
6137+
"undo": {
6138+
"operationId": "PatchReportSchedule",
6139+
"type": "idempotent"
6140+
}
6141+
},
61296142
"DeleteRestrictionPolicy": {
61306143
"tag": "Restriction Policies",
61316144
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,8 @@ def initialize
593593
"v2.update_connection": false,
594594
"v2.get_pruned_trace_by_id": false,
595595
"v2.get_trace_by_id": false,
596+
"v2.create_report_schedule": false,
597+
"v2.patch_report_schedule": false,
596598
"v2.delete_sourcemaps": false,
597599
"v2.get_service_repository_info": false,
598600
"v2.get_sourcemaps": false,

lib/datadog_api_client/inflector.rb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5554,6 +5554,28 @@ def overrides
55545554
"v2.reorder_ruleset_resource_array" => "ReorderRulesetResourceArray",
55555555
"v2.reorder_ruleset_resource_data" => "ReorderRulesetResourceData",
55565556
"v2.reorder_ruleset_resource_data_type" => "ReorderRulesetResourceDataType",
5557+
"v2.report_schedule_author" => "ReportScheduleAuthor",
5558+
"v2.report_schedule_author_attributes" => "ReportScheduleAuthorAttributes",
5559+
"v2.report_schedule_author_relationship" => "ReportScheduleAuthorRelationship",
5560+
"v2.report_schedule_author_relationship_data" => "ReportScheduleAuthorRelationshipData",
5561+
"v2.report_schedule_author_type" => "ReportScheduleAuthorType",
5562+
"v2.report_schedule_create_request" => "ReportScheduleCreateRequest",
5563+
"v2.report_schedule_create_request_attributes" => "ReportScheduleCreateRequestAttributes",
5564+
"v2.report_schedule_create_request_data" => "ReportScheduleCreateRequestData",
5565+
"v2.report_schedule_delivery_format" => "ReportScheduleDeliveryFormat",
5566+
"v2.report_schedule_included_resource" => "ReportScheduleIncludedResource",
5567+
"v2.report_schedule_patch_request" => "ReportSchedulePatchRequest",
5568+
"v2.report_schedule_patch_request_attributes" => "ReportSchedulePatchRequestAttributes",
5569+
"v2.report_schedule_patch_request_data" => "ReportSchedulePatchRequestData",
5570+
"v2.report_schedule_resource_type" => "ReportScheduleResourceType",
5571+
"v2.report_schedule_response" => "ReportScheduleResponse",
5572+
"v2.report_schedule_response_attributes" => "ReportScheduleResponseAttributes",
5573+
"v2.report_schedule_response_attributes_delivery_format" => "ReportScheduleResponseAttributesDeliveryFormat",
5574+
"v2.report_schedule_response_data" => "ReportScheduleResponseData",
5575+
"v2.report_schedule_response_relationships" => "ReportScheduleResponseRelationships",
5576+
"v2.report_schedule_status" => "ReportScheduleStatus",
5577+
"v2.report_schedule_template_variable" => "ReportScheduleTemplateVariable",
5578+
"v2.report_schedule_type" => "ReportScheduleType",
55575579
"v2.resolve_vulnerable_symbols_request" => "ResolveVulnerableSymbolsRequest",
55585580
"v2.resolve_vulnerable_symbols_request_data" => "ResolveVulnerableSymbolsRequestData",
55595581
"v2.resolve_vulnerable_symbols_request_data_attributes" => "ResolveVulnerableSymbolsRequestDataAttributes",
@@ -7606,6 +7628,7 @@ def overrides
76067628
"v2.processes_api" => "ProcessesAPI",
76077629
"v2.product_analytics_api" => "ProductAnalyticsAPI",
76087630
"v2.reference_tables_api" => "ReferenceTablesAPI",
7631+
"v2.report_schedules_api" => "ReportSchedulesAPI",
76097632
"v2.restriction_policies_api" => "RestrictionPoliciesAPI",
76107633
"v2.roles_api" => "RolesAPI",
76117634
"v2.rum_api" => "RUMAPI",

0 commit comments

Comments
 (0)