Skip to content

Commit 29d32b2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 27106c20 of spec repo
1 parent bb498d2 commit 29d32b2

15 files changed

+519
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.4",
7-
"regenerated": "2022-09-26 09:51:16.588136",
8-
"spec_repo_commit": "24936e30"
7+
"regenerated": "2022-09-26 14:13:07.901647",
8+
"spec_repo_commit": "27106c20"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2022-09-26 09:51:16.686609",
13-
"spec_repo_commit": "24936e30"
12+
"regenerated": "2022-09-26 14:13:07.913199",
13+
"spec_repo_commit": "27106c20"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9270,6 +9270,75 @@ components:
92709270
format: int64
92719271
type: integer
92729272
type: object
9273+
SLOListWidgetDefinition:
9274+
description: Use the SLO List widget to track your SLOs (Service Level Objectives)
9275+
on dashboards.
9276+
properties:
9277+
requests:
9278+
description: Array of one request object to display in the widget.
9279+
items:
9280+
$ref: '#/components/schemas/SLOListWidgetRequest'
9281+
maxItems: 1
9282+
minItems: 1
9283+
type: array
9284+
title:
9285+
description: Title of the widget.
9286+
type: string
9287+
title_align:
9288+
$ref: '#/components/schemas/WidgetTextAlign'
9289+
title_size:
9290+
description: Size of the title.
9291+
type: string
9292+
type:
9293+
$ref: '#/components/schemas/SLOListWidgetDefinitionType'
9294+
required:
9295+
- type
9296+
- requests
9297+
type: object
9298+
SLOListWidgetDefinitionType:
9299+
default: slo_list
9300+
description: Type of the SLO List widget.
9301+
enum:
9302+
- slo_list
9303+
example: slo_list
9304+
type: string
9305+
x-enum-varnames:
9306+
- SLO_LIST
9307+
SLOListWidgetQuery:
9308+
description: Updated SLO List widget.
9309+
properties:
9310+
limit:
9311+
default: 100
9312+
description: Maximum number of results to display in the table.
9313+
format: int64
9314+
maximum: 100
9315+
minimum: 1
9316+
type: integer
9317+
query_string:
9318+
description: Widget query.
9319+
example: env:prod AND service:my-app
9320+
type: string
9321+
required:
9322+
- query_string
9323+
type: object
9324+
SLOListWidgetRequest:
9325+
description: Updated SLO List widget.
9326+
properties:
9327+
query:
9328+
$ref: '#/components/schemas/SLOListWidgetQuery'
9329+
request_type:
9330+
$ref: '#/components/schemas/SLOListWidgetRequestType'
9331+
required:
9332+
- query
9333+
- request_type
9334+
type: object
9335+
SLOListWidgetRequestType:
9336+
description: Widget request type.
9337+
enum:
9338+
- slo_list
9339+
type: string
9340+
x-enum-varnames:
9341+
- SLO_LIST
92739342
SLOOverallStatuses:
92749343
description: Overall status of the SLO by timeframes.
92759344
properties:
@@ -17348,6 +17417,7 @@ components:
1734817417
- $ref: '#/components/schemas/QueryValueWidgetDefinition'
1734917418
- $ref: '#/components/schemas/ScatterPlotWidgetDefinition'
1735017419
- $ref: '#/components/schemas/SLOWidgetDefinition'
17420+
- $ref: '#/components/schemas/SLOListWidgetDefinition'
1735117421
- $ref: '#/components/schemas/ServiceMapWidgetDefinition'
1735217422
- $ref: '#/components/schemas/ServiceSummaryWidgetDefinition'
1735317423
- $ref: '#/components/schemas/SunburstWidgetDefinition'

docs/datadog_api_client.v1.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,6 +3039,41 @@ slo\_list\_response\_metadata\_page
30393039
:members:
30403040
:show-inheritance:
30413041

