-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathazure_account.py
More file actions
178 lines (152 loc) · 7.92 KB
/
azure_account.py
File metadata and controls
178 lines (152 loc) · 7.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# 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.resource_provider_config import ResourceProviderConfig
class AzureAccount(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v1.model.resource_provider_config import ResourceProviderConfig
return {
"app_service_plan_filters": (str,),
"automute": (bool,),
"client_id": (str,),
"client_secret": (str,),
"container_app_filters": (str,),
"cspm_enabled": (bool,),
"custom_metrics_enabled": (bool,),
"errors": ([str],),
"host_filters": (str,),
"metrics_enabled": (bool,),
"metrics_enabled_default": (bool,),
"new_client_id": (str,),
"new_tenant_name": (str,),
"resource_collection_enabled": (bool,),
"resource_provider_configs": ([ResourceProviderConfig],),
"tenant_name": (str,),
"usage_metrics_enabled": (bool,),
}
attribute_map = {
"app_service_plan_filters": "app_service_plan_filters",
"automute": "automute",
"client_id": "client_id",
"client_secret": "client_secret",
"container_app_filters": "container_app_filters",
"cspm_enabled": "cspm_enabled",
"custom_metrics_enabled": "custom_metrics_enabled",
"errors": "errors",
"host_filters": "host_filters",
"metrics_enabled": "metrics_enabled",
"metrics_enabled_default": "metrics_enabled_default",
"new_client_id": "new_client_id",
"new_tenant_name": "new_tenant_name",
"resource_collection_enabled": "resource_collection_enabled",
"resource_provider_configs": "resource_provider_configs",
"tenant_name": "tenant_name",
"usage_metrics_enabled": "usage_metrics_enabled",
}
def __init__(
self_,
app_service_plan_filters: Union[str, UnsetType] = unset,
automute: Union[bool, UnsetType] = unset,
client_id: Union[str, UnsetType] = unset,
client_secret: Union[str, UnsetType] = unset,
container_app_filters: Union[str, UnsetType] = unset,
cspm_enabled: Union[bool, UnsetType] = unset,
custom_metrics_enabled: Union[bool, UnsetType] = unset,
errors: Union[List[str], UnsetType] = unset,
host_filters: Union[str, UnsetType] = unset,
metrics_enabled: Union[bool, UnsetType] = unset,
metrics_enabled_default: Union[bool, UnsetType] = unset,
new_client_id: Union[str, UnsetType] = unset,
new_tenant_name: Union[str, UnsetType] = unset,
resource_collection_enabled: Union[bool, UnsetType] = unset,
resource_provider_configs: Union[List[ResourceProviderConfig], UnsetType] = unset,
tenant_name: Union[str, UnsetType] = unset,
usage_metrics_enabled: Union[bool, UnsetType] = unset,
**kwargs,
):
"""
Datadog-Azure integrations configured for your organization.
:param app_service_plan_filters: Limit the Azure app service plans (and Consumption Function Apps) that are pulled into Datadog using tags.
Filtering an App Service Plan applies to all Apps running on that plan.
:type app_service_plan_filters: str, optional
:param automute: Silence monitors for expected Azure VM shutdowns.
:type automute: bool, optional
:param client_id: Your Azure web application ID.
:type client_id: str, optional
:param client_secret: Your Azure web application secret key.
:type client_secret: str, optional
:param container_app_filters: Limit the Azure container apps that are pulled into Datadog using tags.
Only container apps that match one of the defined tags are imported into Datadog.
:type container_app_filters: str, optional
:param cspm_enabled: When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration.
Note: This requires resource_collection_enabled to be set to true.
:type cspm_enabled: bool, optional
:param custom_metrics_enabled: Enable custom metrics for your organization.
:type custom_metrics_enabled: bool, optional
:param errors: Errors in your configuration.
:type errors: [str], optional
:param host_filters: Limit the Azure instances that are pulled into Datadog by using tags.
Only hosts that match one of the defined tags are imported into Datadog.
:type host_filters: str, optional
:param metrics_enabled: Enable Azure metrics for your organization.
:type metrics_enabled: bool, optional
:param metrics_enabled_default: Enable Azure metrics for your organization for resource providers where no resource provider config is specified.
:type metrics_enabled_default: bool, optional
:param new_client_id: Your New Azure web application ID.
:type new_client_id: str, optional
:param new_tenant_name: Your New Azure Active Directory ID.
:type new_tenant_name: str, optional
:param resource_collection_enabled: When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.
:type resource_collection_enabled: bool, optional
:param resource_provider_configs: Configuration settings applied to resources from the specified Azure resource providers.
:type resource_provider_configs: [ResourceProviderConfig], optional
:param tenant_name: Your Azure Active Directory ID.
:type tenant_name: str, optional
:param usage_metrics_enabled: Enable azure.usage metrics for your organization.
:type usage_metrics_enabled: bool, optional
"""
if app_service_plan_filters is not unset:
kwargs["app_service_plan_filters"] = app_service_plan_filters
if automute is not unset:
kwargs["automute"] = automute
if client_id is not unset:
kwargs["client_id"] = client_id
if client_secret is not unset:
kwargs["client_secret"] = client_secret
if container_app_filters is not unset:
kwargs["container_app_filters"] = container_app_filters
if cspm_enabled is not unset:
kwargs["cspm_enabled"] = cspm_enabled
if custom_metrics_enabled is not unset:
kwargs["custom_metrics_enabled"] = custom_metrics_enabled
if errors is not unset:
kwargs["errors"] = errors
if host_filters is not unset:
kwargs["host_filters"] = host_filters
if metrics_enabled is not unset:
kwargs["metrics_enabled"] = metrics_enabled
if metrics_enabled_default is not unset:
kwargs["metrics_enabled_default"] = metrics_enabled_default
if new_client_id is not unset:
kwargs["new_client_id"] = new_client_id
if new_tenant_name is not unset:
kwargs["new_tenant_name"] = new_tenant_name
if resource_collection_enabled is not unset:
kwargs["resource_collection_enabled"] = resource_collection_enabled
if resource_provider_configs is not unset:
kwargs["resource_provider_configs"] = resource_provider_configs
if tenant_name is not unset:
kwargs["tenant_name"] = tenant_name
if usage_metrics_enabled is not unset:
kwargs["usage_metrics_enabled"] = usage_metrics_enabled
super().__init__(kwargs)