Skip to content

Commit

Permalink
Regenerate client from commit 175d99e4 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jul 1, 2024
1 parent 56ffb45 commit 4eef7e5
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-01 17:39:12.491494",
"spec_repo_commit": "acfbfe3f"
"regenerated": "2024-07-01 21:27:39.149935",
"spec_repo_commit": "175d99e4"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-01 17:39:12.508105",
"spec_repo_commit": "acfbfe3f"
"regenerated": "2024-07-01 21:27:39.166710",
"spec_repo_commit": "175d99e4"
}
}
}
23 changes: 23 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,8 @@ components:
Only hosts that match one of the defined tags are imported into Datadog.'
example: key:value,filter:example
type: string
metrics_config:
$ref: '#/components/schemas/AzureAccountMetricsConfig'
new_client_id:
description: Your New Azure web application ID.
example: new1c7f6-1234-5678-9101-3fcbf464test
Expand All @@ -864,6 +866,27 @@ components:
items:
$ref: '#/components/schemas/AzureAccount'
type: array
AzureAccountMetricsConfig:
description: 'Dictionary containing the key `excluded_resource_providers` which
has to be a list of Microsoft Azure Resource Provider names.

This feature is currently being beta tested.

In order to enable all resource providers for metric collection, pass:

`metrics_config: {"excluded_resource_providers": []}` (i.e., an empty list
for `excluded_resource_providers`).'
properties:
excluded_resource_providers:
description: List of Microsoft Azure Resource Providers to exclude from
metric collection.
example:
- Microsoft.Sql
- Microsoft.Cdn
items:
type: string
type: array
type: object
CancelDowntimesByScopeRequest:
description: Cancel downtimes according to scope.
properties:
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v1.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ azure\_account\_list\_response
:members:
:show-inheritance:

azure\_account\_metrics\_config
-------------------------------

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

cancel\_downtimes\_by\_scope\_request
-------------------------------------

Expand Down
7 changes: 7 additions & 0 deletions examples/v1/azure-integration/UpdateAzureHostFilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.azure_integration_api import AzureIntegrationApi
from datadog_api_client.v1.model.azure_account import AzureAccount
from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig

body = AzureAccount(
app_service_plan_filters="key:value,filter:example",
Expand All @@ -18,6 +19,12 @@
"*",
],
host_filters="key:value,filter:example",
metrics_config=AzureAccountMetricsConfig(
excluded_resource_providers=[
"Microsoft.Sql",
"Microsoft.Cdn",
],
),
new_client_id="new1c7f6-1234-5678-9101-3fcbf464test",
new_tenant_name="new1c44-1234-5678-9101-cc00736ftest",
resource_collection_enabled=True,
Expand Down
7 changes: 7 additions & 0 deletions examples/v1/azure-integration/UpdateAzureIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.azure_integration_api import AzureIntegrationApi
from datadog_api_client.v1.model.azure_account import AzureAccount
from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig

body = AzureAccount(
app_service_plan_filters="key:value,filter:example",
Expand All @@ -21,6 +22,12 @@
new_client_id="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
new_tenant_name="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
resource_collection_enabled=True,
metrics_config=AzureAccountMetricsConfig(
excluded_resource_providers=[
"Microsoft.Sql",
"Microsoft.Cdn",
],
),
tenant_name="9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
)

Expand Down
19 changes: 18 additions & 1 deletion src/datadog_api_client/v1/model/azure_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import List, Union
from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -13,9 +13,15 @@
)


if TYPE_CHECKING:
from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig


