-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathazure_account.rb
More file actions
273 lines (224 loc) · 9.75 KB
/
azure_account.rb
File metadata and controls
273 lines (224 loc) · 9.75 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
=begin
#Datadog API V1 Collection
#Collection of all Datadog Public endpoints.
The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
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 2020-Present Datadog, Inc.
=end
require 'date'
require 'time'
module DatadogAPIClient::V1
# Datadog-Azure integrations configured for your organization.
class AzureAccount
include BaseGenericModel
# 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.
attr_accessor :app_service_plan_filters
# Silence monitors for expected Azure VM shutdowns.
attr_accessor :automute
# Your Azure web application ID.
attr_accessor :client_id
# Your Azure web application secret key.
attr_accessor :client_secret
# 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.
attr_accessor :container_app_filters
# 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.
attr_accessor :cspm_enabled
# Enable custom metrics for your organization.
attr_accessor :custom_metrics_enabled
# Errors in your configuration.
attr_accessor :errors
# 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.
attr_accessor :host_filters
# Enable Azure metrics for your organization.
attr_accessor :metrics_enabled
# Enable Azure metrics for your organization for resource providers where no resource provider config is specified.
attr_accessor :metrics_enabled_default
# Your New Azure web application ID.
attr_accessor :new_client_id
# Your New Azure Active Directory ID.
attr_accessor :new_tenant_name
# When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.
attr_accessor :resource_collection_enabled
# Configuration settings applied to resources from the specified Azure resource providers.
attr_accessor :resource_provider_configs
# Your Azure Active Directory ID.
attr_accessor :tenant_name
# Enable azure.usage metrics for your organization.
attr_accessor :usage_metrics_enabled
attr_accessor :additional_properties
# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.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'
}
end
# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'app_service_plan_filters' => :'String',
:'automute' => :'Boolean',
:'client_id' => :'String',
:'client_secret' => :'String',
:'container_app_filters' => :'String',
:'cspm_enabled' => :'Boolean',
:'custom_metrics_enabled' => :'Boolean',
:'errors' => :'Array<String>',
:'host_filters' => :'String',
:'metrics_enabled' => :'Boolean',
:'metrics_enabled_default' => :'Boolean',
:'new_client_id' => :'String',
:'new_tenant_name' => :'String',
:'resource_collection_enabled' => :'Boolean',
:'resource_provider_configs' => :'Array<ResourceProviderConfig>',
:'tenant_name' => :'String',
:'usage_metrics_enabled' => :'Boolean'
}
end
# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::AzureAccount` initialize method"
end
self.additional_properties = {}
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
self.additional_properties[k.to_sym] = v
else
h[k.to_sym] = v
end
}
if attributes.key?(:'app_service_plan_filters')
self.app_service_plan_filters = attributes[:'app_service_plan_filters']
end
if attributes.key?(:'automute')
self.automute = attributes[:'automute']
end
if attributes.key?(:'client_id')
self.client_id = attributes[:'client_id']
end
if attributes.key?(:'client_secret')
self.client_secret = attributes[:'client_secret']
end
if attributes.key?(:'container_app_filters')
self.container_app_filters = attributes[:'container_app_filters']
end
if attributes.key?(:'cspm_enabled')
self.cspm_enabled = attributes[:'cspm_enabled']
end
if attributes.key?(:'custom_metrics_enabled')
self.custom_metrics_enabled = attributes[:'custom_metrics_enabled']
end
if attributes.key?(:'errors')
if (value = attributes[:'errors']).is_a?(Array)
self.errors = value
end
end
if attributes.key?(:'host_filters')
self.host_filters = attributes[:'host_filters']
end
if attributes.key?(:'metrics_enabled')
self.metrics_enabled = attributes[:'metrics_enabled']
end
if attributes.key?(:'metrics_enabled_default')
self.metrics_enabled_default = attributes[:'metrics_enabled_default']
end
if attributes.key?(:'new_client_id')
self.new_client_id = attributes[:'new_client_id']
end
if attributes.key?(:'new_tenant_name')
self.new_tenant_name = attributes[:'new_tenant_name']
end
if attributes.key?(:'resource_collection_enabled')
self.resource_collection_enabled = attributes[:'resource_collection_enabled']
end
if attributes.key?(:'resource_provider_configs')
if (value = attributes[:'resource_provider_configs']).is_a?(Array)
self.resource_provider_configs = value
end
end
if attributes.key?(:'tenant_name')
self.tenant_name = attributes[:'tenant_name']
end
if attributes.key?(:'usage_metrics_enabled')
self.usage_metrics_enabled = attributes[:'usage_metrics_enabled']
end
end
# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end
hash[param] = _to_hash(value)
end
self.additional_properties.each_pair do |attr, value|
hash[attr] = value
end
hash
end
# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
app_service_plan_filters == o.app_service_plan_filters &&
automute == o.automute &&
client_id == o.client_id &&
client_secret == o.client_secret &&
container_app_filters == o.container_app_filters &&
cspm_enabled == o.cspm_enabled &&
custom_metrics_enabled == o.custom_metrics_enabled &&
errors == o.errors &&
host_filters == o.host_filters &&
metrics_enabled == o.metrics_enabled &&
metrics_enabled_default == o.metrics_enabled_default &&
new_client_id == o.new_client_id &&
new_tenant_name == o.new_tenant_name &&
resource_collection_enabled == o.resource_collection_enabled &&
resource_provider_configs == o.resource_provider_configs &&
tenant_name == o.tenant_name &&
usage_metrics_enabled == o.usage_metrics_enabled &&
additional_properties == o.additional_properties
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[app_service_plan_filters, automute, client_id, client_secret, container_app_filters, cspm_enabled, custom_metrics_enabled, errors, host_filters, metrics_enabled, metrics_enabled_default, new_client_id, new_tenant_name, resource_collection_enabled, resource_provider_configs, tenant_name, usage_metrics_enabled, additional_properties].hash
end
end
end