Skip to content

Commit 96b1048

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 1e0b6ab of spec repo (#4788)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 20d5309 commit 96b1048

22 files changed

Lines changed: 1297 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64644,6 +64644,126 @@ components:
6464464644
- type
6464564645
- id
6464664646
type: object
64647+
MaintenanceUpdate:
64648+
description: Response object for a maintenance update.
64649+
properties:
64650+
data:
64651+
$ref: "#/components/schemas/MaintenanceUpdateData"
64652+
type: object
64653+
MaintenanceUpdateData:
64654+
description: The data object for a maintenance update.
64655+
properties:
64656+
attributes:
64657+
$ref: "#/components/schemas/MaintenanceUpdateDataAttributes"
64658+
id:
64659+
description: The ID of the maintenance update.
64660+
example: "1234abcd-12ab-34cd-56ef-123456abcdef"
64661+
format: uuid
64662+
type: string
64663+
relationships:
64664+
$ref: "#/components/schemas/MaintenanceUpdateDataRelationships"
64665+
type:
64666+
$ref: "#/components/schemas/PatchMaintenanceUpdateRequestDataType"
64667+
required:
64668+
- id
64669+
- type
64670+
type: object
64671+
MaintenanceUpdateDataAttributes:
64672+
description: Attributes of a maintenance update resource.
64673+
properties:
64674+
components_affected:
64675+
description: Components affected at the time of the update.
64676+
items:
64677+
$ref: "#/components/schemas/CreateMaintenanceRequestDataAttributesComponentsAffectedItems"
64678+
type: array
64679+
created_at:
64680+
description: The date and time the update was created.
64681+
format: date-time
64682+
type: string
64683+
description:
64684+
description: The message body of the update.
64685+
type: string
64686+
manual_transition:
64687+
description: Whether the update was applied manually by a user (true) or automatically by the system (false).
64688+
type: boolean
64689+
modified_at:
64690+
description: The date and time the update was last modified.
64691+
format: date-time
64692+
type: string
64693+
started_at:
64694+
description: The date and time the update started.
64695+
format: date-time
64696+
type: string
64697+
status:
64698+
$ref: "#/components/schemas/MaintenanceUpdateDataAttributesStatus"
64699+
type: object
64700+
MaintenanceUpdateDataAttributesStatus:
64701+
description: The status of the maintenance update.
64702+
enum:
64703+
- scheduled
64704+
- in_progress
64705+
- completed
64706+
- canceled
64707+
type: string
64708+
x-enum-varnames:
64709+
- SCHEDULED
64710+
- IN_PROGRESS
64711+
- COMPLETED
64712+
- CANCELED
64713+
MaintenanceUpdateDataRelationships:
64714+
description: Relationships of a maintenance update resource.
64715+
properties:
64716+
created_by_user:
64717+
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsUser"
64718+
last_modified_by_user:
64719+
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsUser"
64720+
maintenance:
64721+
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsMaintenance"
64722+
type: object
64723+
MaintenanceUpdateDataRelationshipsMaintenance:
64724+
description: The parent maintenance of the update.
64725+
properties:
64726+
data:
64727+
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsMaintenanceData"
64728+
required:
64729+
- data
64730+
type: object
64731+
MaintenanceUpdateDataRelationshipsMaintenanceData:
64732+
description: The maintenance linked to a maintenance update.
64733+
properties:
64734+
id:
64735+
description: The ID of the maintenance.
64736+
example: ""
64737+
format: uuid
64738+
type: string
64739+
type:
64740+
$ref: "#/components/schemas/PatchMaintenanceRequestDataType"
64741+
required:
64742+
- type
64743+
- id
64744+
type: object
64745+
MaintenanceUpdateDataRelationshipsUser:
64746+
description: A user relationship of a maintenance update.
64747+
properties:
64748+
data:
64749+
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsUserData"
64750+
required:
64751+
- data
64752+
type: object
64753+
MaintenanceUpdateDataRelationshipsUserData:
64754+
description: The data object identifying a Datadog user linked to a maintenance update.
64755+
properties:
64756+
id:
64757+
description: The ID of the Datadog user.
64758+
example: ""
64759+
format: uuid
64760+
type: string
64761+
type:
64762+
$ref: "#/components/schemas/StatusPagesUserType"
64763+
required:
64764+
- type
64765+
- id
64766+
type: object
6464764767
MaintenanceWindow:
6464864768
description: A maintenance window that defines a scheduled time period during which case-related notifications and automation rules are suppressed. Each maintenance window applies to cases matching a specified query.
6464964769
properties:
@@ -80206,6 +80326,9 @@ components:
8020680326
PatchMaintenanceRequestDataAttributes:
8020780327
description: The supported attributes for updating a maintenance.
8020880328
properties:
80329+
canceled_description:
80330+
description: The description shown when the maintenance is canceled.
80331+
type: string
8020980332
completed_date:
8021080333
description: Timestamp of when the maintenance was completed.
8021180334
format: date-time
@@ -80354,6 +80477,50 @@ components:
8035480477
type: string
8035580478
x-enum-varnames:
8035680479
- MAINTENANCE_TEMPLATES
80480+
PatchMaintenanceUpdateRequest:
80481+
description: Request object for editing a maintenance update.
80482+
example:
80483+
data:
80484+
attributes:
80485+
description: We have completed maintenance on the API to improve performance.
80486+
id: 00000000-0000-0000-0000-000000000000
80487+
type: maintenance_updates
80488+
properties:
80489+
data:
80490+
$ref: "#/components/schemas/PatchMaintenanceUpdateRequestData"
80491+
type: object
80492+
PatchMaintenanceUpdateRequestData:
80493+
description: The data object for editing a maintenance update.
80494+
properties:
80495+
attributes:
80496+
$ref: "#/components/schemas/PatchMaintenanceUpdateRequestDataAttributes"
80497+
id:
80498+
description: The ID of the maintenance update to edit. Must match the `update_id` path parameter.
80499+
example: "1234abcd-12ab-34cd-56ef-123456abcdef"
80500+
type: string
80501+
type:
80502+
$ref: "#/components/schemas/PatchMaintenanceUpdateRequestDataType"
80503+
required:
80504+
- id
80505+
- type
80506+
type: object
80507+
PatchMaintenanceUpdateRequestDataAttributes:
80508+
description: Attributes for editing a maintenance update.
80509+
properties:
80510+
description:
80511+
description: The message body of the update.
80512+
example: ""
80513+
type: string
80514+
type: object
80515+
PatchMaintenanceUpdateRequestDataType:
80516+
default: maintenance_updates
80517+
description: Maintenance updates resource type.
80518+
enum:
80519+
- maintenance_updates
80520+
example: maintenance_updates
80521+
type: string
80522+
x-enum-varnames:
80523+
- MAINTENANCE_UPDATES
8035780524
PatchNotificationRuleParameters:
8035880525
description: Body of the notification rule patch request.
8035980526
properties:
@@ -203633,6 +203800,81 @@ paths:
203633203800
operator: AND
203634203801
permissions:
203635203802
- status_pages_incident_write
203803+
/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id}:
203804+
patch:
203805+
description: Edits the message of a specific maintenance update. Editing is allowed regardless of the parent maintenance's status, including completed and canceled maintenances.
203806+
operationId: PatchMaintenanceUpdate
203807+
parameters:
203808+
- description: The ID of the status page.
203809+
in: path
203810+
name: page_id
203811+
required: true
203812+
schema:
203813+
format: uuid
203814+
type: string
203815+
- description: The ID of the maintenance.
203816+
in: path
203817+
name: maintenance_id
203818+
required: true
203819+
schema:
203820+
format: uuid
203821+
type: string
203822+
- description: The ID of the maintenance update.
203823+
in: path
203824+
name: update_id
203825+
required: true
203826+
schema:
203827+
format: uuid
203828+
type: string
203829+
requestBody:
203830+
content:
203831+
application/json:
203832+
examples:
203833+
default:
203834+
value:
203835+
data:
203836+
attributes:
203837+
description: We have completed maintenance on the API to improve performance.
203838+
id: 00000000-0000-0000-0000-000000000000
203839+
type: maintenance_updates
203840+
schema:
203841+
$ref: "#/components/schemas/PatchMaintenanceUpdateRequest"
203842+
required: true
203843+
responses:
203844+
"200":
203845+
content:
203846+
application/json:
203847+
examples:
203848+
default:
203849+
value:
203850+
data:
203851+
attributes:
203852+
components_affected: []
203853+
created_at: "2026-04-27T13:37:31+00:00"
203854+
description: We have completed maintenance on the API to improve performance.
203855+
manual_transition: true
203856+
modified_at: "2026-04-27T14:37:31+00:00"
203857+
started_at: "2026-04-27T13:37:31+00:00"
203858+
status: completed
203859+
id: 00000000-0000-0000-0000-000000000000
203860+
type: maintenance_updates
203861+
schema:
203862+
$ref: "#/components/schemas/MaintenanceUpdate"
203863+
description: OK
203864+
"429":
203865+
$ref: "#/components/responses/TooManyRequestsResponse"
203866+
security:
203867+
- apiKeyAuth: []
203868+
appKeyAuth: []
203869+
- AuthZ:
203870+
- status_pages_incident_write
203871+
summary: Edit maintenance update
203872+
tags:
203873+
- Status Pages
203874+
x-permission:
203875+
operator: AND
203876+
permissions:
203877+
- status_pages_incident_write
203636203878
/api/v2/statuspages/{page_id}/publish:
203637203879
post:
203638203880
description: Publishes a status page. For pages of type `public`, makes the status page available on the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, makes the status page available under the `status-pages/$domain_prefix/view` route within the Datadog organization and requires the `status_pages_internal_page_publish` permission. The `status_pages_settings_write` permission is temporarily honored as we migrate publishing functionality from the update status page endpoint to the publish status page endpoint.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Edit maintenance update returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.StatusPagesApi(configuration);
9+
10+
const params: v2.StatusPagesApiPatchMaintenanceUpdateRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
description:
15+
"We have completed maintenance on the API to improve performance.",
16+
},
17+
id: "00000000-0000-0000-0000-000000000000",
18+
type: "maintenance_updates",
19+
},
20+
},
21+
pageId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
22+
maintenanceId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
23+
updateId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
24+
};
25+
26+
apiInstance
27+
.patchMaintenanceUpdate(params)
28+
.then((data: v2.MaintenanceUpdate) => {
29+
console.log(
30+
"API called successfully. Returned data: " + JSON.stringify(data)
31+
);
32+
})
33+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17193,6 +17193,25 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1719317193
},
1719417194
"operationResponseType": "Maintenance",
1719517195
},
17196+
"v2.PatchMaintenanceUpdate": {
17197+
"pageId": {
17198+
"type": "string",
17199+
"format": "uuid",
17200+
},
17201+
"maintenanceId": {
17202+
"type": "string",
17203+
"format": "uuid",
17204+
},
17205+
"updateId": {
17206+
"type": "string",
17207+
"format": "uuid",
17208+
},
17209+
"body": {
17210+
"type": "PatchMaintenanceUpdateRequest",
17211+
"format": "",
17212+
},
17213+
"operationResponseType": "MaintenanceUpdate",
17214+
},
1719617215
"v2.PublishStatusPage": {
1719717216
"pageId": {
1719817217
"type": "string",

features/v2/status_pages.feature

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,16 @@ Feature: Status Pages
136136
When the request is sent
137137
Then the response status is 200 OK
138138

139+
@generated @skip @team:DataDog/incident-app
140+
Scenario: Edit maintenance update returns "OK" response
141+
Given new "PatchMaintenanceUpdate" request
142+
And request contains "page_id" parameter from "REPLACE.ME"
143+
And request contains "maintenance_id" parameter from "REPLACE.ME"
144+
And request contains "update_id" parameter from "REPLACE.ME"
145+
And body with value {"data": {"attributes": {"description": "We have completed maintenance on the API to improve performance."}, "id": "00000000-0000-0000-0000-000000000000", "type": "maintenance_updates"}}
146+
When the request is sent
147+
Then the response status is 200 OK
148+
139149
@team:DataDog/incident-app
140150
Scenario: Get component returns "OK" response
141151
Given new "GetComponent" request

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9167,6 +9167,12 @@
91679167
"type": "idempotent"
91689168
}
91699169
},
9170+
"PatchMaintenanceUpdate": {
9171+
"tag": "Status Pages",
9172+
"undo": {
9173+
"type": "idempotent"
9174+
}
9175+
},
91709176
"PublishStatusPage": {
91719177
"tag": "Status Pages",
91729178
"undo": {

0 commit comments

Comments
 (0)