Skip to content
Merged
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
146 changes: 146 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11287,6 +11287,12 @@ components:
type: string
status:
$ref: "#/components/schemas/NotebookStatus"
template_variables:
description: List of template variables for this notebook.
items:
$ref: "#/components/schemas/NotebookTemplateVariable"
nullable: true
type: array
time:
$ref: "#/components/schemas/NotebookGlobalTime"
required:
Expand Down Expand Up @@ -11506,6 +11512,12 @@ components:
type: string
status:
$ref: "#/components/schemas/NotebookStatus"
template_variables:
description: List of template variables for this notebook.
items:
$ref: "#/components/schemas/NotebookTemplateVariable"
nullable: true
type: array
time:
$ref: "#/components/schemas/NotebookGlobalTime"
required:
Expand Down Expand Up @@ -11548,6 +11560,128 @@ components:
type: string
x-enum-varnames:
- PUBLISHED
NotebookTemplateVariable:
additionalProperties: false
description: Notebook template variable.
properties:
available_values:
description: The list of values that the template variable drop-down is limited to.
example: ["my-host", "host1", "host2"]
items:
description: Template variable value.
minLength: 1
type: string
nullable: true
type: array
uniqueItems: true
available_values_query:
$ref: "#/components/schemas/NotebookTemplateVariableAvailableValuesQuery"
data_source_mappings:
additionalProperties:
description: The value for the given data source.
type: string
description: Mapping of data source names to template variable values.
type: object
default:
deprecated: true
description: |-
(deprecated) The default value for the template variable on notebook load.
Cannot be used in conjunction with `defaults`.
example: my-host
nullable: true
type: string
defaults:
description: One or many default values for the template variable. Cannot be used in conjunction with `default`.
example: ["my-host-1", "my-host-2"]
items:
description: A default value for the template variable.
minLength: 1
type: string
type: array
uniqueItems: true
name:
description: The name of the variable.
example: host1
type: string
placement:
description: The placement of the template variable in the notebook.
example: global
type: string
prefix:
description: The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down.
example: host
nullable: true
type: string
type:
description: The type of the template variable.
example: tag
type: string
required:
- name
type: object
NotebookTemplateVariableAvailableValuesQuery:
description: Query used to dynamically populate the list of available values for the template variable.
oneOf:
- $ref: "#/components/schemas/NotebookTemplateVariableAvailableValuesQueryLogRumSpans"
- $ref: "#/components/schemas/NotebookTemplateVariableAvailableValuesQueryMetrics"
NotebookTemplateVariableAvailableValuesQueryGroupBy:
additionalProperties: false
description: A group-by facet for an available values query.
properties:
facet:
description: The facet name to group by.
example: host
type: string
required:
- facet
type: object
NotebookTemplateVariableAvailableValuesQueryLogRumSpans:
additionalProperties: false
description: Available values query for logs, RUM, or spans data sources.
properties:
data_source:
description: The data source for the query. Must be one of `logs`, `rum`, or `spans`.
example: logs
type: string
group_by:
description: Group-by fields for the query.
items:
$ref: "#/components/schemas/NotebookTemplateVariableAvailableValuesQueryGroupBy"
type: array
search:
$ref: "#/components/schemas/NotebookTemplateVariableAvailableValuesQuerySearch"
required:
- data_source
- search
- group_by
type: object
NotebookTemplateVariableAvailableValuesQueryMetrics:
additionalProperties: false
description: Available values query for the metrics data source.
properties:
data_source:
description: The data source for the query. Must be `metrics`.
example: metrics
type: string
query:
description: The metrics query string.
example: "avg:system.cpu.user{*} by {host}"
type: string
required:
- data_source
- query
type: object
NotebookTemplateVariableAvailableValuesQuerySearch:
additionalProperties: false
description: Search parameters for an available values query.
properties:
query:
description: The search query string.
example: "service:web"
type: string
required:
- query
type: object
NotebookTimeseriesCellAttributes:
description: The attributes of a notebook `timeseries` cell.
properties:
Expand Down Expand Up @@ -11613,6 +11747,12 @@ components:
type: string
status:
$ref: "#/components/schemas/NotebookStatus"
template_variables:
description: List of template variables for this notebook.
items:
$ref: "#/components/schemas/NotebookTemplateVariable"
nullable: true
type: array
time:
$ref: "#/components/schemas/NotebookGlobalTime"
required:
Expand Down Expand Up @@ -11689,6 +11829,12 @@ components:
type: string
status:
$ref: "#/components/schemas/NotebookStatus"
template_variables:
description: List of template variables for this notebook.
items:
$ref: "#/components/schemas/NotebookTemplateVariable"
nullable: true
type: array
time:
$ref: "#/components/schemas/NotebookGlobalTime"
required:
Expand Down
42 changes: 42 additions & 0 deletions docs/datadog_api_client.v1.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3364,6 +3364,48 @@ datadog\_api\_client.v1.model.notebook\_status module
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_template\_variable module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.notebook_template_variable
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_template\_variable\_available\_values\_query module
-------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.notebook_template_variable_available_values_query
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_template\_variable\_available\_values\_query\_group\_by module
------------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.notebook_template_variable_available_values_query_group_by
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_template\_variable\_available\_values\_query\_log\_rum\_spans module
------------------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.notebook_template_variable_available_values_query_log_rum_spans
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_template\_variable\_available\_values\_query\_metrics module
----------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.notebook_template_variable_available_values_query_metrics
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_template\_variable\_available\_values\_query\_search module
---------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.notebook_template_variable_available_values_query_search
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_timeseries\_cell\_attributes module
---------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)
Expand All @@ -17,6 +18,7 @@
from datadog_api_client.v1.model.notebook_cell_create_request import NotebookCellCreateRequest
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
from datadog_api_client.v1.model.notebook_relative_time import NotebookRelativeTime
from datadog_api_client.v1.model.notebook_absolute_time import NotebookAbsoluteTime
Expand All @@ -35,13 +37,15 @@ def openapi_types(_):
from datadog_api_client.v1.model.notebook_cell_create_request import NotebookCellCreateRequest
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime

return {
"cells": ([NotebookCellCreateRequest],),
"metadata": (NotebookMetadata,),
"name": (str,),
"status": (NotebookStatus,),
"template_variables": ([NotebookTemplateVariable], none_type),
"time": (NotebookGlobalTime,),
}

Expand All @@ -50,6 +54,7 @@ def openapi_types(_):
"metadata": "metadata",
"name": "name",
"status": "status",
"template_variables": "template_variables",
"time": "time",
}

Expand All @@ -60,6 +65,7 @@ def __init__(
time: Union[NotebookGlobalTime, NotebookRelativeTime, NotebookAbsoluteTime],
metadata: Union[NotebookMetadata, UnsetType] = unset,
status: Union[NotebookStatus, UnsetType] = unset,
template_variables: Union[List[NotebookTemplateVariable], none_type, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -77,13 +83,18 @@ def __init__(
:param status: Publication status of the notebook. For now, always "published".
:type status: NotebookStatus, optional

:param template_variables: List of template variables for this notebook.
:type template_variables: [NotebookTemplateVariable], none_type, optional

:param time: Notebook global timeframe.
:type time: NotebookGlobalTime
"""
if metadata is not unset:
kwargs["metadata"] = metadata
if status is not unset:
kwargs["status"] = status
if template_variables is not unset:
kwargs["template_variables"] = template_variables
super().__init__(kwargs)

self_.cells = cells
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ModelNormal,
cached_property,
datetime,
none_type,
unset,
UnsetType,
)
Expand All @@ -19,6 +20,7 @@
from datadog_api_client.v1.model.notebook_cell_response import NotebookCellResponse
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
from datadog_api_client.v1.model.notebook_relative_time import NotebookRelativeTime
from datadog_api_client.v1.model.notebook_absolute_time import NotebookAbsoluteTime
Expand All @@ -38,6 +40,7 @@ def openapi_types(_):
from datadog_api_client.v1.model.notebook_cell_response import NotebookCellResponse
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime

return {
Expand All @@ -48,6 +51,7 @@ def openapi_types(_):
"modified": (datetime,),
"name": (str,),
"status": (NotebookStatus,),
"template_variables": ([NotebookTemplateVariable], none_type),
"time": (NotebookGlobalTime,),
}

Expand All @@ -59,6 +63,7 @@ def openapi_types(_):
"modified": "modified",
"name": "name",
"status": "status",
"template_variables": "template_variables",
"time": "time",
}
read_only_vars = {
Expand All @@ -76,6 +81,7 @@ def __init__(
metadata: Union[NotebookMetadata, UnsetType] = unset,
modified: Union[datetime, UnsetType] = unset,
status: Union[NotebookStatus, UnsetType] = unset,
template_variables: Union[List[NotebookTemplateVariable], none_type, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -102,6 +108,9 @@ def __init__(
:param status: Publication status of the notebook. For now, always "published".
:type status: NotebookStatus, optional

:param template_variables: List of template variables for this notebook.
:type template_variables: [NotebookTemplateVariable], none_type, optional

:param time: Notebook global timeframe.
:type time: NotebookGlobalTime
"""
Expand All @@ -115,6 +124,8 @@ def __init__(
kwargs["modified"] = modified
if status is not unset:
kwargs["status"] = status
if template_variables is not unset:
kwargs["template_variables"] = template_variables
super().__init__(kwargs)

self_.cells = cells
Expand Down
Loading
Loading