class AzureAccount(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig

return {
"app_service_plan_filters": (str,),
"automute": (bool,),
Expand All @@ -26,6 +32,7 @@ def openapi_types(_):
"custom_metrics_enabled": (bool,),
"errors": ([str],),
"host_filters": (str,),
"metrics_config": (AzureAccountMetricsConfig,),
"new_client_id": (str,),
"new_tenant_name": (str,),
"resource_collection_enabled": (bool,),
Expand All @@ -42,6 +49,7 @@ def openapi_types(_):
"custom_metrics_enabled": "custom_metrics_enabled",
"errors": "errors",
"host_filters": "host_filters",
"metrics_config": "metrics_config",
"new_client_id": "new_client_id",
"new_tenant_name": "new_tenant_name",
"resource_collection_enabled": "resource_collection_enabled",
Expand All @@ -59,6 +67,7 @@ def __init__(
custom_metrics_enabled: Union[bool, UnsetType] = unset,
errors: Union[List[str], UnsetType] = unset,
host_filters: Union[str, UnsetType] = unset,
metrics_config: Union[AzureAccountMetricsConfig, UnsetType] = unset,
new_client_id: Union[str, UnsetType] = unset,
new_tenant_name: Union[str, UnsetType] = unset,
resource_collection_enabled: Union[bool, UnsetType] = unset,
Expand Down Expand Up @@ -99,6 +108,12 @@ def __init__(
Only hosts that match one of the defined tags are imported into Datadog.
:type host_filters: str, optional
:param metrics_config: Dictionary containing the key ``excluded_resource_providers`` which has to be a list of Microsoft Azure Resource Provider names.
This feature is currently being beta tested.
In order to enable all resource providers for metric collection, pass:
``metrics_config: {"excluded_resource_providers": []}`` (i.e., an empty list for ``excluded_resource_providers`` ).
:type metrics_config: AzureAccountMetricsConfig, optional
:param new_client_id: Your New Azure web application ID.
:type new_client_id: str, optional
Expand Down Expand Up @@ -129,6 +144,8 @@ def __init__(
kwargs["errors"] = errors
if host_filters is not unset:
kwargs["host_filters"] = host_filters
if metrics_config is not unset:
kwargs["metrics_config"] = metrics_config
if new_client_id is not unset:
kwargs["new_client_id"] = new_client_id
if new_tenant_name is not unset:
Expand Down
39 changes: 39 additions & 0 deletions src/datadog_api_client/v1/model/azure_account_metrics_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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

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


class AzureAccountMetricsConfig(ModelNormal):
@cached_property
def openapi_types(_):
return {
"excluded_resource_providers": ([str],),
}

attribute_map = {
"excluded_resource_providers": "excluded_resource_providers",
}

def __init__(self_, excluded_resource_providers: Union[List[str], UnsetType] = unset, **kwargs):
"""
Dictionary containing the key ``excluded_resource_providers`` which has to be a list of Microsoft Azure Resource Provider names.
This feature is currently being beta tested.
In order to enable all resource providers for metric collection, pass:
``metrics_config: {"excluded_resource_providers": []}`` (i.e., an empty list for ``excluded_resource_providers`` ).
:param excluded_resource_providers: List of Microsoft Azure Resource Providers to exclude from metric collection.
:type excluded_resource_providers: [str], optional
"""
if excluded_resource_providers is not unset:
kwargs["excluded_resource_providers"] = excluded_resource_providers
super().__init__(kwargs)
2 changes: 2 additions & 0 deletions src/datadog_api_client/v1/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from datadog_api_client.v1.model.authentication_validation_response import AuthenticationValidationResponse
from datadog_api_client.v1.model.azure_account import AzureAccount
from datadog_api_client.v1.model.azure_account_list_response import AzureAccountListResponse
from datadog_api_client.v1.model.azure_account_metrics_config import AzureAccountMetricsConfig
from datadog_api_client.v1.model.cancel_downtimes_by_scope_request import CancelDowntimesByScopeRequest
from datadog_api_client.v1.model.canceled_downtimes_ids import CanceledDowntimesIds
from datadog_api_client.v1.model.change_widget_definition import ChangeWidgetDefinition
Expand Down Expand Up @@ -1026,6 +1027,7 @@
"AuthenticationValidationResponse",
"AzureAccount",
"AzureAccountListResponse",
"AzureAccountMetricsConfig",
"CancelDowntimesByScopeRequest",
"CanceledDowntimesIds",
"ChangeWidgetDefinition",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-02-28T20:25:59.931Z
2024-07-01T18:40:05.567Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17091519-0000-0000-0000-170915195900","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17091519-0000-0000-0000-170915195900","new_tenant_name":"17091519-0000-0000-0000-170915195900","resource_collection_enabled":true,"tenant_name":"17091519-0000-0000-0000-170915195900"}'
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17198592-0000-0000-0000-171985920500","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17198592-0000-0000-0000-171985920500","new_tenant_name":"17198592-0000-0000-0000-171985920500","resource_collection_enabled":true,"tenant_name":"17198592-0000-0000-0000-171985920500"}'
headers:
accept:
- application/json
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_id":"17091519-0000-0000-0000-170915195900","tenant_name":"17091519-0000-0000-0000-170915195900"}'
body: '{"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"}'
headers:
accept:
- application/json
Expand All @@ -40,7 +40,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_id":"17091519-0000-0000-0000-170915195900","tenant_name":"17091519-0000-0000-0000-170915195900"}'
body: '{"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"}'
headers:
accept:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-02-28T20:26:00.368Z
2024-07-01T18:40:05.942Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17091519-0000-0000-0000-170915196000","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17091519-0000-0000-0000-170915196000","new_tenant_name":"17091519-0000-0000-0000-170915196000","resource_collection_enabled":true,"tenant_name":"17091519-0000-0000-0000-170915196000"}'
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17198592-0000-0000-0000-171985920500","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17198592-0000-0000-0000-171985920500","new_tenant_name":"17198592-0000-0000-0000-171985920500","resource_collection_enabled":true,"tenant_name":"17198592-0000-0000-0000-171985920500"}'
headers:
accept:
- application/json
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17091519-0000-0000-0000-170915196000","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","new_client_id":"17091519-0000-0000-0000-170915196000","new_tenant_name":"17091519-0000-0000-0000-170915196000","resource_collection_enabled":true,"tenant_name":"17091519-0000-0000-0000-170915196000"}'
body: '{"app_service_plan_filters":"key:value,filter:example","automute":true,"client_id":"17198592-0000-0000-0000-171985920500","client_secret":"testingx./Sw*g/Y33t..R1cH+hScMDt","container_app_filters":"key:value,filter:example","cspm_enabled":true,"custom_metrics_enabled":true,"errors":["*"],"host_filters":"key:value,filter:example","metrics_config":{"excluded_resource_providers":["Microsoft.Sql","Microsoft.Cdn"]},"new_client_id":"17198592-0000-0000-0000-171985920500","new_tenant_name":"17198592-0000-0000-0000-171985920500","resource_collection_enabled":true,"tenant_name":"17198592-0000-0000-0000-171985920500"}'
headers:
accept:
- application/json
Expand All @@ -40,7 +40,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_id":"17091519-0000-0000-0000-170915196000","tenant_name":"17091519-0000-0000-0000-170915196000"}'
body: '{"client_id":"17198592-0000-0000-0000-171985920500","tenant_name":"17198592-0000-0000-0000-171985920500"}'
headers:
accept:
- application/json
Expand Down
Loading

0 comments on commit 4eef7e5

Please sign in to comment.