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
9 changes: 9 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38207,6 +38207,15 @@ paths:
schema:
format: int64
type: integer
- description: |-
Whether to return only deleted service level objective objects.
example: true
in: query
name: is_deleted
required: false
schema:
default: false
type: boolean
responses:
"200":
content:
Expand Down
17 changes: 17 additions & 0 deletions src/datadog_api_client/v1/api/service_level_objectives_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ def __init__(self, api_client=None):
"attribute": "offset",
"location": "query",
},
"is_deleted": {
"openapi_types": (bool,),
"attribute": "is_deleted",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -524,6 +529,7 @@ def list_slos(
metrics_query: Union[str, UnsetType] = unset,
limit: Union[int, UnsetType] = unset,
offset: Union[int, UnsetType] = unset,
is_deleted: Union[bool, UnsetType] = unset,
) -> SLOListResponse:
"""Get all SLOs.

Expand All @@ -541,6 +547,8 @@ def list_slos(
:type limit: int, optional
:param offset: The specific offset to use as the beginning of the returned response.
:type offset: int, optional
:param is_deleted: Whether to return only deleted service level objective objects.
:type is_deleted: bool, optional
:rtype: SLOListResponse
"""
kwargs: Dict[str, Any] = {}
Expand All @@ -562,6 +570,9 @@ def list_slos(
if offset is not unset:
kwargs["offset"] = offset

if is_deleted is not unset:
kwargs["is_deleted"] = is_deleted

return self._list_slos_endpoint.call_with_http_info(**kwargs)

def list_slos_with_pagination(
Expand All @@ -573,6 +584,7 @@ def list_slos_with_pagination(
metrics_query: Union[str, UnsetType] = unset,
limit: Union[int, UnsetType] = unset,
offset: Union[int, UnsetType] = unset,
is_deleted: Union[bool, UnsetType] = unset,
) -> collections.abc.Iterable[ServiceLevelObjective]:
"""Get all SLOs.

Expand All @@ -590,6 +602,8 @@ def list_slos_with_pagination(
:type limit: int, optional
:param offset: The specific offset to use as the beginning of the returned response.
:type offset: int, optional
:param is_deleted: Whether to return only deleted service level objective objects.
:type is_deleted: bool, optional

:return: A generator of paginated results.
:rtype: collections.abc.Iterable[ServiceLevelObjective]
Expand All @@ -613,6 +627,9 @@ def list_slos_with_pagination(
if offset is not unset:
kwargs["offset"] = offset

if is_deleted is not unset:
kwargs["is_deleted"] = is_deleted

local_page_size = get_attribute_from_path(kwargs, "limit", 1000)
endpoint = self._list_slos_endpoint
set_attribute_from_path(kwargs, "limit", local_page_size, endpoint.params_map)
Expand Down
Loading