3042+
slo\_list\_widget\_definition
3043+
-----------------------------
3044+
3045+
.. automodule:: datadog_api_client.v1.model.slo_list_widget_definition
3046+
:members:
3047+
:show-inheritance:
3048+
3049+
slo\_list\_widget\_definition\_type
3050+
-----------------------------------
3051+
3052+
.. automodule:: datadog_api_client.v1.model.slo_list_widget_definition_type
3053+
:members:
3054+
:show-inheritance:
3055+
3056+
slo\_list\_widget\_query
3057+
------------------------
3058+
3059+
.. automodule:: datadog_api_client.v1.model.slo_list_widget_query
3060+
:members:
3061+
:show-inheritance:
3062+
3063+
slo\_list\_widget\_request
3064+
--------------------------
3065+
3066+
.. automodule:: datadog_api_client.v1.model.slo_list_widget_request
3067+
:members:
3068+
:show-inheritance:
3069+
3070+
slo\_list\_widget\_request\_type
3071+
--------------------------------
3072+
3073+
.. automodule:: datadog_api_client.v1.model.slo_list_widget_request_type
3074+
:members:
3075+
:show-inheritance:
3076+
30423077
slo\_overall\_statuses
30433078
----------------------
30443079

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"""
2+
Create a new dashboard with slo list widget
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
7+
from datadog_api_client.v1.model.dashboard import Dashboard
8+
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType
9+
from datadog_api_client.v1.model.slo_list_widget_definition import SLOListWidgetDefinition
10+
from datadog_api_client.v1.model.slo_list_widget_definition_type import SLOListWidgetDefinitionType
11+
from datadog_api_client.v1.model.slo_list_widget_query import SLOListWidgetQuery
12+
from datadog_api_client.v1.model.slo_list_widget_request import SLOListWidgetRequest
13+
from datadog_api_client.v1.model.slo_list_widget_request_type import SLOListWidgetRequestType
14+
from datadog_api_client.v1.model.widget import Widget
15+
from datadog_api_client.v1.model.widget_layout import WidgetLayout
16+
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
17+
18+
body = Dashboard(
19+
title="Example-Create_a_new_dashboard_with_slo_list_widget",
20+
description="",
21+
widgets=[
22+
Widget(
23+
layout=WidgetLayout(
24+
x=0,
25+
y=0,
26+
width=60,
27+
height=21,
28+
),
29+
definition=SLOListWidgetDefinition(
30+
title_size="16",
31+
title_align=WidgetTextAlign.LEFT,
32+
type=SLOListWidgetDefinitionType.SLO_LIST,
33+
requests=[
34+
SLOListWidgetRequest(
35+
query=SLOListWidgetQuery(
36+
query_string="env:prod AND service:my-app",
37+
limit=75,
38+
),
39+
request_type=SLOListWidgetRequestType.SLO_LIST,
40+
),
41+
],
42+
),
43+
),
44+
],
45+
template_variables=[],
46+
layout_type=DashboardLayoutType.FREE,
47+
is_read_only=False,
48+
notify_list=[],
49+
)
50+
51+
configuration = Configuration()
52+
with ApiClient(configuration) as api_client:
53+
api_instance = DashboardsApi(api_client)
54+
response = api_instance.create_dashboard(body=body)
55+
56+
print(response)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
5+
6+
from datadog_api_client.model_utils import (
7+
ModelNormal,
8+
cached_property,
9+
)
10+
11+
12+
class SLOListWidgetDefinition(ModelNormal):
13+
validations = {
14+
"requests": {
15+
"max_items": 1,
16+
"min_items": 1,
17+
},
18+
}
19+
20+
@cached_property
21+
def openapi_types(_):
22+
from datadog_api_client.v1.model.slo_list_widget_request import SLOListWidgetRequest
23+
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
24+
from datadog_api_client.v1.model.slo_list_widget_definition_type import SLOListWidgetDefinitionType
25+
26+
return {
27+
"requests": ([SLOListWidgetRequest],),
28+
"title": (str,),
29+
"title_align": (WidgetTextAlign,),
30+
"title_size": (str,),
31+
"type": (SLOListWidgetDefinitionType,),
32+
}
33+
34+
attribute_map = {
35+
"requests": "requests",
36+
"title": "title",
37+
"title_align": "title_align",
38+
"title_size": "title_size",
39+
"type": "type",
40+
}
41+
42+
def __init__(self_, requests, type, *args, **kwargs):
43+
"""
44+
Use the SLO List widget to track your SLOs (Service Level Objectives) on dashboards.
45+
46+
:param requests: Array of one request object to display in the widget.
47+
:type requests: [SLOListWidgetRequest]
48+
49+
:param title: Title of the widget.
50+
:type title: str, optional
51+
52+
:param title_align: How to align the text on the widget.
53+
:type title_align: WidgetTextAlign, optional
54+
55+
:param title_size: Size of the title.
56+
:type title_size: str, optional
57+
58+
:param type: Type of the SLO List widget.
59+
:type type: SLOListWidgetDefinitionType
60+
"""
61+
super().__init__(kwargs)
62+
63+
self_._check_pos_args(args)
64+
65+
self_.requests = requests
66+
self_.type = type
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
5+
6+
from datadog_api_client.model_utils import (
7+
ModelSimple,
8+
cached_property,
9+
)
10+
11+
from typing import ClassVar
12+
13+
14+
class SLOListWidgetDefinitionType(ModelSimple):
15+
"""
16+
Type of the SLO List widget.
17+
18+
:param value: If omitted defaults to "slo_list". Must be one of ["slo_list"].
19+
:type value: str
20+
"""
21+
22+
allowed_values = {
23+
"slo_list",
24+
}
25+
SLO_LIST: ClassVar["SLOListWidgetDefinitionType"]
26+
27+
@cached_property
28+
def openapi_types(_):
29+
return {
30+
"value": (str,),
31+
}
32+
33+
34+
SLOListWidgetDefinitionType.SLO_LIST = SLOListWidgetDefinitionType("slo_list")
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
5+
6+
from datadog_api_client.model_utils import (
7+
ModelNormal,
8+
cached_property,
9+
)
10+
11+
12+
class SLOListWidgetQuery(ModelNormal):
13+
validations = {
14+
"limit": {
15+
"inclusive_maximum": 100,
16+
"inclusive_minimum": 1,
17+
},
18+
}
19+
20+
@cached_property
21+
def openapi_types(_):
22+
return {
23+
"limit": (int,),
24+
"query_string": (str,),
25+
}
26+
27+
attribute_map = {
28+
"limit": "limit",
29+
"query_string": "query_string",
30+
}
31+
32+
def __init__(self_, query_string, *args, **kwargs):
33+
"""
34+
Updated SLO List widget.
35+
36+
:param limit: Maximum number of results to display in the table.
37+
:type limit: int, optional
38+
39+
:param query_string: Widget query.
40+
:type query_string: str
41+
"""
42+
super().__init__(kwargs)
43+
44+
self_._check_pos_args(args)
45+
46+
self_.query_string = query_string
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
5+
6+
from datadog_api_client.model_utils import (
7+
ModelNormal,
8+
cached_property,
9+
)
10+
11+
12+
class SLOListWidgetRequest(ModelNormal):
13+
@cached_property
14+
def openapi_types(_):
15+
from datadog_api_client.v1.model.slo_list_widget_query import SLOListWidgetQuery
16+
from datadog_api_client.v1.model.slo_list_widget_request_type import SLOListWidgetRequestType
17+
18+
return {
19+
"query": (SLOListWidgetQuery,),
20+
"request_type": (SLOListWidgetRequestType,),
21+
}
22+
23+
attribute_map = {
24+
"query": "query",
25+
"request_type": "request_type",
26+
}
27+
28+
def __init__(self_, query, request_type, *args, **kwargs):
29+
"""
30+
Updated SLO List widget.
31+
32+
:param query: Updated SLO List widget.
33+
:type query: SLOListWidgetQuery
34+
35+
:param request_type: Widget request type.
36+
:type request_type: SLOListWidgetRequestType
37+
"""
38+
super().__init__(kwargs)
39+
40+
self_._check_pos_args(args)
41+
42+
self_.query = query
43+
self_.request_type = request_type

0 commit comments

Comments
 (0)