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
118 changes: 118 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,123 @@ components:
type: string
x-enum-varnames:
- CHECK_STATUS
CloudcraftWidgetDefinition:
description: This widget displays a Cloudcraft topology of cloud resources for the selected provider.
properties:
custom_links:
description: List of custom links.
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
group_by:
description: List of tags or attributes used to group the cloud resources in the widget.
example:
- ""
items:
description: Tag or attribute used to group cloud resources.
type: string
type: array
highlighted:
description: Search query that visually highlights matching resources in the diagram.
example: ""
type: string
overlay:
$ref: "#/components/schemas/CloudcraftWidgetDefinitionOverlay"
overlay_filter:
description: Filter applied to the selected overlay.
example: ""
type: string
projection:
$ref: "#/components/schemas/CloudcraftWidgetDefinitionProjection"
provider:
$ref: "#/components/schemas/CloudcraftWidgetDefinitionProvider"
query_string:
description: Query string used to filter the cloud resources displayed in the widget.
example: ""
type: string
show_empty_groups:
description: Whether to show empty outline groups in the diagram.
example: false
type: boolean
title:
description: Title of your widget.
type: string
title_align:
$ref: "#/components/schemas/WidgetTextAlign"
title_size:
description: Size of the title.
type: string
type:
$ref: "#/components/schemas/CloudcraftWidgetDefinitionType"
required:
- type
- query_string
- provider
- overlay
- overlay_filter
- group_by
- projection
- highlighted
- show_empty_groups
type: object
CloudcraftWidgetDefinitionOverlay:
description: Overlay applied on top of the Cloudcraft topology.
enum:
- Observability
- CloudCost
- Security
- NDMReachability
- Monitors
- APM
- Default
example: Observability
type: string
x-enum-varnames:
- OBSERVABILITY
- CLOUD_COST
- SECURITY
- NDM_REACHABILITY
- MONITORS
- APM
- DEFAULT
CloudcraftWidgetDefinitionProjection:
description: Projection used to render the Cloudcraft topology.
enum:
- isometric
- 2d
example: isometric
type: string
x-enum-varnames:
- ISOMETRIC
- TWO_D
CloudcraftWidgetDefinitionProvider:
description: Cloud provider for the Cloudcraft widget.
enum:
- aws
- azure
- gcp
- ndm
- oci
example: aws
type: string
x-enum-varnames:
- AWS
- AZURE
- GCP
- NDM
- OCI
CloudcraftWidgetDefinitionType:
default: cloudcraft
description: Type of the Cloudcraft widget.
enum:
- cloudcraft
example: cloudcraft
type: string
x-enum-varnames:
- CLOUDCRAFT
CohortWidgetDefinition:
additionalProperties: false
description: The cohort widget visualizes user retention over time.
Expand Down Expand Up @@ -25592,6 +25709,7 @@ components:
- $ref: "#/components/schemas/BarChartWidgetDefinition"
- $ref: "#/components/schemas/ChangeWidgetDefinition"
- $ref: "#/components/schemas/CheckStatusWidgetDefinition"
- $ref: "#/components/schemas/CloudcraftWidgetDefinition"
- $ref: "#/components/schemas/CohortWidgetDefinition"
- $ref: "#/components/schemas/DistributionWidgetDefinition"
- $ref: "#/components/schemas/EventStreamWidgetDefinition"
Expand Down
35 changes: 35 additions & 0 deletions docs/datadog_api_client.v1.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,41 @@ datadog\_api\_client.v1.model.check\_status\_widget\_definition\_type module
:members:
:show-inheritance:

datadog\_api\_client.v1.model.cloudcraft\_widget\_definition module
-------------------------------------------------------------------

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

datadog\_api\_client.v1.model.cloudcraft\_widget\_definition\_overlay module
----------------------------------------------------------------------------

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

datadog\_api\_client.v1.model.cloudcraft\_widget\_definition\_projection module
-------------------------------------------------------------------------------

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

datadog\_api\_client.v1.model.cloudcraft\_widget\_definition\_provider module
-----------------------------------------------------------------------------

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

datadog\_api\_client.v1.model.cloudcraft\_widget\_definition\_type module
-------------------------------------------------------------------------

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

datadog\_api\_client.v1.model.cohort\_widget\_definition module
---------------------------------------------------------------

Expand Down
154 changes: 154 additions & 0 deletions src/datadog_api_client/v1/model/cloudcraft_widget_definition.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink
from datadog_api_client.v1.model.cloudcraft_widget_definition_overlay import CloudcraftWidgetDefinitionOverlay
from datadog_api_client.v1.model.cloudcraft_widget_definition_projection import CloudcraftWidgetDefinitionProjection
from datadog_api_client.v1.model.cloudcraft_widget_definition_provider import CloudcraftWidgetDefinitionProvider
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
from datadog_api_client.v1.model.cloudcraft_widget_definition_type import CloudcraftWidgetDefinitionType


