|
26 | 26 | from datadog_api_client.v2.model.create_degradation_request import CreateDegradationRequest |
27 | 27 | from datadog_api_client.v2.model.create_backfilled_degradation_request import CreateBackfilledDegradationRequest |
28 | 28 | from datadog_api_client.v2.model.patch_degradation_request import PatchDegradationRequest |
| 29 | +from datadog_api_client.v2.model.degradation_update import DegradationUpdate |
| 30 | +from datadog_api_client.v2.model.patch_degradation_update_request import PatchDegradationUpdateRequest |
29 | 31 | from datadog_api_client.v2.model.maintenance import Maintenance |
30 | 32 | from datadog_api_client.v2.model.create_maintenance_request import CreateMaintenanceRequest |
31 | 33 | from datadog_api_client.v2.model.create_backfilled_maintenance_request import CreateBackfilledMaintenanceRequest |
@@ -313,6 +315,49 @@ def __init__(self, api_client=None): |
313 | 315 | api_client=api_client, |
314 | 316 | ) |
315 | 317 |
|
| 318 | + self._edit_degradation_update_endpoint = _Endpoint( |
| 319 | + settings={ |
| 320 | + "response_type": (DegradationUpdate,), |
| 321 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 322 | + "endpoint_path": "/api/v2/statuspages/{page_id}/degradations/{degradation_id}/updates/{update_id}", |
| 323 | + "operation_id": "edit_degradation_update", |
| 324 | + "http_method": "PATCH", |
| 325 | + "version": "v2", |
| 326 | + }, |
| 327 | + params_map={ |
| 328 | + "degradation_id": { |
| 329 | + "required": True, |
| 330 | + "openapi_types": (UUID,), |
| 331 | + "attribute": "degradation_id", |
| 332 | + "location": "path", |
| 333 | + }, |
| 334 | + "include": { |
| 335 | + "openapi_types": (str,), |
| 336 | + "attribute": "include", |
| 337 | + "location": "query", |
| 338 | + }, |
| 339 | + "page_id": { |
| 340 | + "required": True, |
| 341 | + "openapi_types": (UUID,), |
| 342 | + "attribute": "page_id", |
| 343 | + "location": "path", |
| 344 | + }, |
| 345 | + "update_id": { |
| 346 | + "required": True, |
| 347 | + "openapi_types": (UUID,), |
| 348 | + "attribute": "update_id", |
| 349 | + "location": "path", |
| 350 | + }, |
| 351 | + "body": { |
| 352 | + "required": True, |
| 353 | + "openapi_types": (PatchDegradationUpdateRequest,), |
| 354 | + "location": "body", |
| 355 | + }, |
| 356 | + }, |
| 357 | + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, |
| 358 | + api_client=api_client, |
| 359 | + ) |
| 360 | + |
316 | 361 | self._get_component_endpoint = _Endpoint( |
317 | 362 | settings={ |
318 | 363 | "response_type": (StatusPagesComponent,), |
@@ -625,6 +670,41 @@ def __init__(self, api_client=None): |
625 | 670 | api_client=api_client, |
626 | 671 | ) |
627 | 672 |
|
| 673 | + self._soft_delete_degradation_update_endpoint = _Endpoint( |
| 674 | + settings={ |
| 675 | + "response_type": None, |
| 676 | + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], |
| 677 | + "endpoint_path": "/api/v2/statuspages/{page_id}/degradations/{degradation_id}/updates/{update_id}", |
| 678 | + "operation_id": "soft_delete_degradation_update", |
| 679 | + "http_method": "DELETE", |
| 680 | + "version": "v2", |
| 681 | + }, |
| 682 | + params_map={ |
| 683 | + "degradation_id": { |
| 684 | + "required": True, |
| 685 | + "openapi_types": (UUID,), |
| 686 | + "attribute": "degradation_id", |
| 687 | + "location": "path", |
| 688 | + }, |
| 689 | + "page_id": { |
| 690 | + "required": True, |
| 691 | + "openapi_types": (UUID,), |
| 692 | + "attribute": "page_id", |
| 693 | + "location": "path", |
| 694 | + }, |
| 695 | + "update_id": { |
| 696 | + "required": True, |
| 697 | + "openapi_types": (UUID,), |
| 698 | + "attribute": "update_id", |
| 699 | + "location": "path", |
| 700 | + }, |
| 701 | + }, |
| 702 | + headers_map={ |
| 703 | + "accept": ["*/*"], |
| 704 | + }, |
| 705 | + api_client=api_client, |
| 706 | + ) |
| 707 | + |
628 | 708 | self._unpublish_status_page_endpoint = _Endpoint( |
629 | 709 | settings={ |
630 | 710 | "response_type": None, |
@@ -1041,6 +1121,44 @@ def delete_status_page( |
1041 | 1121 |
|
1042 | 1122 | return self._delete_status_page_endpoint.call_with_http_info(**kwargs) |
1043 | 1123 |
|
| 1124 | + def edit_degradation_update( |
| 1125 | + self, |
| 1126 | + degradation_id: UUID, |
| 1127 | + page_id: UUID, |
| 1128 | + update_id: UUID, |
| 1129 | + body: PatchDegradationUpdateRequest, |
| 1130 | + *, |
| 1131 | + include: Union[str, UnsetType] = unset, |
| 1132 | + ) -> DegradationUpdate: |
| 1133 | + """Edit degradation update. |
| 1134 | +
|
| 1135 | + Edits a specific degradation update. |
| 1136 | +
|
| 1137 | + :param degradation_id: The ID of the degradation. |
| 1138 | + :type degradation_id: UUID |
| 1139 | + :param page_id: The ID of the status page. |
| 1140 | + :type page_id: UUID |
| 1141 | + :param update_id: The ID of the degradation update. |
| 1142 | + :type update_id: UUID |
| 1143 | + :type body: PatchDegradationUpdateRequest |
| 1144 | + :param include: Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, degradation, status_page. |
| 1145 | + :type include: str, optional |
| 1146 | + :rtype: DegradationUpdate |
| 1147 | + """ |
| 1148 | + kwargs: Dict[str, Any] = {} |
| 1149 | + kwargs["degradation_id"] = degradation_id |
| 1150 | + |
| 1151 | + if include is not unset: |
| 1152 | + kwargs["include"] = include |
| 1153 | + |
| 1154 | + kwargs["page_id"] = page_id |
| 1155 | + |
| 1156 | + kwargs["update_id"] = update_id |
| 1157 | + |
| 1158 | + kwargs["body"] = body |
| 1159 | + |
| 1160 | + return self._edit_degradation_update_endpoint.call_with_http_info(**kwargs) |
| 1161 | + |
1044 | 1162 | def get_component( |
1045 | 1163 | self, |
1046 | 1164 | page_id: UUID, |
@@ -1328,6 +1446,33 @@ def publish_status_page( |
1328 | 1446 |
|
1329 | 1447 | return self._publish_status_page_endpoint.call_with_http_info(**kwargs) |
1330 | 1448 |
|
| 1449 | + def soft_delete_degradation_update( |
| 1450 | + self, |
| 1451 | + degradation_id: UUID, |
| 1452 | + page_id: UUID, |
| 1453 | + update_id: UUID, |
| 1454 | + ) -> None: |
| 1455 | + """Soft delete degradation update. |
| 1456 | +
|
| 1457 | + Soft-deletes a degradation update. |
| 1458 | +
|
| 1459 | + :param degradation_id: The ID of the degradation. |
| 1460 | + :type degradation_id: UUID |
| 1461 | + :param page_id: The ID of the status page. |
| 1462 | + :type page_id: UUID |
| 1463 | + :param update_id: The ID of the degradation update. |
| 1464 | + :type update_id: UUID |
| 1465 | + :rtype: None |
| 1466 | + """ |
| 1467 | + kwargs: Dict[str, Any] = {} |
| 1468 | + kwargs["degradation_id"] = degradation_id |
| 1469 | + |
| 1470 | + kwargs["page_id"] = page_id |
| 1471 | + |
| 1472 | + kwargs["update_id"] = update_id |
| 1473 | + |
| 1474 | + return self._soft_delete_degradation_update_endpoint.call_with_http_info(**kwargs) |
| 1475 | + |
1331 | 1476 | def unpublish_status_page( |
1332 | 1477 | self, |
1333 | 1478 | page_id: UUID, |
|
0 commit comments