Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
451 changes: 451 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18589,13 +18589,90 @@ datadog\_api\_client.v2.model.incident\_notification\_template\_update\_data mod
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_attributes module
---------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_create\_attributes module
-----------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_create_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_create\_data module
-----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_create_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_create\_request module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_create_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_data module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_included module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_included
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_relationships module
------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_relationships
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_response module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_type module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_update\_attributes module
-----------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_update_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_update\_data module
-----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_update_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_postmortem\_update\_request module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.incident_postmortem_update_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.incident\_related\_object module
--------------------------------------------------------------

Expand Down Expand Up @@ -26688,6 +26765,13 @@ datadog\_api\_client.v2.model.notion\_integration\_update module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.nullable\_relationship\_to\_incident\_responder\_data module
------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.nullable_relationship_to_incident_responder_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.nullable\_relationship\_to\_user module
---------------------------------------------------------------------

Expand Down Expand Up @@ -31651,6 +31735,13 @@ datadog\_api\_client.v2.model.postmortem\_cell\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_status module
-------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_status
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_template\_attributes\_request module
------------------------------------------------------------------------------

Expand Down Expand Up @@ -32932,6 +33023,13 @@ datadog\_api\_client.v2.model.relationship\_to\_incident\_request module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.relationship\_to\_incident\_responder module
--------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.relationship_to_incident_responder
:members:
:show-inheritance:

datadog\_api\_client.v2.model.relationship\_to\_incident\_responder\_data module
--------------------------------------------------------------------------------

Expand Down
32 changes: 32 additions & 0 deletions examples/v2/incidents/CreateIncidentPostmortem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""
Create postmortem for an incident returns "CREATED" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.incidents_api import IncidentsApi
from datadog_api_client.v2.model.incident_postmortem_create_attributes import IncidentPostmortemCreateAttributes
from datadog_api_client.v2.model.incident_postmortem_create_data import IncidentPostmortemCreateData
from datadog_api_client.v2.model.incident_postmortem_create_request import IncidentPostmortemCreateRequest
from datadog_api_client.v2.model.incident_postmortem_type import IncidentPostmortemType

# there is a valid "incident" in the system
INCIDENT_DATA_ID = environ["INCIDENT_DATA_ID"]

body = IncidentPostmortemCreateRequest(
data=IncidentPostmortemCreateData(
attributes=IncidentPostmortemCreateAttributes(
document_url="https://app.datadoghq.com/notebook/123",
title="Postmortem for IR-123",
),
type=IncidentPostmortemType.INCIDENT_POSTMORTEMS,
),
)

configuration = Configuration()
configuration.unstable_operations["create_incident_postmortem"] = True
with ApiClient(configuration) as api_client:
api_instance = IncidentsApi(api_client)
response = api_instance.create_incident_postmortem(incident_id=INCIDENT_DATA_ID, body=body)

print(response)
18 changes: 18 additions & 0 deletions examples/v2/incidents/DeleteIncidentPostmortem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
Delete postmortem for an incident returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.incidents_api import IncidentsApi

# there is a valid "postmortem" in the system
POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID = environ["POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID"]

configuration = Configuration()
configuration.unstable_operations["delete_incident_postmortem"] = True
with ApiClient(configuration) as api_client:
api_instance = IncidentsApi(api_client)
api_instance.delete_incident_postmortem(
incident_id=POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID,
)
20 changes: 20 additions & 0 deletions examples/v2/incidents/GetIncidentPostmortem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Get postmortem for an incident returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.incidents_api import IncidentsApi

# there is a valid "postmortem" in the system
POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID = environ["POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID"]

configuration = Configuration()
configuration.unstable_operations["get_incident_postmortem"] = True
with ApiClient(configuration) as api_client:
api_instance = IncidentsApi(api_client)
response = api_instance.get_incident_postmortem(
incident_id=POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID,
)

print(response)
36 changes: 36 additions & 0 deletions examples/v2/incidents/UpdateIncidentPostmortem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""
Update postmortem for an incident returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.incidents_api import IncidentsApi
from datadog_api_client.v2.model.incident_postmortem_type import IncidentPostmortemType
from datadog_api_client.v2.model.incident_postmortem_update_attributes import IncidentPostmortemUpdateAttributes
from datadog_api_client.v2.model.incident_postmortem_update_data import IncidentPostmortemUpdateData
from datadog_api_client.v2.model.incident_postmortem_update_request import IncidentPostmortemUpdateRequest
from datadog_api_client.v2.model.postmortem_status import PostmortemStatus

# there is a valid "postmortem" in the system
POSTMORTEM_DATA_ID = environ["POSTMORTEM_DATA_ID"]
POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID = environ["POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID"]

body = IncidentPostmortemUpdateRequest(
data=IncidentPostmortemUpdateData(
attributes=IncidentPostmortemUpdateAttributes(
status=PostmortemStatus.IN_REVIEW,
),
id=POSTMORTEM_DATA_ID,
type=IncidentPostmortemType.INCIDENT_POSTMORTEMS,
),
)

configuration = Configuration()
configuration.unstable_operations["update_incident_postmortem"] = True
with ApiClient(configuration) as api_client:
api_instance = IncidentsApi(api_client)
response = api_instance.update_incident_postmortem(
incident_id=POSTMORTEM_DATA_RELATIONSHIPS_INCIDENT_DATA_ID, body=body
)

print(response)
4 changes: 4 additions & 0 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ def __init__(
"v2.create_incident_integration": False,
"v2.create_incident_notification_rule": False,
"v2.create_incident_notification_template": False,
"v2.create_incident_postmortem": False,
"v2.create_incident_postmortem_attachment": False,
"v2.create_incident_postmortem_template": False,
"v2.create_incident_todo": False,
Expand All @@ -576,6 +577,7 @@ def __init__(
"v2.delete_incident_integration": False,
"v2.delete_incident_notification_rule": False,
"v2.delete_incident_notification_template": False,
"v2.delete_incident_postmortem": False,
"v2.delete_incident_postmortem_template": False,
"v2.delete_incident_todo": False,
"v2.delete_incident_type": False,
Expand All @@ -585,6 +587,7 @@ def __init__(
"v2.get_incident_integration": False,
"v2.get_incident_notification_rule": False,
"v2.get_incident_notification_template": False,
"v2.get_incident_postmortem": False,
"v2.get_incident_postmortem_template": False,
"v2.get_incident_todo": False,
"v2.get_incident_type": False,
Expand All @@ -608,6 +611,7 @@ def __init__(
"v2.update_incident_integration": False,
"v2.update_incident_notification_rule": False,
"v2.update_incident_notification_template": False,
"v2.update_incident_postmortem": False,
"v2.update_incident_postmortem_template": False,
"v2.update_incident_todo": False,
"v2.update_incident_type": False,
Expand Down
Loading
Loading