class CloudcraftWidgetDefinition(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink
from datadog_api_client.v1.model.cloudcraft_widget_definition_overlay import CloudcraftWidgetDefinitionOverlay
from datadog_api_client.v1.model.cloudcraft_widget_definition_projection import (
CloudcraftWidgetDefinitionProjection,
)
from datadog_api_client.v1.model.cloudcraft_widget_definition_provider import CloudcraftWidgetDefinitionProvider
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
from datadog_api_client.v1.model.cloudcraft_widget_definition_type import CloudcraftWidgetDefinitionType

return {
"custom_links": ([WidgetCustomLink],),
"description": (str,),
"group_by": ([str],),
"highlighted": (str,),
"overlay": (CloudcraftWidgetDefinitionOverlay,),
"overlay_filter": (str,),
"projection": (CloudcraftWidgetDefinitionProjection,),
"provider": (CloudcraftWidgetDefinitionProvider,),
"query_string": (str,),
"show_empty_groups": (bool,),
"title": (str,),
"title_align": (WidgetTextAlign,),
"title_size": (str,),
"type": (CloudcraftWidgetDefinitionType,),
}

attribute_map = {
"custom_links": "custom_links",
"description": "description",
"group_by": "group_by",
"highlighted": "highlighted",
"overlay": "overlay",
"overlay_filter": "overlay_filter",
"projection": "projection",
"provider": "provider",
"query_string": "query_string",
"show_empty_groups": "show_empty_groups",
"title": "title",
"title_align": "title_align",
"title_size": "title_size",
"type": "type",
}

def __init__(
self_,
group_by: List[str],
highlighted: str,
overlay: CloudcraftWidgetDefinitionOverlay,
overlay_filter: str,
projection: CloudcraftWidgetDefinitionProjection,
provider: CloudcraftWidgetDefinitionProvider,
query_string: str,
show_empty_groups: bool,
type: CloudcraftWidgetDefinitionType,
custom_links: Union[List[WidgetCustomLink], UnsetType] = unset,
description: Union[str, UnsetType] = unset,
title: Union[str, UnsetType] = unset,
title_align: Union[WidgetTextAlign, UnsetType] = unset,
title_size: Union[str, UnsetType] = unset,
**kwargs,
):
"""
This widget displays a Cloudcraft topology of cloud resources for the selected provider.

:param custom_links: List of custom links.
:type custom_links: [WidgetCustomLink], optional

:param description: The description of the widget.
:type description: str, optional

:param group_by: List of tags or attributes used to group the cloud resources in the widget.
:type group_by: [str]

:param highlighted: Search query that visually highlights matching resources in the diagram.
:type highlighted: str

:param overlay: Overlay applied on top of the Cloudcraft topology.
:type overlay: CloudcraftWidgetDefinitionOverlay

:param overlay_filter: Filter applied to the selected overlay.
:type overlay_filter: str

:param projection: Projection used to render the Cloudcraft topology.
:type projection: CloudcraftWidgetDefinitionProjection

:param provider: Cloud provider for the Cloudcraft widget.
:type provider: CloudcraftWidgetDefinitionProvider

:param query_string: Query string used to filter the cloud resources displayed in the widget.
:type query_string: str

:param show_empty_groups: Whether to show empty outline groups in the diagram.
:type show_empty_groups: bool

:param title: Title of your widget.
:type title: str, optional

:param title_align: How to align the text on the widget.
:type title_align: WidgetTextAlign, optional

:param title_size: Size of the title.
:type title_size: str, optional

:param type: Type of the Cloudcraft widget.
:type type: CloudcraftWidgetDefinitionType
"""
if custom_links is not unset:
kwargs["custom_links"] = custom_links
if description is not unset:
kwargs["description"] = description
if title is not unset:
kwargs["title"] = title
if title_align is not unset:
kwargs["title_align"] = title_align
if title_size is not unset:
kwargs["title_size"] = title_size
super().__init__(kwargs)

self_.group_by = group_by
self_.highlighted = highlighted
self_.overlay = overlay
self_.overlay_filter = overlay_filter
self_.projection = projection
self_.provider = provider
self_.query_string = query_string
self_.show_empty_groups = show_empty_groups
self_.type = type
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class CloudcraftWidgetDefinitionOverlay(ModelSimple):
"""
Overlay applied on top of the Cloudcraft topology.

:param value: Must be one of ["Observability", "CloudCost", "Security", "NDMReachability", "Monitors", "APM", "Default"].
:type value: str
"""

allowed_values = {
"Observability",
"CloudCost",
"Security",
"NDMReachability",
"Monitors",
"APM",
"Default",
}
OBSERVABILITY: ClassVar["CloudcraftWidgetDefinitionOverlay"]
CLOUD_COST: ClassVar["CloudcraftWidgetDefinitionOverlay"]
SECURITY: ClassVar["CloudcraftWidgetDefinitionOverlay"]
NDM_REACHABILITY: ClassVar["CloudcraftWidgetDefinitionOverlay"]
MONITORS: ClassVar["CloudcraftWidgetDefinitionOverlay"]
APM: ClassVar["CloudcraftWidgetDefinitionOverlay"]
DEFAULT: ClassVar["CloudcraftWidgetDefinitionOverlay"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


CloudcraftWidgetDefinitionOverlay.OBSERVABILITY = CloudcraftWidgetDefinitionOverlay("Observability")
CloudcraftWidgetDefinitionOverlay.CLOUD_COST = CloudcraftWidgetDefinitionOverlay("CloudCost")
CloudcraftWidgetDefinitionOverlay.SECURITY = CloudcraftWidgetDefinitionOverlay("Security")
CloudcraftWidgetDefinitionOverlay.NDM_REACHABILITY = CloudcraftWidgetDefinitionOverlay("NDMReachability")
CloudcraftWidgetDefinitionOverlay.MONITORS = CloudcraftWidgetDefinitionOverlay("Monitors")
CloudcraftWidgetDefinitionOverlay.APM = CloudcraftWidgetDefinitionOverlay("APM")
CloudcraftWidgetDefinitionOverlay.DEFAULT = CloudcraftWidgetDefinitionOverlay("Default")
Loading
Loading